tutorials/modules/multiphaseEuler: Updated wallBoiling tutorials

These tutorials now make make use of the phaseTurbulenceStabilisation
fvModel and the wallBoilingProperties functionObject.

Patch contributed by Juho Peltola, VTT.
This commit is contained in:
Will Bainbridge
2022-11-03 17:19:59 +00:00
parent 0da49126b4
commit c766abc662
34 changed files with 589 additions and 70 deletions

View File

@ -10,7 +10,7 @@ FoamFile
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0"; location "0";
object omega.liquid; object omega.gas;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -31,4 +31,16 @@ runApplication foamPostProcess -latestTime -func "
./validation/createGraphs ./validation/createGraphs
runApplication -append foamPostProcess -latestTime -func "
patchSurface
(
funcName=patchWallBoilingProperties,
patch=wall,
surfaceFormat=raw,
interpolate=false,
fields=(dDeparture.liquid fDeparture.liquid nucleationSiteDensity.liquid fLiquid.liquid quenchingHeatFlux.liquid evaporativeHeatFlux.liquid)
)"
./validation/createWallBoilingPropertiesGraphs
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -0,0 +1,38 @@
/*--------------------------------*- 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 fvModels;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
phaseTurbulenceStabilisationGas
{
type phaseTurbulenceStabilisation;
libs ("libmultiphaseEulerFoamFvModels.so");
phase gas;
alphaInversion 0.1;
}
phaseTurbulenceStabilisationLiquid
{
type phaseTurbulenceStabilisation;
libs ("libmultiphaseEulerFoamFvModels.so");
phase liquid;
alphaInversion 0.1;
}

View File

@ -14,6 +14,15 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType laminar; simulationType RAS;
RAS
{
model kOmegaSST;
turbulence on;
printCoeffs on;
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -19,4 +19,11 @@ laminar
model Fourier; model Fourier;
} }
RAS
{
model eddyDiffusivity;
Prt 1;
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -54,6 +54,13 @@ maxDeltaT 0.001;
functions functions
{ {
writeWallBoilingProperties
{
type wallBoilingProperties;
functionObjectLibs ( "libmultiphaseEulerFoamFunctionObjects.so" );
writeControl writeTime;
phase liquid;
}
outflow outflow
{ {
type surfaceFieldValue; type surfaceFieldValue;

View File

@ -79,7 +79,7 @@ relaxationFactors
equations equations
{ {
".*" 1; ".*" 1;
"h\..*" 1.0; "h\..*" 1;
} }
} }

View File

@ -0,0 +1,49 @@
#!/bin/sh
if ! which gnuplot > /dev/null 2>&1
then
echo 'gnuplot not found - skipping graph creation' >&2
exit 1
fi
graphFile=$(foamListTimes -latestTime)/patch.xy
gnuplot<<EOF
set terminal postscript eps size 8,9 color enhanced font "Helvetica,20"
set output "./validation/$(basename "$PWD")Properties.eps"
set multiplot layout 2,2
set decimalsign '.'
set grid
set key at graph 0.65,0.95
set ylabel 'Vertical coordinate (m)'
set yrange [0:4]
set xlabel 'Departure diameter (mm)'
plot \
"postProcessing/patchWallBoilingProperties/$graphFile" \
u (\$4*1000):1 w lp lt 1 t 'Simulation' \
set xlabel 'Departure frequency (Hz)'
plot \
"postProcessing/patchWallBoilingProperties/$graphFile" \
u 5:1 w lp lt 1 t 'Simulation' \
set xlabel 'Nucleation Site Density (1/m^2)'
plot \
"postProcessing/patchWallBoilingProperties/$graphFile" \
u 5:1 w lp lt 1 t 'Simulation' \
set xlabel 'Heat flux partitioning function, liquid (-)'
plot \
"postProcessing/patchWallBoilingProperties/$graphFile" \
u 7:1 w lp lt 1 t 'Simulation' \
set key at graph 0.99,0.95
unset multiplot
EOF
#------------------------------------------------------------------------------

View File

@ -16,7 +16,7 @@ FoamFile
dimensions [0 1 -1 0 0 0 0]; dimensions [0 1 -1 0 0 0 0];
internalField uniform (1.96244 0 0); internalField uniform (1.75175 0 0);
boundaryField boundaryField
{ {
@ -24,13 +24,13 @@ boundaryField
{ {
type mappedInternalValue; type mappedInternalValue;
interpolationScheme cell; interpolationScheme cell;
value uniform (1.96244 0 0); value uniform (1.75175 0 0);
} }
outlet outlet
{ {
type pressureInletOutletVelocity; type pressureInletOutletVelocity;
phi phi.gas; phi phi.gas;
value uniform (1.96244 0 0); value uniform (1.75175 0 0);
} }
wall wall
{ {

View File

@ -16,22 +16,22 @@ FoamFile
dimensions [0 1 -1 0 0 0 0]; dimensions [0 1 -1 0 0 0 0];
internalField uniform (1.743138395 0 0); internalField uniform (1.75175 0 0);
boundaryField boundaryField
{ {
inlet inlet
{ {
type mappedInternalValue; type mappedInternalValue;
average (1.743138395 0 0); average (1.75175 0 0);
interpolationScheme cell; interpolationScheme cell;
value uniform (1.743138395 0 0); value uniform (1.75175 0 0);
} }
outlet outlet
{ {
type pressureInletOutletVelocity; type pressureInletOutletVelocity;
phi phi.liquid; phi phi.liquid;
value uniform (1.743138395 0 0); value uniform (1.75175 0 0);
} }
wall wall
{ {

View File

@ -0,0 +1,55 @@
/*--------------------------------*- 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 volScalarField;
location "0";
object omega.liquid;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 -1 0 0 0 0];
internalField uniform 0.01;
boundaryField
{
inlet
{
type mappedInternalValue;
interpolationScheme cell;
value uniform 0.01;
}
outlet
{
type inletOutlet;
phi phi.liquid;
inletValue uniform 0.0015;
value uniform 0.01;
}
wall
{
type omegaWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.001;
}
front
{
type wedge;
}
back
{
type wedge;
}
}
// ************************************************************************* //

View File

@ -31,4 +31,16 @@ runApplication foamPostProcess -latestTime -func "
./validation/createGraphs ./validation/createGraphs
runApplication -append foamPostProcess -latestTime -func "
patchSurface
(
funcName=patchWallBoilingProperties,
patch=wall,
surfaceFormat=raw,
interpolate=false,
fields=(dDeparture.liquid fDeparture.liquid nucleationSiteDensity.liquid fLiquid.liquid quenchingHeatFlux.liquid evaporativeHeatFlux.liquid)
)"
./validation/createWallBoilingPropertiesGraphs
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -0,0 +1,38 @@
/*--------------------------------*- 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 fvModels;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
phaseTurbulenceStabilisationGas
{
type phaseTurbulenceStabilisation;
libs ("libmultiphaseEulerFoamFvModels.so");
phase gas;
alphaInversion 0.1;
}
phaseTurbulenceStabilisationLiquid
{
type phaseTurbulenceStabilisation;
libs ("libmultiphaseEulerFoamFvModels.so");
phase liquid;
alphaInversion 0.1;
}

View File

@ -14,6 +14,15 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType laminar; simulationType RAS;
RAS
{
model kOmegaSST;
turbulence on;
printCoeffs on;
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -98,15 +98,12 @@ heatTransfer
{ {
gas_dispersedIn_liquid_inThe_gas gas_dispersedIn_liquid_inThe_gas
{ {
type constantNu; type spherical;
Nu 1e1;
residualAlpha 1e-4;
} }
gas_dispersedIn_liquid_inThe_liquid gas_dispersedIn_liquid_inThe_liquid
{ {
type RanzMarshall; type RanzMarshall;
residualAlpha 1e-4;
} }
} }
@ -203,7 +200,4 @@ surfaceTension
phaseTransfer phaseTransfer
{} {}
interfaceCompression
{}
// ************************************************************************* // // ************************************************************************* //

View File

@ -19,4 +19,11 @@ laminar
model Fourier; model Fourier;
} }
RAS
{
model eddyDiffusivity;
Prt 1;
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -54,6 +54,13 @@ maxDeltaT 0.001;
functions functions
{ {
writeWallBoilingProperties
{
type wallBoilingProperties;
functionObjectLibs ( "libmultiphaseEulerFoamFunctionObjects.so" );
writeControl writeTime;
phase liquid;
}
outflow outflow
{ {
type surfaceFieldValue; type surfaceFieldValue;

View File

@ -0,0 +1,49 @@
#!/bin/sh
if ! which gnuplot > /dev/null 2>&1
then
echo 'gnuplot not found - skipping graph creation' >&2
exit 1
fi
graphFile=$(foamListTimes -latestTime)/patch.xy
gnuplot<<EOF
set terminal postscript eps size 8,9 color enhanced font "Helvetica,20"
set output "./validation/$(basename "$PWD")Properties.eps"
set multiplot layout 2,2
set decimalsign '.'
set grid
set key at graph 0.65,0.95
set ylabel 'Vertical coordinate (m)'
set yrange [0:4]
set xlabel 'Departure diameter (mm)'
plot \
"postProcessing/patchWallBoilingProperties/$graphFile" \
u (\$4*1000):1 w lp lt 1 t 'Simulation' \
set xlabel 'Departure frequency (Hz)'
plot \
"postProcessing/patchWallBoilingProperties/$graphFile" \
u 5:1 w lp lt 1 t 'Simulation' \
set xlabel 'Nucleation Site Density (1/m^2)'
plot \
"postProcessing/patchWallBoilingProperties/$graphFile" \
u 5:1 w lp lt 1 t 'Simulation' \
set xlabel 'Heat flux partitioning function, liquid (-)'
plot \
"postProcessing/patchWallBoilingProperties/$graphFile" \
u 7:1 w lp lt 1 t 'Simulation' \
set key at graph 0.99,0.95
unset multiplot
EOF
#------------------------------------------------------------------------------

View File

@ -32,4 +32,16 @@ runApplication foamPostProcess -latestTime -func "
./validation/createGraphs ./validation/createGraphs
runApplication -append foamPostProcess -latestTime -func "
patchSurface
(
funcName=patchWallBoilingProperties,
patch=wall,
surfaceFormat=raw,
interpolate=false,
fields=(dDeparture.liquid fDeparture.liquid nucleationSiteDensity.liquid fLiquid.liquid quenchingHeatFlux.liquid evaporativeHeatFlux.liquid)
)"
./validation/createWallBoilingPropertiesGraphs
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -0,0 +1,38 @@
/*--------------------------------*- 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 fvModels;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
phaseTurbulenceStabilisationGas
{
type phaseTurbulenceStabilisation;
libs ("libmultiphaseEulerFoamFvModels.so");
phase gas;
alphaInversion 0.1;
}
phaseTurbulenceStabilisationLiquid
{
type phaseTurbulenceStabilisation;
libs ("libmultiphaseEulerFoamFvModels.so");
phase liquid;
alphaInversion 0.1;
}

View File

@ -14,6 +14,15 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType laminar; simulationType RAS;
RAS
{
model kOmegaSST;
turbulence on;
printCoeffs on;
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -246,7 +246,4 @@ surfaceTension
phaseTransfer phaseTransfer
{} {}
interfaceCompression
{}
// ************************************************************************* // // ************************************************************************* //

View File

@ -19,4 +19,11 @@ laminar
model Fourier; model Fourier;
} }
RAS
{
model eddyDiffusivity;
Prt 1;
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -54,6 +54,13 @@ maxDeltaT 0.001;
functions functions
{ {
writeWallBoilingProperties
{
type wallBoilingProperties;
functionObjectLibs ( "libmultiphaseEulerFoamFunctionObjects.so" );
writeControl writeTime;
phase liquid;
}
volumeDensity.diameter.bubbles volumeDensity.diameter.bubbles
{ {
type populationBalanceSizeDistribution; type populationBalanceSizeDistribution;

View File

@ -0,0 +1,49 @@
#!/bin/sh
if ! which gnuplot > /dev/null 2>&1
then
echo 'gnuplot not found - skipping graph creation' >&2
exit 1
fi
graphFile=$(foamListTimes -latestTime)/patch.xy
gnuplot<<EOF
set terminal postscript eps size 8,9 color enhanced font "Helvetica,20"
set output "./validation/$(basename "$PWD")Properties.eps"
set multiplot layout 2,2
set decimalsign '.'
set grid
set key at graph 0.65,0.95
set ylabel 'Vertical coordinate (m)'
set yrange [0:4]
set xlabel 'Departure diameter (mm)'
plot \
"postProcessing/patchWallBoilingProperties/$graphFile" \
u (\$4*1000):1 w lp lt 1 t 'Simulation' \
set xlabel 'Departure frequency (Hz)'
plot \
"postProcessing/patchWallBoilingProperties/$graphFile" \
u 5:1 w lp lt 1 t 'Simulation' \
set xlabel 'Nucleation Site Density (1/m^2)'
plot \
"postProcessing/patchWallBoilingProperties/$graphFile" \
u 5:1 w lp lt 1 t 'Simulation' \
set xlabel 'Heat flux partitioning function, liquid (-)'
plot \
"postProcessing/patchWallBoilingProperties/$graphFile" \
u 7:1 w lp lt 1 t 'Simulation' \
set key at graph 0.99,0.95
unset multiplot
EOF
#------------------------------------------------------------------------------

View File

@ -32,4 +32,16 @@ runApplication foamPostProcess -latestTime -func "
./validation/createGraphs ./validation/createGraphs
runApplication -append foamPostProcess -latestTime -func "
patchSurface
(
funcName=patchWallBoilingProperties,
patch=wall,
surfaceFormat=raw,
interpolate=false,
fields=(dDeparture.liquid fDeparture.liquid nucleationSiteDensity.liquid fLiquid.liquid quenchingHeatFlux.liquid evaporativeHeatFlux.liquid)
)"
./validation/createWallBoilingPropertiesGraphs
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -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 dictionary;
location "constant";
object fvModels;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
phaseTurbulenceStabilisationGas
{
type phaseTurbulenceStabilisation;
libs ("libmultiphaseEulerFoamFvModels.so");
phase gas;
alphaInversion 0.1;
}
phaseTurbulenceStabilisationGas2
{
type phaseTurbulenceStabilisation;
libs ("libmultiphaseEulerFoamFvModels.so");
phase gas2;
alphaInversion 0.1;
}
phaseTurbulenceStabilisationLiquid
{
type phaseTurbulenceStabilisation;
libs ("libmultiphaseEulerFoamFvModels.so");
phase liquid;
alphaInversion 0.1;
}

View File

@ -14,6 +14,15 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType laminar; simulationType RAS;
RAS
{
model kOmegaSST;
turbulence on;
printCoeffs on;
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -14,6 +14,14 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType laminar; simulationType RAS;
RAS
{
model kOmegaSST;
turbulence on;
printCoeffs on;
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -192,13 +192,11 @@ heatTransfer
gas_dispersedIn_liquid_inThe_liquid gas_dispersedIn_liquid_inThe_liquid
{ {
type RanzMarshall; type RanzMarshall;
residualAlpha 1e-4;
} }
gas2_dispersedIn_liquid_inThe_liquid gas2_dispersedIn_liquid_inThe_liquid
{ {
type RanzMarshall; type RanzMarshall;
residualAlpha 1e-4;
} }
} }
@ -230,26 +228,7 @@ lift
gas2_dispersedIn_liquid gas2_dispersedIn_liquid
{ {
type wallDamped; $gas_dispersedIn_liquid
lift
{
type Tomiyama;
Cl 0.288;
aspectRatio
{
type constant;
E0 1;
}
}
wallDamping
{
type cosine;
Cd 1.0;
zeroWallDist 0.0002;
}
} }
} }
@ -264,9 +243,7 @@ wallLubrication
gas2_dispersedIn_liquid gas2_dispersedIn_liquid
{ {
type Antal; $gas_dispersedIn_liquid
Cw1 -0.01;
Cw2 0.05;
} }
} }
@ -322,24 +299,7 @@ saturation
gas2_liquid gas2_liquid
{ {
type function1; $gas_liquid
function scale;
xScale 1e-6;
scale 1;
value
{
type tableFile;
format csv;
nHeaderLine 1;
refColumn 1;
componentColumns (0);
mergeSeparators no;
file "$FOAM_TUTORIALS/resources/thermoData/wallBoiling-saturation.csv";
outOfBounds clamp;
interpolationScheme linear;
}
} }
} }
@ -353,8 +313,7 @@ surfaceTension
gas2_liquid gas2_liquid
{ {
type constant; $gas_liquid
sigma 0.00176574;
} }
} }

View File

@ -19,4 +19,11 @@ laminar
model Fourier; model Fourier;
} }
RAS
{
model eddyDiffusivity;
Prt 1;
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -19,4 +19,11 @@ laminar
model Fourier; model Fourier;
} }
RAS
{
model eddyDiffusivity;
Prt 1;
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -54,6 +54,13 @@ maxDeltaT 0.001;
functions functions
{ {
writeWallBoilingProperties
{
type wallBoilingProperties;
functionObjectLibs ( "libmultiphaseEulerFoamFunctionObjects.so" );
writeControl writeTime;
phase liquid;
}
volumeDensity.diameter.bubbles volumeDensity.diameter.bubbles
{ {
type populationBalanceSizeDistribution; type populationBalanceSizeDistribution;

View File

@ -0,0 +1,49 @@
#!/bin/sh
if ! which gnuplot > /dev/null 2>&1
then
echo 'gnuplot not found - skipping graph creation' >&2
exit 1
fi
graphFile=$(foamListTimes -latestTime)/patch.xy
gnuplot<<EOF
set terminal postscript eps size 8,9 color enhanced font "Helvetica,20"
set output "./validation/$(basename "$PWD")Properties.eps"
set multiplot layout 2,2
set decimalsign '.'
set grid
set key at graph 0.65,0.95
set ylabel 'Vertical coordinate (m)'
set yrange [0:4]
set xlabel 'Departure diameter (mm)'
plot \
"postProcessing/patchWallBoilingProperties/$graphFile" \
u (\$4*1000):1 w lp lt 1 t 'Simulation' \
set xlabel 'Departure frequency (Hz)'
plot \
"postProcessing/patchWallBoilingProperties/$graphFile" \
u 5:1 w lp lt 1 t 'Simulation' \
set xlabel 'Nucleation Site Density (1/m^2)'
plot \
"postProcessing/patchWallBoilingProperties/$graphFile" \
u 5:1 w lp lt 1 t 'Simulation' \
set xlabel 'Heat flux partitioning function, liquid (-)'
plot \
"postProcessing/patchWallBoilingProperties/$graphFile" \
u 7:1 w lp lt 1 t 'Simulation' \
set key at graph 0.99,0.95
unset multiplot
EOF
#------------------------------------------------------------------------------