diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/Allclean b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/Allclean new file mode 100755 index 0000000000..1d69dc999c --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/Allclean @@ -0,0 +1,8 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +##. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions + +(cd background && ./Allclean) +(cd floatingBody && ./Allclean) + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/Allrun b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/Allrun new file mode 100755 index 0000000000..6699724457 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/Allrun @@ -0,0 +1,8 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions + +./Allrun.pre +(cd background && runApplication $(getApplication)) + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/Allrun.pre b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/Allrun.pre new file mode 100755 index 0000000000..ef286ecbfa --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/Allrun.pre @@ -0,0 +1,11 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions + +# mesh floating body +(cd floatingBody && ./Allrun.pre) + +# Add background mesh +(cd background && ./Allrun.pre) + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/0.orig/U b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/0.orig/U new file mode 100644 index 0000000000..b9ffc93fcf --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/0.orig/U @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + oversetPatch + { + type overset; + } + + overset + { + patchType overset; + type zeroGradient; + } + + stationaryWalls + { + type pressureInletOutletVelocity; + value uniform (0 0 0); + } + sidePatch + { + type pressureInletOutletVelocity; + value uniform (0 0 0); + } + atmosphere + { + type pressureInletOutletVelocity; + value uniform (0 0 0); + } + floatingObject + { + type movingWallVelocity; + value uniform (0 0 0); + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/0.orig/alpha.water b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/0.orig/alpha.water new file mode 100644 index 0000000000..566920c9e4 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/0.orig/alpha.water @@ -0,0 +1,65 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object alpha.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + oversetPatch + { + type overset; + } + + sides + { + type overset; + } + + stationaryWalls + { + type variableHeightFlowRate; + lowerBound 0; + upperBound 1; + value uniform 0; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } + floatingObject + { +// type variableHeightFlowRate; +// lowerBound 0; +// upperBound 1; +// value uniform 0; + type zeroGradient; + } + sidePatch + { + type variableHeightFlowRate; + lowerBound 0; + upperBound 1; + value uniform 0; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/0.orig/epsilon b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/0.orig/epsilon new file mode 100644 index 0000000000..c26efa5348 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/0.orig/epsilon @@ -0,0 +1,55 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 0.1; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + stationaryWalls + { + type inletOutlet; + inletValue uniform 0.1; + value uniform 0.1; + } + "(atmosphere|sidePatch)" + { + type inletOutlet; + inletValue uniform 0.1; + value uniform 0.1; + } + floatingObject + { + type epsilonWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0.1; + } + overset + { + type overset; + } + oversetPatch + { + type overset; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/0.orig/k b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/0.orig/k new file mode 100644 index 0000000000..45e3f75294 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/0.orig/k @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0.01; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + stationaryWalls + { + type inletOutlet; + inletValue uniform 0.01; + value uniform 0.01; + } + "(atmosphere|sidePatch)" + { + type inletOutlet; + inletValue uniform 0.01; + value uniform 0.01; + } + floatingObject + { + type kqRWallFunction; + value uniform 0.01; + } + overset + { + type overset; + } + oversetPatch + { + type overset; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/0.orig/nut b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/0.orig/nut new file mode 100644 index 0000000000..2e56272c92 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/0.orig/nut @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + stationaryWalls + { + type calculated; + value uniform 0; + } + "(atmosphere|sidePatch)" + { + type calculated; + value uniform 0; + } + floatingObject + { + type nutkWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + overset + { + patchType overset; + type zeroGradient; + } + oversetPatch + { + type overset; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/0.orig/p_rgh b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/0.orig/p_rgh new file mode 100644 index 0000000000..922a4369cd --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/0.orig/p_rgh @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + oversetPatch + { + type overset; + } + "(stationaryWalls|sidePatch)" + { + type fixedFluxPressure; + } + atmosphere + { + type totalPressure; + p0 uniform 0; + U U; + phi phi; + rho rho; + psi none; + gamma 1; + value uniform 0; + } + floatingObject + { + type fixedFluxPressure; + } + overset + { + patchType overset; + type overset; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/0.orig/pointDisplacement b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/0.orig/pointDisplacement new file mode 100644 index 0000000000..e7d4be2af5 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/0.orig/pointDisplacement @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class pointVectorField; + object pointDisplacement; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 0 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + stationaryWalls + { + type calculated; + value uniform (0 0 0); + } + "(atmosphere|sidePatch)" + { + type calculated; + value uniform (0 0 0); + } + floatingObject + { + type calculated; + value uniform (0 0 0); + } + oversetPatch + { + patchType overset; + type zeroGradient; + } + sides + { + patchType overset; + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/0.orig/zoneID b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/0.orig/zoneID new file mode 100644 index 0000000000..8c2a64b1d8 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/0.orig/zoneID @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object zoneID; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + "(stationaryWalls|sidePatch)" + { + type zeroGradient; + } + atmosphere + { + type zeroGradient; + } + floatingObject + { + type zeroGradient; + } + oversetPatch + { + patchType overset; + type zeroGradient; + } + + sides + { + patchType overset; + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/Allclean b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/Allclean new file mode 100755 index 0000000000..e2f275d9fd --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/Allclean @@ -0,0 +1,7 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions + +cleanCase0 + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/Allrun.pre b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/Allrun.pre new file mode 100755 index 0000000000..9a44881018 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/Allrun.pre @@ -0,0 +1,19 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions + +# Create background mesh +runApplication blockMesh + +# Add the cylinder mesh +runApplication mergeMeshes . ../floatingBody -overwrite + +# Select cellSets for the different zones +runApplication topoSet + +restore0Dir + +# Use cellSets to write zoneID +runApplication setFields + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/constant/dynamicMeshDict b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/constant/dynamicMeshDict new file mode 100644 index 0000000000..5c731ae947 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/constant/dynamicMeshDict @@ -0,0 +1,118 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object dynamicMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + + +dynamicFvMesh dynamicOversetFvMesh; + +solvers +{ + VF + { + motionSolverLibs ("libfvMotionSolvers.so" ); + + motionSolver solidBody; + solidBodyMotionFunction drivenLinearMotion; + + cellSet c0; + CofGvelocity CofG; + normal (0 0 1); + } + + cube + { + motionSolverLibs ("libsixDoFRigidBodyMotion.so"); + motionSolver sixDoFRigidBodyMotion; + + cellSet c1; + + patches (floatingObject); + innerDistance 1000.0; + outerDistance 1001.0; + + centreOfMass (0.5 0.5 0.4); + CofGvelocity CofG; + + // Cuboid dimensions + Lx 0.24; + Ly 0.24; + Lz 0.4; + + // Density of the solid + rhoSolid 500; + + // Cuboid mass + mass #calc "$rhoSolid*$Lx*$Ly*$Lz"; + + // Cuboid moment of inertia about the centre of mass + momentOfInertia #codeStream + { + codeInclude + #{ + #include "diagTensor.H" + #}; + + code + #{ + scalar sqrLx = sqr($Lx); + scalar sqrLy = sqr($Ly); + scalar sqrLz = sqr($Lz); + os << + $mass + *diagTensor(sqrLy + sqrLz, sqrLx + sqrLz, sqrLx + sqrLy)/12.0; + #}; + }; + + report on; + accelerationRelaxation 0.6; + accelerationDamping 1; + + solver + { + type Newmark; + } + + constraints + { + + fixedAxis + { + sixDoFRigidBodyMotionConstraint plane; + normal (0 0 1); + } + } + + restraints + { + + linearSpring + { + sixDoFRigidBodyMotionRestraint linearSpring; + anchor (0 0.5 0.4); + refAttachmentPt (0.5 0.5 0.4); + stiffness 100; + damping 0; + restLength 0; + } + + } + } + + + +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/constant/g b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/constant/g new file mode 100644 index 0000000000..d0c94ed348 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/constant/g @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedVectorField; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value ( 0 0 -9.81 ); + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/constant/transportProperties b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/constant/transportProperties new file mode 100644 index 0000000000..12821b4ed4 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/constant/transportProperties @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +phases (water air); + +water +{ + transportModel Newtonian; + nu nu [ 0 2 -1 0 0 0 0 ] 1e-06; + rho rho [ 1 -3 0 0 0 0 0 ] 998.2; +} + +air +{ + transportModel Newtonian; + nu nu [ 0 2 -1 0 0 0 0 ] 1.48e-05; + rho rho [ 1 -3 0 0 0 0 0 ] 1; +} + +sigma sigma [ 1 0 -2 0 0 0 0 ] 0.007; + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/constant/turbulenceProperties b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/constant/turbulenceProperties new file mode 100644 index 0000000000..d6a25264c3 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/constant/turbulenceProperties @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/system/blockMeshDict b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/system/blockMeshDict new file mode 100644 index 0000000000..06c2e6faa2 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/system/blockMeshDict @@ -0,0 +1,83 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +scale 1; + +vertices +( + (-0.2 -0.2 -0.2) + (1.2 -0.2 -0.2) + (1.2 1.2 -0.2) + (-0.2 1.2 -0.2) + (-0.2 -0.2 1) + (1.2 -0.2 1) + (1.2 1.2 1) + (-0.2 1.2 1) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (80 80 70) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + // Dummy patch to trigger overset interpolation before any other + // bcs + oversetPatch + { + type overset; + faces (); + } + + stationaryWalls + { + type wall; + faces + ( + (0 3 2 1) + ); + } + sidePatch + { + type patch; + faces + ( + (2 6 5 1) + (1 5 4 0) + (3 7 6 2) + (0 4 7 3) + ); + } + atmosphere + { + type patch; + faces + ( + (4 5 6 7) + ); + } +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/system/controlDict b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/system/controlDict new file mode 100644 index 0000000000..2e03641fd4 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/system/controlDict @@ -0,0 +1,65 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +libs ("liboverset.so" "libfvMotionSolvers.so"); + +DebugSwitches +{ + cellVolumeWeight 0; + drivenLinearMotion 0; +} + +application overInterDyMFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 5; + +deltaT 0.0005; + +writeControl adjustableRunTime; + +writeInterval 0.05; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 12; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep yes; + +maxCo 5.0; +maxAlphaCo 2.0; +maxDeltaT 0.1; + +functions +{ +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/system/decomposeParDict b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/system/decomposeParDict new file mode 100644 index 0000000000..655b19ad53 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/system/decomposeParDict @@ -0,0 +1,26 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 8; + +method scotch; + +coeffs +{ + n (2 2 2); +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/system/fvSchemes b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/system/fvSchemes new file mode 100644 index 0000000000..e2181edaeb --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/system/fvSchemes @@ -0,0 +1,74 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + div(rhoPhi,U) Gauss upwind; + div(U) Gauss linear; + div(phi,alpha) Gauss vanLeer; + div(phirb,alpha) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; + + div(phi,k) Gauss upwind; + div(phi,epsilon) Gauss upwind; + div(phi,omega) Gauss upwind; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +oversetInterpolation +{ + method inverseDistance;//cellVolumeWeight +} + +oversetInterpolationSuppressed +{ + grad(p_rgh); + surfaceIntegrate(phiHbyA); +} + +fluxRequired +{ + default no; + p_rgh; + pcorr; + alpha.water; +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/system/fvSolution b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/system/fvSolution new file mode 100644 index 0000000000..91778a6d1b --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/system/fvSolution @@ -0,0 +1,108 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + + "cellDisplacement.*" + { + solver PCG; + preconditioner DIC; + + tolerance 1e-06; + relTol 0; + maxIter 100; + } + + "alpha.water.*" + { + nAlphaCorr 2; + nAlphaSubCycles 2; + cAlpha 1; + icAlpha 0; + + MULESCorr yes; + nLimiterIter 5; + alphaApplyPrevCorr no; + + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-8; + relTol 0; + } + + "pcorr.*" + { + solver PCG; + preconditioner DIC; + tolerance 1e-9; + relTol 0; + } + + p_rgh + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-9; + relTol 0.01; + } + + p_rghFinal + { + $p_rgh; + relTol 0; + } + + "(U|k|omega|epsilon).*" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-08; + relTol 0; + } +} + +PIMPLE +{ + momentumPredictor no; + nOuterCorrectors 1; + nCorrectors 3; + nNonOrthogonalCorrectors 0; + + ddtCorr yes; + correctPhi no; + checkMeshCourantNo no; + + moveMeshOuterCorrectors no; + turbOnFinalIterOnly no; + oversetAdjustPhi no; +} + +relaxationFactors +{ + fields + { + } + equations + { + ".*" 1; + } +} + +cache +{} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/system/setFieldsDict b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/system/setFieldsDict new file mode 100644 index 0000000000..546c0196a3 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/system/setFieldsDict @@ -0,0 +1,65 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue alpha.water 0 + volScalarFieldValue zoneID 123 +); + +regions +( + boxToCell + { + box ( -100 -100 -100 ) ( 100 100 0.5368 ); + fieldValues ( volScalarFieldValue alpha.water 1 ); + } + + boxToFace + { + box ( -100 -100 -100 ) ( 100 100 0.5368 ); + fieldValues ( volScalarFieldValue alpha.water 1 ); + } + /* + boxToCell + { + box ( 0.9 0.9 -100 ) ( 100 100 0.75 ); + fieldValues ( volScalarFieldValue alpha.water 1 ); + } + */ + + cellToCell + { + set c0; + + fieldValues + ( + volScalarFieldValue zoneID 0 + ); + } + cellToCell + { + set c1; + + fieldValues + ( + volScalarFieldValue zoneID 1 + ); + } + +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/system/topoSetDict b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/system/topoSetDict new file mode 100644 index 0000000000..2ac1e2d23b --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/background/system/topoSetDict @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object topoSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name c0; + type cellSet; + action new; + source regionToCell; + insidePoints ((0.1 0.1 0.1)); + } + + { + name c1; + type cellSet; + action new; + source cellToCell; + set c0; + } + + { + name c1; + type cellSet; + action invert; + } +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/floatingBody/Allclean b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/floatingBody/Allclean new file mode 100755 index 0000000000..e2f275d9fd --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/floatingBody/Allclean @@ -0,0 +1,7 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions + +cleanCase0 + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/floatingBody/Allrun.pre b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/floatingBody/Allrun.pre new file mode 100755 index 0000000000..8142d7c389 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/floatingBody/Allrun.pre @@ -0,0 +1,9 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions + +runApplication blockMesh +runApplication topoSet +runApplication subsetMesh -overwrite c0 -patch floatingObject + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/floatingBody/system/blockMeshDict b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/floatingBody/system/blockMeshDict new file mode 100644 index 0000000000..a6c6853051 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/floatingBody/system/blockMeshDict @@ -0,0 +1,62 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +scale 1; + +vertices +( + (0.2 0.2 0.1) + (0.8 0.2 0.1) + (0.8 0.8 0.1) + (0.2 0.8 0.1) + (0.2 0.2 0.8) + (0.8 0.2 0.8) + (0.8 0.8 0.8) + (0.2 0.8 0.8) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (40 40 45) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + sides + { + type overset; + faces + ( + (0 3 2 1) + (2 6 5 1) + (1 5 4 0) + (3 7 6 2) + (0 4 7 3) + (4 5 6 7) + ); + } + floatingObject + { + type wall; + faces (); + } +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/floatingBody/system/controlDict b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/floatingBody/system/controlDict new file mode 100644 index 0000000000..1de9891a17 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/floatingBody/system/controlDict @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application subsetMesh; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 6; + +deltaT 0.01; + +writeControl adjustableRunTime; + +writeInterval 0.1; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 12; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep yes; + +maxCo 1; +maxAlphaCo 1; +maxDeltaT 1; + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/floatingBody/system/fvSchemes b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/floatingBody/system/fvSchemes new file mode 100644 index 0000000000..86cc4f87e5 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/floatingBody/system/fvSchemes @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + div(rhoPhi,U) Gauss vanLeerV; + div(phi,alpha) Gauss vanLeer; + div(phirb,alpha) Gauss linear; + div(phi,k) Gauss upwind; + div(phi,epsilon) Gauss upwind; + div((muEff*dev(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +fluxRequired +{ + default no; + p_rgh; + pcorr; + alpha.water; +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/floatingBody/system/fvSolution b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/floatingBody/system/fvSolution new file mode 100644 index 0000000000..7a5578fc4f --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/floatingBody/system/fvSolution @@ -0,0 +1,137 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + "alpha.water.*" + { + nAlphaCorr 1; + nAlphaSubCycles 1; + cAlpha 1; + + MULESCorr yes; + nLimiterIter 5; + alphaApplyPrevCorr true; + + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-8; + relTol 0; + } + + "pcorr.*" + { + solver PCG; + preconditioner + { + preconditioner GAMG; + tolerance 1e-5; + relTol 0; + smoother DICGaussSeidel; + nPreSweeps 0; + nPostSweeps 2; + nFinestSweeps 2; + cacheAgglomeration false; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + } + + tolerance 1e-05; + relTol 0; + maxIter 100; + } + + p_rgh + { + solver GAMG; + tolerance 1e-8; + relTol 0.01; + smoother DIC; + nPreSweeps 0; + nPostSweeps 2; + nFinestSweeps 2; + cacheAgglomeration true; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + } + + p_rghFinal + { + solver PCG; + preconditioner + { + preconditioner GAMG; + tolerance 1e-8; + relTol 0; + nVcycles 2; + smoother DICGaussSeidel; + nPreSweeps 2; + nPostSweeps 2; + nFinestSweeps 2; + cacheAgglomeration true; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + } + + tolerance 1e-8; + relTol 0; + maxIter 20; + } + + "(U|k|epsilon)" + { + solver smoothSolver; + smoother GaussSeidel; + tolerance 1e-6; + relTol 0.1; + nSweeps 1; + } + + "(U|k|epsilon)Final" + { + solver smoothSolver; + smoother GaussSeidel; + tolerance 1e-6; + relTol 0; + nSweeps 1; + } +} + +PIMPLE +{ + momentumPredictor no; + nOuterCorrectors 5; + nCorrectors 1; + nNonOrthogonalCorrectors 0; + correctPhi yes; + moveMeshOuterCorrectors yes; +} + +relaxationFactors +{ + fields + { + } + equations + { + ".*" 1; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/floatingBody/system/setFieldsDict b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/floatingBody/system/setFieldsDict new file mode 100644 index 0000000000..9f00800ce5 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/floatingBody/system/setFieldsDict @@ -0,0 +1,37 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue alpha.water 0 +); + +regions +( + boxToCell + { + box ( -100 -100 -100 ) ( 100 100 0.5368 ); + fieldValues ( volScalarFieldValue alpha.water 1 ); + } + + boxToCell + { + box ( 0.7 0.8 -100 ) ( 100 100 0.65 ); + fieldValues ( volScalarFieldValue alpha.water 1 ); + } +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/floatingBody/system/topoSetDict b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/floatingBody/system/topoSetDict new file mode 100644 index 0000000000..9859faeb9f --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/floatingBodyWithSpring/floatingBody/system/topoSetDict @@ -0,0 +1,34 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object topoSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name c0; + type cellSet; + action new; + source boxToCell; + box (0.38 0.38 0.2) (0.62 0.62 0.6); + } + + { + name c0; + type cellSet; + action invert; + } +); + +// ************************************************************************* //