diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/dragModel/dragModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/dragModel/dragModel.C index 7e97c66d4b..41e8ad799d 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/dragModel/dragModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/dragModel/dragModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,7 +25,7 @@ License #include "dragModel.H" #include "phasePair.H" -#include "swarmCorrection.H" +#include "noSwarm.H" #include "surfaceInterpolate.H" #include "BlendedInterfacialModel.H" @@ -87,11 +87,13 @@ Foam::dragModel::dragModel pair_(pair), swarmCorrection_ ( - swarmCorrection::New + dict.found("swarmCorrection") + ? swarmCorrection::New ( dict.subDict("swarmCorrection"), pair ) + : autoPtr(new swarmCorrections::noSwarm(dict, pair)) ) {} diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/segregated/segregated.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/segregated/segregated.C index 0f93b592f5..c80d101c33 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/segregated/segregated.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/segregated/segregated.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2014-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2020 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -107,30 +107,14 @@ Foam::tmp Foam::dragModels::segregated::K() const L.primitiveFieldRef() = cbrt(mesh.V()); L.correctBoundaryConditions(); - const volScalarField I + const dimensionedScalar residualAlpha ( - alpha1 - /max - ( - alpha1 + alpha2, - pair_.phase1().residualAlpha() + pair_.phase2().residualAlpha() - ) + (pair_.phase1().residualAlpha() + pair_.phase2().residualAlpha())/2 ); - const volScalarField magGradI - ( - max - ( - mag(fvc::grad(I)), - (pair_.phase1().residualAlpha() + pair_.phase2().residualAlpha())/L - ) - ); - - const volScalarField muI - ( - rho1*nu1*rho2*nu2 - /(rho1*nu1 + rho2*nu2) - ); + const volScalarField I(alpha1/max(alpha1 + alpha2, residualAlpha)); + const volScalarField magGradI(max(mag(fvc::grad(I)), 0.5*residualAlpha/L)); + const volScalarField muI(rho1*nu1*rho2*nu2/(rho1*nu1 + rho2*nu2)); const volScalarField limitedAlpha1 ( @@ -144,7 +128,7 @@ Foam::tmp Foam::dragModels::segregated::K() const const volScalarField muAlphaI ( - alpha1*rho1*nu1*alpha2*rho2*nu2 + limitedAlpha1*rho1*nu1*limitedAlpha2*rho2*nu2 /(limitedAlpha1*rho1*nu1 + limitedAlpha2*rho2*nu2) ); diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/system/controlDict b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/system/controlDict index dde079e6bd..9a032f6d8f 100644 --- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/system/controlDict +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/system/controlDict @@ -29,11 +29,11 @@ deltaT 0.001; writeControl adjustableRunTime; -writeInterval 0.05; +writeInterval 0.01; purgeWrite 0; -writeFormat ascii; +writeFormat binary; writePrecision 6; diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0/U b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0/U index 9b3fe6c7c6..26c32de240 100644 --- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0/U +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0/U @@ -8,7 +8,7 @@ FoamFile { version 2.0; - format binary; + format ascii; class volVectorField; location "0"; object U; diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0/p_rgh b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0/p_rgh index c866d84748..1f4da013a2 100644 --- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0/p_rgh +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0/p_rgh @@ -42,6 +42,8 @@ boundaryField { type totalPressure; p0 uniform 0; + U U.air; + phi phi.air; } defaultFaces diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/system/setFieldsDict b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/system/setFieldsDict index 81cf086898..93d78e36d8 100644 --- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/system/setFieldsDict +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/system/setFieldsDict @@ -21,7 +21,6 @@ defaultFieldValues volScalarFieldValue alpha.water 0 volScalarFieldValue alpha.oil 0 volScalarFieldValue alpha.mercury 0 - volVectorFieldValue U (0 0 0) ); regions diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/T.air b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/T.air new file mode 100644 index 0000000000..484aed45cc --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/T.air @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object T.air; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0]; + +internalField uniform 300; + +boundaryField +{ + leftWall + { + type zeroGradient; + } + + rightWall + { + type zeroGradient; + } + + lowerWall + { + type zeroGradient; + } + + atmosphere + { + type inletOutlet; + phi phi.air; + inletValue $internalField; + value $internalField; + } + + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/T.mercury b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/T.mercury new file mode 100644 index 0000000000..f79952b804 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/T.mercury @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object T.mercury; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0]; + +internalField uniform 300; + +boundaryField +{ + leftWall + { + type zeroGradient; + } + + rightWall + { + type zeroGradient; + } + + lowerWall + { + type zeroGradient; + } + + atmosphere + { + type inletOutlet; + phi phi.mercury; + inletValue $internalField; + value $internalField; + } + + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/T.oil b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/T.oil new file mode 100644 index 0000000000..8a567a1a7c --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/T.oil @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object T.oil; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0]; + +internalField uniform 300; + +boundaryField +{ + leftWall + { + type zeroGradient; + } + + rightWall + { + type zeroGradient; + } + + lowerWall + { + type zeroGradient; + } + + atmosphere + { + type inletOutlet; + phi phi.oil; + inletValue $internalField; + value $internalField; + } + + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/T.water b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/T.water new file mode 100644 index 0000000000..a8d2878573 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/T.water @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object T.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0]; + +internalField uniform 300; + +boundaryField +{ + leftWall + { + type zeroGradient; + } + + rightWall + { + type zeroGradient; + } + + lowerWall + { + type zeroGradient; + } + + atmosphere + { + type inletOutlet; + phi phi.water; + inletValue $internalField; + value $internalField; + } + + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/U b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/U new file mode 100644 index 0000000000..e0711ac4a1 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/U @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ 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 +{ + leftWall + { + type noSlip; + } + + rightWall + { + type noSlip; + } + + lowerWall + { + type noSlip; + } + + atmosphere + { + type fluxCorrectedVelocity; + value uniform (0 0 0); + } + + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/U.air b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/U.air new file mode 100644 index 0000000000..9b6e2b4a73 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/U.air @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object U.air; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + leftWall + { + type noSlip; + } + + rightWall + { + type noSlip; + } + + lowerWall + { + type noSlip; + } + + atmosphere + { + type pressureInletOutletVelocity; + phi phi.air; + value $internalField; + } + + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/U.mercury b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/U.mercury new file mode 100644 index 0000000000..8c37bc44f0 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/U.mercury @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object U.mercury; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + leftWall + { + type noSlip; + } + + rightWall + { + type noSlip; + } + + lowerWall + { + type noSlip; + } + + atmosphere + { + type inletOutlet; + phi phi.mercury; + inletValue $internalField; + } + + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/U.oil b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/U.oil new file mode 100644 index 0000000000..98f74d0b83 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/U.oil @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object U.oil; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + leftWall + { + type noSlip; + } + + rightWall + { + type noSlip; + } + + lowerWall + { + type noSlip; + } + + atmosphere + { + type pressureInletOutletVelocity; + phi phi.oil; + value $internalField; + } + + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/U.water b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/U.water new file mode 100644 index 0000000000..54fc71280f --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/U.water @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object Uwater; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + leftWall + { + type noSlip; + } + + rightWall + { + type noSlip; + } + + lowerWall + { + type noSlip; + } + + atmosphere + { + type pressureInletOutletVelocity; + phi phi.water; + value $internalField; + } + + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/alpha.air.orig b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/alpha.air.orig new file mode 100644 index 0000000000..cccb052e1a --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/alpha.air.orig @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alpha.air; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type zeroGradient; + } + + rightWall + { + type zeroGradient; + } + + lowerWall + { + type zeroGradient; + } + + atmosphere + { + type inletOutlet; + phi phi.air; + inletValue uniform 1; + value uniform 1; + } + + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/alpha.mercury.orig b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/alpha.mercury.orig new file mode 100644 index 0000000000..3dd8646a57 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/alpha.mercury.orig @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alpha.mercury; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type zeroGradient; + } + + rightWall + { + type zeroGradient; + } + + lowerWall + { + type zeroGradient; + } + + atmosphere + { + type inletOutlet; + phi phi.mercury; + inletValue uniform 0; + value uniform 0; + } + + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/alpha.oil.orig b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/alpha.oil.orig new file mode 100644 index 0000000000..44b06819b6 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/alpha.oil.orig @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alpha.oil; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type zeroGradient; + } + + rightWall + { + type zeroGradient; + } + + lowerWall + { + type zeroGradient; + } + + atmosphere + { + type inletOutlet; + phi phi.oil; + inletValue uniform 0; + value uniform 0; + } + + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/alpha.water.orig b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/alpha.water.orig new file mode 100644 index 0000000000..055995bfa1 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/alpha.water.orig @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alpha.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type zeroGradient; + } + + rightWall + { + type zeroGradient; + } + + lowerWall + { + type zeroGradient; + } + + atmosphere + { + type inletOutlet; + phi phi.water; + inletValue uniform 0; + value uniform 0; + } + + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/p b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/p new file mode 100644 index 0000000000..109848a794 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/p @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 1e5; + +boundaryField +{ + leftWall + { + type calculated; + value $internalField; + } + + rightWall + { + type calculated; + value $internalField; + } + + lowerWall + { + type calculated; + value $internalField; + } + + atmosphere + { + type calculated; + value $internalField; + } + + defaultFaces + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/p_rgh b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/p_rgh new file mode 100644 index 0000000000..942b7edf2a --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0/p_rgh @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 1e5; + +boundaryField +{ + leftWall + { + type fixedFluxPressure; + value $internalField; + } + + rightWall + { + type fixedFluxPressure; + value $internalField; + } + + lowerWall + { + type fixedFluxPressure; + value $internalField; + } + + atmosphere + { + type prghTotalPressure; + p0 $internalField; + U U.air; + phi phi.air; + rho thermo:rho.air; + value $internalField; + } + + defaultFaces + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/Allrun b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/Allrun new file mode 100755 index 0000000000..229ef5105c --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/Allrun @@ -0,0 +1,14 @@ +#!/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) + +runApplication blockMesh +runApplication setFields +runApplication $application + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/AllrunFine b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/AllrunFine new file mode 100755 index 0000000000..1993f87d4f --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/AllrunFine @@ -0,0 +1,16 @@ +#!/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) + +runApplication blockMesh -dict system/fineBlockMeshDict +runApplication setFields +runApplication decomposePar +runParallel $application +runApplication reconstructPar + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/g b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/g new file mode 100644 index 0000000000..e75aeb5349 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ 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/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/phaseProperties b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/phaseProperties new file mode 100644 index 0000000000..bcc99becfb --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/phaseProperties @@ -0,0 +1,204 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object phaseProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +type basicMultiphaseSystem; + +phases (water oil mercury air); + +water +{ + type pureIsothermalPhaseModel; + diameterModel constant; + constantCoeffs + { + d 1e-4; + } + + residualAlpha 1e-3; +} + +oil +{ + type pureIsothermalPhaseModel; + diameterModel constant; + constantCoeffs + { + d 1e-4; + } + + residualAlpha 1e-3; +} + +mercury +{ + type pureIsothermalPhaseModel; + diameterModel constant; + constantCoeffs + { + d 1e-4; + } + + residualAlpha 1e-3; +} + +air +{ + type pureIsothermalPhaseModel; + diameterModel constant; + constantCoeffs + { + d 3e-3; + } + + residualAlpha 1e-3; +} + +blending +{ + default + { + type none; + continuousPhase none; + } +} + +surfaceTension +( + (air and water) + { + type constant; + sigma 0.07; + } + + (air and oil) + { + type constant; + sigma 0.032; + } + + (air and mercury) + { + type constant; + sigma 0.486; + } + + (water and oil) + { + type constant; + sigma 0.03; + } + + (water and mercury) + { + type constant; + sigma 0.415; + } + + (oil and mercury) + { + type constant; + sigma 0.4; + } +); + +interfaceCompression +( + (air and water) 1 + (air and oil) 1 + (air and mercury) 1 + (water and oil) 1 + (water and mercury) 1 + (oil and mercury) 1 +); + +aspectRatio +(); + +drag +( + (air and water) + { + type segregated; + + m 0.1; + n 8; + } + + (air and oil) + { + type segregated; + + m 0.1; + n 8; + } + + (air and mercury) + { + type segregated; + + m 0.1; + n 8; + } + + (water and oil) + { + type segregated; + + m 0.1; + n 8; + } + + (water and mercury) + { + type segregated; + + m 0.1; + n 8; + } + + (oil and mercury) + { + type segregated; + + m 0.1; + n 8; + } +); + +virtualMass +(); + +heatTransfer +(); + +phaseTransfer +(); + +lift +(); + +wallLubrication +(); + +turbulentDispersion +(); + +// Minimum allowable pressure +pMin 10000; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/thermophysicalProperties.air b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/thermophysicalProperties.air new file mode 100644 index 0000000000..aca85e96f4 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/thermophysicalProperties.air @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties.air; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo hConst; + equationOfState perfectGas; + specie specie; + energy sensibleInternalEnergy; +} + +mixture +{ + specie + { + molWeight 28.9; + } + thermodynamics + { + Cp 1007; + Hf 0; + } + transport + { + mu 1.84e-05; + Pr 0.7; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/thermophysicalProperties.mercury b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/thermophysicalProperties.mercury new file mode 100644 index 0000000000..18091e495f --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/thermophysicalProperties.mercury @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties.oil; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo hConst; + equationOfState rhoConst; + specie specie; + energy sensibleInternalEnergy; +} + +mixture +{ + specie + { + molWeight 200; + } + equationOfState + { + rho 13529; + } + thermodynamics + { + Cp 135; + Hf 0; + } + transport + { + mu 8.6e-4; + Pr 111; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/thermophysicalProperties.oil b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/thermophysicalProperties.oil new file mode 100644 index 0000000000..2a84f2b931 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/thermophysicalProperties.oil @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties.oil; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo hConst; + equationOfState rhoConst; + specie specie; + energy sensibleInternalEnergy; +} + +mixture +{ + specie + { + molWeight 160; + } + equationOfState + { + rho 500; + } + thermodynamics + { + Cp 4195; + Hf 0; + } + transport + { + mu 5e-4; + Pr 1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/thermophysicalProperties.water b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/thermophysicalProperties.water new file mode 100644 index 0000000000..f745ebe9c5 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/thermophysicalProperties.water @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo eConst; + equationOfState rPolynomial; + specie specie; + energy sensibleInternalEnergy; +} + +mixture +{ + specie + { + molWeight 18; + } + equationOfState + { + C (0.001278 -2.1055e-06 3.9689e-09 4.3772e-13 -2.0225e-16); + } + thermodynamics + { + Cv 4195; + Hf 0; + } + transport + { + mu 3.645e-4; + Pr 2.289; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/transportProperties b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/transportProperties new file mode 100644 index 0000000000..4c940c2cd1 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/transportProperties @@ -0,0 +1,236 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +phases +( + water + { + nu 1e-06; + kappa 1e-06; + Cp 4195; + rho 1000; + + diameterModel constant; + constantCoeffs + { + d 1e-3; + } + } + + oil + { + nu 1e-06; + kappa 1e-06; + Cp 4195; + rho 500; + + diameterModel constant; + constantCoeffs + { + d 1e-3; + } + } + + mercury + { + nu 1.125e-07; + kappa 1e-06; + Cp 4195; + rho 13529; + + diameterModel constant; + constantCoeffs + { + d 1e-3; + } + } + + air + { + nu 1.48e-05; + kappa 2.63e-2; + Cp 1007; + rho 1; + + diameterModel constant; + constantCoeffs + { + d 3e-3; + } + } +); + +sigmas +( + (air water) 0.07 + (air oil) 0.07 + (air mercury) 0.07 +); + +interfaceCompression +( + (air water) 1 + (air oil) 1 + (air mercury) 1 +); + +virtualMass +( +); + +drag +( + (air water) + { + type blended; + + air + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + water + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + residualPhaseFraction 1e-3; + residualSlip 1e-3; + } + + (air oil) + { + type blended; + + air + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + oil + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + residualPhaseFraction 1e-3; + residualSlip 1e-3; + } + + (air mercury) + { + type blended; + + air + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + mercury + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + residualPhaseFraction 1e-3; + residualSlip 1e-3; + } + + (water oil) + { + type blended; + + water + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + oil + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + residualPhaseFraction 1e-3; + residualSlip 1e-3; + } + + (water mercury) + { + type blended; + + water + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + mercury + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + residualPhaseFraction 1e-3; + residualSlip 1e-3; + } + + (oil mercury) + { + type blended; + + oil + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + mercury + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + residualPhaseFraction 1e-3; + residualSlip 1e-3; + } +); + + +// This is a dummy to support the Smagorinsky model +transportModel Newtonian; +nu [0 2 -1 0 0 0 0] 0; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/turbulenceProperties b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/turbulenceProperties new file mode 100644 index 0000000000..ff13edf0a6 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/turbulenceProperties @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/turbulenceProperties.air b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/turbulenceProperties.air new file mode 100644 index 0000000000..32e9e1ba67 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/turbulenceProperties.air @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties.air; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/turbulenceProperties.mercury b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/turbulenceProperties.mercury new file mode 100644 index 0000000000..6507dd153b --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/turbulenceProperties.mercury @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties.mercury; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/turbulenceProperties.oil b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/turbulenceProperties.oil new file mode 100644 index 0000000000..fa3246f320 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/turbulenceProperties.oil @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties.oil; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/turbulenceProperties.water b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/turbulenceProperties.water new file mode 100644 index 0000000000..e23bf545cc --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/turbulenceProperties.water @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/blockMeshDict b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/blockMeshDict new file mode 100644 index 0000000000..bddf6b56a1 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/blockMeshDict @@ -0,0 +1,108 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 0.146; + +vertices +( + (0 0 0) + (2 0 0) + (2.16438 0 0) + (4 0 0) + (0 0.32876 0) + (2 0.32876 0) + (2.16438 0.32876 0) + (4 0.32876 0) + (0 4 0) + (2 4 0) + (2.16438 4 0) + (4 4 0) + (0 0 0.1) + (2 0 0.1) + (2.16438 0 0.1) + (4 0 0.1) + (0 0.32876 0.1) + (2 0.32876 0.1) + (2.16438 0.32876 0.1) + (4 0.32876 0.1) + (0 4 0.1) + (2 4 0.1) + (2.16438 4 0.1) + (4 4 0.1) +); + +blocks +( + hex (0 1 5 4 12 13 17 16) (23 8 1) simpleGrading (1 1 1) + hex (2 3 7 6 14 15 19 18) (19 8 1) simpleGrading (1 1 1) + hex (4 5 9 8 16 17 21 20) (23 42 1) simpleGrading (1 1 1) + hex (5 6 10 9 17 18 22 21) (4 42 1) simpleGrading (1 1 1) + hex (6 7 11 10 18 19 23 22) (19 42 1) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + leftWall + { + type wall; + faces + ( + (0 12 16 4) + (4 16 20 8) + ); + } + rightWall + { + type wall; + faces + ( + (7 19 15 3) + (11 23 19 7) + ); + } + lowerWall + { + type wall; + faces + ( + (0 1 13 12) + (1 5 17 13) + (5 6 18 17) + (2 14 18 6) + (2 3 15 14) + ); + } + atmosphere + { + type patch; + faces + ( + (8 20 21 9) + (9 21 22 10) + (10 22 23 11) + ); + } +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/controlDict b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/controlDict new file mode 100644 index 0000000000..ee7aa58f61 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/controlDict @@ -0,0 +1,56 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application reactingMultiphaseEulerFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 6; + +deltaT 0.001; + +writeControl adjustableRunTime; + +writeInterval 0.02; + +purgeWrite 0; + +writeFormat binary; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep yes; + +maxCo 0.5; +maxAlphaCo 0.5; + +maxDeltaT 1; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/decomposeParDict b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/decomposeParDict new file mode 100644 index 0000000000..f41ea9e0e9 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/decomposeParDict @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +method simple; + +simpleCoeffs +{ + n (2 2 1); + delta 0.001; +} + +hierarchicalCoeffs +{ + n (1 1 1); + delta 0.001; + order xyz; +} + +manualCoeffs +{ + dataFile ""; +} + +distributed no; + +roots ( ); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/fineBlockMeshDict b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/fineBlockMeshDict new file mode 100644 index 0000000000..a57e967cb2 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/fineBlockMeshDict @@ -0,0 +1,108 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 0.146; + +vertices +( + (0 0 0) + (2 0 0) + (2.16438 0 0) + (4 0 0) + (0 0.32876 0) + (2 0.32876 0) + (2.16438 0.32876 0) + (4 0.32876 0) + (0 4 0) + (2 4 0) + (2.16438 4 0) + (4 4 0) + (0 0 0.1) + (2 0 0.1) + (2.16438 0 0.1) + (4 0 0.1) + (0 0.32876 0.1) + (2 0.32876 0.1) + (2.16438 0.32876 0.1) + (4 0.32876 0.1) + (0 4 0.1) + (2 4 0.1) + (2.16438 4 0.1) + (4 4 0.1) +); + +blocks +( + hex (0 1 5 4 12 13 17 16) (92 15 1) simpleGrading (1 1 1) + hex (2 3 7 6 14 15 19 18) (76 15 1) simpleGrading (1 1 1) + hex (4 5 9 8 16 17 21 20) (92 180 1) simpleGrading (1 1 1) + hex (5 6 10 9 17 18 22 21) (8 180 1) simpleGrading (1 1 1) + hex (6 7 11 10 18 19 23 22) (76 180 1) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + leftWall + { + type wall; + faces + ( + (0 12 16 4) + (4 16 20 8) + ); + } + rightWall + { + type wall; + faces + ( + (7 19 15 3) + (11 23 19 7) + ); + } + lowerWall + { + type wall; + faces + ( + (0 1 13 12) + (1 5 17 13) + (5 6 18 17) + (2 14 18 6) + (2 3 15 14) + ); + } + atmosphere + { + type patch; + faces + ( + (8 20 21 9) + (9 21 22 10) + (10 22 23 11) + ); + } +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/fvSchemes b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/fvSchemes new file mode 100644 index 0000000000..09e53669d0 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/fvSchemes @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + "div\(phi,alpha.*\)" Gauss vanLeer; + "div\(phir,alpha.*,alpha.*\)" Gauss vanLeer; + + "div\(alphaRhoPhi.*,U.*\)" Gauss limitedLinearV 1; + "div\(phi.*,U.*\)" Gauss limitedLinearV 1; + + "div\(alphaRhoPhi.*,(h|e).*\)" Gauss limitedLinear 1; + "div\(alphaRhoPhi.*,K.*\)" Gauss limitedLinear 1; + "div\(alphaPhi.*,p\)" Gauss limitedLinear 1; + + "div\(\(\(\(alpha.*\*thermo:rho.*\)*nuEff.*\)\*dev2\(T\(grad\(U.*\)\)\)\)\)" Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/fvSolution b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/fvSolution new file mode 100644 index 0000000000..5e3c312817 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/fvSolution @@ -0,0 +1,91 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + "alpha.*" + { + nAlphaCorr 1; + nAlphaSubCycles 3; + } + + p_rgh + { + solver GAMG; + tolerance 1e-7; + relTol 0.01; + smoother GaussSeidel; + } + + p_rghFinal + { + solver PCG; + preconditioner + { + preconditioner GAMG; + tolerance 1e-7; + relTol 0; + nVcycles 2; + smoother GaussSeidel; + } + tolerance 1e-7; + relTol 0; + maxIter 30; + } + + "pcorr.*" + { + $p_rghFinal; + tolerance 1e-5; + relTol 0; + } + + "U.*" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-5; + relTol 0; + minIter 1; + } + + "e.*" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-8; + relTol 0; + maxIter 0; + } +} + +PIMPLE +{ + nCorrectors 3; + nNonOrthogonalCorrectors 0; +} + +relaxationFactors +{ + equations + { + ".*" 1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/setFieldsDict b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/setFieldsDict new file mode 100644 index 0000000000..93d78e36d8 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/setFieldsDict @@ -0,0 +1,64 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue alpha.air 1 + volScalarFieldValue alpha.water 0 + volScalarFieldValue alpha.oil 0 + volScalarFieldValue alpha.mercury 0 +); + +regions +( + boxToCell + { + box (0 0 -1) (0.1461 0.292 1); + fieldValues + ( + volScalarFieldValue alpha.water 1 + volScalarFieldValue alpha.oil 0 + volScalarFieldValue alpha.mercury 0 + volScalarFieldValue alpha.air 0 + ); + } + boxToCell + { + box (0.1461 0 -1) (0.2922 0.292 1); + fieldValues + ( + volScalarFieldValue alpha.water 0 + volScalarFieldValue alpha.oil 1 + volScalarFieldValue alpha.mercury 0 + volScalarFieldValue alpha.air 0 + ); + } + boxToCell + { + box (0 0 -1) (0.1461 0.1 1); + fieldValues + ( + volScalarFieldValue alpha.water 0 + volScalarFieldValue alpha.oil 0 + volScalarFieldValue alpha.mercury 1 + volScalarFieldValue alpha.air 0 + ); + } +); + + +// ************************************************************************* //