diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/Allrun b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..da1575a1aa04e0948a12fc3608a2fd3ed478b518 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/Allrun @@ -0,0 +1,9 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +(cd eulerianInjection && ./Allrun) +(cd lagrangianParticleInjection && ./Allrun) +(cd lagrangianDistributionInjection && ./Allrun) diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/0.orig/U b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/0.orig/U new file mode 100644 index 0000000000000000000000000000000000000000..5f79ace4a9a9de5fec1bad39179e95161d839f68 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/0.orig/U @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus-develop | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format binary; + class volVectorField; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + top + { + type fixedValue; + value $internalField; + } + bottom + { + type fixedValue; + value $internalField; + } + sides + { + type pressureInletOutletVelocity; + value $internalField; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/0.orig/alpha.water b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/0.orig/alpha.water new file mode 100644 index 0000000000000000000000000000000000000000..8b0f7e79c14f82a962101f6ea4b5c0f3fc2f624f --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/0.orig/alpha.water @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus-develop | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format binary; + class volScalarField; + location "0"; + object alpha.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + top + { + type fixedValue; + value uniform 0; + } + bottom + { + type zeroGradient; + } + sides + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/0.orig/p_rgh b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/0.orig/p_rgh new file mode 100644 index 0000000000000000000000000000000000000000..28fe003658c1b0e96259bdd94ce962048cb896a8 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/0.orig/p_rgh @@ -0,0 +1,44 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus-develop | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format binary; + class volScalarField; + location "0"; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + top + { + type fixedFluxPressure; + gradient uniform 0; + value uniform 0; + } + bottom + { + type fixedFluxPressure; + gradient uniform 0; + value uniform 0; + } + sides + { + type fixedValue; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/Allclean b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/Allclean new file mode 100755 index 0000000000000000000000000000000000000000..8976b1e90b5a624a6a34bb638aef29620d8ec7d1 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/Allclean @@ -0,0 +1,10 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cleanCase +\rm -rf 0 + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/Allrun b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..8c13891df5ba424c333bc9e7611f5f2772c16cae --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/Allrun @@ -0,0 +1,20 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +runApplication blockMesh +runApplication -s createBlockage topoSet -dict system/topoSetDict.createBlockage +runApplication subsetMesh -overwrite blockage -patch bottom +runApplication -s createPatch topoSet -dict system/topoSetDict.createPatch +runApplication -s createCollector topoSet -dict system/topoSetDict.createCollector + +restore0Dir + +runApplication decomposePar + +runParallel setFields +runParallel $(getApplication) + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/constant/g b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/constant/g new file mode 100644 index 0000000000000000000000000000000000000000..4702e33f63dacbb20139c0fd115011be321b4102 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / 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/interFoam/laminar/vofToLagrangian/eulerianInjection/constant/transportProperties b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/constant/transportProperties new file mode 100644 index 0000000000000000000000000000000000000000..1331af1e5ce2a7e3343e0b0d2aee2df99780ba4e --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/constant/transportProperties @@ -0,0 +1,37 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / 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 [0 2 -1 0 0 0 0] 1e-06; + rho [1 -3 0 0 0 0 0] 1000; +} + +air +{ + transportModel Newtonian; + nu [0 2 -1 0 0 0 0] 1.48e-05; + rho [1 -3 0 0 0 0 0] 1; +} + +sigma [1 0 -2 0 0 0 0] 0.07; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/constant/turbulenceProperties b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/constant/turbulenceProperties new file mode 100644 index 0000000000000000000000000000000000000000..5eec04267266e7fd15e7701a875d683d5e658cd9 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/constant/turbulenceProperties @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / 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/interFoam/laminar/vofToLagrangian/eulerianInjection/system/blockMeshDict b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/system/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..992905dc55b8edcda37c8a0253f89935891e4e31 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/system/blockMeshDict @@ -0,0 +1,75 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 0.05; + +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) (75 75 75) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + top + { + type patch; + faces + ( + (3 7 6 2) + ); + } + bottom + { + type wall; + faces + ( + (1 5 4 0) + ); + } + sides + { + type patch; + faces + ( + (0 4 7 3) + (2 6 5 1) + (0 3 2 1) + (4 5 6 7) + ); + } +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/system/controlDict b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..f307bd85eb9914a1d324af216e39fc1b35b953df --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/system/controlDict @@ -0,0 +1,70 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application interFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 0.2; + +deltaT 1e-4; + +writeControl adjustableRunTime; + +writeInterval 0.001; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep yes; + +maxCo 0.5; +maxAlphaCo 1; + +maxDeltaT 1; + +functions +{ + extractEulerianParticles1 + { + type extractEulerianParticles; + libs ("libfieldFunctionObjects.so"); + writeControl writeTime; + faceZone collector; + alpha alpha.water; + nLocations 20; + } +} + + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/system/decomposeParDict b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/system/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..0573ee2a16c1350384d481bcc65d52b3a4fa4cb8 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/system/decomposeParDict @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + note "mesh decomposition control dictionary"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +method simple; + +simpleCoeffs +{ + n (2 1 2); + delta 0.001; +} + + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/system/fvSchemes b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..26c90ec72e11257d2756be5af0b6e5f85b31ef1e --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/system/fvSchemes @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / 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 limitedLinear 0.2; + 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/interFoam/laminar/vofToLagrangian/eulerianInjection/system/fvSolution b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..d2eb88fed75d73d28f103b67abe1bb34c6a90a84 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/system/fvSolution @@ -0,0 +1,67 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + alpha.water + { + nAlphaCorr 1; + nAlphaSubCycles 5; + cAlpha 2; + } + + pcorr + { + solver GAMG; + smoother GaussSeidel; + tolerance 1e-10; + relTol 0; + } + + p_rgh + { + solver GAMG; + smoother GaussSeidel; + tolerance 1e-07; + relTol 0.05; + } + + p_rghFinal + { + $p_rgh; + tolerance 1e-07; + relTol 0; + } + + U + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-06; + relTol 0; + } +} + +PIMPLE +{ + momentumPredictor no; + nCorrectors 3; + nNonOrthogonalCorrectors 0; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/system/setFieldsDict b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/system/setFieldsDict new file mode 100644 index 0000000000000000000000000000000000000000..12aa29b7024decd1127e03d652e11dddaad2be84 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/system/setFieldsDict @@ -0,0 +1,38 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / 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 +( + faceToFace + { + set injectorFaces; + + fieldValues + ( + volScalarFieldValue alpha.water 1 + volVectorFieldValue U (0 -15 0) + ); + } +); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/system/topoSetDict.createBlockage b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/system/topoSetDict.createBlockage new file mode 100644 index 0000000000000000000000000000000000000000..bc986f502d1e71fdd641211d56d5ce83eca7a159 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/system/topoSetDict.createBlockage @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object topoSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + // Create blockage cellSet + { + name blockage; + type cellSet; + action new; +// source boxToCell; + source cylinderToCell; + sourceInfo + { +// box (0.015 0.010 0.015) (0.035 0.015 0.035); + p1 (0.025 0.02 0.025); + p2 (0.025 0.022 0.025); + radius 0.01; + } + } + { + name blockage; + type cellSet; + action invert; + } +); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/system/topoSetDict.createCollector b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/system/topoSetDict.createCollector new file mode 100644 index 0000000000000000000000000000000000000000..ca6627533a326c5684a270fc79ce656874d9b35f --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/system/topoSetDict.createCollector @@ -0,0 +1,43 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object topoSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + // Get all faces in cellSet + { + name f0; + type faceSet; + action new; + source patchToFace; + sourceInfo + { + name sides; + } + } + + { + name collector; + type faceZoneSet; + action new; + source setToFaceZone; + sourceInfo + { + faceSet f0; + } + } +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/system/topoSetDict.createPatch b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/system/topoSetDict.createPatch new file mode 100644 index 0000000000000000000000000000000000000000..308d04f85f4bacedf5d3013a08a6cf7cdf0fe207 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/system/topoSetDict.createPatch @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object topoSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + // Load initial cellSet + { + name c0; + type cellSet; + action new; + source cylinderToCell; + sourceInfo + { + p1 (0.025 1 0.025); + p2 (0.025 0.049 0.025); + radius 0.0015; + } + } + + // Get all faces in cellSet and assign to injectorFaces + { + name injectorFaces; + type faceSet; + action new; + source cellToFace; + sourceInfo + { + set c0; + option all; + } + } + + // Keep in injectorFaces all faces in boundary faces + { + name injectorFaces; + type faceSet; + action subset; + source boundaryToFace; + sourceInfo + { + } + } +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/N2 b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/N2 new file mode 100644 index 0000000000000000000000000000000000000000..123ad010661c88028131c132fd0a1576594533eb --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/N2 @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object N2; +} +// ************************************************************************* // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.766; + +boundaryField +{ + walls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/O2 b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/O2 new file mode 100644 index 0000000000000000000000000000000000000000..d92780c711b96d89fcc8eafb939e9fb2ad766675 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/O2 @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object O2; +} +// ************************************************************************* // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.234; + +boundaryField +{ + walls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/T b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/T new file mode 100644 index 0000000000000000000000000000000000000000..5ab29c45d9b6283f5c756de2687f074c92858370 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/T @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object T; +} +// ************************************************************************* // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 293; + +boundaryField +{ + walls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/U b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/U new file mode 100644 index 0000000000000000000000000000000000000000..dbc425bf798bdc7e84c56fb93cf8def4973f1753 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/U @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object U; +} +// ************************************************************************* // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + walls + { + type fixedValue; + value uniform (0 0 0); + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/Ydefault b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/Ydefault new file mode 100644 index 0000000000000000000000000000000000000000..fa61395a09416b89d92ef4f029650efb88f4867e --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/Ydefault @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object Ydefault; +} +// ************************************************************************* // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + walls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/alphat b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/alphat new file mode 100644 index 0000000000000000000000000000000000000000..fcbffd94632960759682202990c207bf87836cd1 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/alphat @@ -0,0 +1,32 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format binary; + class volScalarField; + location "0"; + object alphat; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + walls + { + type compressible::alphatWallFunction; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/epsilon b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/epsilon new file mode 100644 index 0000000000000000000000000000000000000000..53bec64b70e5c7986f67092cd385a6a488970abe --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/epsilon @@ -0,0 +1,32 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format binary; + class volScalarField; + location "0"; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 90; + +boundaryField +{ + walls + { + type epsilonWallFunction; + value uniform 90; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/k b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/k new file mode 100644 index 0000000000000000000000000000000000000000..d4a53552b3ea91f70eb0812ce4d90434f770c9e5 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/k @@ -0,0 +1,32 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format binary; + class volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 1; + +boundaryField +{ + walls + { + type kqRWallFunction; + value uniform 1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/nut b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/nut new file mode 100644 index 0000000000000000000000000000000000000000..cb79f1138446fad6b0c02fa1f7589ee31f94ceb6 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/nut @@ -0,0 +1,32 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format binary; + class volScalarField; + location "0"; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + walls + { + type nutkWallFunction; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/p b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/p new file mode 100644 index 0000000000000000000000000000000000000000..96fe56b77d12e0d374e47329b0e3740690f68caf --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/0.orig/p @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p; +} +// ************************************************************************* // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 101325; + +boundaryField +{ + walls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/Allclean b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/Allclean new file mode 100755 index 0000000000000000000000000000000000000000..c07f861837c4c4e3b2773c073e04f7e5f0ea38e6 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/Allclean @@ -0,0 +1,8 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +\rm -rf 0 +cleanCase diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/Allrun b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..7bceb07e3acf2592d130e138d87f4f9095511506 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/Allrun @@ -0,0 +1,55 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +eulerianCase=../eulerianInjection + +checkPrecursorCase() { + if [ ! -f ${1}/system/controlDict ] + then + echo "Error: unable to find precursor Eulerian case $eulerianCase" + exit 1 + fi +} + +copyLagrangianData() { + dir=$1 + latestTime=$(\cd $dir && foamListTimes -latestTime) + if [ ! "$latestTime" ] + then + # Try a processor directory + latestTime=$(\cd $dir && foamListTimes -latestTime -processor) + if [ "$latestTime" ] + then + dir="${dir}/processor0" + fi + fi + + if [ ! "$latestTime" ] + then + echo "Error: unable to find Lagrangian data in case $eulerianCase" + exit 1 + fi + + dir=$dir/${latestTime}/lagrangian + + echo "Copying lagrangian data from $dir to 0 directory" + \cp -r $dir 0 +} + + +checkPrecursorCase ${eulerianCase} + +restore0Dir; + +copyLagrangianData ${eulerianCase} + +runApplication blockMesh + +runApplication decomposePar + +runParallel $(getApplication) + +runApplication reconstructPar diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/constant/chemistryProperties b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/constant/chemistryProperties new file mode 100644 index 0000000000000000000000000000000000000000..d201a0f326ce7df1c4e07a38f7b57dbb44be83e3 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/constant/chemistryProperties @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object chemistryProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +chemistryType +{ + chemistrySolver noneode; + chemistryThermo nonwpsi; +} + +chemistry off; + +initialChemicalTimeStep 1e-07; + +odeCoeffs +{ + solver seulex; + eps 0.05; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/constant/combustionProperties b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/constant/combustionProperties new file mode 100644 index 0000000000000000000000000000000000000000..4f1d97bf2b081fdb5e2ec7e947ab06c1c064009a --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/constant/combustionProperties @@ -0,0 +1,25 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object combustionProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +combustionModel noCombustion<psiThermoCombustion>; + +active no; + +noCombustionCoeffs +{} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/constant/g b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/constant/g new file mode 100644 index 0000000000000000000000000000000000000000..c1edc7c793607493ac50c42aeb05258cf0e67ef3 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format binary; + class uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value (0 -9.81 0); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/constant/radiationProperties b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/constant/radiationProperties new file mode 100644 index 0000000000000000000000000000000000000000..19dcadd5d58cb518ef094551d85d15916fd353c0 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/constant/radiationProperties @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object radiationProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +radiation off; + +radiationModel none; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/constant/sprayCloudProperties b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/constant/sprayCloudProperties new file mode 100644 index 0000000000000000000000000000000000000000..06888d83a841316147411be0e2e827a1cad5f009 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/constant/sprayCloudProperties @@ -0,0 +1,161 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format binary; + class dictionary; + location "constant"; + object SprayCloudProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solution +{ + active true; + coupled true; + transient yes; + cellValueSourceCorrection on; + maxCo 0.3; + + sourceTerms + { + schemes + { + rho explicit 1; + U explicit 1; + Yi explicit 1; + h explicit 1; + radiation explicit 1; + } + } + + interpolationSchemes + { + rho cell; + U cellPoint; + thermo:mu cell; + T cell; + Cp cell; + kappa cell; + p cell; + } + + integrationSchemes + { + U Euler; + T analytical; + } +} + + +constantProperties +{ + T0 293; + + // Place holders for rho0 and Cp0 + // - reset from liquid properties using T0 + rho0 1000; + Cp0 4187; + + constantVolume false; +} + + +subModels +{ + particleForces + { + sphereDrag; + } + + injectionModels + { + model1 + { + type injectedParticleDistributionInjection; + SOI 0; + parcelBasisType mass; + cloud eulerianParticleCloud; + positionOffset (-0.025 2 -0.025); + binWidth 0.1e-3; + parcelsPerInjector 500; + resampleSize 100; // optional + applyDistributionMassTotal yes; + + // Placeholder only when using applyDistributionMassTotal + massTotal 0; + } + } + + dispersionModel none; + + patchInteractionModel standardWallInteraction; + + heatTransferModel RanzMarshall; + + compositionModel singlePhaseMixture; + + phaseChangeModel none; + + surfaceFilmModel none; + + atomizationModel none; + + breakupModel ReitzDiwakar; + + stochasticCollisionModel none; + + radiation off; + + standardWallInteractionCoeffs + { + type rebound; + } + + RanzMarshallCoeffs + { + BirdCorrection true; + } + + singlePhaseMixtureCoeffs + { + phases + ( + liquid + { + H2O 1; + } + ); + } + + ReitzDiwakarCoeffs + { + solveOscillationEq yes; + Cbag 6; + Cb 0.785; + Cstrip 0.5; + Cs 10; + } + + TABCoeffs + { + y0 0; + yDot0 0; + Cmu 10; + Comega 8; + WeCrit 12; + } +} + + +cloudFunctions +{} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/constant/thermophysicalProperties b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/constant/thermophysicalProperties new file mode 100644 index 0000000000000000000000000000000000000000..41996383a2f69bbea040c2e061d6fe79af447022 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/constant/thermophysicalProperties @@ -0,0 +1,81 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type hePsiThermo; + mixture multiComponentMixture; + transport const; + thermo hConst; + energy sensibleEnthalpy; + equationOfState perfectGas; + specie specie; +} + +species (N2 H2O); + +N2 +{ + specie + { + nMoles 1; + molWeight 28; + } + thermodynamics + { + Cp 1000; + Hf 0; + } + transport + { + mu 1.5e-5; + Pr 0.7; + } +} + +H2O +{ + specie + { + nMoles 1; + molWeight 28; + } + thermodynamics + { + Cp 4187; + Hf 0; + } + transport + { + mu 1e-6; + Pr 0.7; + } +} +inertSpecie N2; + +liquids +{ + H2O + { + defaultCoeffs yes; + } +} + +solids +{} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/constant/turbulenceProperties b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/constant/turbulenceProperties new file mode 100644 index 0000000000000000000000000000000000000000..37d2c70fa61a6b58979d4e20dada9c1de1e09237 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/constant/turbulenceProperties @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format binary; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/system/blockMeshDict b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/system/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..e62bdd9b924c04bb128b06d9495cfc117675747b --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/system/blockMeshDict @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 3; + +vertices +( + (-1 0 -1) + (-1 0 1) + ( 1 0 1) + ( 1 0 -1) + (-1 1 -1) + (-1 1 1) + ( 1 1 1) + ( 1 1 -1) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (40 40 40) simpleGrading (1 1 1) +); + +edges +( +); + +patches +( + wall walls + ( + (2 6 5 1) + (0 4 7 3) + (0 1 5 4) + (4 5 6 7) + (7 6 2 3) + (3 2 1 0) + ) +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/system/controlDict b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..e8a8c97553eb04e4a5b9c126f1381ff6474be077 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/system/controlDict @@ -0,0 +1,55 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application sprayFoam; + +startFrom latestTime; // startTime; + +startTime 0; + +stopAt endTime; + +endTime 0.5; + +deltaT 1e-4; + +writeControl adjustableRunTime; + +writeInterval 0.01; + +purgeWrite 0; + +writeFormat binary; + +writePrecision 6; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +adjustTimeStep yes; + +maxCo 0.1; + +maxDeltaT 1e-3; + +runTimeModifiable yes; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/system/decomposeParDict b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/system/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..09cbfd15750dea37bce52a361a4d3545718c334f --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/system/decomposeParDict @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + note "mesh decomposition control dictionary"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +method simple; + +simpleCoeffs +{ + n (2 1 2); + delta 0.001; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/system/fvSchemes b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..e0d6a06a9620a42e730bb4bc2b3809af2ef2c095 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/system/fvSchemes @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / 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(phi,U) Gauss upwind; + div(phid,p) Gauss upwind; + div(phi,K) Gauss linear; + div(phi,k) Gauss upwind; + div(phi,epsilon) Gauss upwind; + div(U) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; + div(phi,Yi_h) Gauss upwind; +} + +laplacianSchemes +{ + default Gauss linear orthogonal; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default orthogonal; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/system/fvSolution b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..964c4c8475651a46280cf4fca07c77d2affb1ce2 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/system/fvSolution @@ -0,0 +1,101 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + rho + { + solver PCG; + preconditioner DIC; + tolerance 1e-05; + relTol 0.1; + } + + rhoFinal + { + $rho; + tolerance 1e-05; + relTol 0; + } + + "(U|k|epsilon)" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-06; + relTol 0.1; + } + + p + { + solver GAMG; + tolerance 0; + relTol 0.1; + smoother GaussSeidel; + } + + pFinal + { + $p; + tolerance 1e-06; + relTol 0; + } + + "(U|k|epsilon)Final" + { + $U; + tolerance 1e-06; + relTol 0; + } + + "(Yi|O2|N2|H2O)" + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-6; + relTol 0; + } + + h + { + $Yi; + relTol 0.1; + } + + hFinal + { + $Yi; + } +} + +PIMPLE +{ + transonic no; + nCorrectors 2; + nNonOrthogonalCorrectors 0; + momentumPredictor yes; +} + +relaxationFactors +{ + equations + { + ".*Final" 1; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/N2 b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/N2 new file mode 100644 index 0000000000000000000000000000000000000000..123ad010661c88028131c132fd0a1576594533eb --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/N2 @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object N2; +} +// ************************************************************************* // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.766; + +boundaryField +{ + walls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/O2 b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/O2 new file mode 100644 index 0000000000000000000000000000000000000000..d92780c711b96d89fcc8eafb939e9fb2ad766675 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/O2 @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object O2; +} +// ************************************************************************* // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.234; + +boundaryField +{ + walls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/T b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/T new file mode 100644 index 0000000000000000000000000000000000000000..5ab29c45d9b6283f5c756de2687f074c92858370 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/T @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object T; +} +// ************************************************************************* // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 293; + +boundaryField +{ + walls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/U b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/U new file mode 100644 index 0000000000000000000000000000000000000000..dbc425bf798bdc7e84c56fb93cf8def4973f1753 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/U @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object U; +} +// ************************************************************************* // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + walls + { + type fixedValue; + value uniform (0 0 0); + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/Ydefault b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/Ydefault new file mode 100644 index 0000000000000000000000000000000000000000..fa61395a09416b89d92ef4f029650efb88f4867e --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/Ydefault @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object Ydefault; +} +// ************************************************************************* // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + walls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/alphat b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/alphat new file mode 100644 index 0000000000000000000000000000000000000000..fcbffd94632960759682202990c207bf87836cd1 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/alphat @@ -0,0 +1,32 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format binary; + class volScalarField; + location "0"; + object alphat; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + walls + { + type compressible::alphatWallFunction; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/epsilon b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/epsilon new file mode 100644 index 0000000000000000000000000000000000000000..53bec64b70e5c7986f67092cd385a6a488970abe --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/epsilon @@ -0,0 +1,32 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format binary; + class volScalarField; + location "0"; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 90; + +boundaryField +{ + walls + { + type epsilonWallFunction; + value uniform 90; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/k b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/k new file mode 100644 index 0000000000000000000000000000000000000000..d4a53552b3ea91f70eb0812ce4d90434f770c9e5 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/k @@ -0,0 +1,32 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format binary; + class volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 1; + +boundaryField +{ + walls + { + type kqRWallFunction; + value uniform 1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/nut b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/nut new file mode 100644 index 0000000000000000000000000000000000000000..cb79f1138446fad6b0c02fa1f7589ee31f94ceb6 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/nut @@ -0,0 +1,32 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format binary; + class volScalarField; + location "0"; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + walls + { + type nutkWallFunction; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/p b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/p new file mode 100644 index 0000000000000000000000000000000000000000..96fe56b77d12e0d374e47329b0e3740690f68caf --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/0.orig/p @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p; +} +// ************************************************************************* // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 101325; + +boundaryField +{ + walls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/Allclean b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/Allclean new file mode 100755 index 0000000000000000000000000000000000000000..c07f861837c4c4e3b2773c073e04f7e5f0ea38e6 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/Allclean @@ -0,0 +1,8 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +\rm -rf 0 +cleanCase diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/Allrun b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..7bceb07e3acf2592d130e138d87f4f9095511506 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/Allrun @@ -0,0 +1,55 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +eulerianCase=../eulerianInjection + +checkPrecursorCase() { + if [ ! -f ${1}/system/controlDict ] + then + echo "Error: unable to find precursor Eulerian case $eulerianCase" + exit 1 + fi +} + +copyLagrangianData() { + dir=$1 + latestTime=$(\cd $dir && foamListTimes -latestTime) + if [ ! "$latestTime" ] + then + # Try a processor directory + latestTime=$(\cd $dir && foamListTimes -latestTime -processor) + if [ "$latestTime" ] + then + dir="${dir}/processor0" + fi + fi + + if [ ! "$latestTime" ] + then + echo "Error: unable to find Lagrangian data in case $eulerianCase" + exit 1 + fi + + dir=$dir/${latestTime}/lagrangian + + echo "Copying lagrangian data from $dir to 0 directory" + \cp -r $dir 0 +} + + +checkPrecursorCase ${eulerianCase} + +restore0Dir; + +copyLagrangianData ${eulerianCase} + +runApplication blockMesh + +runApplication decomposePar + +runParallel $(getApplication) + +runApplication reconstructPar diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/constant/chemistryProperties b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/constant/chemistryProperties new file mode 100644 index 0000000000000000000000000000000000000000..d201a0f326ce7df1c4e07a38f7b57dbb44be83e3 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/constant/chemistryProperties @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object chemistryProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +chemistryType +{ + chemistrySolver noneode; + chemistryThermo nonwpsi; +} + +chemistry off; + +initialChemicalTimeStep 1e-07; + +odeCoeffs +{ + solver seulex; + eps 0.05; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/constant/combustionProperties b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/constant/combustionProperties new file mode 100644 index 0000000000000000000000000000000000000000..4f1d97bf2b081fdb5e2ec7e947ab06c1c064009a --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/constant/combustionProperties @@ -0,0 +1,25 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object combustionProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +combustionModel noCombustion<psiThermoCombustion>; + +active no; + +noCombustionCoeffs +{} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/constant/g b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/constant/g new file mode 100644 index 0000000000000000000000000000000000000000..c1edc7c793607493ac50c42aeb05258cf0e67ef3 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format binary; + class uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value (0 -9.81 0); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/constant/radiationProperties b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/constant/radiationProperties new file mode 100644 index 0000000000000000000000000000000000000000..19dcadd5d58cb518ef094551d85d15916fd353c0 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/constant/radiationProperties @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object radiationProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +radiation off; + +radiationModel none; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/constant/sprayCloudProperties b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/constant/sprayCloudProperties new file mode 100644 index 0000000000000000000000000000000000000000..e19ccc85622b39e5b826aabeb31b8d39a07e5dda --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/constant/sprayCloudProperties @@ -0,0 +1,156 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format binary; + class dictionary; + location "constant"; + object SprayCloudProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solution +{ + active true; + coupled true; + transient yes; + cellValueSourceCorrection on; + maxCo 0.3; + + sourceTerms + { + schemes + { + rho explicit 1; + U explicit 1; + Yi explicit 1; + h explicit 1; + radiation explicit 1; + } + } + + interpolationSchemes + { + rho cell; + U cellPoint; + thermo:mu cell; + T cell; + Cp cell; + kappa cell; + p cell; + } + + integrationSchemes + { + U Euler; + T analytical; + } +} + + +constantProperties +{ + T0 293; + + // Place holders for rho0 and Cp0 + // - reset from liquid properties using T0 + rho0 1000; + Cp0 4187; + + constantVolume false; +} + + +subModels +{ + particleForces + { + sphereDrag; + } + + injectionModels + { + model1 + { + type injectedParticleInjection; + SOI 0; + massTotal 6.0e-6; + parcelBasisType fixed; + nParticle 1; + cloud eulerianParticleCloud; + positionOffset (-0.025 2 -0.025); + } + } + + dispersionModel none; + + patchInteractionModel standardWallInteraction; + + heatTransferModel RanzMarshall; + + compositionModel singlePhaseMixture; + + phaseChangeModel none; + + surfaceFilmModel none; + + atomizationModel none; + + breakupModel ReitzDiwakar; + + stochasticCollisionModel none; + + radiation off; + + standardWallInteractionCoeffs + { + type rebound; + } + + RanzMarshallCoeffs + { + BirdCorrection true; + } + + singlePhaseMixtureCoeffs + { + phases + ( + liquid + { + H2O 1; + } + ); + } + + ReitzDiwakarCoeffs + { + solveOscillationEq yes; + Cbag 6; + Cb 0.785; + Cstrip 0.5; + Cs 10; + } + + TABCoeffs + { + y0 0; + yDot0 0; + Cmu 10; + Comega 8; + WeCrit 12; + } +} + + +cloudFunctions +{} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/constant/thermophysicalProperties b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/constant/thermophysicalProperties new file mode 100644 index 0000000000000000000000000000000000000000..41996383a2f69bbea040c2e061d6fe79af447022 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/constant/thermophysicalProperties @@ -0,0 +1,81 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type hePsiThermo; + mixture multiComponentMixture; + transport const; + thermo hConst; + energy sensibleEnthalpy; + equationOfState perfectGas; + specie specie; +} + +species (N2 H2O); + +N2 +{ + specie + { + nMoles 1; + molWeight 28; + } + thermodynamics + { + Cp 1000; + Hf 0; + } + transport + { + mu 1.5e-5; + Pr 0.7; + } +} + +H2O +{ + specie + { + nMoles 1; + molWeight 28; + } + thermodynamics + { + Cp 4187; + Hf 0; + } + transport + { + mu 1e-6; + Pr 0.7; + } +} +inertSpecie N2; + +liquids +{ + H2O + { + defaultCoeffs yes; + } +} + +solids +{} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/constant/turbulenceProperties b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/constant/turbulenceProperties new file mode 100644 index 0000000000000000000000000000000000000000..37d2c70fa61a6b58979d4e20dada9c1de1e09237 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/constant/turbulenceProperties @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format binary; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/system/blockMeshDict b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/system/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..e62bdd9b924c04bb128b06d9495cfc117675747b --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/system/blockMeshDict @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 3; + +vertices +( + (-1 0 -1) + (-1 0 1) + ( 1 0 1) + ( 1 0 -1) + (-1 1 -1) + (-1 1 1) + ( 1 1 1) + ( 1 1 -1) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (40 40 40) simpleGrading (1 1 1) +); + +edges +( +); + +patches +( + wall walls + ( + (2 6 5 1) + (0 4 7 3) + (0 1 5 4) + (4 5 6 7) + (7 6 2 3) + (3 2 1 0) + ) +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/system/controlDict b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..e8a8c97553eb04e4a5b9c126f1381ff6474be077 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/system/controlDict @@ -0,0 +1,55 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application sprayFoam; + +startFrom latestTime; // startTime; + +startTime 0; + +stopAt endTime; + +endTime 0.5; + +deltaT 1e-4; + +writeControl adjustableRunTime; + +writeInterval 0.01; + +purgeWrite 0; + +writeFormat binary; + +writePrecision 6; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +adjustTimeStep yes; + +maxCo 0.1; + +maxDeltaT 1e-3; + +runTimeModifiable yes; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/system/decomposeParDict b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/system/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..09cbfd15750dea37bce52a361a4d3545718c334f --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/system/decomposeParDict @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + note "mesh decomposition control dictionary"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +method simple; + +simpleCoeffs +{ + n (2 1 2); + delta 0.001; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/system/fvSchemes b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..e0d6a06a9620a42e730bb4bc2b3809af2ef2c095 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/system/fvSchemes @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / 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(phi,U) Gauss upwind; + div(phid,p) Gauss upwind; + div(phi,K) Gauss linear; + div(phi,k) Gauss upwind; + div(phi,epsilon) Gauss upwind; + div(U) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; + div(phi,Yi_h) Gauss upwind; +} + +laplacianSchemes +{ + default Gauss linear orthogonal; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default orthogonal; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/system/fvSolution b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..964c4c8475651a46280cf4fca07c77d2affb1ce2 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/system/fvSolution @@ -0,0 +1,101 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + rho + { + solver PCG; + preconditioner DIC; + tolerance 1e-05; + relTol 0.1; + } + + rhoFinal + { + $rho; + tolerance 1e-05; + relTol 0; + } + + "(U|k|epsilon)" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-06; + relTol 0.1; + } + + p + { + solver GAMG; + tolerance 0; + relTol 0.1; + smoother GaussSeidel; + } + + pFinal + { + $p; + tolerance 1e-06; + relTol 0; + } + + "(U|k|epsilon)Final" + { + $U; + tolerance 1e-06; + relTol 0; + } + + "(Yi|O2|N2|H2O)" + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-6; + relTol 0; + } + + h + { + $Yi; + relTol 0.1; + } + + hFinal + { + $Yi; + } +} + +PIMPLE +{ + transonic no; + nCorrectors 2; + nNonOrthogonalCorrectors 0; + momentumPredictor yes; +} + +relaxationFactors +{ + equations + { + ".*Final" 1; + } +} + +// ************************************************************************* //