diff --git a/tutorials/incompressible/icoFoam/cavity/constant/polyMesh/blockMeshDict b/tutorials/incompressible/icoFoam/cavity/constant/polyMesh/blockMeshDict index 6aa802c1e976cb7756555768135439d950337b79..2e5f98c1a5f29b03764d942f7842c3f8a50c7e39 100644 --- a/tutorials/incompressible/icoFoam/cavity/constant/polyMesh/blockMeshDict +++ b/tutorials/incompressible/icoFoam/cavity/constant/polyMesh/blockMeshDict @@ -16,7 +16,7 @@ FoamFile convertToMeters 0.1; -vertices +vertices ( (0 0 0) (1 0 0) @@ -28,19 +28,18 @@ vertices (0 1 0.1) ); -blocks +blocks ( hex (0 1 2 3 4 5 6 7) (20 20 1) simpleGrading (1 1 1) ); -edges +edges ( ); boundary ( - - movingWall + movingWall { type wall; faces @@ -48,7 +47,7 @@ boundary (3 7 6 2) ); } - fixedWalls + fixedWalls { type wall; faces @@ -58,7 +57,7 @@ boundary (1 5 4 0) ); } - frontAndBack + frontAndBack { type empty; faces @@ -69,7 +68,7 @@ boundary } ); -mergePatchPairs +mergePatchPairs ( ); diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/0.org/U b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/0.org/U new file mode 100644 index 0000000000000000000000000000000000000000..a7bfdc893c06c0a9ec26f43a81bd99db3cb073eb --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/0.org/U @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / 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 +{ + left + { + type slip; + } + right + { + type slip; + } + bottom + { + type slip; + } + top + { + type slip; + } + frontBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/0.org/alpha1 b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/0.org/alpha1 new file mode 100644 index 0000000000000000000000000000000000000000..8dbc709325a241b671349b3ce274d98cdcb613c0 --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/0.org/alpha1 @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alpha1; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + left + { + type zeroGradient; + } + right + { + type zeroGradient; + } + bottom + { + type zeroGradient; + } + top + { + type zeroGradient; + } + frontBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/0.org/p_rgh b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/0.org/p_rgh new file mode 100644 index 0000000000000000000000000000000000000000..faed24b29c4d8c09f98326b1641d10736a46f107 --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/0.org/p_rgh @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + left + { + type buoyantPressure; + } + right + { + type buoyantPressure; + } + bottom + { + type buoyantPressure; + } + top + { + type buoyantPressure; + } + frontBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allclean b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allclean new file mode 100755 index 0000000000000000000000000000000000000000..cd78b26599c3d4f7cd89a2197d3e52eb5f83087b --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allclean @@ -0,0 +1,11 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cleanCase + +\rm -rf 0 + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allrun b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..887344985c0a184737b5ab1f75f0709c953212b1 --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allrun @@ -0,0 +1,17 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +# Set application name +application=`getApplication` + +\rm -rf 0 +cp -r 0.org 0 + +runApplication blockMesh +runApplication setFields +runApplication $application + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/g b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/g new file mode 100644 index 0000000000000000000000000000000000000000..622f53c3528d356882a736fb68e92b2f5ece8d9e --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/g @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / 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/twoLiquidMixingFoam/lockExchange/constant/polyMesh/blockMeshDict b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/polyMesh/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..129623509b71f2766895163c1148b91baf384dea --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/polyMesh/blockMeshDict @@ -0,0 +1,88 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +vertices +( + (0 0 0) + (10 0 0) + (10 2 0) + (0 2 0) + (0 0 2) + (10 0 2) + (10 2 2) + (0 2 2)); + +blocks +( + hex (0 1 2 3 4 5 6 7) (200 40 1) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + left + { + type wall; + faces + ( + (0 4 7 3) + ); + } + right + { + type wall; + faces + ( + (1 5 6 2) + ); + } + bottom + { + type wall; + faces + ( + (0 1 5 4) + ); + } + top + { + type wall; + faces + ( + (3 2 6 7) + ); + } + frontBack + { + type empty; + faces + ( + (0 1 2 3) + (4 5 6 7) + ); + } +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/polyMesh/boundary b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/polyMesh/boundary new file mode 100644 index 0000000000000000000000000000000000000000..372e6d731bd16ddd8bcce82a46c8bb0e17f1b97c --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/polyMesh/boundary @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +5 +( + left + { + type wall; + nFaces 40; + startFace 15760; + } + right + { + type wall; + nFaces 40; + startFace 15800; + } + bottom + { + type wall; + nFaces 200; + startFace 15840; + } + top + { + type wall; + nFaces 200; + startFace 16040; + } + frontBack + { + type empty; + nFaces 16000; + startFace 16240; + } +) + +// ************************************************************************* // diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/transportProperties b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/transportProperties new file mode 100644 index 0000000000000000000000000000000000000000..409c2a04f191d9f3de1c84c7227654ae40b3201e --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/transportProperties @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Dab Dab [0 2 -1 0 0 0 0] 1e-06; +alphatab alphatab [0 0 0 0 0 0 0] 1; + +phase1 +{ + transportModel Newtonian; + nu nu [0 2 -1 0 0 0 0] 1e-06; + rho rho [1 -3 0 0 0 0 0] 1000; +} + +phase2 +{ + transportModel Newtonian; + nu nu [0 2 -1 0 0 0 0] 1e-06; + rho rho [1 -3 0 0 0 0 0] 990; +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/turbulenceProperties b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/turbulenceProperties new file mode 100644 index 0000000000000000000000000000000000000000..aefe0c27d7a3bc1b0638d7907c0b8fa67a8b60ed --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/turbulenceProperties @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + +// ************************************************************************* // diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/controlDict b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..35ccca10c5f44cfc6320017844afaa1e304b0d93 --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/controlDict @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application twoLiquidMixingFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 100; + +deltaT 0.05; + +writeControl adjustableRunTime; + +writeInterval 1; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep on; + +maxCo 0.5; +maxDeltaT 1; + +// ************************************************************************* // diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/fvSchemes b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..4bb0230588cf9b264ce877886a7bcec8f595b18e --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/fvSchemes @@ -0,0 +1,62 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / 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 +{ + default none; + + div(rho*phi,U) Gauss linear; + div(phi,alpha1) Gauss vanLeer; + div(phi,k) Gauss limitedLinear 1; + div(((rho*nuEff)*dev(grad(U).T()))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +fluxRequired +{ + default no; + p_rgh; + alpha1; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/fvSolution b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..a4e4e913ec6feecc616f1d46f18592c27713a6e5 --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/fvSolution @@ -0,0 +1,74 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + "alpha1.*" + { + solver smoothSolver; + smoother GaussSeidel; + tolerance 1e-7; + relTol 0; + nSweeps 1; + } + + p_rgh + { + solver GAMG; + tolerance 1e-7; + relTol 0.01; + smoother GaussSeidel; + cacheAgglomeration true; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + } + + p_rghFinal + { + $p_rgh; + relTol 0; + } + + U + { + solver smoothSolver; + smoother GaussSeidel; + tolerance 1e-7; + relTol 0.1; + nSweeps 1; + } + + UFinal + { + $U; + relTol 0; + } +} + +PIMPLE +{ + momentumPredictor yes; + nOuterCorrectors 1; + nCorrectors 2; + nNonOrthogonalCorrectors 0; + pRefValue 0; + pRefPoint (0.1 0.1 1); +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/setFieldsDict b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/setFieldsDict new file mode 100644 index 0000000000000000000000000000000000000000..64f0b43c43bef4962be50b98458a9cf30f377677 --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/setFieldsDict @@ -0,0 +1,36 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue alpha1 0 + volVectorFieldValue U (0 0 0) +); + +regions +( + boxToCell + { + box (0 0 0) (5 2 2); + + fieldValues + ( + volScalarFieldValue alpha1 1 + ); + } +); + +// ************************************************************************* //