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;
class volScalarField;
location "0";
object omega.liquid;
object omega.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -31,4 +31,16 @@ runApplication foamPostProcess -latestTime -func "
./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;
}
RAS
{
model eddyDiffusivity;
Prt 1;
}
// ************************************************************************* //

View File

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

View File

@ -79,7 +79,7 @@ relaxationFactors
equations
{
".*" 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];
internalField uniform (1.96244 0 0);
internalField uniform (1.75175 0 0);
boundaryField
{
@ -24,13 +24,13 @@ boundaryField
{
type mappedInternalValue;
interpolationScheme cell;
value uniform (1.96244 0 0);
value uniform (1.75175 0 0);
}
outlet
{
type pressureInletOutletVelocity;
phi phi.gas;
value uniform (1.96244 0 0);
value uniform (1.75175 0 0);
}
wall
{

View File

@ -16,22 +16,22 @@ FoamFile
dimensions [0 1 -1 0 0 0 0];
internalField uniform (1.743138395 0 0);
internalField uniform (1.75175 0 0);
boundaryField
{
inlet
{
type mappedInternalValue;
average (1.743138395 0 0);
average (1.75175 0 0);
interpolationScheme cell;
value uniform (1.743138395 0 0);
value uniform (1.75175 0 0);
}
outlet
{
type pressureInletOutletVelocity;
phi phi.liquid;
value uniform (1.743138395 0 0);
value uniform (1.75175 0 0);
}
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
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
{
type constantNu;
Nu 1e1;
residualAlpha 1e-4;
type spherical;
}
gas_dispersedIn_liquid_inThe_liquid
{
type RanzMarshall;
residualAlpha 1e-4;
}
}
@ -139,7 +136,7 @@ lift
wallLubrication
{
gas_dispersedIn_liquid
gas_dispersedIn_liquid
{
type Antal;
Cw1 -0.01;
@ -203,7 +200,4 @@ surfaceTension
phaseTransfer
{}
interfaceCompression
{}
// ************************************************************************* //

View File

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

View File

@ -54,6 +54,13 @@ maxDeltaT 0.001;
functions
{
writeWallBoilingProperties
{
type wallBoilingProperties;
functionObjectLibs ( "libmultiphaseEulerFoamFunctionObjects.so" );
writeControl writeTime;
phase liquid;
}
outflow
{
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
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
{}
interfaceCompression
{}
// ************************************************************************* //

View File

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

View File

@ -54,6 +54,13 @@ maxDeltaT 0.001;
functions
{
writeWallBoilingProperties
{
type wallBoilingProperties;
functionObjectLibs ( "libmultiphaseEulerFoamFunctionObjects.so" );
writeControl writeTime;
phase liquid;
}
volumeDensity.diameter.bubbles
{
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
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
{
type RanzMarshall;
residualAlpha 1e-4;
}
gas2_dispersedIn_liquid_inThe_liquid
{
type RanzMarshall;
residualAlpha 1e-4;
}
}
@ -230,26 +228,7 @@ lift
gas2_dispersedIn_liquid
{
type wallDamped;
lift
{
type Tomiyama;
Cl 0.288;
aspectRatio
{
type constant;
E0 1;
}
}
wallDamping
{
type cosine;
Cd 1.0;
zeroWallDist 0.0002;
}
$gas_dispersedIn_liquid
}
}
@ -264,9 +243,7 @@ wallLubrication
gas2_dispersedIn_liquid
{
type Antal;
Cw1 -0.01;
Cw2 0.05;
$gas_dispersedIn_liquid
}
}
@ -322,24 +299,7 @@ saturation
gas2_liquid
{
type function1;
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;
}
$gas_liquid
}
}
@ -353,8 +313,7 @@ surfaceTension
gas2_liquid
{
type constant;
sigma 0.00176574;
$gas_liquid
}
}

View File

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

View File

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

View File

@ -54,6 +54,13 @@ maxDeltaT 0.001;
functions
{
writeWallBoilingProperties
{
type wallBoilingProperties;
functionObjectLibs ( "libmultiphaseEulerFoamFunctionObjects.so" );
writeControl writeTime;
phase liquid;
}
volumeDensity.diameter.bubbles
{
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
#------------------------------------------------------------------------------