diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/0/T.gas b/tutorials/modules/multiphaseEuler/hydrofoil/0/T.gas new file mode 100644 index 0000000000..ec5afe5875 --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/0/T.gas @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object T.gas; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 293.15; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type fixedValue; + value $internalField; + } + outlet + { + type inletOutlet; + phi phi.gas; + inletValue $internalField; + value $internalField; + } + hydrofoil + { + type zeroGradient; + } + walls + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/0/T.liquid b/tutorials/modules/multiphaseEuler/hydrofoil/0/T.liquid new file mode 100644 index 0000000000..0407bf043a --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/0/T.liquid @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object T.liquid; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 293.15; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type fixedValue; + value $internalField; + } + outlet + { + type inletOutlet; + phi phi.liquid; + inletValue $internalField; + value $internalField; + } + hydrofoil + { + type zeroGradient; + } + walls + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/0/U.gas.orig b/tutorials/modules/multiphaseEuler/hydrofoil/0/U.gas.orig new file mode 100644 index 0000000000..cdb30a35ad --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/0/U.gas.orig @@ -0,0 +1,46 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object U.gas; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (5.33 0 0); + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type fixedValue; + value uniform (5.33 0 0); + } + outlet + { + type zeroGradient; + } + hydrofoil + { + type noSlip; + } + walls + { + type noSlip; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/0/U.liquid.orig b/tutorials/modules/multiphaseEuler/hydrofoil/0/U.liquid.orig new file mode 100644 index 0000000000..ee78804820 --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/0/U.liquid.orig @@ -0,0 +1,46 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object U.liquid; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (5.33 0 0); + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type fixedValue; + value uniform (5.33 0 0); + } + outlet + { + type zeroGradient; + } + hydrofoil + { + type noSlip; + } + walls + { + type noSlip; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/0/alpha.gas b/tutorials/modules/multiphaseEuler/hydrofoil/0/alpha.gas new file mode 100644 index 0000000000..c850ac1c2c --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/0/alpha.gas @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alpha.gas; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type fixedValue; + value uniform 0; + } + outlet + { + type inletOutlet; + phi phi.gas; + inletValue uniform 0; + value uniform 0; + } + hydrofoil + { + type zeroGradient; + } + walls + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/0/alpha.liquid b/tutorials/modules/multiphaseEuler/hydrofoil/0/alpha.liquid new file mode 100644 index 0000000000..bc54b10e67 --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/0/alpha.liquid @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alpha.liquid; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 1.0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type fixedValue; + value $internalField; + } + outlet + { + type inletOutlet; + phi phi.liquid; + inletValue uniform 1; + value uniform 1; + } + hydrofoil + { + type zeroGradient; + } + walls + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/0/alphat.gas b/tutorials/modules/multiphaseEuler/hydrofoil/0/alphat.gas new file mode 100644 index 0000000000..75775e3f26 --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/0/alphat.gas @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alphat.gas; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 1e-8; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type calculated; + value uniform 1e-8; + } + outlet + { + type calculated; + value uniform 1e-8; + } + hydrofoil + { + type compressible::alphatPhaseJayatillekeWallFunction; + Prt 0.85; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + walls + { + type compressible::alphatPhaseJayatillekeWallFunction; + Prt 0.85; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/0/alphat.liquid b/tutorials/modules/multiphaseEuler/hydrofoil/0/alphat.liquid new file mode 100644 index 0000000000..1ca935c585 --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/0/alphat.liquid @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alphat.liquid; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [ 1 -1 -1 0 0 0 0 ]; + +internalField uniform 1e-08; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type fixedValue; + value uniform 0; + } + outlet + { + type calculated; + value uniform 1e-08; + } + hydrofoil + { + type compressible::alphatPhaseJayatillekeWallFunction; + Prt 0.85; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + walls + { + type compressible::alphatPhaseJayatillekeWallFunction; + Prt 0.85; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/0/k.gas b/tutorials/modules/multiphaseEuler/hydrofoil/0/k.gas new file mode 100644 index 0000000000..7d977934c2 --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/0/k.gas @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object k.gas; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0.0042613; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type fixedValue; + value $internalField; + } + outlet + { + type inletOutlet; + phi phi.gas; + inletValue $internalField; + value $internalField; + } + hydrofoil + { + type kqRWallFunction; + value $internalField; + } + walls + { + type kqRWallFunction; + value $internalField; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/0/k.liquid b/tutorials/modules/multiphaseEuler/hydrofoil/0/k.liquid new file mode 100644 index 0000000000..9ec37cc5b2 --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/0/k.liquid @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object k.liquid; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0.0042613; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type fixedValue; + value $internalField; + + } + outlet + { + type inletOutlet; + phi phi.liquid; + inletValue $internalField; + value $internalField; + } + hydrofoil + { + type kqRWallFunction; + value $internalField; + } + walls + { + type kqRWallFunction; + value $internalField; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/0/nut.gas b/tutorials/modules/multiphaseEuler/hydrofoil/0/nut.gas new file mode 100644 index 0000000000..9f3b3c397e --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/0/nut.gas @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object nut.gas; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 9.993764000E-07; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type calculated; + value $internalField; + } + outlet + { + type calculated; + value $internalField; + } + hydrofoil + { + type nutUSpaldingWallFunction; + value $internalField; + } + walls + { + type nutUSpaldingWallFunction; + value $internalField; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/0/nut.liquid b/tutorials/modules/multiphaseEuler/hydrofoil/0/nut.liquid new file mode 100644 index 0000000000..05a29fa91f --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/0/nut.liquid @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object nut.liquid; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 9.993764000E-07; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type calculated; + value $internalField; + } + outlet + { + type calculated; + value $internalField; + } + hydrofoil + { + type nutUSpaldingWallFunction; + value $internalField; + } + walls + { + type nutUSpaldingWallFunction; + value $internalField; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/0/omega.gas b/tutorials/modules/multiphaseEuler/hydrofoil/0/omega.gas new file mode 100644 index 0000000000..ad361c0bad --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/0/omega.gas @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object omega.gas; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 -1 0 0 0 0]; + +internalField uniform 355.3333333; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type fixedValue; + value $internalField; + + } + outlet + { + type inletOutlet; + phi phi.liquid; + inletValue $internalField; + value $internalField; + } + hydrofoil + { + type omegaWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + blended on; + value $internalField; + } + walls + { + type omegaWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + blended on; + value $internalField; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/0/omega.liquid b/tutorials/modules/multiphaseEuler/hydrofoil/0/omega.liquid new file mode 100644 index 0000000000..0529839074 --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/0/omega.liquid @@ -0,0 +1,59 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object omega.liquid; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 -1 0 0 0 0]; + +internalField uniform 355.3333333; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type fixedValue; + value $internalField; + } + outlet + { + type inletOutlet; + phi phi.liquid; + inletValue $internalField; + value $internalField; + } + hydrofoil + { + type omegaWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + blended on; + value $internalField; + } + walls + { + type omegaWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + blended on; + value $internalField; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/0/p b/tutorials/modules/multiphaseEuler/hydrofoil/0/p new file mode 100644 index 0000000000..360ab5ce19 --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/0/p @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 1e5; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type calculated; + value $internalField; + } + outlet + { + type calculated; + value $internalField; + } + hydrofoil + { + type calculated; + value $internalField; + } + walls + { + type calculated; + value $internalField; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/0/p_rgh b/tutorials/modules/multiphaseEuler/hydrofoil/0/p_rgh new file mode 100644 index 0000000000..f2ec3cab33 --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/0/p_rgh @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 1e5; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type fixedFluxPressure; + } + outlet + { + type prghPressure; + p $internalField; + value $internalField; + } + hydrofoil + { + type fixedFluxPressure; + } + walls + { + type fixedFluxPressure; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/Allclean b/tutorials/modules/multiphaseEuler/hydrofoil/Allclean new file mode 100755 index 0000000000..77bdf0f3ff --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/Allclean @@ -0,0 +1,7 @@ +#!/bin/sh + +cd ${0%/*} || exit 1 + +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cleanCase && rm -rf 0/phi 0/U 0/uniform 0/yPlus.liquid validation/*.eps diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/Allrun b/tutorials/modules/multiphaseEuler/hydrofoil/Allrun new file mode 100755 index 0000000000..4adb9f2fd4 --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/Allrun @@ -0,0 +1,20 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +runApplication blockMesh + +cp 0/U.liquid.orig 0/U +runApplication potentialFoam -pName p_rgh +cp 0/U 0/U.gas +cp 0/U 0/U.liquid + +runApplication decomposePar +runParallel $(getApplication) +runApplication reconstructPar + +validation/createGraph + +#------------------------------------------------------------------------------ diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/constant/fvModels b/tutorials/modules/multiphaseEuler/hydrofoil/constant/fvModels new file mode 100644 index 0000000000..b0c49f3e93 --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/constant/fvModels @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object fvOptions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +phaseTurbulenceStabilisation +{ + type phaseTurbulenceStabilisation; + + libs ("libmultiphaseEulerFoamFvModels.so"); + + phase gas; + + alphaInversion 0.1; +} + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/constant/g b/tutorials/modules/multiphaseEuler/hydrofoil/constant/g new file mode 100644 index 0000000000..a11e931c9a --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/constant/g @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class uniformDimensionedVectorField; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value (0 -9.81 0); + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/constant/geometry/NACAMOD66_6deg_lower.stl.gz b/tutorials/modules/multiphaseEuler/hydrofoil/constant/geometry/NACAMOD66_6deg_lower.stl.gz new file mode 100644 index 0000000000..96ab117bba Binary files /dev/null and b/tutorials/modules/multiphaseEuler/hydrofoil/constant/geometry/NACAMOD66_6deg_lower.stl.gz differ diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/constant/geometry/NACAMOD66_6deg_tip.stl.gz b/tutorials/modules/multiphaseEuler/hydrofoil/constant/geometry/NACAMOD66_6deg_tip.stl.gz new file mode 100644 index 0000000000..237c31f20a Binary files /dev/null and b/tutorials/modules/multiphaseEuler/hydrofoil/constant/geometry/NACAMOD66_6deg_tip.stl.gz differ diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/constant/geometry/NACAMOD66_6deg_upper.stl.gz b/tutorials/modules/multiphaseEuler/hydrofoil/constant/geometry/NACAMOD66_6deg_upper.stl.gz new file mode 100644 index 0000000000..7d13f2274b Binary files /dev/null and b/tutorials/modules/multiphaseEuler/hydrofoil/constant/geometry/NACAMOD66_6deg_upper.stl.gz differ diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/constant/momentumTransport.gas b/tutorials/modules/multiphaseEuler/hydrofoil/constant/momentumTransport.gas new file mode 100644 index 0000000000..a200e5c3b1 --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/constant/momentumTransport.gas @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object momentumTransport.gas; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RAS; + +RAS +{ + model kOmegaSST; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/constant/momentumTransport.liquid b/tutorials/modules/multiphaseEuler/hydrofoil/constant/momentumTransport.liquid new file mode 100644 index 0000000000..62775f7b79 --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/constant/momentumTransport.liquid @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object momentumTransport.liquid; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RAS; + +RAS +{ + model kOmegaSST; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/constant/phaseProperties b/tutorials/modules/multiphaseEuler/hydrofoil/constant/phaseProperties new file mode 100644 index 0000000000..fd474a285d --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/constant/phaseProperties @@ -0,0 +1,118 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object phaseProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +type basicMultiphaseSystem; + +phases (gas liquid); + +gas +{ + type purePhaseModel; + + diameterModel constant; + constantCoeffs + { + d 0.0002; + } + + residualAlpha 1e-6; +} + +liquid +{ + type purePhaseModel; + + diameterModel none; + + residualAlpha 1e-6; +} + +blending +{ + default + { + type continuous; + phase liquid; + } +} + +drag +{ + gas_dispersedIn_liquid + { + type IshiiZuber; + } +} + +virtualMass +{} + +heatTransfer +{ + gas_dispersedIn_liquid + { + type RanzMarshall; + } +} + +lift +{} + +wallLubrication +{} + +turbulentDispersion +{} + +aspectRatio +{} + +surfaceTension +{ + gas_liquid + { + type constant; + sigma 0.071; + } +} + +saturation +{} + +phaseTransfer +{ + gas_dispersedIn_liquid + { + type cavitation; + + model Kunz; + + liquid liquid; + + pSat 79995.75943; + + UInf 5.33; + tInf 0.028142589; + Cc 100; + Cv 100; + } +} + +interfaceCompression +{} + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/constant/physicalProperties.gas b/tutorials/modules/multiphaseEuler/hydrofoil/constant/physicalProperties.gas new file mode 100644 index 0000000000..ab6f58b8e4 --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/constant/physicalProperties.gas @@ -0,0 +1,46 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object thermophysicalProperties.gas; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo hConst; + equationOfState perfectGas; + specie specie; + energy sensibleEnthalpy; +} + +mixture +{ + specie + { + molWeight 18.015; + } + thermodynamics + { + Cp 1006.3; + Hf 6e3; + } + transport + { + mu 9.86e-06; + Pr 0.71; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/constant/physicalProperties.liquid b/tutorials/modules/multiphaseEuler/hydrofoil/constant/physicalProperties.liquid new file mode 100644 index 0000000000..f01a6ad7d4 --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/constant/physicalProperties.liquid @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object thermophysicalProperties.liquid; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo eConst; + equationOfState rhoConst; + specie specie; + energy sensibleInternalEnergy; +} + +mixture +{ + specie + { + molWeight 18.015; + } + equationOfState + { + rho 998.4; + } + thermodynamics + { + Cv 4180; + Hf 40e3; + } + transport + { + mu 9.9768e-04; + Pr 2.289; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/system/blockMeshDict b/tutorials/modules/multiphaseEuler/hydrofoil/system/blockMeshDict new file mode 100644 index 0000000000..75d26cfdaa --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/system/blockMeshDict @@ -0,0 +1,257 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1.0; + +x0 -0.381; +x1 -0.081; +x2 -0.02; +xTip 0.0015; +xTail 0.149571; +x3 0.21; +x4 0.96; + +y0 -0.096; +y1 -0.03; +y1Tip -0.022; +y1Tail -0.038; +yTipL 0.00625802; +yTipU 0.0095993; +yTail -0.00801537; +y2 0; +y3 0.03; +y3Tip 0.038; +y3Tail 0.022; +y4 0.096; + +z 0.01; + +nX0 24; +nX1 20; +nX2 80; +nX3 20; +nX4 60; + +nY0 11; +nY1 11; +nY2 11; + +nO 16; + +geometry +{ + hydrofoilTip + { + type triSurfaceMesh; + file "NACAMOD66_6deg_tip.stl"; + } + hydrofoilLower + { + type triSurfaceMesh; + file "NACAMOD66_6deg_lower.stl"; + } + hydrofoilUpper + { + type triSurfaceMesh; + file "NACAMOD66_6deg_upper.stl"; + } +} + +vertices +( + ($x0 $y0 #neg $z) + ($x0 $y1 #neg $z) + ($x0 $y3 #neg $z) + ($x0 $y4 #neg $z) + + ($x1 $y0 #neg $z) + ($x1 $y1 #neg $z) + ($x1 $y3 #neg $z) + ($x1 $y4 #neg $z) + + ($x2 $y0 #neg $z) + ($x2 $y1Tip #neg $z) + ($x2 $y3Tip #neg $z) + ($x2 $y4 #neg $z) + + ($xTip $yTipL #neg $z) + ($xTip $yTipU #neg $z) + + ($xTail $y0 #neg $z) + ($xTail $y1Tail #neg $z) + ($xTail $yTail #neg $z) + ($xTail $y3Tail #neg $z) + ($xTail $y4 #neg $z) + + ($x3 $y0 #neg $z) + ($x3 $y1 #neg $z) + ($x3 $y2 #neg $z) + ($x3 $y3 #neg $z) + ($x3 $y4 #neg $z) + + ($x4 $y0 #neg $z) + ($x4 $y1 #neg $z) + ($x4 $y2 #neg $z) + ($x4 $y3 #neg $z) + ($x4 $y4 #neg $z) + + + ($x0 $y0 $z) + ($x0 $y1 $z) + ($x0 $y3 $z) + ($x0 $y4 $z) + + ($x1 $y0 $z) + ($x1 $y1 $z) + ($x1 $y3 $z) + ($x1 $y4 $z) + + ($x2 $y0 $z) + ($x2 $y1Tip $z) + ($x2 $y3Tip $z) + ($x2 $y4 $z) + + ($xTip $yTipL $z) + ($xTip $yTipU $z) + + ($xTail $y0 $z) + ($xTail $y1Tail $z) + ($xTail $yTail $z) + ($xTail $y3Tail $z) + ($xTail $y4 $z) + + ($x3 $y0 $z) + ($x3 $y1 $z) + ($x3 $y2 $z) + ($x3 $y3 $z) + ($x3 $y4 $z) + + ($x4 $y0 $z) + ($x4 $y1 $z) + ($x4 $y2 $z) + ($x4 $y3 $z) + ($x4 $y4 $z) +); + +blocks +( + hex ( 0 4 5 1 29 33 34 30) ($nX0 $nY0 1) simpleGrading (0.1 1 1) + hex ( 1 5 6 2 30 34 35 31) ($nX0 $nY1 1) simpleGrading (0.1 1 1) + hex ( 2 6 7 3 31 35 36 32) ($nX0 $nY2 1) simpleGrading (0.1 1 1) + + hex ( 4 8 9 5 33 37 38 34) ($nX1 $nY0 1) simpleGrading (1 1 1) + hex ( 5 9 10 6 34 38 39 35) ($nX1 $nY1 1) simpleGrading (1 1 1) + hex ( 6 10 11 7 35 39 40 36) ($nX1 $nY2 1) simpleGrading (1 1 1) + + hex ( 8 14 15 9 37 43 44 38) ($nX2 $nY0 1) simpleGrading (1 1 1) + hex ( 9 15 16 12 38 44 45 41) ($nX2 $nO 1) edgeGrading (1 2 2 1 0.2 0.2 0.2 0.2 1 1 1 1) + hex ( 9 12 13 10 38 41 42 39) ($nO $nY1 1) simpleGrading (0.2 1 1) + hex (13 16 17 10 42 45 46 39) ($nX2 $nO 1) edgeGrading (2 1 1 2 5 5 5 5 1 1 1 1) + hex (10 17 18 11 39 46 47 40) ($nX2 $nY2 1) simpleGrading (1 1 1) + + hex (14 19 20 15 43 48 49 44) ($nX3 $nY0 1) simpleGrading (1 1 1) + hex (15 20 21 16 44 49 50 45) ($nX3 $nO 1) edgeGrading (1 1 1 1 0.2 1 1 0.2 1 1 1 1) + hex (16 21 22 17 45 50 51 46) ($nX3 $nO 1) edgeGrading (1 1 1 1 5 1 1 5 1 1 1 1) + hex (17 22 23 18 46 51 52 47) ($nX3 $nY2 1) simpleGrading (1 1 1) + + hex (19 24 25 20 48 53 54 49) ($nX4 $nY0 1) simpleGrading (10 1 1) + hex (20 25 26 21 49 54 55 50) ($nX4 $nO 1) simpleGrading (10 1 1) + hex (21 26 27 22 50 55 56 51) ($nX4 $nO 1) simpleGrading (10 1 1) + hex (22 27 28 23 51 56 57 52) ($nX4 $nY2 1) simpleGrading (10 1 1) +); + +edges +( + project 12 13 (hydrofoilTip) + project 12 16 (hydrofoilLower) + project 13 16 (hydrofoilUpper) + + project 41 42 (hydrofoilTip) + project 41 45 (hydrofoilLower) + project 42 45 (hydrofoilUpper) + + arc 9 10 30 (0 0 -1) + arc 9 15 20 (0 0 1) + arc 10 17 30 (0 0 -1) + + arc 38 39 30 (0 0 -1) + arc 38 44 20 (0 0 1) + arc 39 46 30 (0 0 -1) +); + +defaultPatch +{ + name frontAndBack; + type empty; +} + +boundary +( + inlet + { + type patch; + faces + ( + (0 1 30 29) + (1 2 31 30) + (2 3 32 31) + ); + } + outlet + { + type patch; + faces + ( + (24 25 54 53) + (25 26 55 54) + (26 27 56 55) + (27 28 57 56) + ); + } + hydrofoil + { + type wall; + faces + ( + (12 13 42 41) + (12 16 45 41) + (13 16 45 42) + ); + } + walls + { + type wall; + faces + ( + ( 0 4 33 29) + ( 4 8 37 33) + ( 8 14 43 37) + (14 19 48 43) + (19 24 53 48) + + ( 3 7 36 32) + ( 7 11 40 36) + (11 18 47 40) + (18 23 52 47) + (23 28 57 52) + ); + } +); + +mergePatchPairs +(); + +// ************************************************************************* // + diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/system/controlDict b/tutorials/modules/multiphaseEuler/hydrofoil/system/controlDict new file mode 100644 index 0000000000..e012a01ca6 --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/system/controlDict @@ -0,0 +1,63 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application foamRun; + +solver multiphaseEuler; + +startFrom latestTime; + +startTime 0; + +stopAt endTime; + +endTime 0.2; + +deltaT 2e-6; + +writeControl adjustableRunTime; + +writeInterval 0.01; + +purgeWrite 0; + +writeFormat binary; + +writePrecision 9; + +writeCompression uncompressed; + +timePrecision 14; + +timeFormat general; + +runTimeModifiable yes; + +adjustTimeStep yes; + +maxCo 0.8; + +maxDeltaT 1e-4; + +functions +{ + #includeFunc yPlus(phase=liquid) + #includeFunc cellMin(funcName=min, alpha.liquid, alpha.gas, p, p_rgh, U.liquid, U.gas, T.gas, T.liquid) + #includeFunc cellMax(funcName=max, alpha.liquid, alpha.gas, p, p_rgh, U.liquid, U.gas, T.gas, T.liquid) + #includeFunc hydrofoilPressure +} + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/system/decomposeParDict b/tutorials/modules/multiphaseEuler/hydrofoil/system/decomposeParDict new file mode 100644 index 0000000000..7d3802d855 --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/system/decomposeParDict @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +method scotch; + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/system/fvConstraints b/tutorials/modules/multiphaseEuler/hydrofoil/system/fvConstraints new file mode 100644 index 0000000000..cd06a71b91 --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/system/fvConstraints @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object fvConstraints; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +limitp +{ + type limitPressure; + min 1; + max 1e12; +} + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/system/fvSchemes b/tutorials/modules/multiphaseEuler/hydrofoil/system/fvSchemes new file mode 100644 index 0000000000..867f0ab5a7 --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/system/fvSchemes @@ -0,0 +1,68 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; + limited cellLimited Gauss linear 1; +} + +interpolationSchemes +{ + default linear; +} + +divSchemes +{ + default none; + + div(phi,alpha) Gauss vanLeer; + + div(alphaRhoPhi,U) Gauss linearUpwind limited; + div(alphaRhoPhi,h) Gauss linearUpwind limited; + div(alphaRhoPhi,e) Gauss linearUpwind limited; + div(alphaRhoPhi,f) Gauss upwind; + div(alphaRhoPhi,K) Gauss linearUpwind limited; + div(alphaRhoPhi,k) Gauss upwind; + div(alphaRhoPhi,omega) Gauss upwind; + + div(alphaRhoPhi,(p|rho)) Gauss linearUpwind limited; + + div((((alpha*rho)*nuEff)*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +snGradSchemes +{ + default corrected; +} + +wallDist +{ + method meshWave; + correctWalls true; +} + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/system/fvSolution b/tutorials/modules/multiphaseEuler/hydrofoil/system/fvSolution new file mode 100644 index 0000000000..46fe1f368b --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/system/fvSolution @@ -0,0 +1,100 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + "alpha.*" + { + nAlphaCorr 1; + nAlphaSubCycles 1; + }; + + p_rgh + { + solver GAMG; + smoother DICGaussSeidel; + tolerance 1e-8; + relTol 0.1; + }; + + p_rghFinal + { + $p_rgh; + relTol 0; + } + + "U.*" + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-6; + relTol 0; + } + + "(e|h).*" + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-8; + relTol 0.001; + } + + "(k|omega).*" + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-8; + relTol 0; + } + + Phi + { + $p_rgh; + relTol 0; + }; +} + +potentialFlow +{ + nNonOrthogonalCorrectors 10; +} + +PIMPLE +{ + nOuterCorrectors 3; + nCorrectors 3; + nEnergyCorrectors 1; + + transportCorrectionFinal yes; + + faceMomentum no; +} + +cache +{ + grad(U); +} + +relaxationFactors +{ + equations + { + ".*" 1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/system/hydrofoilPressure b/tutorials/modules/multiphaseEuler/hydrofoil/system/hydrofoilPressure new file mode 100644 index 0000000000..2821f57fdf --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/system/hydrofoilPressure @@ -0,0 +1,149 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ + +type sets; +libs ("libsampling.so"); + +writeControl writeTime; + +interpolationScheme cellPoint; + +setFormat raw; + +fields (p); + +axis xyz; + +sets +( + lower + { + type boundaryPoints; + axis xyz; + points + ( + (0 0 0) + (0.003 -0.0003 0) + (0.006 -0.0006 0) + (0.009 -0.0009 0) + (0.012 -0.0012 0) + (0.015 -0.0015 0) + (0.018 -0.0018 0) + (0.021 -0.0021 0) + (0.024 -0.0024 0) + (0.027 -0.0027 0) + (0.03 -0.003 0) + (0.033 -0.0033 0) + (0.036 -0.0036 0) + (0.039 -0.0039 0) + (0.042 -0.0042 0) + (0.045 -0.0045 0) + (0.048 -0.0048 0) + (0.051 -0.0051 0) + (0.054 -0.0054 0) + (0.057 -0.0057 0) + (0.06 -0.006 0) + (0.063 -0.0063 0) + (0.066 -0.0066 0) + (0.069 -0.0069 0) + (0.072 -0.0072 0) + (0.075 -0.0075 0) + (0.078 -0.0078 0) + (0.081 -0.0081 0) + (0.084 -0.0084 0) + (0.087 -0.0087 0) + (0.09 -0.009 0) + (0.093 -0.0093 0) + (0.096 -0.0096 0) + (0.099 -0.0099 0) + (0.102 -0.0102 0) + (0.105 -0.0105 0) + (0.108 -0.0108 0) + (0.111 -0.0111 0) + (0.114 -0.0114 0) + (0.117 -0.0117 0) + (0.12 -0.012 0) + (0.123 -0.0123 0) + (0.126 -0.0126 0) + (0.129 -0.0129 0) + (0.132 -0.0132 0) + (0.135 -0.0135 0) + (0.138 -0.0138 0) + (0.141 -0.0141 0) + (0.144 -0.0144 0) + (0.147 -0.0147 0) + (0.15 -0.015 0) + ); + patches (hydrofoil); + maxDistance 1; + } + upper + { + type boundaryPoints; + axis xyz; + points + ( + (0 0.015 0) + (0.003 0.0147 0) + (0.006 0.0144 0) + (0.009 0.0141 0) + (0.012 0.0138 0) + (0.015 0.0135 0) + (0.018 0.0132 0) + (0.021 0.0129 0) + (0.024 0.0126 0) + (0.027 0.0123 0) + (0.03 0.012 0) + (0.033 0.0117 0) + (0.036 0.0114 0) + (0.039 0.0111 0) + (0.042 0.0108 0) + (0.045 0.0105 0) + (0.048 0.0102 0) + (0.051 0.0099 0) + (0.054 0.0096 0) + (0.057 0.0093 0) + (0.06 0.009 0) + (0.063 0.0087 0) + (0.066 0.0084 0) + (0.069 0.0081 0) + (0.072 0.0078 0) + (0.075 0.0075 0) + (0.078 0.0072 0) + (0.081 0.0069 0) + (0.084 0.0066 0) + (0.087 0.0063 0) + (0.09 0.006 0) + (0.093 0.0057 0) + (0.096 0.0054 0) + (0.099 0.0051 0) + (0.102 0.0048 0) + (0.105 0.0045 0) + (0.108 0.0042 0) + (0.111 0.0039 0) + (0.114 0.0036 0) + (0.117 0.0033 0) + (0.12 0.003 0) + (0.123 0.0027 0) + (0.126 0.0024 0) + (0.129 0.0021 0) + (0.132 0.0018 0) + (0.135 0.0015 0) + (0.138 0.0012 0) + (0.141 0.0009 0) + (0.144 0.0006 0) + (0.147 0.0003 0) + (0.15 0 0) + ); + patches (hydrofoil); + maxDistance 1; + } +); + + +// ************************************************************************* // diff --git a/tutorials/modules/multiphaseEuler/hydrofoil/validation/createGraph b/tutorials/modules/multiphaseEuler/hydrofoil/validation/createGraph new file mode 100755 index 0000000000..172a705585 --- /dev/null +++ b/tutorials/modules/multiphaseEuler/hydrofoil/validation/createGraph @@ -0,0 +1,48 @@ +#!/bin/sh + +if ! which gnuplot > /dev/null 2>&1 +then + echo 'gnuplot not found - skipping graph creation' >&2 + exit 1 +fi + +lowerFile=postProcessing/hydrofoilPressure/$(foamListTimes -latestTime)/lower.xy +upperFile=postProcessing/hydrofoilPressure/$(foamListTimes -latestTime)/upper.xy + +gnuplot<