From 7c8376763a94a03aef4fe1c4387a55501ab2a570 Mon Sep 17 00:00:00 2001 From: Rahimi Date: Wed, 29 Jan 2025 11:48:44 -0700 Subject: [PATCH 1/4] added airlift tutorial case --- tutorial_cases/airlift_40m/0.org/H2O.liquid | 44 ++ tutorial_cases/airlift_40m/0.org/N2.gas | 44 ++ tutorial_cases/airlift_40m/0.org/O2.gas | 45 ++ tutorial_cases/airlift_40m/0.org/T.gas | 47 ++ tutorial_cases/airlift_40m/0.org/T.liquid | 47 ++ tutorial_cases/airlift_40m/0.org/U.gas | 45 ++ tutorial_cases/airlift_40m/0.org/U.liquid | 43 ++ tutorial_cases/airlift_40m/0.org/Ydefault.gas | 45 ++ .../airlift_40m/0.org/Ydefault.liquid | 45 ++ tutorial_cases/airlift_40m/0.org/alpha.gas | 42 ++ tutorial_cases/airlift_40m/0.org/alpha.liquid | 42 ++ tutorial_cases/airlift_40m/0.org/alphat.gas | 44 ++ .../airlift_40m/0.org/alphat.liquid | 44 ++ tutorial_cases/airlift_40m/0.org/epsilon.gas | 47 ++ .../airlift_40m/0.org/epsilon.liquid | 43 ++ tutorial_cases/airlift_40m/0.org/k.gas | 49 ++ tutorial_cases/airlift_40m/0.org/k.liquid | 45 ++ tutorial_cases/airlift_40m/0.org/nut.gas | 41 ++ tutorial_cases/airlift_40m/0.org/nut.liquid | 43 ++ tutorial_cases/airlift_40m/0.org/p | 45 ++ tutorial_cases/airlift_40m/0.org/p_rgh | 46 ++ tutorial_cases/airlift_40m/constant/g | 22 + .../airlift_40m/constant/globalVars | 107 ++++ .../constant/momentumTransport.gas | 29 + .../constant/momentumTransport.liquid | 26 + .../airlift_40m/constant/phaseProperties | 291 +++++++++ .../constant/thermophysicalProperties.gas | 118 ++++ .../constant/thermophysicalProperties.liquid | 132 ++++ tutorial_cases/airlift_40m/presteps.sh | 7 + tutorial_cases/airlift_40m/submitjob | 20 + .../airlift_40m/system/blockMeshDict | 604 ++++++++++++++++++ .../airlift_40m/system/circinlet.m4 | 236 +++++++ .../airlift_40m/system/conc_cylinder_mesh.m4 | 604 ++++++++++++++++++ tutorial_cases/airlift_40m/system/controlDict | 67 ++ .../airlift_40m/system/cylinderMesh.m4 | 154 +++++ .../airlift_40m/system/decomposeParDict | 45 ++ tutorial_cases/airlift_40m/system/fvSchemes | 72 +++ tutorial_cases/airlift_40m/system/fvSolution | 103 +++ .../airlift_40m/system/setFieldsDict | 39 ++ 39 files changed, 3612 insertions(+) create mode 100644 tutorial_cases/airlift_40m/0.org/H2O.liquid create mode 100644 tutorial_cases/airlift_40m/0.org/N2.gas create mode 100644 tutorial_cases/airlift_40m/0.org/O2.gas create mode 100644 tutorial_cases/airlift_40m/0.org/T.gas create mode 100644 tutorial_cases/airlift_40m/0.org/T.liquid create mode 100644 tutorial_cases/airlift_40m/0.org/U.gas create mode 100644 tutorial_cases/airlift_40m/0.org/U.liquid create mode 100644 tutorial_cases/airlift_40m/0.org/Ydefault.gas create mode 100644 tutorial_cases/airlift_40m/0.org/Ydefault.liquid create mode 100644 tutorial_cases/airlift_40m/0.org/alpha.gas create mode 100644 tutorial_cases/airlift_40m/0.org/alpha.liquid create mode 100644 tutorial_cases/airlift_40m/0.org/alphat.gas create mode 100644 tutorial_cases/airlift_40m/0.org/alphat.liquid create mode 100644 tutorial_cases/airlift_40m/0.org/epsilon.gas create mode 100644 tutorial_cases/airlift_40m/0.org/epsilon.liquid create mode 100644 tutorial_cases/airlift_40m/0.org/k.gas create mode 100644 tutorial_cases/airlift_40m/0.org/k.liquid create mode 100644 tutorial_cases/airlift_40m/0.org/nut.gas create mode 100644 tutorial_cases/airlift_40m/0.org/nut.liquid create mode 100644 tutorial_cases/airlift_40m/0.org/p create mode 100644 tutorial_cases/airlift_40m/0.org/p_rgh create mode 100644 tutorial_cases/airlift_40m/constant/g create mode 100644 tutorial_cases/airlift_40m/constant/globalVars create mode 100644 tutorial_cases/airlift_40m/constant/momentumTransport.gas create mode 100644 tutorial_cases/airlift_40m/constant/momentumTransport.liquid create mode 100644 tutorial_cases/airlift_40m/constant/phaseProperties create mode 100644 tutorial_cases/airlift_40m/constant/thermophysicalProperties.gas create mode 100644 tutorial_cases/airlift_40m/constant/thermophysicalProperties.liquid create mode 100644 tutorial_cases/airlift_40m/presteps.sh create mode 100644 tutorial_cases/airlift_40m/submitjob create mode 100644 tutorial_cases/airlift_40m/system/blockMeshDict create mode 100644 tutorial_cases/airlift_40m/system/circinlet.m4 create mode 100644 tutorial_cases/airlift_40m/system/conc_cylinder_mesh.m4 create mode 100644 tutorial_cases/airlift_40m/system/controlDict create mode 100644 tutorial_cases/airlift_40m/system/cylinderMesh.m4 create mode 100644 tutorial_cases/airlift_40m/system/decomposeParDict create mode 100644 tutorial_cases/airlift_40m/system/fvSchemes create mode 100644 tutorial_cases/airlift_40m/system/fvSolution create mode 100644 tutorial_cases/airlift_40m/system/setFieldsDict diff --git a/tutorial_cases/airlift_40m/0.org/H2O.liquid b/tutorial_cases/airlift_40m/0.org/H2O.liquid new file mode 100644 index 00000000..83c3a6ed --- /dev/null +++ b/tutorial_cases/airlift_40m/0.org/H2O.liquid @@ -0,0 +1,44 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 9 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + object water.liquid; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 1; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type fixedValue; + value $internalField; + } + + outlet + { + type inletOutlet; + phi phi.liquid; + inletValue $internalField; + value $internalField; + } + + walls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/0.org/N2.gas b/tutorial_cases/airlift_40m/0.org/N2.gas new file mode 100644 index 00000000..b2173f88 --- /dev/null +++ b/tutorial_cases/airlift_40m/0.org/N2.gas @@ -0,0 +1,44 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 9 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + object N2.gas; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 1; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type fixedValue; + value uniform 0.77; + } + + outlet + { + type inletOutlet; + phi phi.gas; + inletValue uniform 0; + value uniform 0; + } + + walls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/0.org/O2.gas b/tutorial_cases/airlift_40m/0.org/O2.gas new file mode 100644 index 00000000..c5781be2 --- /dev/null +++ b/tutorial_cases/airlift_40m/0.org/O2.gas @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 9 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + object O2.gas; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.0; + +#include "${FOAM_CASE}/constant/globalVars" + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type fixedValue; + value uniform 0.23; + } + + outlet + { + type inletOutlet; + phi phi.gas; + inletValue uniform 0; + value uniform 0; + } + + walls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/0.org/T.gas b/tutorial_cases/airlift_40m/0.org/T.gas new file mode 100644 index 00000000..4919baf5 --- /dev/null +++ b/tutorial_cases/airlift_40m/0.org/T.gas @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 9 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + object T.gas; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +#include "${FOAM_CASE}/constant/globalVars" + +internalField uniform $T0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type fixedValue; + value $internalField; + } + + outlet + { + type inletOutlet; + phi phi.gas; + inletValue $internalField; + value $internalField; + } + + walls + { + type zeroGradient; + } + +} + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/0.org/T.liquid b/tutorial_cases/airlift_40m/0.org/T.liquid new file mode 100644 index 00000000..6e0a6083 --- /dev/null +++ b/tutorial_cases/airlift_40m/0.org/T.liquid @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 9 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + object T.liquid; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +#include "${FOAM_CASE}/constant/globalVars" + +internalField uniform $T0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type zeroGradient; // As the inlet is only gas we can use zerograd for T.liq + // type fixedValue; + // value $internalField; + } + + outlet + { + type inletOutlet; + phi phi.liquid; + inletValue $internalField; + value $internalField; + } + + walls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/0.org/U.gas b/tutorial_cases/airlift_40m/0.org/U.gas new file mode 100644 index 00000000..e9cafebe --- /dev/null +++ b/tutorial_cases/airlift_40m/0.org/U.gas @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 9 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volVectorField; + object U.gas; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +#include "${FOAM_CASE}/constant/globalVars" + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type flowRateInletVelocity; + volumetricFlowRate $V_flowRate; + } + + outlet + { + type pressureInletOutletVelocity; + phi phi.gas; + value $internalField; + } + + walls + { + type slip; + } +} + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/0.org/U.liquid b/tutorial_cases/airlift_40m/0.org/U.liquid new file mode 100644 index 00000000..2338ed50 --- /dev/null +++ b/tutorial_cases/airlift_40m/0.org/U.liquid @@ -0,0 +1,43 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 9 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2; + format ascii; + class volVectorField; + object U.liquid; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type fixedValue; + value $internalField; + } + outlet + { + type pressureInletOutletVelocity; + phi phi.liquid; + value $internalField; + } + walls + { + type noSlip; + } +} + + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/0.org/Ydefault.gas b/tutorial_cases/airlift_40m/0.org/Ydefault.gas new file mode 100644 index 00000000..87cb0102 --- /dev/null +++ b/tutorial_cases/airlift_40m/0.org/Ydefault.gas @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 9 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + object Ydefault.gas; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type fixedValue; + value uniform 0.0; + } + + outlet + { + type inletOutlet; + phi phi.gas; + inletValue $internalField; + value $internalField; + } + + walls + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/0.org/Ydefault.liquid b/tutorial_cases/airlift_40m/0.org/Ydefault.liquid new file mode 100644 index 00000000..a63d45bd --- /dev/null +++ b/tutorial_cases/airlift_40m/0.org/Ydefault.liquid @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 9 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + object Ydefault.liquid; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type fixedValue; + value uniform 0.0; + } + + outlet + { + type inletOutlet; + phi phi.liquid; + inletValue $internalField; + value $internalField; + } + + walls + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/0.org/alpha.gas b/tutorial_cases/airlift_40m/0.org/alpha.gas new file mode 100644 index 00000000..4d97a1e8 --- /dev/null +++ b/tutorial_cases/airlift_40m/0.org/alpha.gas @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 9 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + location "0"; + object alpha.gas; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 1; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform 1; + } + outlet + { + type inletOutlet; + phi phi.gas; + inletValue uniform 1; + value uniform 1; + } + walls + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/0.org/alpha.liquid b/tutorial_cases/airlift_40m/0.org/alpha.liquid new file mode 100644 index 00000000..59a28e27 --- /dev/null +++ b/tutorial_cases/airlift_40m/0.org/alpha.liquid @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 9 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + location "0"; + object alpha.liquid; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform 0; + } + outlet + { + type inletOutlet; + phi phi.liquid; + inletValue uniform 0; + value uniform 0; + } + walls + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/0.org/alphat.gas b/tutorial_cases/airlift_40m/0.org/alphat.gas new file mode 100644 index 00000000..f3c95612 --- /dev/null +++ b/tutorial_cases/airlift_40m/0.org/alphat.gas @@ -0,0 +1,44 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 9 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + object alphat.gas; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type calculated; + value $internalField; + } + + outlet + { + type calculated; + value $internalField; + } + + walls + { + type compressible::alphatWallFunction; + Prt 0.85; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/0.org/alphat.liquid b/tutorial_cases/airlift_40m/0.org/alphat.liquid new file mode 100644 index 00000000..5d2cbc5f --- /dev/null +++ b/tutorial_cases/airlift_40m/0.org/alphat.liquid @@ -0,0 +1,44 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 9 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + object alphat.liquid; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type calculated; + value $internalField; + } + + outlet + { + type calculated; + value $internalField; + } + + walls + { + type compressible::alphatWallFunction; + Prt 0.85; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/0.org/epsilon.gas b/tutorial_cases/airlift_40m/0.org/epsilon.gas new file mode 100644 index 00000000..7c072b34 --- /dev/null +++ b/tutorial_cases/airlift_40m/0.org/epsilon.gas @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 9 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + object epsilon.gas; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 1.5e-4; + +boundaryField +{ + inlet + { + type turbulentMixingLengthDissipationRateInlet; + mixingLength 0.0035; //0.07 x Hydraulic Diameter (D=4A/P=0.05) + value $internalField; + // Optional entries + k k.gas; + phi phi.gas; + } + + outlet + { + type inletOutlet; + phi phi.gas; + inletValue $internalField; + value $internalField; + } + + walls + { + type epsilonWallFunction; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/0.org/epsilon.liquid b/tutorial_cases/airlift_40m/0.org/epsilon.liquid new file mode 100644 index 00000000..53d8ffba --- /dev/null +++ b/tutorial_cases/airlift_40m/0.org/epsilon.liquid @@ -0,0 +1,43 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 9 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + object epsilon.liquid; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 1.5e-5; + +boundaryField +{ + inlet + { + type fixedValue; + value $internalField; + } + + outlet + { + type inletOutlet; + phi phi.liquid; + inletValue $internalField; + value $internalField; + } + + walls + { + type epsilonWallFunction; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/0.org/k.gas b/tutorial_cases/airlift_40m/0.org/k.gas new file mode 100644 index 00000000..8e97efb6 --- /dev/null +++ b/tutorial_cases/airlift_40m/0.org/k.gas @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 9 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + object k.gas; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 3.7e-6; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type turbulentIntensityKineticEnergyInlet; + intensity 0.05; + value $internalField; + // Optional entries + U U.gas; + phi phi.gas; + } + + outlet + { + type inletOutlet; + phi phi.gas; + inletValue $internalField; + value $internalField; + } + + walls + { + type kqRWallFunction; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/0.org/k.liquid b/tutorial_cases/airlift_40m/0.org/k.liquid new file mode 100644 index 00000000..6cb2c516 --- /dev/null +++ b/tutorial_cases/airlift_40m/0.org/k.liquid @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 9 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + object k.liquid; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 3.75e-5; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type fixedValue; + value $internalField; + } + + outlet + { + type inletOutlet; + phi phi.liquid; + inletValue $internalField; + value $internalField; + } + + walls + { + type kqRWallFunction; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/0.org/nut.gas b/tutorial_cases/airlift_40m/0.org/nut.gas new file mode 100644 index 00000000..ae57af96 --- /dev/null +++ b/tutorial_cases/airlift_40m/0.org/nut.gas @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 9 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + object nut.gas; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 1e-8; + +boundaryField +{ + inlet + { + type calculated; + value $internalField; + } + + outlet + { + type calculated; + value $internalField; + } + + walls + { + type nutkWallFunction; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/0.org/nut.liquid b/tutorial_cases/airlift_40m/0.org/nut.liquid new file mode 100644 index 00000000..0b684e7f --- /dev/null +++ b/tutorial_cases/airlift_40m/0.org/nut.liquid @@ -0,0 +1,43 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 9 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + object nut.liquid; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 1e-4; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type calculated; + value $internalField; + } + + outlet + { + type calculated; + value $internalField; + } + + walls + { + type nutkWallFunction; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/0.org/p b/tutorial_cases/airlift_40m/0.org/p new file mode 100644 index 00000000..936e1fe6 --- /dev/null +++ b/tutorial_cases/airlift_40m/0.org/p @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 9 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +#include "${FOAM_CASE}/constant/globalVars" + +internalField uniform $P0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type calculated; + value $internalField; + } + + outlet + { + type calculated; + value $internalField; + } + + walls + { + type calculated; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/0.org/p_rgh b/tutorial_cases/airlift_40m/0.org/p_rgh new file mode 100644 index 00000000..c7cedd4d --- /dev/null +++ b/tutorial_cases/airlift_40m/0.org/p_rgh @@ -0,0 +1,46 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 9 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +#include "${FOAM_CASE}/constant/globalVars" + +internalField uniform $P0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type fixedFluxPressure; + value $internalField; + } + + outlet + { + type prghPressure; + p $internalField; + value $internalField; + } + + walls + { + type fixedFluxPressure; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/constant/g b/tutorial_cases/airlift_40m/constant/g new file mode 100644 index 00000000..cac96600 --- /dev/null +++ b/tutorial_cases/airlift_40m/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 3.0.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value (0 -9.81 0); + + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/constant/globalVars b/tutorial_cases/airlift_40m/constant/globalVars new file mode 100644 index 00000000..608c757e --- /dev/null +++ b/tutorial_cases/airlift_40m/constant/globalVars @@ -0,0 +1,107 @@ +T0 308; // initial T(K) which stays constant +// water thermophysical properties +muMixLiq #calc "2.414e-5 * pow(10,247.8/($T0 - 140.0))"; //viscosity (Pa.s) of water as a function of T(K) +CpMixLiq 4181; // J/kg-K +kThermLiq 0.62; // W/m-K +rho0MixLiq 1000; // kg/m^3 +sigmaLiq 0.07; //surface tension N/m +//Wilke-Chang params for diffusion coefficient of a given solute in water (solvent) +WC_psi 2.6; +WC_M 18; // kg/kmol +WC_V_O2 25.6e-3; // m3/kmol molar volume at normal boiling temperature (Treybal 1968) +WC_V_H2 14.3e-3; +WC_V_CO2 34e-3; +WC_V_CO 30.7e-3; +WC_V_CH4 35e-3; // V_b[cm3/mol]=0.285*V_critical^1.048 (Tyn and Calus; ESTIMATING LIQUID MOLAL VOLUME; Processing, Volume 21, Issue 4, Pages 16 - 17) +//****** diffusion coeff *********** +D_H2 #calc "1.173e-16 * pow($WC_psi * $WC_M,0.5) * $T0 / $muMixLiq / pow($WC_V_H2,0.6)"; +D_CO2 #calc "1.173e-16 * pow($WC_psi * $WC_M,0.5) * $T0 / $muMixLiq / pow($WC_V_CO2,0.6)"; +D_O2 #calc "1.173e-16 * pow($WC_psi * $WC_M,0.5) * $T0 / $muMixLiq / pow($WC_V_O2,0.6)"; +D_CO #calc "1.173e-16 * pow($WC_psi * $WC_M,0.5) * $T0 / $muMixLiq / pow($WC_V_CO,0.6)"; +D_CH4 #calc "1.173e-16 * pow($WC_psi * $WC_M,0.5) * $T0 / $muMixLiq / pow($WC_V_CH4,0.6)"; +// D_H2=3.4e-9, D_CO2=2e-9, D_CO=2.16e-9 at 25C +// Looks like the H2 diffusion is less than litr reported values ~ 4.5e-9 +//****** Henry coeff *************** +H_O2_298 0.032; +DH_O2 1700; +H_CO2_298 0.83; +DH_CO2 2400; +H_CO_298 0.023; +DH_CO 1300; +H_H2_298 0.019; +DH_H2 500; +H_CH4_298 0.032; +DH_CH4 1900; + +He_H2 #calc "$H_H2_298 * exp($DH_H2 *(1. / $T0 - 1./298.15))"; +He_CO #calc "$H_CO_298 * exp($DH_CO *(1. / $T0 - 1./298.15))"; +He_CO2 #calc "$H_CO2_298 * exp($DH_CO2 *(1. / $T0 - 1./298.15))"; +He_O2 #calc "$H_O2_298 * exp($DH_O2 *(1. / $T0 - 1./298.15))"; +He_CH4 #calc "$H_CH4_298 * exp($DH_CH4 *(1. / $T0 - 1./298.15))"; +//*******inlet gas species mass frac************* +f_H2 0.0; +f_CO2 0.0; +f_CO 0.0; +f_O2 1.0; +//********************************* +LeLiqH2 #calc "$kThermLiq / $rho0MixLiq / $D_H2 / $CpMixLiq"; +LeLiqCO #calc "$kThermLiq / $rho0MixLiq / $D_CO / $CpMixLiq"; +LeLiqCO2 #calc "$kThermLiq / $rho0MixLiq / $D_CO2 / $CpMixLiq"; // = 74 +LeLiqO2 #calc "$kThermLiq / $rho0MixLiq / $D_O2 / $CpMixLiq"; +LeLiqCH4 #calc "$kThermLiq / $rho0MixLiq / $D_CH4 / $CpMixLiq"; + +LeLiqMix #calc "$f_H2*$LeLiqH2+$f_CO2*$LeLiqCO2+$f_CO*$LeLiqCO+$f_O2*$LeLiqO2"; +PrMixLiq #calc "$CpMixLiq * $muMixLiq / $kThermLiq"; +// Pr number is ~ 7 for water and ~ 0.7 for air +//********************************* +kH2 #calc "$D_H2*$rho0MixLiq*$CpMixLiq*$LeLiqMix"; +PrH2 #calc "$muMixLiq*$CpMixLiq / $kH2"; + +kCO #calc "$D_CO*$rho0MixLiq*$CpMixLiq*$LeLiqMix"; +PrCO #calc "$muMixLiq*$CpMixLiq / $kCO"; + +kCO2 #calc "$D_CO2*$rho0MixLiq*$CpMixLiq*$LeLiqMix"; +PrCO2 #calc "$muMixLiq*$CpMixLiq / $kCO2"; + +kO2 #calc "$D_O2*$rho0MixLiq*$CpMixLiq*$LeLiqMix"; +PrO2 #calc "$muMixLiq*$CpMixLiq / $kO2"; + +kCH4 #calc "$D_CH4*$rho0MixLiq*$CpMixLiq*$LeLiqMix"; +PrCH4 #calc "$muMixLiq*$CpMixLiq / $kCH4"; +//*****Gas transport******************* +muMixGas 1.88e-05; +PrMixGas 0.7; +LeGas 1.0; +//dbubGas 0.001; +//********************************* +HtBcol 40; +DiaBcol 5; +LiqHt 32; +//********************************* +P0 101325.0; +//P0 85000.0; // pressure at Golden +Pbot #calc "$P0+1000.0*$LiqHt*9.8"; +Pmid #calc "$P0+1000.0*0.5*$LiqHt*9.8"; + +//bubble column cross-section divided by sparger area +ArbyAs 2.0; +uSupVel 0.02; +uGas #calc "$Pmid / $Pbot * $ArbyAs * $uSupVel"; +A_Bcol #calc "3.14159 * $DiaBcol * $DiaBcol / 4.0"; +rho_gas #calc "$Pmid / 287.0 / $T0"; +mflowRate #calc "$uSupVel * $A_Bcol * $rho_gas"; //kg/s + +VVM 1.0; //gas feed per vessel volume, m3 gas/m3 vessel min +V_flowRate #calc "$VVM * $A_Bcol * $LiqHt / 60"; + +//********************************* +//intensity 0.01; +//k_inlet #calc "1.5 * Foam::pow(($uSupVel * Foam::pow($ArbyAs, 2)), 2) * Foam::pow($intensity, 2)"; +intensity 0.02; +k_inlet #calc "1.5 * pow($uSupVel * $intensity, 2)"; +//eps_gas_inlet #calc "0.09 * Foam::pow($k_inlet, 1.5) / (($DiaBcol / $ArbyAs) * 0.07)"; +eps_gas_inlet #calc "pow(0.09,0.75) * pow($k_inlet,1.5) / ($DiaBcol / $ArbyAs * 0.07)"; +//eps_liq_inlet #calc "0.09 * 1000 * Foam::pow($k_inlet, 2) * 0.05 / 0.00089"; +eps_liq_inlet #calc "pow(0.09,0.75) * pow($k_inlet,1.5) / ($DiaBcol / $ArbyAs * 0.07)"; +//omega_liq_inlet #calc "1000 * $k_inlet * 0.05 / 0.00089"; +omega_liq_inlet #calc "pow(0.09,-0.25) * pow($k_inlet,0.5) / ($DiaBcol / $ArbyAs * 0.07)"; diff --git a/tutorial_cases/airlift_40m/constant/momentumTransport.gas b/tutorial_cases/airlift_40m/constant/momentumTransport.gas new file mode 100644 index 00000000..4f394508 --- /dev/null +++ b/tutorial_cases/airlift_40m/constant/momentumTransport.gas @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 3.0.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties.gas; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +//simulationType laminar; +simulationType RAS; +RAS +{ + RASModel mixtureKEpsilon; + + turbulence on; + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/constant/momentumTransport.liquid b/tutorial_cases/airlift_40m/constant/momentumTransport.liquid new file mode 100644 index 00000000..5cc9a397 --- /dev/null +++ b/tutorial_cases/airlift_40m/constant/momentumTransport.liquid @@ -0,0 +1,26 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 3.0.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties.liquid; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +//simulationType laminar; +simulationType RAS; +RAS +{ + RASModel mixtureKEpsilon; + turbulence on; + printCoeffs on; +} + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/constant/phaseProperties b/tutorial_cases/airlift_40m/constant/phaseProperties new file mode 100644 index 00000000..42fb83a1 --- /dev/null +++ b/tutorial_cases/airlift_40m/constant/phaseProperties @@ -0,0 +1,291 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 3.0.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object phaseProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "$FOAM_CASE/constant/globalVars" + +type interfaceCompositionPhaseChangeMultiphaseSystem; + +phases (gas liquid); + +gas +{ + type multiComponentPhaseModel; + // diameterModel isothermal; + // isothermalCoeffs + // { + // d0 3e-3; + // p0 1e5; + // } + diameterModel constant; + constantCoeffs + { + d 0.006; // m + } + Sc 0.7; + + residualAlpha 1e-6; +} + +liquid +{ + type multiComponentPhaseModel; + diameterModel constant; + constantCoeffs + { + d 1e-4; //1e-4; helps prevent liquid drops in head space, JJS 4/14/16 + } + residualAlpha 1e-6; +} + +blending +{ + default + { + type linear; + minFullyContinuousAlpha.gas 0.7; + minPartlyContinuousAlpha.gas 0.3; + minFullyContinuousAlpha.liquid 0.7; + minPartlyContinuousAlpha.liquid 0.3; + } + + heatTransfer + { + type linear; + minFullyContinuousAlpha.gas 1; + minPartlyContinuousAlpha.gas 0; + minFullyContinuousAlpha.liquid 1; + minPartlyContinuousAlpha.liquid 0; + } + + massTransfer + { + $heatTransfer; + } + +} + +surfaceTension +( + (gas and liquid) + { + type constant; + sigma $sigmaLiq; + } +); + +aspectRatio +( + (gas in liquid) + { + type constant; + E0 1.0; + } + + (liquid in gas) + { + type constant; + E0 1.0; + } +); + +drag +( + (gas in liquid) + { + //type SchillerNaumann; + type Grace; + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (liquid in gas) + { + type SchillerNaumann; + residualRe 1e-3; + swarmCorrection + { + type none; + } + } +); + +virtualMass +( + (gas in liquid) + { + type constantCoefficient; + Cvm 0.5; + } + + (liquid in gas) + { + type constantCoefficient; + Cvm 0.5; + } +); + +/* +From docs: These models describe the composition in phase 1 of the supplied pair +at the interface with phase 2. +DWH: I verified which Le goes where by determining the corresponding rho called by +each model. +*/ +interfaceComposition.gas +( + (gas and liquid) + { + type saturated; + species ( H2O ); + Le $LeGas; + saturationPressure + { + type ArdenBuck; + } + } +); + +interfaceComposition.liquid +( + (liquid and gas) + { + type Henry; + species (O2); + k ($He_O2); + Le $LeLiqMix; + } +); + +/* +DWH: As far as I can tell, the Le defined here are whatever shows up in the K/D eqn +in the mass transfer model. (I.e. Le_liq shows up in Frossling and Higbie. +Le does not appear in spherical at all, but the constructor still expects Le +in the input dict.) +When K/D is returned and multiplied by D to compute mass transfer, that D is +obtained from the InterfaceCompositionModel and not this Le. +*/ + +diffusiveMassTransfer.gas +( + (gas in liquid) + { + type spherical; + Le 1.0; + } + + (liquid in gas) + { + type Higbie; + //type Frossling; + Le $LeLiqMix; + } +); + +diffusiveMassTransfer.liquid +( + (gas in liquid) + { + type Higbie; + //type Frossling; + Le $LeLiqMix; + } + + (liquid in gas) + { + type spherical; + Le 1.0; + } +); + + +heatTransfer.gas +( + (gas in liquid) + { + type spherical; + residualAlpha 1e-4; + } + + (liquid in gas) + { + type RanzMarshall; + residualAlpha 1e-4; + } +); + + +heatTransfer.liquid +( + (gas in liquid) + { + type RanzMarshall; + residualAlpha 1e-4; + } + + (liquid in gas) + { + type spherical; + residualAlpha 1e-4; + } +); + +lift +( +); + +wallLubrication +( + (gas in liquid) + { + type Antal; + Cw1 -0.01; + Cw2 -0.05; + } + + (liquid in gas) + { + type Antal; + Cw1 -0.01; + Cw2 -0.05; + } +); + +turbulentDispersion +( + (gas in liquid) + { + type LopezDeBertodano; + Ctd 0.5; + } + + (liquid in gas) + { + type LopezDeBertodano; + Ctd 0.5; + } +); + +phaseTransfer +( +); + +// Minimum allowable pressure +pMin 10000; + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/constant/thermophysicalProperties.gas b/tutorial_cases/airlift_40m/constant/thermophysicalProperties.gas new file mode 100644 index 00000000..ea417fed --- /dev/null +++ b/tutorial_cases/airlift_40m/constant/thermophysicalProperties.gas @@ -0,0 +1,118 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 3.0.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties.gas; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "$FOAM_CASE/constant/globalVars" + +thermoType +{ + type heRhoThermo; + mixture multiComponentMixture; + transport const; + thermo hConst; + equationOfState perfectGas; + specie specie; + energy sensibleInternalEnergy; +} + +species +( + N2 + O2 + H2O +); + +defaultSpecie N2; + +//"(mixture|O2|N2)" +O2 +{ + specie + { + nMoles 1; + molWeight 32; + } + thermodynamics + { + Hf 0; + Cp 1012.5; + } + transport + { + mu $muMixGas; + Pr $PrMixGas; + } +} + +CO2 +{ + specie + { + nMoles 1; + molWeight 44; + } + thermodynamics + { + Hf -8941418; + Cp 1012.5; + } + transport + { + mu $muMixGas; + Pr $PrMixGas; + } +} + +N2 +{ + specie + { + nMoles 1; + molWeight 28; + } + thermodynamics + { + Hf 0; + Cp 1012.5; + } + transport + { + mu $muMixGas; + Pr $PrMixGas; + } +} + +H2O +{ + specie + { + nMoles 1; + molWeight 18; + } + thermodynamics + { + Hf -13422939; // (J/kg) + Cp 1857.8; + } + transport + { + mu $muMixGas; + Pr $PrMixGas; + } +} + + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/constant/thermophysicalProperties.liquid b/tutorial_cases/airlift_40m/constant/thermophysicalProperties.liquid new file mode 100644 index 00000000..36c0588b --- /dev/null +++ b/tutorial_cases/airlift_40m/constant/thermophysicalProperties.liquid @@ -0,0 +1,132 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 3.0.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties.liquid; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "$FOAM_CASE/constant/globalVars" + +thermoType +{ + type heRhoThermo; + mixture multiComponentMixture; + transport const; + thermo hConst; + equationOfState rhoConst; + specie specie; + energy sensibleInternalEnergy; +} + +species +( + H2O + O2 +); + +defaultSpecie H2O; + +"(mixture|H2O)" +{ + specie + { + nMoles 1; + molWeight 18; + } + equationOfState + { + rho $rho0MixLiq; + } + thermodynamics + { + Hf -15857343; + Cp $CpMixLiq; + } + transport + { + mu $muMixLiq; + Pr $PrMixLiq; + } +} + +//CO2 +//{ +// specie +// { +// nMoles 1; +// molWeight 44; +// } +// equationOfState +// { +// R $RMixLiq; +// rho0 $rho0MixLiq; +// } +// thermodynamics +// { +// Hf -9402451; +// Cp $CpMixLiq; +// } +// transport +// { +// mu $muMixLiq; +// Pr $PrMixLiq; +// } +//} + +// N2 +// { +// specie +// { +// nMoles 1; +// molWeight 28; +// } +// equationOfState +// { +// R $RMixLiq; +// rho0 $rho0MixLiq; +// } +// thermodynamics +// { +// Hf 0; +// Cp $CpMixLiq; +// } +// transport +// { +// mu $muMixLiq; +// Pr $PrMixLiq; +// } +// } + +O2 +{ + specie + { + nMoles 1; + molWeight 32; + } + equationOfState + { + rho $rho0MixLiq; + } + thermodynamics + { + Hf -365639; + Cp $CpMixLiq; + } + transport + { + mu $muMixLiq; + Pr $PrO2; + } +} +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/presteps.sh b/tutorial_cases/airlift_40m/presteps.sh new file mode 100644 index 00000000..aaf057c8 --- /dev/null +++ b/tutorial_cases/airlift_40m/presteps.sh @@ -0,0 +1,7 @@ +m4 system/conc_cylinder_mesh.m4 > system/blockMeshDict +rm -rf 0 +cp -r 0.org 0 +blockMesh +setFields +decomposePar +#reactingTwoPhaseEulerFoam diff --git a/tutorial_cases/airlift_40m/submitjob b/tutorial_cases/airlift_40m/submitjob new file mode 100644 index 00000000..9f34f963 --- /dev/null +++ b/tutorial_cases/airlift_40m/submitjob @@ -0,0 +1,20 @@ +#!/bin/bash +# #SBATCH --qos=high +#SBATCH --job-name=bio-airlift +#SBATCH --partition=standard +#SBATCH --nodes=4 +#SBATCH --ntasks-per-node=36 +#SBATCH --time=48:00:00 +#SBATCH --account=bpms +#SBATCH --output=log.out + +module purge +ml PrgEnv-cray +source /projects/gas2fuels/ofoam_cray_mpich/OpenFOAM-dev/etc/bashrc + +module purge +module load openmpi/1.10.7/gcc-7.3.0 +module load gcc +source /projects/bpms/openfoam/OpenFOAM-dev/etc/bashrc +. ./presteps.sh +srun -n 144 multiphaseEulerFoam -parallel diff --git a/tutorial_cases/airlift_40m/system/blockMeshDict b/tutorial_cases/airlift_40m/system/blockMeshDict new file mode 100644 index 00000000..790d1eed --- /dev/null +++ b/tutorial_cases/airlift_40m/system/blockMeshDict @@ -0,0 +1,604 @@ +//--------------------------------*- C++ -*---------------------------------- +// blockMesh : Block mesh description file +// +// adapted from: +// http://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/61796-help-could-anyone-post-simple-cylinder-mesh.html +// +// JJS, 1/8/16 +// +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// ************************************ + + + + + + + convertToMeters 1; + + // outer cylinder diameter + // outer cylinder length + + // inner cylinder diameter + // inner cylinder length + // inner cylinder thickness + // inner cylinder offset from bottom + + + + + + + //Width of middle square section + + + + + + + + + + + + + + + //how many cells in the square section + //how many cells from square section to perimeter + //how many cells in the thickness + // how many cells from top to bottom + + + + + + vertices + ( + ( 0.625 0.0 0.625) // Vertex fiveoclock_sq1 = 0 + (-0.625 0.0 0.625) // Vertex sevenoclock_sq1 = 1 + (-0.625 0.0 -0.625) // Vertex elevenoclock_sq1 = 2 + ( 0.625 0.0 -0.625) // Vertex oneoclock_sq1 = 3 + + ( 0.625 2.5 0.625) // Vertex fiveoclock_sq2 = 4 + (-0.625 2.5 0.625) // Vertex sevenoclock_sq2 = 5 + (-0.625 2.5 -0.625) // Vertex elevenoclock_sq2 = 6 + ( 0.625 2.5 -0.625) // Vertex oneoclock_sq2 = 7 + + ( 0.625 22.5 0.625) // Vertex fiveoclock_sq3 = 8 + (-0.625 22.5 0.625) // Vertex sevenoclock_sq3 = 9 + (-0.625 22.5 -0.625) // Vertex elevenoclock_sq3 = 10 + ( 0.625 22.5 -0.625) // Vertex oneoclock_sq3 = 11 + + ( 0.625 40 0.625) // Vertex fiveoclock_sq4 = 12 + (-0.625 40 0.625) // Vertex sevenoclock_sq4 = 13 + (-0.625 40 -0.625) // Vertex elevenoclock_sq4 = 14 + ( 0.625 40 -0.625) // Vertex oneoclock_sq4 = 15 + + ( 1.76776695455285 0.0 1.76776695137989) // Vertex fiveoclock_c11 = 16 + (-1.76776695455285 0.0 1.76776695137989) // Vertex sevenoclock_c11 = 17 + (-1.76776695455285 0.0 -1.76776695137989) // Vertex elevenoclock_c11 = 18 + ( 1.76776695455285 0.0 -1.76776695137989) // Vertex oneoclock_c11 = 19 + + ( 1.76776695455285 2.5 1.76776695137989) // Vertex fiveoclock_c12 = 20 + (-1.76776695455285 2.5 1.76776695137989) // Vertex sevenoclock_c12 = 21 + (-1.76776695455285 2.5 -1.76776695137989) // Vertex elevenoclock_c12 = 22 + ( 1.76776695455285 2.5 -1.76776695137989) // Vertex oneoclock_c12 = 23 + + ( 1.76776695455285 22.5 1.76776695137989) // Vertex fiveoclock_c13 = 24 + (-1.76776695455285 22.5 1.76776695137989) // Vertex sevenoclock_c13 = 25 + (-1.76776695455285 22.5 -1.76776695137989) // Vertex elevenoclock_c13 = 26 + ( 1.76776695455285 22.5 -1.76776695137989) // Vertex oneoclock_c13 = 27 + + ( 1.76776695455285 40 1.76776695137989) // Vertex fiveoclock_c14 = 28 + (-1.76776695455285 40 1.76776695137989) // Vertex sevenoclock_c14 = 29 + (-1.76776695455285 40 -1.76776695137989) // Vertex elevenoclock_c14 = 30 + ( 1.76776695455285 40 -1.76776695137989) // Vertex oneoclock_c14 = 31 + + ( 0.883883477276424 0.0 0.883883475689945) // Vertex fiveoclock_c21 = 32 + (-0.883883477276424 0.0 0.883883475689945) // Vertex sevenoclock_c21 = 33 + (-0.883883477276424 0.0 -0.883883475689945) // Vertex elevenoclock_c21 = 34 + ( 0.883883477276424 0.0 -0.883883475689945) // Vertex oneoclock_c21 = 35 + + ( 0.883883477276424 2.5 0.883883475689945) // Vertex fiveoclock_c22 = 36 + (-0.883883477276424 2.5 0.883883475689945) // Vertex sevenoclock_c22 = 37 + (-0.883883477276424 2.5 -0.883883475689945) // Vertex elevenoclock_c22 = 38 + ( 0.883883477276424 2.5 -0.883883475689945) // Vertex oneoclock_c22 = 39 + + ( 0.883883477276424 22.5 0.883883475689945) // Vertex fiveoclock_c23 = 40 + (-0.883883477276424 22.5 0.883883475689945) // Vertex sevenoclock_c23 = 41 + (-0.883883477276424 22.5 -0.883883475689945) // Vertex elevenoclock_c23 = 42 + ( 0.883883477276424 22.5 -0.883883475689945) // Vertex oneoclock_c23 = 43 + + ( 0.883883477276424 40 0.883883475689945) // Vertex fiveoclock_c24 = 44 + (-0.883883477276424 40 0.883883475689945) // Vertex sevenoclock_c24 = 45 + (-0.883883477276424 40 -0.883883475689945) // Vertex elevenoclock_c24 = 46 + ( 0.883883477276424 40 -0.883883475689945) // Vertex oneoclock_c24 = 47 + + ( 0.954594155458538 0.0 0.95459415374514) // Vertex fiveoclock_ct1 = 48 + (-0.954594155458538 0.0 0.95459415374514) // Vertex sevenoclock_ct1 = 49 + (-0.954594155458538 0.0 -0.95459415374514) // Vertex elevenoclock_ct1 = 50 + ( 0.954594155458538 0.0 -0.95459415374514) // Vertex oneoclock_ct1 = 51 + + ( 0.954594155458538 2.5 0.95459415374514) // Vertex fiveoclock_ct2 = 52 + (-0.954594155458538 2.5 0.95459415374514) // Vertex sevenoclock_ct2 = 53 + (-0.954594155458538 2.5 -0.95459415374514) // Vertex elevenoclock_ct2 = 54 + ( 0.954594155458538 2.5 -0.95459415374514) // Vertex oneoclock_ct2 = 55 + + ( 0.954594155458538 22.5 0.95459415374514) // Vertex fiveoclock_ct3 = 56 + (-0.954594155458538 22.5 0.95459415374514) // Vertex sevenoclock_ct3 = 57 + (-0.954594155458538 22.5 -0.95459415374514) // Vertex elevenoclock_ct3 = 58 + ( 0.954594155458538 22.5 -0.95459415374514) // Vertex oneoclock_ct3 = 59 + + ( 0.954594155458538 40 0.95459415374514) // Vertex fiveoclock_ct4 = 60 + (-0.954594155458538 40 0.95459415374514) // Vertex sevenoclock_ct4 = 61 + (-0.954594155458538 40 -0.95459415374514) // Vertex elevenoclock_ct4 = 62 + ( 0.954594155458538 40 -0.95459415374514) // Vertex oneoclock_ct4 = 63 + + ); + + blocks + ( + //square blocks + hex ( + 1 0 3 2 + 5 4 7 6 + ) + (12 12 18) + simpleGrading (1 1 1) + + hex ( + 5 4 7 6 + 9 8 11 10 + ) + (12 12 150) + simpleGrading (1 1 1) + + hex ( + 9 8 11 10 + 13 12 15 14 + ) + (12 12 132) + simpleGrading (1 1 1) + + //slices (outer to thickness)************************************* + + // 1 to 2========================================================= + //slice1 + hex ( + 17 16 48 49 + 21 20 52 53 + ) + (12 14 18) + simpleGrading (1 1 1) + + //slice2 + hex ( + 18 17 49 50 + 22 21 53 54 + ) + (12 14 18) +simpleGrading (1 1 1) + + //slice3 + hex ( + 19 18 50 51 + 23 22 54 55 + ) + (12 14 18) +simpleGrading (1 1 1) + + //slice4 + hex ( + 16 19 51 48 + 20 23 55 52 + ) + (12 14 18) +simpleGrading (1 1 1) + //==================================================================== + + // 2 to 3========================================================= + //slice1 + hex ( + 21 20 52 53 + 25 24 56 57 + ) + (12 14 150) + simpleGrading (1 1 1) + + //slice2 + hex ( + 22 21 53 54 + 26 25 57 58 + ) + (12 14 150) +simpleGrading (1 1 1) + + //slice3 + hex ( + 23 22 54 55 + 27 26 58 59 + ) + (12 14 150) +simpleGrading (1 1 1) + + //slice4 + hex ( + 20 23 55 52 + 24 27 59 56 + ) + (12 14 150) +simpleGrading (1 1 1) + //==================================================================== + + // 3 to 4========================================================= + //slice1 + hex ( + 25 24 56 57 + 29 28 60 61 + ) + (12 14 132) + simpleGrading (1 1 1) + + //slice2 + hex ( + 26 25 57 58 + 30 29 61 62 + ) + (12 14 132) +simpleGrading (1 1 1) + + //slice3 + hex ( + 27 26 58 59 + 31 30 62 63 + ) + (12 14 132) +simpleGrading (1 1 1) + + //slice4 + hex ( + 24 27 59 56 + 28 31 63 60 + ) + (12 14 132) +simpleGrading (1 1 1) + //==================================================================== + + //slices (inner to square)************************************* + + // 1 to 2========================================================= + //slice1 + hex ( + 33 32 0 1 + 37 36 4 5 + ) + (12 14 18) + simpleGrading (1 1 1) + + //slice2 + hex ( + 34 33 1 2 + 38 37 5 6 + ) + (12 14 18) +simpleGrading (1 1 1) + + //slice3 + hex ( + 35 34 2 3 + 39 38 6 7 + ) + (12 14 18) +simpleGrading (1 1 1) + + //slice4 + hex ( + 32 35 3 0 + 36 39 7 4 + ) + (12 14 18) +simpleGrading (1 1 1) + //==================================================================== + + // 2 to 3========================================================= + //slice1 + hex ( + 37 36 4 5 + 41 40 8 9 + ) + (12 14 150) + simpleGrading (1 1 1) + + //slice2 + hex ( + 38 37 5 6 + 42 41 9 10 + ) + (12 14 150) +simpleGrading (1 1 1) + + //slice3 + hex ( + 39 38 6 7 + 43 42 10 11 + ) + (12 14 150) +simpleGrading (1 1 1) + + //slice4 + hex ( + 36 39 7 4 + 40 43 11 8 + ) + (12 14 150) +simpleGrading (1 1 1) + //==================================================================== + + // 3 to 4========================================================= + //slice1 + hex ( + 41 40 8 9 + 45 44 12 13 + ) + (12 14 132) + simpleGrading (1 1 1) + + //slice2 + hex ( + 42 41 9 10 + 46 45 13 14 + ) + (12 14 132) +simpleGrading (1 1 1) + + //slice3 + hex ( + 43 42 10 11 + 47 46 14 15 + ) + (12 14 132) +simpleGrading (1 1 1) + + //slice4 + hex ( + 40 43 11 8 + 44 47 15 12 + ) + (12 14 132) +simpleGrading (1 1 1) + //==================================================================== + + + //slices (thickness to inner)************************************* + + // 1 to 2========================================================= + //slice1 + hex ( + 49 48 32 33 + 53 52 36 37 + ) + (12 2 18) + simpleGrading (1 1 1) + + //slice2 + hex ( + 50 49 33 34 + 54 53 37 38 + ) + (12 2 18) +simpleGrading (1 1 1) + + //slice3 + hex ( + 51 50 34 35 + 55 54 38 39 + ) + (12 2 18) +simpleGrading (1 1 1) + + //slice4 + hex ( + 48 51 35 32 + 52 55 39 36 + ) + (12 2 18) +simpleGrading (1 1 1) + //==================================================================== + + // 3 to 4========================================================= + //slice1 + hex ( + 57 56 40 41 + 61 60 44 45 + ) + (12 2 132) + simpleGrading (1 1 1) + + //slice2 + hex ( + 58 57 41 42 + 62 61 45 46 + ) + (12 2 132) +simpleGrading (1 1 1) + + //slice3 + hex ( + 59 58 42 43 + 63 62 46 47 + ) + (12 2 132) +simpleGrading (1 1 1) + + //slice4 + hex ( + 56 59 43 40 + 60 63 47 44 + ) + (12 2 132) +simpleGrading (1 1 1) + //==================================================================== + + ); + + + //create the quarter circles + edges + ( + arc 16 17 (0.0 0.0 2.5) + arc 17 18 (-2.5 0.0 0.0) + arc 18 19 (0.0 0.0 -2.5) + arc 19 16 (2.5 0.0 0.0) + + arc 20 21 (0.0 2.5 2.5) + arc 21 22 (-2.5 2.5 0.0) + arc 22 23 (0.0 2.5 -2.5) + arc 23 20 (2.5 2.5 0.0) + + arc 24 25 (0.0 22.5 2.5) + arc 25 26 (-2.5 22.5 0.0) + arc 26 27 (0.0 22.5 -2.5) + arc 27 24 (2.5 22.5 0.0) + + arc 28 29 (0.0 40 2.5) + arc 29 30 (-2.5 40 0.0) + arc 30 31 (0.0 40 -2.5) + arc 31 28 (2.5 40 0.0) + + arc 32 33 (0.0 0.0 1.25) + arc 33 34 (-1.25 0.0 0.0) + arc 34 35 (0.0 0.0 -1.25) + arc 35 32 (1.25 0.0 0.0) + + arc 36 37 (0.0 2.5 1.25) + arc 37 38 (-1.25 2.5 0.0) + arc 38 39 (0.0 2.5 -1.25) + arc 39 36 (1.25 2.5 0.0) + + arc 40 41 (0.0 22.5 1.25) + arc 41 42 (-1.25 22.5 0.0) + arc 42 43 (0.0 22.5 -1.25) + arc 43 40 (1.25 22.5 0.0) + + arc 44 45 (0.0 40 1.25) + arc 45 46 (-1.25 40 0.0) + arc 46 47 (0.0 40 -1.25) + arc 47 44 (1.25 40 0.0) + + arc 48 49 (0.0 0.0 1.35) + arc 49 50 (-1.35 0.0 0.0) + arc 50 51 (0.0 0.0 -1.35) + arc 51 48 (1.35 0.0 0.0) + + arc 52 53 (0.0 2.5 1.35) + arc 53 54 (-1.35 2.5 0.0) + arc 54 55 (0.0 2.5 -1.35) + arc 55 52 (1.35 2.5 0.0) + + arc 56 57 (0.0 22.5 1.35) + arc 57 58 (-1.35 22.5 0.0) + arc 58 59 (0.0 22.5 -1.35) + arc 59 56 (1.35 22.5 0.0) + + arc 60 61 (0.0 40 1.35) + arc 61 62 (-1.35 40 0.0) + arc 62 63 (0.0 40 -1.35) + arc 63 60 (1.35 40 0.0) + + ); + + patches + ( + patch inlet + ( + (0 3 2 1) + + (0 32 35 3) + (32 0 1 33) + (1 2 34 33) + (3 35 34 2) + ) + + patch outlet + ( + (12 15 14 13) + + (12 44 47 15) + (44 12 13 45) + (13 14 46 45) + (15 47 46 14) + + (60 63 47 44) + (63 62 46 47) + (62 61 45 46) + (60 61 45 44) + + (60 28 31 63) + (28 60 61 29) + (29 61 62 30) + (30 62 63 31) + ) + + wall walls + ( + + (32 48 51 35) + (48 32 33 49) + (49 33 34 50) + (50 34 35 51) + + (48 16 19 51) + (16 48 49 17) + (17 49 50 18) + (18 50 51 19) + + (17 16 20 21) + (17 21 22 18) + (18 22 23 19) + (19 23 20 16) + + (21 20 24 25) + (21 25 26 22) + (22 26 27 23) + (23 27 24 20) + + (25 24 28 29) + (25 29 30 26) + (26 30 31 27) + (27 31 28 24) + + (37 36 40 41) + (37 41 42 38) + (38 42 43 39) + (39 43 40 36) + + (53 52 56 57) + (53 57 58 54) + (54 58 59 55) + (53 52 36 37) + + (52 55 39 36) + (55 54 38 39) + (54 53 37 38) + (55 59 56 52) + + (57 56 40 41) + (56 59 43 40) + (59 58 42 43) + (58 57 41 42) + + ) + +); + +mergePatchPairs +( +); diff --git a/tutorial_cases/airlift_40m/system/circinlet.m4 b/tutorial_cases/airlift_40m/system/circinlet.m4 new file mode 100644 index 00000000..3164cfbd --- /dev/null +++ b/tutorial_cases/airlift_40m/system/circinlet.m4 @@ -0,0 +1,236 @@ +//--------------------------------*- C++ -*---------------------------------- +// blockMesh : Block mesh description file +// +// adapted from: +// http://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/61796-help-could-anyone-post-simple-cylinder-mesh.html +// +// JJS, 1/8/16 +// +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// ************************************ +changecom(//)changequote([,]) +define(calc, [esyscmd(perl -e 'printf ($1)')]) +define(calcint, [esyscmd(perl -e 'printf int($1)')]) +define(VCOUNT, 0) +define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))]) + + convertToMeters 1; + + define(D1, 5.0) // outer cylinder diameter + define(L1, 40.0) // outer cylinder length + define(D2, calc(0.707*D1)) // inner cylinder diameter + + define(PI, 3.14159265) + + define(R1, calc(D1/2)) + define(R2, calc(D2/2)) + define(CW, calc(D2/4)) //Width of middle square section + + define(CX1, calc(R1*cos((PI/180)*45))) + define(CZ1, calc(R1*sin((PI/180)*45))) + + define(CX2, calc(R2*cos((PI/180)*45))) + define(CZ2, calc(R2*sin((PI/180)*45))) + + define(NPS, 8) //how many cells in the square section + define(NPD, 8) //how many cells from square section to perimeter + define(NPY, 200) // how many cells from top to bottom + + vertices + ( + //Bottom surface + //========== + + //square + ( CW 0.0 CW) vlabel(fiveoclock_sq1) + (-CW 0.0 CW) vlabel(sevenoclock_sq1) + (-CW 0.0 -CW) vlabel(elevenoclock_sq1) + ( CW 0.0 -CW) vlabel(oneoclock_sq1) + + //outer circle + ( CX1 0.0 CZ1) vlabel(fiveoclock_c11) + (-CX1 0.0 CZ1) vlabel(sevenoclock_c11) + (-CX1 0.0 -CZ1) vlabel(elevenoclock_c11) + ( CX1 0.0 -CZ1) vlabel(oneoclock_c11) + + //inner circle + ( CX2 0.0 CZ2) vlabel(fiveoclock_c21) + (-CX2 0.0 CZ2) vlabel(sevenoclock_c21) + (-CX2 0.0 -CZ2) vlabel(elevenoclock_c21) + ( CX2 0.0 -CZ2) vlabel(oneoclock_c21) + + + //Top surface + + //square + ( CW L1 CW) vlabel(fiveoclock_sq2) + (-CW L1 CW) vlabel(sevenoclock_sq2) + (-CW L1 -CW) vlabel(elevenoclock_sq2) + ( CW L1 -CW) vlabel(oneoclock_sq2) + + //outer circle + ( CX1 L1 CZ1) vlabel(fiveoclock_c12) + (-CX1 L1 CZ1) vlabel(sevenoclock_c12) + (-CX1 L1 -CZ1) vlabel(elevenoclock_c12) + ( CX1 L1 -CZ1) vlabel(oneoclock_c12) + + //inner circle + ( CX2 L1 CZ2) vlabel(fiveoclock_c22) + (-CX2 L1 CZ2) vlabel(sevenoclock_c22) + (-CX2 L1 -CZ2) vlabel(elevenoclock_c22) + ( CX2 L1 -CZ2) vlabel(oneoclock_c22) + + ); + + blocks + ( + //square block + hex ( + sevenoclock_sq1 fiveoclock_sq1 oneoclock_sq1 elevenoclock_sq1 + sevenoclock_sq2 fiveoclock_sq2 oneoclock_sq2 elevenoclock_sq2 + ) + (NPS NPS NPY) + simpleGrading (1 1 1) + + //slice1 + hex ( + sevenoclock_c21 fiveoclock_c21 fiveoclock_sq1 sevenoclock_sq1 + sevenoclock_c22 fiveoclock_c22 fiveoclock_sq2 sevenoclock_sq2 + ) + (NPS NPD NPY) + simpleGrading (1 1 1) + + //slice2 + hex ( + elevenoclock_c21 sevenoclock_c21 sevenoclock_sq1 elevenoclock_sq1 + elevenoclock_c22 sevenoclock_c22 sevenoclock_sq2 elevenoclock_sq2 + ) + (NPS NPD NPY) +simpleGrading (1 1 1) + + //slice3 + hex ( + oneoclock_c21 elevenoclock_c21 elevenoclock_sq1 oneoclock_sq1 + oneoclock_c22 elevenoclock_c22 elevenoclock_sq2 oneoclock_sq2 + ) + (NPS NPD NPY) +simpleGrading (1 1 1) + + //slice4 + hex ( + fiveoclock_c21 oneoclock_c21 oneoclock_sq1 fiveoclock_sq1 + fiveoclock_c22 oneoclock_c22 oneoclock_sq2 fiveoclock_sq2 + ) + (NPS NPD NPY) + simpleGrading (1 1 1) + + //slice1 + hex ( + fiveoclock_c11 fiveoclock_c21 sevenoclock_c21 sevenoclock_c11 + fiveoclock_c12 fiveoclock_c22 sevenoclock_c22 sevenoclock_c12 + ) + (NPD NPS NPY) + simpleGrading (1 1 1) + + //slice2 + hex ( + sevenoclock_c11 sevenoclock_c21 elevenoclock_c21 elevenoclock_c11 + sevenoclock_c12 sevenoclock_c22 elevenoclock_c22 elevenoclock_c12 + ) + (NPD NPS NPY) +simpleGrading (1 1 1) + + //slice3 + hex ( + elevenoclock_c11 elevenoclock_c21 oneoclock_c21 oneoclock_c11 + elevenoclock_c12 elevenoclock_c22 oneoclock_c22 oneoclock_c12 + ) + (NPD NPS NPY) +simpleGrading (1 1 1) + + //slice4 + hex ( + oneoclock_c11 oneoclock_c21 fiveoclock_c21 fiveoclock_c11 + oneoclock_c12 oneoclock_c22 fiveoclock_c22 fiveoclock_c12 + ) + (NPD NPS NPY) + simpleGrading (1 1 1) + + ); + + + //create the quarter circles + edges + ( + arc fiveoclock_c11 sevenoclock_c11 (0.0 0.0 R1) + arc sevenoclock_c11 elevenoclock_c11 (-R1 0.0 0.0) + arc elevenoclock_c11 oneoclock_c11 (0.0 0.0 -R1) + arc oneoclock_c11 fiveoclock_c11 (R1 0.0 0.0) + + arc fiveoclock_c12 sevenoclock_c12 (0.0 L1 R1) + arc sevenoclock_c12 elevenoclock_c12 (-R1 L1 0.0) + arc elevenoclock_c12 oneoclock_c12 (0.0 L1 -R1) + arc oneoclock_c12 fiveoclock_c12 (R1 L1 0.0) + + arc fiveoclock_c21 sevenoclock_c21 (0.0 0.0 R2) + arc sevenoclock_c21 elevenoclock_c21 (-R2 0.0 0.0) + arc elevenoclock_c21 oneoclock_c21 (0.0 0.0 -R2) + arc oneoclock_c21 fiveoclock_c21 (R2 0.0 0.0) + + arc fiveoclock_c22 sevenoclock_c22 (0.0 L1 R2) + arc sevenoclock_c22 elevenoclock_c22 (-R2 L1 0.0) + arc elevenoclock_c22 oneoclock_c22 (0.0 L1 -R2) + arc oneoclock_c22 fiveoclock_c22 (R2 L1 0.0) + ); + + patches + ( + patch inlet + ( + (fiveoclock_sq1 oneoclock_sq1 elevenoclock_sq1 sevenoclock_sq1) + (fiveoclock_sq1 fiveoclock_c21 sevenoclock_c21 sevenoclock_sq1) + (sevenoclock_sq1 sevenoclock_c21 elevenoclock_c21 elevenoclock_sq1) + (elevenoclock_sq1 elevenoclock_c21 oneoclock_c21 oneoclock_sq1) + (oneoclock_sq1 oneoclock_c21 fiveoclock_c21 fiveoclock_sq1) + ) + + patch outlet + ( + (fiveoclock_sq2 oneoclock_sq2 elevenoclock_sq2 sevenoclock_sq2) + (fiveoclock_sq2 fiveoclock_c22 sevenoclock_c22 sevenoclock_sq2) + (sevenoclock_sq2 sevenoclock_c22 elevenoclock_c22 elevenoclock_sq2) + (elevenoclock_sq2 elevenoclock_c22 oneoclock_c22 oneoclock_sq2) + (oneoclock_sq2 oneoclock_c22 fiveoclock_c22 fiveoclock_sq2) + + (fiveoclock_c22 fiveoclock_c12 sevenoclock_c12 sevenoclock_c22) + (sevenoclock_c22 sevenoclock_c12 elevenoclock_c12 elevenoclock_c22) + (elevenoclock_c22 elevenoclock_c12 oneoclock_c12 oneoclock_c22) + (oneoclock_c22 oneoclock_c12 fiveoclock_c12 fiveoclock_c22) + + ) + + wall walls + ( + (fiveoclock_c21 fiveoclock_c11 sevenoclock_c11 sevenoclock_c21) + (sevenoclock_c21 sevenoclock_c11 elevenoclock_c11 elevenoclock_c21) + (elevenoclock_c21 elevenoclock_c11 oneoclock_c11 oneoclock_c21) + (oneoclock_c21 oneoclock_c11 fiveoclock_c11 fiveoclock_c21) + + (fiveoclock_c11 fiveoclock_c12 sevenoclock_c12 sevenoclock_c11) + (sevenoclock_c11 sevenoclock_c12 elevenoclock_c12 elevenoclock_c11) + (elevenoclock_c11 elevenoclock_c12 oneoclock_c12 oneoclock_c11) + (oneoclock_c11 oneoclock_c12 fiveoclock_c12 fiveoclock_c11) + ) + +); + +mergePatchPairs +( +); diff --git a/tutorial_cases/airlift_40m/system/conc_cylinder_mesh.m4 b/tutorial_cases/airlift_40m/system/conc_cylinder_mesh.m4 new file mode 100644 index 00000000..e59e757f --- /dev/null +++ b/tutorial_cases/airlift_40m/system/conc_cylinder_mesh.m4 @@ -0,0 +1,604 @@ +//--------------------------------*- C++ -*---------------------------------- +// blockMesh : Block mesh description file +// +// adapted from: +// http://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/61796-help-could-anyone-post-simple-cylinder-mesh.html +// +// JJS, 1/8/16 +// +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// ************************************ +changecom(//)changequote([,]) +define(calc, [esyscmd(perl -e 'printf ($1)')]) +define(calcint, [esyscmd(perl -e 'printf int($1)')]) +define(VCOUNT, 0) +define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))]) + + convertToMeters 1; + + define(D1, 5.0) // outer cylinder diameter + define(L1, 40.0) // outer cylinder length + + define(D2, calc(0.5*D1)) // inner cylinder diameter + define(L2, calc(0.5*L1)) // inner cylinder length + define(T2, 0.1) // inner cylinder thickness + define(OF2, D2) // inner cylinder offset from bottom + + define(PI, 3.14159265) + + define(R1, calc(D1/2)) + define(R2, calc(D2/2)) + define(Rt, calc(R2+T2)) + define(CW, calc(D2/4)) //Width of middle square section + + define(CX1, calc(R1*cos((PI/180)*45))) + define(CZ1, calc(R1*sin((PI/180)*45))) + + define(CX2, calc(R2*cos((PI/180)*45))) + define(CZ2, calc(R2*sin((PI/180)*45))) + + define(CXt, calc(Rt*cos((PI/180)*45))) + define(CZt, calc(Rt*sin((PI/180)*45))) + + define(OFF1,calc(OF2)) + define(OFF2,calc(OF2+L2)) + define(OFF3,calc(L1)) + + define(NPS, 12) //how many cells in the square section + define(NPD, 14) //how many cells from square section to perimeter + define(NPT, 2) //how many cells in the thickness + define(NPY, 300) // how many cells from top to bottom + + define(NPY1,calcint(NPY*OF2/L1)) + define(NPY2,calcint(NPY*L2/L1)) + define(NPY3,calcint(NPY-NPY1-NPY2)) + + vertices + ( + ( CW 0.0 CW) vlabel(fiveoclock_sq1) + (-CW 0.0 CW) vlabel(sevenoclock_sq1) + (-CW 0.0 -CW) vlabel(elevenoclock_sq1) + ( CW 0.0 -CW) vlabel(oneoclock_sq1) + + ( CW OFF1 CW) vlabel(fiveoclock_sq2) + (-CW OFF1 CW) vlabel(sevenoclock_sq2) + (-CW OFF1 -CW) vlabel(elevenoclock_sq2) + ( CW OFF1 -CW) vlabel(oneoclock_sq2) + + ( CW OFF2 CW) vlabel(fiveoclock_sq3) + (-CW OFF2 CW) vlabel(sevenoclock_sq3) + (-CW OFF2 -CW) vlabel(elevenoclock_sq3) + ( CW OFF2 -CW) vlabel(oneoclock_sq3) + + ( CW OFF3 CW) vlabel(fiveoclock_sq4) + (-CW OFF3 CW) vlabel(sevenoclock_sq4) + (-CW OFF3 -CW) vlabel(elevenoclock_sq4) + ( CW OFF3 -CW) vlabel(oneoclock_sq4) + + ( CX1 0.0 CZ1) vlabel(fiveoclock_c11) + (-CX1 0.0 CZ1) vlabel(sevenoclock_c11) + (-CX1 0.0 -CZ1) vlabel(elevenoclock_c11) + ( CX1 0.0 -CZ1) vlabel(oneoclock_c11) + + ( CX1 OFF1 CZ1) vlabel(fiveoclock_c12) + (-CX1 OFF1 CZ1) vlabel(sevenoclock_c12) + (-CX1 OFF1 -CZ1) vlabel(elevenoclock_c12) + ( CX1 OFF1 -CZ1) vlabel(oneoclock_c12) + + ( CX1 OFF2 CZ1) vlabel(fiveoclock_c13) + (-CX1 OFF2 CZ1) vlabel(sevenoclock_c13) + (-CX1 OFF2 -CZ1) vlabel(elevenoclock_c13) + ( CX1 OFF2 -CZ1) vlabel(oneoclock_c13) + + ( CX1 OFF3 CZ1) vlabel(fiveoclock_c14) + (-CX1 OFF3 CZ1) vlabel(sevenoclock_c14) + (-CX1 OFF3 -CZ1) vlabel(elevenoclock_c14) + ( CX1 OFF3 -CZ1) vlabel(oneoclock_c14) + + ( CX2 0.0 CZ2) vlabel(fiveoclock_c21) + (-CX2 0.0 CZ2) vlabel(sevenoclock_c21) + (-CX2 0.0 -CZ2) vlabel(elevenoclock_c21) + ( CX2 0.0 -CZ2) vlabel(oneoclock_c21) + + ( CX2 OFF1 CZ2) vlabel(fiveoclock_c22) + (-CX2 OFF1 CZ2) vlabel(sevenoclock_c22) + (-CX2 OFF1 -CZ2) vlabel(elevenoclock_c22) + ( CX2 OFF1 -CZ2) vlabel(oneoclock_c22) + + ( CX2 OFF2 CZ2) vlabel(fiveoclock_c23) + (-CX2 OFF2 CZ2) vlabel(sevenoclock_c23) + (-CX2 OFF2 -CZ2) vlabel(elevenoclock_c23) + ( CX2 OFF2 -CZ2) vlabel(oneoclock_c23) + + ( CX2 OFF3 CZ2) vlabel(fiveoclock_c24) + (-CX2 OFF3 CZ2) vlabel(sevenoclock_c24) + (-CX2 OFF3 -CZ2) vlabel(elevenoclock_c24) + ( CX2 OFF3 -CZ2) vlabel(oneoclock_c24) + + ( CXt 0.0 CZt) vlabel(fiveoclock_ct1) + (-CXt 0.0 CZt) vlabel(sevenoclock_ct1) + (-CXt 0.0 -CZt) vlabel(elevenoclock_ct1) + ( CXt 0.0 -CZt) vlabel(oneoclock_ct1) + + ( CXt OFF1 CZt) vlabel(fiveoclock_ct2) + (-CXt OFF1 CZt) vlabel(sevenoclock_ct2) + (-CXt OFF1 -CZt) vlabel(elevenoclock_ct2) + ( CXt OFF1 -CZt) vlabel(oneoclock_ct2) + + ( CXt OFF2 CZt) vlabel(fiveoclock_ct3) + (-CXt OFF2 CZt) vlabel(sevenoclock_ct3) + (-CXt OFF2 -CZt) vlabel(elevenoclock_ct3) + ( CXt OFF2 -CZt) vlabel(oneoclock_ct3) + + ( CXt OFF3 CZt) vlabel(fiveoclock_ct4) + (-CXt OFF3 CZt) vlabel(sevenoclock_ct4) + (-CXt OFF3 -CZt) vlabel(elevenoclock_ct4) + ( CXt OFF3 -CZt) vlabel(oneoclock_ct4) + + ); + + blocks + ( + //square blocks + hex ( + sevenoclock_sq1 fiveoclock_sq1 oneoclock_sq1 elevenoclock_sq1 + sevenoclock_sq2 fiveoclock_sq2 oneoclock_sq2 elevenoclock_sq2 + ) + (NPS NPS NPY1) + simpleGrading (1 1 1) + + hex ( + sevenoclock_sq2 fiveoclock_sq2 oneoclock_sq2 elevenoclock_sq2 + sevenoclock_sq3 fiveoclock_sq3 oneoclock_sq3 elevenoclock_sq3 + ) + (NPS NPS NPY2) + simpleGrading (1 1 1) + + hex ( + sevenoclock_sq3 fiveoclock_sq3 oneoclock_sq3 elevenoclock_sq3 + sevenoclock_sq4 fiveoclock_sq4 oneoclock_sq4 elevenoclock_sq4 + ) + (NPS NPS NPY3) + simpleGrading (1 1 1) + + //slices (outer to thickness)************************************* + + // 1 to 2========================================================= + //slice1 + hex ( + sevenoclock_c11 fiveoclock_c11 fiveoclock_ct1 sevenoclock_ct1 + sevenoclock_c12 fiveoclock_c12 fiveoclock_ct2 sevenoclock_ct2 + ) + (NPS NPD NPY1) + simpleGrading (1 1 1) + + //slice2 + hex ( + elevenoclock_c11 sevenoclock_c11 sevenoclock_ct1 elevenoclock_ct1 + elevenoclock_c12 sevenoclock_c12 sevenoclock_ct2 elevenoclock_ct2 + ) + (NPS NPD NPY1) +simpleGrading (1 1 1) + + //slice3 + hex ( + oneoclock_c11 elevenoclock_c11 elevenoclock_ct1 oneoclock_ct1 + oneoclock_c12 elevenoclock_c12 elevenoclock_ct2 oneoclock_ct2 + ) + (NPS NPD NPY1) +simpleGrading (1 1 1) + + //slice4 + hex ( + fiveoclock_c11 oneoclock_c11 oneoclock_ct1 fiveoclock_ct1 + fiveoclock_c12 oneoclock_c12 oneoclock_ct2 fiveoclock_ct2 + ) + (NPS NPD NPY1) +simpleGrading (1 1 1) + //==================================================================== + + // 2 to 3========================================================= + //slice1 + hex ( + sevenoclock_c12 fiveoclock_c12 fiveoclock_ct2 sevenoclock_ct2 + sevenoclock_c13 fiveoclock_c13 fiveoclock_ct3 sevenoclock_ct3 + ) + (NPS NPD NPY2) + simpleGrading (1 1 1) + + //slice2 + hex ( + elevenoclock_c12 sevenoclock_c12 sevenoclock_ct2 elevenoclock_ct2 + elevenoclock_c13 sevenoclock_c13 sevenoclock_ct3 elevenoclock_ct3 + ) + (NPS NPD NPY2) +simpleGrading (1 1 1) + + //slice3 + hex ( + oneoclock_c12 elevenoclock_c12 elevenoclock_ct2 oneoclock_ct2 + oneoclock_c13 elevenoclock_c13 elevenoclock_ct3 oneoclock_ct3 + ) + (NPS NPD NPY2) +simpleGrading (1 1 1) + + //slice4 + hex ( + fiveoclock_c12 oneoclock_c12 oneoclock_ct2 fiveoclock_ct2 + fiveoclock_c13 oneoclock_c13 oneoclock_ct3 fiveoclock_ct3 + ) + (NPS NPD NPY2) +simpleGrading (1 1 1) + //==================================================================== + + // 3 to 4========================================================= + //slice1 + hex ( + sevenoclock_c13 fiveoclock_c13 fiveoclock_ct3 sevenoclock_ct3 + sevenoclock_c14 fiveoclock_c14 fiveoclock_ct4 sevenoclock_ct4 + ) + (NPS NPD NPY3) + simpleGrading (1 1 1) + + //slice2 + hex ( + elevenoclock_c13 sevenoclock_c13 sevenoclock_ct3 elevenoclock_ct3 + elevenoclock_c14 sevenoclock_c14 sevenoclock_ct4 elevenoclock_ct4 + ) + (NPS NPD NPY3) +simpleGrading (1 1 1) + + //slice3 + hex ( + oneoclock_c13 elevenoclock_c13 elevenoclock_ct3 oneoclock_ct3 + oneoclock_c14 elevenoclock_c14 elevenoclock_ct4 oneoclock_ct4 + ) + (NPS NPD NPY3) +simpleGrading (1 1 1) + + //slice4 + hex ( + fiveoclock_c13 oneoclock_c13 oneoclock_ct3 fiveoclock_ct3 + fiveoclock_c14 oneoclock_c14 oneoclock_ct4 fiveoclock_ct4 + ) + (NPS NPD NPY3) +simpleGrading (1 1 1) + //==================================================================== + + //slices (inner to square)************************************* + + // 1 to 2========================================================= + //slice1 + hex ( + sevenoclock_c21 fiveoclock_c21 fiveoclock_sq1 sevenoclock_sq1 + sevenoclock_c22 fiveoclock_c22 fiveoclock_sq2 sevenoclock_sq2 + ) + (NPS NPD NPY1) + simpleGrading (1 1 1) + + //slice2 + hex ( + elevenoclock_c21 sevenoclock_c21 sevenoclock_sq1 elevenoclock_sq1 + elevenoclock_c22 sevenoclock_c22 sevenoclock_sq2 elevenoclock_sq2 + ) + (NPS NPD NPY1) +simpleGrading (1 1 1) + + //slice3 + hex ( + oneoclock_c21 elevenoclock_c21 elevenoclock_sq1 oneoclock_sq1 + oneoclock_c22 elevenoclock_c22 elevenoclock_sq2 oneoclock_sq2 + ) + (NPS NPD NPY1) +simpleGrading (1 1 1) + + //slice4 + hex ( + fiveoclock_c21 oneoclock_c21 oneoclock_sq1 fiveoclock_sq1 + fiveoclock_c22 oneoclock_c22 oneoclock_sq2 fiveoclock_sq2 + ) + (NPS NPD NPY1) +simpleGrading (1 1 1) + //==================================================================== + + // 2 to 3========================================================= + //slice1 + hex ( + sevenoclock_c22 fiveoclock_c22 fiveoclock_sq2 sevenoclock_sq2 + sevenoclock_c23 fiveoclock_c23 fiveoclock_sq3 sevenoclock_sq3 + ) + (NPS NPD NPY2) + simpleGrading (1 1 1) + + //slice2 + hex ( + elevenoclock_c22 sevenoclock_c22 sevenoclock_sq2 elevenoclock_sq2 + elevenoclock_c23 sevenoclock_c23 sevenoclock_sq3 elevenoclock_sq3 + ) + (NPS NPD NPY2) +simpleGrading (1 1 1) + + //slice3 + hex ( + oneoclock_c22 elevenoclock_c22 elevenoclock_sq2 oneoclock_sq2 + oneoclock_c23 elevenoclock_c23 elevenoclock_sq3 oneoclock_sq3 + ) + (NPS NPD NPY2) +simpleGrading (1 1 1) + + //slice4 + hex ( + fiveoclock_c22 oneoclock_c22 oneoclock_sq2 fiveoclock_sq2 + fiveoclock_c23 oneoclock_c23 oneoclock_sq3 fiveoclock_sq3 + ) + (NPS NPD NPY2) +simpleGrading (1 1 1) + //==================================================================== + + // 3 to 4========================================================= + //slice1 + hex ( + sevenoclock_c23 fiveoclock_c23 fiveoclock_sq3 sevenoclock_sq3 + sevenoclock_c24 fiveoclock_c24 fiveoclock_sq4 sevenoclock_sq4 + ) + (NPS NPD NPY3) + simpleGrading (1 1 1) + + //slice2 + hex ( + elevenoclock_c23 sevenoclock_c23 sevenoclock_sq3 elevenoclock_sq3 + elevenoclock_c24 sevenoclock_c24 sevenoclock_sq4 elevenoclock_sq4 + ) + (NPS NPD NPY3) +simpleGrading (1 1 1) + + //slice3 + hex ( + oneoclock_c23 elevenoclock_c23 elevenoclock_sq3 oneoclock_sq3 + oneoclock_c24 elevenoclock_c24 elevenoclock_sq4 oneoclock_sq4 + ) + (NPS NPD NPY3) +simpleGrading (1 1 1) + + //slice4 + hex ( + fiveoclock_c23 oneoclock_c23 oneoclock_sq3 fiveoclock_sq3 + fiveoclock_c24 oneoclock_c24 oneoclock_sq4 fiveoclock_sq4 + ) + (NPS NPD NPY3) +simpleGrading (1 1 1) + //==================================================================== + + + //slices (thickness to inner)************************************* + + // 1 to 2========================================================= + //slice1 + hex ( + sevenoclock_ct1 fiveoclock_ct1 fiveoclock_c21 sevenoclock_c21 + sevenoclock_ct2 fiveoclock_ct2 fiveoclock_c22 sevenoclock_c22 + ) + (NPS NPT NPY1) + simpleGrading (1 1 1) + + //slice2 + hex ( + elevenoclock_ct1 sevenoclock_ct1 sevenoclock_c21 elevenoclock_c21 + elevenoclock_ct2 sevenoclock_ct2 sevenoclock_c22 elevenoclock_c22 + ) + (NPS NPT NPY1) +simpleGrading (1 1 1) + + //slice3 + hex ( + oneoclock_ct1 elevenoclock_ct1 elevenoclock_c21 oneoclock_c21 + oneoclock_ct2 elevenoclock_ct2 elevenoclock_c22 oneoclock_c22 + ) + (NPS NPT NPY1) +simpleGrading (1 1 1) + + //slice4 + hex ( + fiveoclock_ct1 oneoclock_ct1 oneoclock_c21 fiveoclock_c21 + fiveoclock_ct2 oneoclock_ct2 oneoclock_c22 fiveoclock_c22 + ) + (NPS NPT NPY1) +simpleGrading (1 1 1) + //==================================================================== + + // 3 to 4========================================================= + //slice1 + hex ( + sevenoclock_ct3 fiveoclock_ct3 fiveoclock_c23 sevenoclock_c23 + sevenoclock_ct4 fiveoclock_ct4 fiveoclock_c24 sevenoclock_c24 + ) + (NPS NPT NPY3) + simpleGrading (1 1 1) + + //slice2 + hex ( + elevenoclock_ct3 sevenoclock_ct3 sevenoclock_c23 elevenoclock_c23 + elevenoclock_ct4 sevenoclock_ct4 sevenoclock_c24 elevenoclock_c24 + ) + (NPS NPT NPY3) +simpleGrading (1 1 1) + + //slice3 + hex ( + oneoclock_ct3 elevenoclock_ct3 elevenoclock_c23 oneoclock_c23 + oneoclock_ct4 elevenoclock_ct4 elevenoclock_c24 oneoclock_c24 + ) + (NPS NPT NPY3) +simpleGrading (1 1 1) + + //slice4 + hex ( + fiveoclock_ct3 oneoclock_ct3 oneoclock_c23 fiveoclock_c23 + fiveoclock_ct4 oneoclock_ct4 oneoclock_c24 fiveoclock_c24 + ) + (NPS NPT NPY3) +simpleGrading (1 1 1) + //==================================================================== + + ); + + + //create the quarter circles + edges + ( + arc fiveoclock_c11 sevenoclock_c11 (0.0 0.0 R1) + arc sevenoclock_c11 elevenoclock_c11 (-R1 0.0 0.0) + arc elevenoclock_c11 oneoclock_c11 (0.0 0.0 -R1) + arc oneoclock_c11 fiveoclock_c11 (R1 0.0 0.0) + + arc fiveoclock_c12 sevenoclock_c12 (0.0 OFF1 R1) + arc sevenoclock_c12 elevenoclock_c12 (-R1 OFF1 0.0) + arc elevenoclock_c12 oneoclock_c12 (0.0 OFF1 -R1) + arc oneoclock_c12 fiveoclock_c12 (R1 OFF1 0.0) + + arc fiveoclock_c13 sevenoclock_c13 (0.0 OFF2 R1) + arc sevenoclock_c13 elevenoclock_c13 (-R1 OFF2 0.0) + arc elevenoclock_c13 oneoclock_c13 (0.0 OFF2 -R1) + arc oneoclock_c13 fiveoclock_c13 (R1 OFF2 0.0) + + arc fiveoclock_c14 sevenoclock_c14 (0.0 OFF3 R1) + arc sevenoclock_c14 elevenoclock_c14 (-R1 OFF3 0.0) + arc elevenoclock_c14 oneoclock_c14 (0.0 OFF3 -R1) + arc oneoclock_c14 fiveoclock_c14 (R1 OFF3 0.0) + + arc fiveoclock_c21 sevenoclock_c21 (0.0 0.0 R2) + arc sevenoclock_c21 elevenoclock_c21 (-R2 0.0 0.0) + arc elevenoclock_c21 oneoclock_c21 (0.0 0.0 -R2) + arc oneoclock_c21 fiveoclock_c21 (R2 0.0 0.0) + + arc fiveoclock_c22 sevenoclock_c22 (0.0 OFF1 R2) + arc sevenoclock_c22 elevenoclock_c22 (-R2 OFF1 0.0) + arc elevenoclock_c22 oneoclock_c22 (0.0 OFF1 -R2) + arc oneoclock_c22 fiveoclock_c22 (R2 OFF1 0.0) + + arc fiveoclock_c23 sevenoclock_c23 (0.0 OFF2 R2) + arc sevenoclock_c23 elevenoclock_c23 (-R2 OFF2 0.0) + arc elevenoclock_c23 oneoclock_c23 (0.0 OFF2 -R2) + arc oneoclock_c23 fiveoclock_c23 (R2 OFF2 0.0) + + arc fiveoclock_c24 sevenoclock_c24 (0.0 OFF3 R2) + arc sevenoclock_c24 elevenoclock_c24 (-R2 OFF3 0.0) + arc elevenoclock_c24 oneoclock_c24 (0.0 OFF3 -R2) + arc oneoclock_c24 fiveoclock_c24 (R2 OFF3 0.0) + + arc fiveoclock_ct1 sevenoclock_ct1 (0.0 0.0 Rt) + arc sevenoclock_ct1 elevenoclock_ct1 (-Rt 0.0 0.0) + arc elevenoclock_ct1 oneoclock_ct1 (0.0 0.0 -Rt) + arc oneoclock_ct1 fiveoclock_ct1 (Rt 0.0 0.0) + + arc fiveoclock_ct2 sevenoclock_ct2 (0.0 OFF1 Rt) + arc sevenoclock_ct2 elevenoclock_ct2 (-Rt OFF1 0.0) + arc elevenoclock_ct2 oneoclock_ct2 (0.0 OFF1 -Rt) + arc oneoclock_ct2 fiveoclock_ct2 (Rt OFF1 0.0) + + arc fiveoclock_ct3 sevenoclock_ct3 (0.0 OFF2 Rt) + arc sevenoclock_ct3 elevenoclock_ct3 (-Rt OFF2 0.0) + arc elevenoclock_ct3 oneoclock_ct3 (0.0 OFF2 -Rt) + arc oneoclock_ct3 fiveoclock_ct3 (Rt OFF2 0.0) + + arc fiveoclock_ct4 sevenoclock_ct4 (0.0 OFF3 Rt) + arc sevenoclock_ct4 elevenoclock_ct4 (-Rt OFF3 0.0) + arc elevenoclock_ct4 oneoclock_ct4 (0.0 OFF3 -Rt) + arc oneoclock_ct4 fiveoclock_ct4 (Rt OFF3 0.0) + + ); + + patches + ( + patch inlet + ( + (fiveoclock_sq1 oneoclock_sq1 elevenoclock_sq1 sevenoclock_sq1) + + (fiveoclock_sq1 fiveoclock_c21 oneoclock_c21 oneoclock_sq1) + (fiveoclock_c21 fiveoclock_sq1 sevenoclock_sq1 sevenoclock_c21) + (sevenoclock_sq1 elevenoclock_sq1 elevenoclock_c21 sevenoclock_c21) + (oneoclock_sq1 oneoclock_c21 elevenoclock_c21 elevenoclock_sq1) + ) + + patch outlet + ( + (fiveoclock_sq4 oneoclock_sq4 elevenoclock_sq4 sevenoclock_sq4) + + (fiveoclock_sq4 fiveoclock_c24 oneoclock_c24 oneoclock_sq4) + (fiveoclock_c24 fiveoclock_sq4 sevenoclock_sq4 sevenoclock_c24) + (sevenoclock_sq4 elevenoclock_sq4 elevenoclock_c24 sevenoclock_c24) + (oneoclock_sq4 oneoclock_c24 elevenoclock_c24 elevenoclock_sq4) + + (fiveoclock_ct4 oneoclock_ct4 oneoclock_c24 fiveoclock_c24) + (oneoclock_ct4 elevenoclock_ct4 elevenoclock_c24 oneoclock_c24) + (elevenoclock_ct4 sevenoclock_ct4 sevenoclock_c24 elevenoclock_c24) + (fiveoclock_ct4 sevenoclock_ct4 sevenoclock_c24 fiveoclock_c24) + + (fiveoclock_ct4 fiveoclock_c14 oneoclock_c14 oneoclock_ct4) + (fiveoclock_c14 fiveoclock_ct4 sevenoclock_ct4 sevenoclock_c14) + (sevenoclock_c14 sevenoclock_ct4 elevenoclock_ct4 elevenoclock_c14) + (elevenoclock_c14 elevenoclock_ct4 oneoclock_ct4 oneoclock_c14) + ) + + wall walls + ( + + (fiveoclock_c21 fiveoclock_ct1 oneoclock_ct1 oneoclock_c21) + (fiveoclock_ct1 fiveoclock_c21 sevenoclock_c21 sevenoclock_ct1) + (sevenoclock_ct1 sevenoclock_c21 elevenoclock_c21 elevenoclock_ct1) + (elevenoclock_ct1 elevenoclock_c21 oneoclock_c21 oneoclock_ct1) + + (fiveoclock_ct1 fiveoclock_c11 oneoclock_c11 oneoclock_ct1) + (fiveoclock_c11 fiveoclock_ct1 sevenoclock_ct1 sevenoclock_c11) + (sevenoclock_c11 sevenoclock_ct1 elevenoclock_ct1 elevenoclock_c11) + (elevenoclock_c11 elevenoclock_ct1 oneoclock_ct1 oneoclock_c11) + + (sevenoclock_c11 fiveoclock_c11 fiveoclock_c12 sevenoclock_c12) + (sevenoclock_c11 sevenoclock_c12 elevenoclock_c12 elevenoclock_c11) + (elevenoclock_c11 elevenoclock_c12 oneoclock_c12 oneoclock_c11) + (oneoclock_c11 oneoclock_c12 fiveoclock_c12 fiveoclock_c11) + + (sevenoclock_c12 fiveoclock_c12 fiveoclock_c13 sevenoclock_c13) + (sevenoclock_c12 sevenoclock_c13 elevenoclock_c13 elevenoclock_c12) + (elevenoclock_c12 elevenoclock_c13 oneoclock_c13 oneoclock_c12) + (oneoclock_c12 oneoclock_c13 fiveoclock_c13 fiveoclock_c12) + + (sevenoclock_c13 fiveoclock_c13 fiveoclock_c14 sevenoclock_c14) + (sevenoclock_c13 sevenoclock_c14 elevenoclock_c14 elevenoclock_c13) + (elevenoclock_c13 elevenoclock_c14 oneoclock_c14 oneoclock_c13) + (oneoclock_c13 oneoclock_c14 fiveoclock_c14 fiveoclock_c13) + + (sevenoclock_c22 fiveoclock_c22 fiveoclock_c23 sevenoclock_c23) + (sevenoclock_c22 sevenoclock_c23 elevenoclock_c23 elevenoclock_c22) + (elevenoclock_c22 elevenoclock_c23 oneoclock_c23 oneoclock_c22) + (oneoclock_c22 oneoclock_c23 fiveoclock_c23 fiveoclock_c22) + + (sevenoclock_ct2 fiveoclock_ct2 fiveoclock_ct3 sevenoclock_ct3) + (sevenoclock_ct2 sevenoclock_ct3 elevenoclock_ct3 elevenoclock_ct2) + (elevenoclock_ct2 elevenoclock_ct3 oneoclock_ct3 oneoclock_ct2) + (sevenoclock_ct2 fiveoclock_ct2 fiveoclock_c22 sevenoclock_c22) + + (fiveoclock_ct2 oneoclock_ct2 oneoclock_c22 fiveoclock_c22) + (oneoclock_ct2 elevenoclock_ct2 elevenoclock_c22 oneoclock_c22) + (elevenoclock_ct2 sevenoclock_ct2 sevenoclock_c22 elevenoclock_c22) + (oneoclock_ct2 oneoclock_ct3 fiveoclock_ct3 fiveoclock_ct2) + + (sevenoclock_ct3 fiveoclock_ct3 fiveoclock_c23 sevenoclock_c23) + (fiveoclock_ct3 oneoclock_ct3 oneoclock_c23 fiveoclock_c23) + (oneoclock_ct3 elevenoclock_ct3 elevenoclock_c23 oneoclock_c23) + (elevenoclock_ct3 sevenoclock_ct3 sevenoclock_c23 elevenoclock_c23) + + ) + +); + +mergePatchPairs +( +); diff --git a/tutorial_cases/airlift_40m/system/controlDict b/tutorial_cases/airlift_40m/system/controlDict new file mode 100644 index 00000000..2013c13f --- /dev/null +++ b/tutorial_cases/airlift_40m/system/controlDict @@ -0,0 +1,67 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 3.0.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application reactingTwoPhaseEulerFoam; + +startFrom latestTime; //startTime; //latestTime + +startTime 0; + +stopAt endTime; + +endTime 500; + +deltaT 0.00025; + +writeControl adjustableRunTime; + +writeInterval 1.0; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 10; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep yes; + +maxCo 0.3; + +maxDeltaT 1; + +/*functions +{ + writeFields + { + type writeRegisteredObject; + functionObjectLibs ( "libIOFunctionObjects.so" ); + objectNames ("thermo:rho.liquid"); + objectNames ("thermo:rho.gas"); + outputControl outputTime; + } +}*/ + + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/system/cylinderMesh.m4 b/tutorial_cases/airlift_40m/system/cylinderMesh.m4 new file mode 100644 index 00000000..c06740d0 --- /dev/null +++ b/tutorial_cases/airlift_40m/system/cylinderMesh.m4 @@ -0,0 +1,154 @@ +//--------------------------------*- C++ -*---------------------------------- +// blockMesh : Block mesh description file +// +// adapted from: +// http://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/61796-help-could-anyone-post-simple-cylinder-mesh.html +// +// JJS, 1/8/16 +// +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// ************************************ +changecom(//)changequote([,]) +define(calc, [esyscmd(perl -e 'printf ($1)')]) +define(VCOUNT, 0) +define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))]) + + convertToMeters 1; + + define(D, 5.0) // diameter + define(L, 40.0) // length + define(PI, 3.14159265) + + define(R, calc(D/2)) + define(CW, calc(D/4)) //Width of middle square section + + define(CX, calc(R*cos((PI/180)*45))) + define(CZ, calc(R*sin((PI/180)*45))) + + define(NPS, 5) //how many cells in the square section + define(NPD, 5) //how many cells from square section to perimeter + define(NPY, 200) // how many cells from top to bottom + + vertices + ( + ( CW 0.0 CW) vlabel(fiveoclocksqb) + (-CW 0.0 CW) vlabel(sevenoclocksqb) + (-CW 0.0 -CW) vlabel(elevenoclocksqb) + ( CW 0.0 -CW) vlabel(oneoclocksqb) + + ( CX 0.0 CZ) vlabel(fiveoclockcb) + (-CX 0.0 CZ) vlabel(sevenoclockcb) + (-CX 0.0 -CZ) vlabel(elevenoclockcb) + ( CX 0.0 -CZ) vlabel(oneoclockcb) + + ( CW L CW) vlabel(fiveoclocksqt) + (-CW L CW) vlabel(sevenoclocksqt) + (-CW L -CW) vlabel(elevenoclocksqt) + ( CW L -CW) vlabel(oneoclocksqt) + + ( CX L CZ) vlabel(fiveoclockct) + (-CX L CZ) vlabel(sevenoclockct) + (-CX L -CZ) vlabel(elevenoclockct) + ( CX L -CZ) vlabel(oneoclockct) + ); + + blocks + ( + //square block + hex ( + sevenoclocksqb fiveoclocksqb oneoclocksqb elevenoclocksqb + sevenoclocksqt fiveoclocksqt oneoclocksqt elevenoclocksqt + ) + (NPS NPS NPY) + simpleGrading (1 1 1) + + //slice1 + hex ( + sevenoclockcb fiveoclockcb fiveoclocksqb sevenoclocksqb + sevenoclockct fiveoclockct fiveoclocksqt sevenoclocksqt + ) + (NPS NPD NPY) + simpleGrading (1 1 1) + + //slice2 + hex ( + sevenoclocksqb elevenoclocksqb elevenoclockcb sevenoclockcb + sevenoclocksqt elevenoclocksqt elevenoclockct sevenoclockct + ) + (NPS NPD NPY) +simpleGrading (1 1 1) + + //slice3 + hex ( + elevenoclocksqb oneoclocksqb oneoclockcb elevenoclockcb + elevenoclocksqt oneoclocksqt oneoclockct elevenoclockct + ) + (NPS NPD NPY) +simpleGrading (1 1 1) + + //slice4 + hex ( + oneoclocksqb fiveoclocksqb fiveoclockcb oneoclockcb + oneoclocksqt fiveoclocksqt fiveoclockct oneoclockct + ) + (NPS NPD NPY) +simpleGrading (1 1 1) + + ); + + + //create the quarter circles + edges + ( + arc fiveoclockcb sevenoclockcb (0.0 0.0 R) + arc sevenoclockcb elevenoclockcb (-R 0.0 0.0) + arc elevenoclockcb oneoclockcb (0.0 0.0 -R) + arc oneoclockcb fiveoclockcb (R 0.0 0.0) + + arc fiveoclockct sevenoclockct (0.0 L R) + arc sevenoclockct elevenoclockct (-R L 0.0) + arc elevenoclockct oneoclockct (0.0 L -R) + arc oneoclockct fiveoclockct (R L 0.0) + + ); + + patches + ( + patch inlet + ( + (fiveoclocksqb oneoclocksqb elevenoclocksqb sevenoclocksqb) + (fiveoclocksqb fiveoclockcb oneoclockcb oneoclocksqb) + (fiveoclockcb fiveoclocksqb sevenoclocksqb sevenoclockcb) + (sevenoclocksqb elevenoclocksqb elevenoclockcb sevenoclockcb) + (oneoclocksqb oneoclockcb elevenoclockcb elevenoclocksqb) + ) + + patch outlet + ( + (fiveoclocksqt oneoclocksqt elevenoclocksqt sevenoclocksqt) + (fiveoclocksqt fiveoclockct oneoclockct oneoclocksqt) + (fiveoclockct fiveoclocksqt sevenoclocksqt sevenoclockct) + (sevenoclocksqt elevenoclocksqt elevenoclockct sevenoclockct) + (oneoclocksqt oneoclockct elevenoclockct elevenoclocksqt) + ) + + wall walls + ( + (sevenoclockcb fiveoclockcb fiveoclockct sevenoclockct) + (sevenoclockcb sevenoclockct elevenoclockct elevenoclockcb) + (elevenoclockcb elevenoclockct oneoclockct oneoclockcb) + (oneoclockcb oneoclockct fiveoclockct fiveoclockcb) + ) + +); + +mergePatchPairs +( +); diff --git a/tutorial_cases/airlift_40m/system/decomposeParDict b/tutorial_cases/airlift_40m/system/decomposeParDict new file mode 100644 index 00000000..8cb9cefd --- /dev/null +++ b/tutorial_cases/airlift_40m/system/decomposeParDict @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.4.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 144; + +method simple; + +simpleCoeffs +{ + n ( 2 36 2 ); + delta 0.001; +} + +hierarchicalCoeffs +{ + n ( 1 1 1 ); + delta 0.001; + order xyz; +} + +manualCoeffs +{ + dataFile ""; +} + +distributed no; + +roots ( ); + + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/system/fvSchemes b/tutorial_cases/airlift_40m/system/fvSchemes new file mode 100644 index 00000000..8ca9016b --- /dev/null +++ b/tutorial_cases/airlift_40m/system/fvSchemes @@ -0,0 +1,72 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 3.0.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + + "div\(phi,alpha.*\)" Gauss upwind; + "div\(phir,alpha.*\)" Gauss upwind; + + "div\(alphaRhoPhi.*,U.*\)" Gauss upwind; + "div\(phi.*,U.*\)" Gauss upwind; + + "div\(alphaRhoPhi.*,Yi\)" Gauss upwind; + "div\(alphaRhoPhi.*,(h|e).*\)" Gauss upwind; + "div\(alphaRhoPhi.*,K.*\)" Gauss upwind; + "div\(alphaPhi.*,p\)" Gauss upwind; + + "div\(alphaRhoPhi.*,K.*\)" Gauss upwind; + + "div\(alphaRhoPhi.*,\(p\|thermo:rho.*\)\)" Gauss upwind; + "div\(alphaRhoPhi.*,(k|epsilon).*\)" Gauss upwind; + "div\(phim,(k|epsilon)m\)" Gauss upwind; + + "div\(\(\(\(alpha.*\*thermo:rho.*\)\*nuEff.*\)\*dev2\(T\(grad\(U.*\)\)\)\)\)" Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear uncorrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default uncorrected; +} + +wallDist +{ + method meshWave; +} + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/system/fvSolution b/tutorial_cases/airlift_40m/system/fvSolution new file mode 100644 index 00000000..f8c7b3b0 --- /dev/null +++ b/tutorial_cases/airlift_40m/system/fvSolution @@ -0,0 +1,103 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 3.0.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + "alpha.*" + { + nAlphaCorr 1; + nAlphaSubCycles 3; + } + + p_rgh + { + solver GAMG; + smoother DIC; + nPreSweeps 0; + nPostSweeps 2; + nFinestSweeps 2; + cacheAgglomeration true; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + tolerance 1e-11; + relTol 0.001; + } + + p_rghFinal + { + $p_rgh; + relTol 0; + } + + "U.*" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-12; + relTol 0; + minIter 1; + } + + "(e|h).*" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-9; + relTol 0; + minIter 0; + maxIter 0; + } + + "Yi.*" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-8; + relTol 0; + minIter 1; + residualAlpha 1e-8; + } + + "(k|epsilon|Theta).*" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-7; + relTol 0; + minIter 1; + } + +} + +PIMPLE +{ + nOuterCorrectors 3; + nCorrectors 1; + nNonOrthogonalCorrectors 2; +} + +relaxationFactors +{ + equations + { + ".*" 1; + } +} + + +// ************************************************************************* // diff --git a/tutorial_cases/airlift_40m/system/setFieldsDict b/tutorial_cases/airlift_40m/system/setFieldsDict new file mode 100644 index 00000000..8b2cc76c --- /dev/null +++ b/tutorial_cases/airlift_40m/system/setFieldsDict @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 3.0.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue alpha.gas 1 + volScalarFieldValue alpha.liquid 0 +); + +regions +( + boxToCell + { + box (-2.5 0.0 -2.5) (2.5 32 2.5); + fieldValues + ( + volScalarFieldValue alpha.gas 0.01 + volScalarFieldValue alpha.liquid 0.99 + //volScalarFieldValue O2.liquid 3.2e-6 // 8e-6 = 0.25 mol/m^3 + ); + } +); + + +// ************************************************************************* // From 01a7aed80e7d911ca1249f6b3811fdaabe842315 Mon Sep 17 00:00:00 2001 From: Rahimi Date: Wed, 29 Jan 2025 13:28:39 -0700 Subject: [PATCH 2/4] add readme and run.sh to airlift --- tutorial_cases/airlift_40m/README.md | 19 +++++++++++++++++++ tutorial_cases/airlift_40m/run.sh | 2 ++ 2 files changed, 21 insertions(+) create mode 100644 tutorial_cases/airlift_40m/README.md create mode 100644 tutorial_cases/airlift_40m/run.sh diff --git a/tutorial_cases/airlift_40m/README.md b/tutorial_cases/airlift_40m/README.md new file mode 100644 index 00000000..bd037e1f --- /dev/null +++ b/tutorial_cases/airlift_40m/README.md @@ -0,0 +1,19 @@ +### Airlift reactor + +This is the airlift reactor (5m diameter and 40m tall). + +``` +@article{rahimi2018computational, + title={Computational fluid dynamics study of full-scale aerobic bioreactors: Evaluation of gas--liquid mass transfer, oxygen uptake, and dynamic oxygen distribution}, + author={Rahimi, Mohammad J and Sitaraman, Hariswaran and Humbird, David and Stickel, Jonathan J}, + journal={Chemical Engineering Research and Design}, + volume={139}, + pages={283--295}, + year={2018}, + publisher={Elsevier} +} +``` + +Single core exec + +1. `bash run.sh` diff --git a/tutorial_cases/airlift_40m/run.sh b/tutorial_cases/airlift_40m/run.sh new file mode 100644 index 00000000..f79cc8d4 --- /dev/null +++ b/tutorial_cases/airlift_40m/run.sh @@ -0,0 +1,2 @@ +. ./presteps.sh +birdmultiphaseEulerFoam From d205bac0b1679c964c05e1d83cbf3f721f12c0e8 Mon Sep 17 00:00:00 2001 From: Rahimi Date: Wed, 29 Jan 2025 13:40:26 -0700 Subject: [PATCH 3/4] run the airlift case for one timestep --- .github/workflows/ci.yml | 6 ++++++ tutorial_cases/airlift_40m/system/controlDict | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf90bb53..74e673df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -171,3 +171,9 @@ jobs: cd tutorial_cases/loop_reactor_mixing bash run.sh cd ../../ + - name: Run airlift reactor tutorial + run: | + cd tutorial_cases/airlift_40m + bash run.sh + cd ../../ + diff --git a/tutorial_cases/airlift_40m/system/controlDict b/tutorial_cases/airlift_40m/system/controlDict index 2013c13f..b9bba7f4 100644 --- a/tutorial_cases/airlift_40m/system/controlDict +++ b/tutorial_cases/airlift_40m/system/controlDict @@ -21,7 +21,7 @@ startFrom latestTime; //startTime; //latestTime startTime 0; -stopAt endTime; +stopAt writeNow;//endTime; endTime 500; From 5a4cd818cd23eeea2e53e032ccf57ecc9820a288 Mon Sep 17 00:00:00 2001 From: Rahimi Date: Wed, 29 Jan 2025 14:20:41 -0700 Subject: [PATCH 4/4] fix the outlet mass fraction --- tutorial_cases/airlift_40m/0.org/N2.gas | 2 +- tutorial_cases/airlift_40m/presteps.sh | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tutorial_cases/airlift_40m/0.org/N2.gas b/tutorial_cases/airlift_40m/0.org/N2.gas index b2173f88..b00ed7c7 100644 --- a/tutorial_cases/airlift_40m/0.org/N2.gas +++ b/tutorial_cases/airlift_40m/0.org/N2.gas @@ -32,7 +32,7 @@ boundaryField type inletOutlet; phi phi.gas; inletValue uniform 0; - value uniform 0; + value uniform 1; } walls diff --git a/tutorial_cases/airlift_40m/presteps.sh b/tutorial_cases/airlift_40m/presteps.sh index aaf057c8..06433b60 100644 --- a/tutorial_cases/airlift_40m/presteps.sh +++ b/tutorial_cases/airlift_40m/presteps.sh @@ -3,5 +3,4 @@ rm -rf 0 cp -r 0.org 0 blockMesh setFields -decomposePar -#reactingTwoPhaseEulerFoam +#decomposePar