diff --git a/tutorials/multiphase/interIsoFoam/iobasin/0.orig/U b/tutorials/multiphase/interIsoFoam/iobasin/0.orig/U new file mode 100644 index 0000000000000000000000000000000000000000..fcc166b1155cfec6a46dd51e1270a2a53db8be0d --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/iobasin/0.orig/U @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / 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.1 0 0); + +boundaryField +{ + inlet + { + type flowRateInletVelocity; + volumetricFlowRate constant 0.1; + } + + walls + { + type slip; + } + + outlet + { + type flowRateOutletVelocity; + volumetricFlowRate constant 0.1; + } + + atmosphere + { + type pressureInletOutletVelocity; + value uniform (0 0 0); + } + +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/iobasin/0.orig/alpha.water b/tutorials/multiphase/interIsoFoam/iobasin/0.orig/alpha.water new file mode 100644 index 0000000000000000000000000000000000000000..7c8c91473292175b98c98f5a2453b5c210f39e06 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/iobasin/0.orig/alpha.water @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / 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 +{ + inlet + { + type fixedValue; + value uniform 1; + } + + walls + { + type zeroGradient; + } + + outlet + { + type zeroGradient; + value uniform 0; + } + + atmosphere + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/iobasin/0.orig/p_rgh b/tutorials/multiphase/interIsoFoam/iobasin/0.orig/p_rgh new file mode 100644 index 0000000000000000000000000000000000000000..3867a5548344b4d26ebda557ee7093587e7945a7 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/iobasin/0.orig/p_rgh @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / 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 +{ + inlet + { + type zeroGradient; + } + + walls + { + type fixedFluxPressure; + value uniform 0; + } + + outlet + { + type zeroGradient; + } + + atmosphere + { + type totalPressure; + p0 uniform 0; + } + +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/iobasin/Allclean b/tutorials/multiphase/interIsoFoam/iobasin/Allclean new file mode 100755 index 0000000000000000000000000000000000000000..e2f275d9fd6e6ba843f14fec57e2987e4c8607b3 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/iobasin/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/interIsoFoam/iobasin/Allrun b/tutorials/multiphase/interIsoFoam/iobasin/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..90ac4929521659a246995e14b41521f49729d13f --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/iobasin/Allrun @@ -0,0 +1,12 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions + +restore0Dir +runApplication blockMesh +runApplication createPatch -overwrite +runApplication setFields +runApplication decomposePar +runParallel $(getApplication) + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interIsoFoam/iobasin/constant/g b/tutorials/multiphase/interIsoFoam/iobasin/constant/g new file mode 100644 index 0000000000000000000000000000000000000000..bded3688c0600a4e15e99a23892da0fb60d689e2 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/iobasin/constant/g @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ 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/interIsoFoam/iobasin/constant/transportProperties b/tutorials/multiphase/interIsoFoam/iobasin/constant/transportProperties new file mode 100644 index 0000000000000000000000000000000000000000..c4ebbfe29dd3d8e34d8fb6a8e32cf1a887c4d03c --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/iobasin/constant/transportProperties @@ -0,0 +1,37 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +phases (water air); + +water +{ + transportModel Newtonian; + nu 1e-06; + rho 1000; +} + +air +{ + transportModel Newtonian; + nu 1.48e-05; + rho 1; +} + +sigma 0.07; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/iobasin/constant/turbulenceProperties b/tutorials/multiphase/interIsoFoam/iobasin/constant/turbulenceProperties new file mode 100644 index 0000000000000000000000000000000000000000..0077473d45b3cd3f56918e169988a7137ce53d87 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/iobasin/constant/turbulenceProperties @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/iobasin/system/blockMeshDict b/tutorials/multiphase/interIsoFoam/iobasin/system/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..56fcf4bc8618fe48e173a4976ea0c9e00fa75f93 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/iobasin/system/blockMeshDict @@ -0,0 +1,179 @@ +/*--------------------------------*- C++ -*----------------------------------*/ + +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +scale 1; + +// Basin +x0 0; +x1 1; +y0 0; +y1 1; +z0 0; +z1 1; + +// Inlet +x2 -0.3; +x3 0; +y2 0.35; +y3 0.65; +z2 0.6; +z3 0.9; + +// Outlet +x4 1; +x5 1.3; +y4 0.35; +y5 0.65; +z4 0.1; +z5 0.4; + + +vertices +( + // Basin + ($x0 $y0 $z0) + ($x1 $y0 $z0) + ($x1 $y1 $z0) + ($x0 $y1 $z0) + ($x0 $y0 $z1) + ($x1 $y0 $z1) + ($x1 $y1 $z1) + ($x0 $y1 $z1) + + // Inlet + ($x2 $y2 $z2) + ($x3 $y2 $z2) + ($x3 $y3 $z2) + ($x2 $y3 $z2) + ($x2 $y2 $z3) + ($x3 $y2 $z3) + ($x3 $y3 $z3) + ($x2 $y3 $z3) + + // Outlet + ($x4 $y4 $z4) + ($x5 $y4 $z4) + ($x5 $y5 $z4) + ($x4 $y5 $z4) + ($x4 $y4 $z5) + ($x5 $y4 $z5) + ($x5 $y5 $z5) + ($x4 $y5 $z5) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (40 40 40) simpleGrading (1 1 1) + hex (8 9 10 11 12 13 14 15) (12 12 12) simpleGrading (1 1 1) + hex (16 17 18 19 20 21 22 23) (12 12 12) simpleGrading (1 1 1) +); + +boundary +( + inlet + { + type patch; + faces + ( + (8 12 15 11) + ); + } + + outlet + { + type patch; + faces + ( + (17 18 22 21) + ); + } + + walls + { + type patch; + faces + ( + // Basin + (0 3 2 1) + (0 1 5 4) + (2 3 7 6) + + // Inlet + (8 11 10 9) + (8 9 13 12) + (10 11 15 14) + (12 13 14 15) + + // Outlet + (16 19 18 17) + (16 17 21 20) + (18 19 23 22) + (20 21 22 23) + ); + } + + atmosphere + { + type patch; + faces + ( + (4 5 6 7) + ); + } + + inletRightPatch + { + type patch; + faces + ( + (9 10 14 13) + ); + } + + basinLeftPatch + { + type patch; + faces + ( + (0 4 7 3) + ); + } + + outletLeftPatch + { + type patch; + faces + ( + (16 20 23 19) + ); + } + + basinRightPatch + { + type patch; + faces + ( + (1 2 6 5) + ); + } +); + +edges +( +); + +mergePatchPairs +( + (inletRightPatch basinLeftPatch) + (outletLeftPatch basinRightPatch) +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/iobasin/system/controlDict b/tutorials/multiphase/interIsoFoam/iobasin/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..4b7fd592554c4d40dfd47dcca90338f3b6c23ca2 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/iobasin/system/controlDict @@ -0,0 +1,100 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2; + format ascii; + class dictionary; + location "system"; + object controlDict; +} + +application interIsoFoam; + +startFrom latestTime; + +startTime 0; + +stopAt endTime; + +endTime 3; + +deltaT 0.005; +//deltaT 0.001; + +writeControl adjustableRunTime; + +writeInterval 0.01; + +purgeWrite 0; + +writeFormat binary; + +writePrecision 8; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep yes; + +maxCo 0.8; + +maxAlphaCo 0.8; + +maxDeltaT 1; + + +functions +{ + inletFlux + { + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + writeControl timeStep; + log true; + writeFields false; + regionType patch; + name inlet; + operation sum; + fields ( rhoPhi ); + } + + outletFlux + { + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + writeControl timeStep; + log true; + writeFields false; + regionType patch; + name outlet; + operation sum; + fields ( rhoPhi ); + } + + atmosphereFlux + { + type surfaceFieldValue; + libs ( "libfieldFunctionObjects.so" ); + writeControl timeStep; + log true; + writeFields false; + regionType patch; + name atmosphere; + operation sum; + fields ( rhoPhi ); + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/iobasin/system/createPatchDict b/tutorials/multiphase/interIsoFoam/iobasin/system/createPatchDict new file mode 100644 index 0000000000000000000000000000000000000000..f039ada7f52b3d71b9b46145fcf68d82b6bd10f1 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/iobasin/system/createPatchDict @@ -0,0 +1,84 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object createPatchDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +pointSync false; + +// Patches to create. +patches +( + { + // Name of new patch + name walls; + + // Dictionary to construct new patch from + patchInfo + { + type patch; + } + + // How to construct: either from 'patches' or 'set' + constructFrom patches; + + // If constructFrom = patches : names of patches. Wildcards allowed. + patches (walls basinLeftPatch basinRightPatch); + + // If constructFrom = set : name of faceSet + set f0; + } +/* + { + // Name of new patch + name walls; + + // Dictionary to construct new patch from + patchInfo + { + type wall; + } + + // How to construct: either from 'patches' or 'set' + constructFrom patches; + + // If constructFrom = patches : names of patches. Wildcards allowed. + patches (originalPatch); + + // If constructFrom = set : name of faceSet + set f0; + } + + { + // Name of new patch + name frontAndBack; + + // Dictionary to construct new patch from + patchInfo + { + type empty; + } + + // How to construct: either from 'patches' or 'set' + constructFrom patches; + + // If constructFrom = patches : names of patches. Wildcards allowed. + patches (sides); + + // If constructFrom = set : name of faceSet + set f0; + } +*/ +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/iobasin/system/decomposeParDict b/tutorials/multiphase/interIsoFoam/iobasin/system/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..56c7dca5aa46fcac79f99c4044b2e6378be7c495 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/iobasin/system/decomposeParDict @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + note "mesh decomposition control dictionary"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 8; + +method simple; + +simpleCoeffs +{ + n (2 2 2); + delta 0.001; +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/iobasin/system/fvSchemes b/tutorials/multiphase/interIsoFoam/iobasin/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..e503f16cd74f4dccdab61f7bc5188ea7a3020d5a --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/iobasin/system/fvSchemes @@ -0,0 +1,64 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + div(rhoPhi,U) Gauss limitedLinearV 1; + div(phi,alpha) Gauss vanLeer; + div(phirb,alpha) Gauss linear; + + "div\(phi,(k|omega)\)" Gauss upwind; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; + + div(phi,s) Gauss vanLeer; + div(phirb,s) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +/* +wallDist +{ + method meshWave; +} +*/ + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/iobasin/system/fvSolution b/tutorials/multiphase/interIsoFoam/iobasin/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..2280dbc593e1ab16aefbf7a4798252e319d92164 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/iobasin/system/fvSolution @@ -0,0 +1,89 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + "alpha.water.*" + { + nAlphaSubCycles 1; + cAlpha 1; + } + + "pcorr.*" + { + solver PCG; + preconditioner + { + preconditioner GAMG; + tolerance 1e-5; + relTol 0; + smoother GaussSeidel; + } + tolerance 1e-5; + relTol 0; + maxIter 50; + } + + p_rgh + { + solver GAMG; + tolerance 5e-9; + relTol 0.01; + + smoother GaussSeidel; + + + + maxIter 50; + }; + + p_rghFinal + { + $p_rgh; + tolerance 5e-9; + relTol 0; + } + + "(U|k|omega|s).*" + { + solver smoothSolver; + smoother symGaussSeidel; + nSweeps 1; + tolerance 1e-6; + relTol 0.1; + }; +} + +PIMPLE +{ + momentumPredictor no; + nCorrectors 2; + nNonOrthogonalCorrectors 0; + pRefCell 0; + pRefValue 0; +} + +relaxationFactors +{ + equations + { + ".*" 1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/iobasin/system/setFieldsDict b/tutorials/multiphase/interIsoFoam/iobasin/system/setFieldsDict new file mode 100644 index 0000000000000000000000000000000000000000..4424ae1279a1a21d352e1fed6d91600f3444bbe8 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/iobasin/system/setFieldsDict @@ -0,0 +1,46 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue alpha.water 0 +); + +regions +( + boxToCell + { + box (-1e10 -1e10 -1e10) (1e10 1e10 0.45); + fieldValues + ( + volScalarFieldValue alpha.water 1 + ); + } + + boxToCell + { + box (-1e10 -1e10 -1e10) (-.2 1e10 1e10); + fieldValues + ( + volScalarFieldValue alpha.water 1 + ); + } + +); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/0.orig/U b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/0.orig/U new file mode 100644 index 0000000000000000000000000000000000000000..020c0cd55c52841759705c679e54d556b638f505 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/0.orig/U @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + inlet + { + type waveVelocity; + value uniform (0 0 0); + } + + outlet + { + type waveVelocity; + value uniform (0 0 0); + } + + sides + { + type empty; + } + + ground + { + type fixedValue; + value uniform (0 0 0); + } + + top + { + type pressureInletOutletVelocity; + value uniform (0 0 0); + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/0.orig/alpha.water b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/0.orig/alpha.water new file mode 100644 index 0000000000000000000000000000000000000000..436879eb36706174517ccdcb3849cb6b506d41ba --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/0.orig/alpha.water @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / 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 +{ + inlet + { + type waveAlpha; + value uniform 0; + } + + outlet + { + type zeroGradient; + } + + ground + { + type zeroGradient; + } + + sides + { + type empty; + } + + top + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/0.orig/p_rgh b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/0.orig/p_rgh new file mode 100644 index 0000000000000000000000000000000000000000..5fe1bb4ade9ede8985c60b0ac325165805d6b884 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/0.orig/p_rgh @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / 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 +{ + inlet + { + type fixedFluxPressure; + value uniform 0; + } + + outlet + { + type fixedFluxPressure; + value uniform 0; + } + + ground + { + type fixedFluxPressure; + value uniform 0; + } + + sides + { + type empty; + } + + top + { + type totalPressure; + p0 uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/Allclean b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/Allclean new file mode 100755 index 0000000000000000000000000000000000000000..e2f275d9fd6e6ba843f14fec57e2987e4c8607b3 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/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/interIsoFoam/waveExampleStreamFunction/Allrun b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..28bf991e627511713c3b915ac0d9998f068ce030 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/Allrun @@ -0,0 +1,15 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions + +restore0Dir + +runApplication blockMesh + +runApplication decomposePar + +runParallel setFields + +runParallel $(getApplication) + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/constant/g b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/constant/g new file mode 100644 index 0000000000000000000000000000000000000000..492b5693e947caf937121bd5e6977ef9dcf59896 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ 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/interIsoFoam/waveExampleStreamFunction/constant/transportProperties b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/constant/transportProperties new file mode 100644 index 0000000000000000000000000000000000000000..70f3aebb062ac5bca95ae0908d0ec48ca1de4f8c --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/constant/transportProperties @@ -0,0 +1,37 @@ +/*---------------------------------------------------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +phases (water air); + +water +{ + transportModel Newtonian; + nu 1e-06; + rho 1000; +} + +air +{ + transportModel Newtonian; + nu 1.48e-05; + rho 1; +} + +sigma 0.07; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/constant/turbulenceProperties b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/constant/turbulenceProperties new file mode 100644 index 0000000000000000000000000000000000000000..feea4803ea50860c13e81ee1b30d0af0aebcf956 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/constant/turbulenceProperties @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/constant/waveProperties b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/constant/waveProperties new file mode 100644 index 0000000000000000000000000000000000000000..b18ad6d4d2ab6e1e719997a45db91b1271a5289a --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/constant/waveProperties @@ -0,0 +1,80 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object waveProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +inlet +{ + alpha alpha.water; + + waveModel streamFunction; + + nPaddle 1; + + waveHeight 0.1517; + + waveAngle 0.0; + + rampTime 3.017;//6.034; + + activeAbsorption yes; + + wavePeriod 3.017; + + uMean 2.0825; + + waveLength 6.2832; + + Bjs + ( + 8.6669014e-002 + 2.4849799e-002 + 7.7446850e-003 + 2.3355420e-003 + 6.4497731e-004 + 1.5205114e-004 + 2.5433769e-005 + -2.2045436e-007 + -2.8711504e-006 + -1.2287334e-006 + ); + + Ejs + ( + 5.6009609e-002 + 3.1638171e-002 + 1.5375952e-002 + 7.1743178e-003 + 3.3737077e-003 + 1.6324880e-003 + 8.2331980e-004 + 4.4403497e-004 + 2.7580059e-004 + 2.2810557e-004 + ); + +} + +outlet +{ + alpha alpha.water; + + waveModel shallowWaterAbsorption; + + nPaddle 1; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/system/blockMeshDict b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/system/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..7e2390b70576a7b4af0b710acc71f461e1e95bc6 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/system/blockMeshDict @@ -0,0 +1,91 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +scale 1; + +vertices +( + ( 0.0 0.0 0.0) + ( 40.0 0.0 0.0) + ( 40.0 0.01 0.0) + ( 0.0 0.01 0.0) + ( 0.0 0.0 0.8) + ( 40.0 0.0 0.8) + ( 40.0 0.01 0.8) + ( 0.0 0.01 0.8) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (2000 1 80) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + inlet + { + type patch; + faces + ( + (0 4 7 3) + ); + } + outlet + { + type patch; + faces + ( + (1 5 6 2) + ); + } + ground + { + type wall; + faces + ( + (0 1 2 3) + ); + } + top + { + type patch; + faces + ( + (4 5 6 7) + ); + } + sides + { + type empty; + faces + ( + (0 1 5 4) + (3 2 6 7) + ); + } +); + +mergePatchPairs +( +); + +// ************************************************************************* // + + diff --git a/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/system/controlDict b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..c0cf911c720335e0f12c5a4336dfc552897c229a --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/system/controlDict @@ -0,0 +1,162 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application interIsoFoam; + +startFrom latestTime; + +startTime 0; + +stopAt endTime; + +endTime 30.0; + +deltaT 0.001; + +writeControl adjustableRunTime; + +writeInterval 0.15085; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep yes; + +maxCo 0.5; +maxAlphaCo 0.5; + +maxDeltaT 0.5; + + +functions +{ + line + { + type sets; + libs ("libsampling.so"); + enabled true; + writeControl writeTime; + writeInterval 1; + + interpolationScheme cellPoint; + setFormat raw; + sets + ( + line1 + { + type uniform; + axis distance; + start ( 1.0 0.005 0.0 ); + end ( 1.0 0.005 1.0 ); + nPoints 1001; + } + line2 + { + type uniform; + axis distance; + start ( 2.0 0.005 0.0 ); + end ( 2.0 0.005 1.0 ); + nPoints 1001; + } + line3 + { + type uniform; + axis distance; + start ( 3.0 0.005 0.0 ); + end ( 3.0 0.005 1.0 ); + nPoints 1001; + } + line4 + { + type uniform; + axis distance; + start ( 5.0 0.005 0.0 ); + end ( 5.0 0.005 1.0 ); + nPoints 1001; + } + line5 + { + type uniform; + axis distance; + start ( 7.5 0.005 0.0 ); + end ( 7.5 0.005 1.0 ); + nPoints 1001; + } + + line6 + { + type uniform; + axis distance; + start ( 10.0 0.005 0.0 ); + end ( 10.0 0.005 1.0 ); + nPoints 1001; + } + line7 + { + type uniform; + axis distance; + start ( 12.0 0.005 0.0 ); + end ( 12.0 0.005 1.0 ); + nPoints 1001; + } + line8 + { + type uniform; + axis distance; + start ( 15.0 0.005 0.0 ); + end ( 15.0 0.005 1.0 ); + nPoints 1001; + } + line9 + { + type uniform; + axis distance; + start ( 20.0 0.005 0.0 ); + end ( 20.0 0.005 1.0 ); + nPoints 1001; + } + line10 + { + type uniform; + axis distance; + start ( 28.0 0.005 0.0 ); + end ( 28.0 0.005 1.0 ); + nPoints 1001; + } + ); + + fixedLocations false; + fields + ( + U alpha.water + ); + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/system/decomposeParDict b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/system/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..d17ee03e3d140ed6365240ae578a9571b03f25b9 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/system/decomposeParDict @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 2; + +method hierarchical; + +hierarchicalCoeffs +{ + n (2 1 1); + delta 0.001; + order xyz; +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/system/fvSchemes b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..1962d3a4a4c428c507a2c1abc4829eda87a7ab3e --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/system/fvSchemes @@ -0,0 +1,54 @@ + +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + div(rhoPhi,U) Gauss linearUpwind grad(U); + div(phi,alpha) Gauss vanLeer; + div(phirb,alpha) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear orthogonal; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default orthogonal; +} + + +// ************************************************************************* // + diff --git a/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/system/fvSolution b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..46b73f7e0c00bae63f435b4bebd71f8c40c86767 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/system/fvSolution @@ -0,0 +1,89 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + "alpha.water.*" + { + isoFaceTol 1e-10; + surfCellTol 1e-2; + nAlphaBounds 3; + snapTol 1e-12; + clip true; + + nAlphaCorr 1; + nAlphaSubCycles 1; + cAlpha 1; + + MULESCorr yes; + nLimiterIter 5; + + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-8; + relTol 0; + } + + "pcorr.*" + { + solver PCG; + preconditioner DIC; + tolerance 1e-6; + relTol 0; + } + + p_rgh + { + solver PCG; + preconditioner DIC; + tolerance 1e-08; + relTol 0.05; + } + + p_rghFinal + { + $p_rgh; + relTol 0; + } + + U + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-06; + relTol 0; + } +} + +PIMPLE +{ + momentumPredictor no; + nOuterCorrectors 1; + nCorrectors 3; + nNonOrthogonalCorrectors 0; +} + +relaxationFactors +{ + equations + { + ".*" 1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/system/setFieldsDict b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/system/setFieldsDict new file mode 100644 index 0000000000000000000000000000000000000000..bbf3c8d43fc1769aa3461f2c9dfb6f2c26d43523 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/waveExampleStreamFunction/system/setFieldsDict @@ -0,0 +1,36 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue alpha.water 0 +); + +regions +( + boxToCell + { + box (0 0 0) (40.0 1.0 0.4046); + fieldValues + ( + volScalarFieldValue alpha.water 1 + ); + } +); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/weirOverflow/0.orig/U b/tutorials/multiphase/interIsoFoam/weirOverflow/0.orig/U new file mode 100644 index 0000000000000000000000000000000000000000..615644c61b1ad1f0eadeba1bceb00e72827b151a --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/weirOverflow/0.orig/U @@ -0,0 +1,55 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "include/initialConditions" + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + inlet + { + type variableHeightFlowRateInletVelocity; + flowRate $inletFlowRate; + alpha alpha.water; + value uniform (0 0 0); + } + + outlet + { + type zeroGradient; + } + + lowerWall + { + type noSlip; + } + + atmosphere + { + type pressureInletOutletVelocity; + value uniform (0 0 0); + } + + defaultFaces + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/weirOverflow/0.orig/alpha.water.orig b/tutorials/multiphase/interIsoFoam/weirOverflow/0.orig/alpha.water.orig new file mode 100644 index 0000000000000000000000000000000000000000..7562548261e83ddce3406ae902c4fca9dc6b1a5f --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/weirOverflow/0.orig/alpha.water.orig @@ -0,0 +1,56 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object alpha.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "include/initialConditions" + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type variableHeightFlowRate; + lowerBound 0; + upperBound 1; + value uniform 0; + } + + outlet + { + type zeroGradient; + } + + lowerWall + { + type zeroGradient; + } + + atmosphere + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } + + defaultFaces + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/weirOverflow/0.orig/epsilon b/tutorials/multiphase/interIsoFoam/weirOverflow/0.orig/epsilon new file mode 100644 index 0000000000000000000000000000000000000000..e4501081b331459a602d3651758f86a931840ad8 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/weirOverflow/0.orig/epsilon @@ -0,0 +1,59 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "include/initialConditions" + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform $turbulentEpsilon; + +boundaryField +{ + inlet + { + type fixedValue; + value $internalField; + } + + outlet + { + type inletOutlet; + inletValue $internalField; + value $internalField; + } + + lowerWall + { + type epsilonWallFunction; + value $internalField; + } + + atmosphere + { + type inletOutlet; + inletValue $internalField; + value $internalField; + } + + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/weirOverflow/0.orig/include/initialConditions b/tutorials/multiphase/interIsoFoam/weirOverflow/0.orig/include/initialConditions new file mode 100644 index 0000000000000000000000000000000000000000..2331b854d28b7f57489fe2be1830c3c47874e8d3 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/weirOverflow/0.orig/include/initialConditions @@ -0,0 +1,14 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +inletFlowRate 75; +pressure 0; +turbulentKE 4.14e-03; +turbulentEpsilon 4.39e-05; + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/weirOverflow/0.orig/k b/tutorials/multiphase/interIsoFoam/weirOverflow/0.orig/k new file mode 100644 index 0000000000000000000000000000000000000000..1b0b46e5dcaef99f1081fbf546e61188d378e695 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/weirOverflow/0.orig/k @@ -0,0 +1,59 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "include/initialConditions" + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform $turbulentKE; + +boundaryField +{ + inlet + { + type fixedValue; + value $internalField; + } + + outlet + { + type inletOutlet; + inletValue $internalField; + value $internalField; + } + + lowerWall + { + type kqRWallFunction; + value $internalField; + } + + atmosphere + { + type inletOutlet; + inletValue $internalField; + value $internalField; + } + + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/weirOverflow/0.orig/nut b/tutorials/multiphase/interIsoFoam/weirOverflow/0.orig/nut new file mode 100644 index 0000000000000000000000000000000000000000..7af6950d8bb11a89b8e1d78517e84a0d7a59c2db --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/weirOverflow/0.orig/nut @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type calculated; + value uniform 0; + } + outlet + { + type calculated; + value uniform 0; + } + lowerWall + { + type nutkWallFunction; + value uniform 0; + } + atmosphere + { + type calculated; + value uniform 0; + } + + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/weirOverflow/0.orig/p_rgh b/tutorials/multiphase/interIsoFoam/weirOverflow/0.orig/p_rgh new file mode 100644 index 0000000000000000000000000000000000000000..e692f6e849060bc15026c5b807b25dfe3d26fdbc --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/weirOverflow/0.orig/p_rgh @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "include/initialConditions" + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform $pressure; + +boundaryField +{ + inlet + { + type zeroGradient; + } + + outlet + { + type zeroGradient; + } + + lowerWall + { + type fixedFluxPressure; + } + + atmosphere + { + type totalPressure; + p0 uniform 0; + } + + defaultFaces + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/weirOverflow/Allclean b/tutorials/multiphase/interIsoFoam/weirOverflow/Allclean new file mode 100755 index 0000000000000000000000000000000000000000..e2f275d9fd6e6ba843f14fec57e2987e4c8607b3 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/weirOverflow/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/interIsoFoam/weirOverflow/Allrun b/tutorials/multiphase/interIsoFoam/weirOverflow/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..c7107259267d9ec3d57107003fcfe6a9e1483ad5 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/weirOverflow/Allrun @@ -0,0 +1,13 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions + +restore0Dir + +runApplication blockMesh +\cp 0/alpha.water.orig 0/alpha.water + +runApplication setFields +runApplication $(getApplication) + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interIsoFoam/weirOverflow/constant/g b/tutorials/multiphase/interIsoFoam/weirOverflow/constant/g new file mode 100644 index 0000000000000000000000000000000000000000..037697dd981e91821b2f945f442f842357790ef0 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/weirOverflow/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value (0 -9.81 0); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/weirOverflow/constant/transportProperties b/tutorials/multiphase/interIsoFoam/weirOverflow/constant/transportProperties new file mode 100644 index 0000000000000000000000000000000000000000..c4ebbfe29dd3d8e34d8fb6a8e32cf1a887c4d03c --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/weirOverflow/constant/transportProperties @@ -0,0 +1,37 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +phases (water air); + +water +{ + transportModel Newtonian; + nu 1e-06; + rho 1000; +} + +air +{ + transportModel Newtonian; + nu 1.48e-05; + rho 1; +} + +sigma 0.07; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/weirOverflow/constant/turbulenceProperties b/tutorials/multiphase/interIsoFoam/weirOverflow/constant/turbulenceProperties new file mode 100644 index 0000000000000000000000000000000000000000..0e5f55ae375d8a8f5549782d89481e69caeb1861 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/weirOverflow/constant/turbulenceProperties @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/weirOverflow/system/blockMeshDict b/tutorials/multiphase/interIsoFoam/weirOverflow/system/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..c8309631490290d3683ac35899511f556db603f2 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/weirOverflow/system/blockMeshDict @@ -0,0 +1,93 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +scale 1; + +vertices +( + (-18 0 -0.5) + ( 0 0 -0.5) + ( 30 0 -0.5) + ( 90 0 -0.5) + (-18 30 -0.5) + ( 0 30 -0.5) + ( 15 30 -0.5) + ( 90 30 -0.5) + (-18 54 -0.5) + ( 0 54 -0.5) + ( 15 54 -0.5) + ( 90 54 -0.5) + + (-18 0 0.5) + ( 0 0 0.5) + ( 30 0 0.5) + ( 90 0 0.5) + (-18 30 0.5) + ( 0 30 0.5) + ( 15 30 0.5) + ( 90 30 0.5) + (-18 54 0.5) + ( 0 54 0.5) + ( 15 54 0.5) + ( 90 54 0.5) +); + +blocks +( + hex (0 1 5 4 12 13 17 16) (20 20 1) simpleGrading (1 0.5 1) + hex (2 3 7 6 14 15 19 18) (60 40 1) simpleGrading (1 2 1) + hex (4 5 9 8 16 17 21 20) (20 24 1) simpleGrading (1 1 1) + hex (5 6 10 9 17 18 22 21) (15 24 1) simpleGrading (1 1 1) + hex (6 7 11 10 18 19 23 22) (60 24 1) simpleGrading (1 1 1) +); + +edges +( +); + +patches +( + patch inlet + ( + (0 12 16 4) + (4 16 20 8) + ) + patch outlet + ( + (7 19 15 3) + (11 23 19 7) + ) + wall lowerWall + ( + (0 1 13 12) + (1 5 17 13) + (5 6 18 17) + (2 14 18 6) + (2 3 15 14) + ) + patch atmosphere + ( + (8 20 21 9) + (9 21 22 10) + (10 22 23 11) + ) +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/weirOverflow/system/controlDict b/tutorials/multiphase/interIsoFoam/weirOverflow/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..1b57380eefa56a1b689ead25bfa07e5554573c98 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/weirOverflow/system/controlDict @@ -0,0 +1,55 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application interIsoFoam; + +startFrom latestTime; + +startTime 0; + +stopAt endTime; + +endTime 30; + +deltaT 0.001; + +writeControl adjustableRunTime; + +writeInterval 2; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep on; + +maxCo 0.9; +maxAlphaCo 0.9; + +maxDeltaT 1; + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/weirOverflow/system/fvSchemes b/tutorials/multiphase/interIsoFoam/weirOverflow/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..7b9531750a95c9a937f24b03ff552b3ea7740e7f --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/weirOverflow/system/fvSchemes @@ -0,0 +1,56 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + div(rhoPhi,U) Gauss linear; + div(phi,alpha) Gauss vanLeer; + div(phirb,alpha) Gauss linear; + div(phi,k) Gauss upwind; + div(phi,epsilon) Gauss upwind; + div(phi,R) Gauss upwind; + div(R) Gauss linear; + div(phi,nuTilda) Gauss upwind; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/weirOverflow/system/fvSolution b/tutorials/multiphase/interIsoFoam/weirOverflow/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..6ff4f3463f969a9a54133f251a2d810896142401 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/weirOverflow/system/fvSolution @@ -0,0 +1,79 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + alpha.water + { + + isoFaceTol 1e-6; + surfCellTol 1e-6; + nAlphaBounds 3; + snapTol 1e-12; + clip true; + + nAlphaSubCycles 1; + cAlpha 1; // Note: cAlpha is not used by isoAdvector but must + // be specified because interfacePropertes object + // reads it during construction. + } + + "pcorr.*" + { + solver PCG; + preconditioner DIC; + tolerance 1e-10; + relTol 0; + } + + p_rgh + { + solver PCG; + preconditioner DIC; + tolerance 1e-08; + relTol 0.05; + } + + p_rghFinal + { + $p_rgh; + relTol 0; + } + + "(U|k|epsilon)" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-8; + relTol 0.1; + } + + "(U|k|epsilon)Final" + { + $U; + relTol 0; + } +} + +PIMPLE +{ + momentumPredictor no; + nCorrectors 3; + nNonOrthogonalCorrectors 0; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interIsoFoam/weirOverflow/system/setFieldsDict b/tutorials/multiphase/interIsoFoam/weirOverflow/system/setFieldsDict new file mode 100644 index 0000000000000000000000000000000000000000..1020eb07ee169c77f4a6dee85cd1971a3bf854e0 --- /dev/null +++ b/tutorials/multiphase/interIsoFoam/weirOverflow/system/setFieldsDict @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / 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 0 -100) (0 20 100); + + fieldValues + ( + volScalarFieldValue alpha.water 1 + ); + } +); + +// ************************************************************************* //