diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allclean b/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allclean new file mode 100755 index 0000000000000000000000000000000000000000..2cd0673fdd5e684d4862ad4f10019588b8c5d95a --- /dev/null +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allclean @@ -0,0 +1,10 @@ +#!/bin/sh + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +rm system/cellSetDict > /dev/null 2>&1 +rm -rf 0 > /dev/null 2>&1 + +cleanCase + diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allrun b/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..1bece85bd98222c0358d809de9c9d3033aeda6c4 --- /dev/null +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allrun @@ -0,0 +1,27 @@ +#!/bin/sh + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +# Set application name +application="interDyMFoam" + +makeMeshByCellSet() +{ + while [ $# -ge 1 ] + do + echo "Running cellSet operation $1" + cp system/cellSetDict.$1 system/cellSetDict + cellSet > log.cellSet.$1 2>&1 + shift + done +} + +runApplication blockMesh +makeMeshByCellSet 1 2 +runApplication subsetMesh -overwrite c0 -patch floatingObject +cp -r 0.orig 0 > /dev/null 2>&1 +runApplication setFields +runApplication $application + +# ----------------------------------------------------------------------------- diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/RASProperties b/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/RASProperties new file mode 100644 index 0000000000000000000000000000000000000000..81b1ec9115226882e6e980b8e5f4e19cabb886d9 --- /dev/null +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/RASProperties @@ -0,0 +1,25 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object RASProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RASModel kEpsilon; + +turbulence on; + +printCoeffs on; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/dynamicMeshDict b/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/dynamicMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..083baf725a14ecb9787708faf739d7e859f6172e --- /dev/null +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/dynamicMeshDict @@ -0,0 +1,26 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object motionProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dynamicFvMesh dynamicMotionSolverFvMesh; + +motionSolverLibs ("libfvMotionSolvers.so"); + +solver displacementLaplacian; + +diffusivity inverseDistance (floatingObject); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/g b/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/g new file mode 100644 index 0000000000000000000000000000000000000000..317bdd50defb2d1a2717ce5c7b4467cf9fd14264 --- /dev/null +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value ( 0 0 -9.81 ); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/polyMesh/blockMeshDict b/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/polyMesh/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..611466bb780fc9e54585ddbdbe160ad492fde813 --- /dev/null +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/polyMesh/blockMeshDict @@ -0,0 +1,62 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +vertices +( + (0 0 0) + (1 0 0) + (1 1 0) + (0 1 0) + (0 0 1) + (1 0 1) + (1 1 1) + (0 1 1) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (40 40 60) simpleGrading (1 1 1) +); + +edges +( +); + +patches +( + wall stationaryWalls + ( + (0 3 2 1) + (2 6 5 1) + (1 5 4 0) + (3 7 6 2) + (0 4 7 3) + ) + patch atmosphere + ( + (4 5 6 7) + ) + wall floatingObject + () +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/polyMesh/boundary b/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/polyMesh/boundary new file mode 100644 index 0000000000000000000000000000000000000000..62fd629b04d8486450a703d16f705cc5a0a987ac --- /dev/null +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/polyMesh/boundary @@ -0,0 +1,40 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +3 +( + stationaryWalls + { + type wall; + nFaces 11200; + startFace 277808; + } + atmosphere + { + type patch; + nFaces 1600; + startFace 289008; + } + floatingObject + { + type wall; + nFaces 672; + startFace 290608; + } +) + +// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/transportProperties b/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/transportProperties new file mode 100644 index 0000000000000000000000000000000000000000..6a2e70e1c4280ebd53d4ada91293b41d817271f6 --- /dev/null +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/transportProperties @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +phase1 +{ + transportModel Newtonian; + nu nu [ 0 2 -1 0 0 0 0 ] 1e-06; + rho rho [ 1 -3 0 0 0 0 0 ] 998.2; +} + +phase2 +{ + 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; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/turbulenceProperties b/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/turbulenceProperties new file mode 100644 index 0000000000000000000000000000000000000000..e94c3c747331a9df223b57641173f3f8e8185a15 --- /dev/null +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/turbulenceProperties @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RASModel; + +// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/cellSetDict.1 b/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/cellSetDict.1 new file mode 100644 index 0000000000000000000000000000000000000000..90a225e6a9a91a84eb563e3ddfb54503a4b4d8d7 --- /dev/null +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/cellSetDict.1 @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object cellSetDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +name c0; + +action new; + +topoSetSources +( + boxToCell + { + box (0.35 0.35 0.44) (0.65 0.65 0.56); + } +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/cellSetDict.2 b/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/cellSetDict.2 new file mode 100644 index 0000000000000000000000000000000000000000..57cc0658f727238910e5a2351eae60f342221ff0 --- /dev/null +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/cellSetDict.2 @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object cellSetDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +name c0; + +action invert; + +topoSetSources (); + +// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/controlDict b/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..efcb76277a25448889bdf8fb1b57de9aebafba0c --- /dev/null +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/controlDict @@ -0,0 +1,56 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application interDyMFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 6; + +deltaT 0.01; + +writeControl adjustableRunTime; + +writeInterval 0.025; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 12; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep yes; + +maxCo 0.2; + +maxDeltaT 0.025; + +libs ("libincompressibleRASModels.so" "libfvMotionSolvers.so"); + +// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/decomposeParDict b/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..2a513989c06496d892c421259c6312431ee03d23 --- /dev/null +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/decomposeParDict @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +method hierarchical; + +simpleCoeffs +{ + n ( 2 2 1 ); + delta 0.001; +} + +hierarchicalCoeffs +{ + n ( 2 2 1 ); + delta 0.001; + order xyz; +} + +metisCoeffs +{ + processorWeights ( 1 1 1 1 ); +} + +manualCoeffs +{ + dataFile ""; +} + +distributed no; + +roots ( ); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..aa863122a1cd30a7c93ca9c3061035a8b1d02568 --- /dev/null +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/fvSchemes @@ -0,0 +1,61 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + div(rho*phi,U) Gauss vanLeerV; + div(phi,alpha) Gauss vanLeer; + div(phirb,alpha) Gauss vanLeer; + div(phi,k) Gauss upwind; + div(phi,epsilon) Gauss upwind; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +fluxRequired +{ + default no; + p; + pcorr; + alpha; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/fvSolution b/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..bbe6b39db4c5ac879a9d67cc11fad5888a0bcf90 --- /dev/null +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/fvSolution @@ -0,0 +1,129 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + cellDisplacement + { + solver GAMG; + tolerance 1e-08; + relTol 0; + smoother GaussSeidel; + cacheAgglomeration true; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + } + + pcorr + { + solver PCG; + preconditioner + { + preconditioner GAMG; + tolerance 1e-05; + relTol 0; + smoother DICGaussSeidel; + nPreSweeps 0; + nPostSweeps 2; + nBottomSweeps 2; + cacheAgglomeration false; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + } + + tolerance 1e-05; + relTol 0; + maxIter 100; + } + + p + { + solver GAMG; + tolerance 1e-08; + relTol 0.01; + smoother DIC; + nPreSweeps 0; + nPostSweeps 2; + nFinestSweeps 2; + cacheAgglomeration true; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + } + + pFinal + { + solver PCG; + preconditioner + { + preconditioner GAMG; + tolerance 2e-09; + relTol 0; + nVcycles 2; + smoother DICGaussSeidel; + nPreSweeps 2; + nPostSweeps 2; + nFinestSweeps 2; + cacheAgglomeration true; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + } + + tolerance 2e-09; + relTol 0; + maxIter 20; + } + + U + { + solver smoothSolver; + smoother GaussSeidel; + tolerance 1e-06; + relTol 0; + nSweeps 1; + } + + "(k|epsilon|R|nuTilda)" + { + $U; + tolerance 1e-08; + relTol 0; + } + +} + +PISO +{ + momentumPredictor no; + nCorrectors 2; + nNonOrthogonalCorrectors 0; + nAlphaCorr 1; + nAlphaSubCycles 1; + cAlpha 1.5; + correctPhi no; +} + +relaxationFactors +{ + U 1; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/setFieldsDict b/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/setFieldsDict new file mode 100644 index 0000000000000000000000000000000000000000..3565b89deede7023901256fb0f38769f5094019c --- /dev/null +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/setFieldsDict @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue alpha1 0 +); + +regions +( + boxToCell + { + box ( -100 -100 -100 ) ( 100 100 0.5368 ); + fieldValues ( volScalarFieldValue alpha1 1 ); + } + + boxToCell + { + box ( 0.7 0.8 -100 ) ( 100 100 0.65 ); + fieldValues ( volScalarFieldValue alpha1 1 ); + } +); + + +// ************************************************************************* //