interFoam: Added support for phase-change with cavitation models
The phase-change functionality in interPhaseChangeFoam has been generalised and
moved into the run-time selectable twoPhaseChange library included into
interFoam providing optional phase-change. The three cavitation models provided
in interPhaseChangeFoam are now included in the twoPhaseChange library and the
two interPhaseChangeFoam cavitation tutorials updated for interFoam.
interPhaseChangeFoam has been replaced by a user redirection script which prints
the following message:
The interPhaseChangeFoam solver has solver has been replaced by the more general
interFoam solver, which now supports phase-change using the new twoPhaseChange
models library.
To run with with phase-change create a constant/phaseChangeProperties dictionary
containing the phase-change model specification, e.g.
phaseChangeModel SchnerrSauer;
pSat 2300; // Saturation pressure
See the following cases for an example converted from interPhaseChangeFoam:
$FOAM_TUTORIALS/multiphase/interFoam/laminar/cavitatingBullet
$FOAM_TUTORIALS/multiphase/interFoam/RAS/propeller
This commit is contained in:
@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Mesh if necessary
|
||||
if ! cloneMesh ../../../../multiphase/interPhaseChangeFoam/propeller .
|
||||
if ! cloneMesh ../../../../multiphase/interFoam/RAS/propeller .
|
||||
then
|
||||
./Allmesh
|
||||
fi
|
||||
|
||||
@ -25,28 +25,34 @@ boundaryField
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
rightWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
lowerWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
atmosphere
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 0;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
porous_half0
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
|
||||
porous_half1
|
||||
{
|
||||
type cyclic;
|
||||
|
||||
@ -64,13 +64,7 @@ boundaryField
|
||||
}
|
||||
porous_half1
|
||||
{
|
||||
type porousBafflePressure;
|
||||
patchType cyclic;
|
||||
D 10;
|
||||
I 5;
|
||||
length 0.15;
|
||||
jump uniform 0;
|
||||
value uniform 0;
|
||||
type cyclic;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -10,33 +10,14 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object transportProperties;
|
||||
object phaseChangeProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
phases (water vapour);
|
||||
|
||||
phaseChangeTwoPhaseMixture SchnerrSauer;
|
||||
phaseChangeModel SchnerrSauer;
|
||||
|
||||
pSat 2300; // Saturation pressure
|
||||
|
||||
sigma 0.07;
|
||||
|
||||
water
|
||||
{
|
||||
transportModel Newtonian;
|
||||
nu 9e-07;
|
||||
rho 1000;
|
||||
}
|
||||
|
||||
vapour
|
||||
{
|
||||
transportModel Newtonian;
|
||||
nu 4.273e-04;
|
||||
rho 0.02308;
|
||||
}
|
||||
|
||||
KunzCoeffs
|
||||
{
|
||||
UInf 20.0;
|
||||
@ -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 transportProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
phases (water vapour);
|
||||
|
||||
pSat 2300; // Saturation pressure
|
||||
|
||||
sigma 0.07;
|
||||
|
||||
water
|
||||
{
|
||||
transportModel Newtonian;
|
||||
nu 9e-07;
|
||||
rho 1000;
|
||||
}
|
||||
|
||||
vapour
|
||||
{
|
||||
transportModel Newtonian;
|
||||
nu 4.273e-04;
|
||||
rho 0.02308;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application interPhaseChangeFoam;
|
||||
application interFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
@ -30,7 +30,7 @@ divSchemes
|
||||
{
|
||||
default none;
|
||||
|
||||
div(phi,alpha) Gauss interfaceCompression vanLeer 1;
|
||||
div(phi,alpha) Gauss noInterfaceCompression vanLeer;
|
||||
div(rhoPhi,U) Gauss linearUpwind grad(U);
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
@ -10,38 +10,20 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object transportProperties;
|
||||
object phaseChangeProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
phases (water vapour);
|
||||
|
||||
phaseChangeTwoPhaseMixture SchnerrSauer;
|
||||
phaseChangeModel SchnerrSauer;
|
||||
|
||||
pSat 2300; // Saturation pressure
|
||||
|
||||
sigma 0.07;
|
||||
|
||||
water
|
||||
{
|
||||
transportModel Newtonian;
|
||||
nu 9e-07;
|
||||
rho 1000;
|
||||
}
|
||||
|
||||
vapour
|
||||
{
|
||||
transportModel Newtonian;
|
||||
nu 4.273e-04;
|
||||
rho 0.02308;
|
||||
}
|
||||
|
||||
KunzCoeffs
|
||||
{
|
||||
UInf U20.0;
|
||||
tInf t0.005; // L = 0.1 m
|
||||
Cc C1000;
|
||||
Cv C1000;
|
||||
UInf 20.0;
|
||||
tInf 0.005; // L = 0.1 m
|
||||
Cc 1000;
|
||||
Cv 1000;
|
||||
}
|
||||
|
||||
MerkleCoeffs
|
||||
@ -60,5 +42,4 @@ SchnerrSauerCoeffs
|
||||
Cv 1;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,35 @@
|
||||
/*--------------------------------*- 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 transportProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
phases (water vapour);
|
||||
|
||||
sigma 0.07;
|
||||
|
||||
water
|
||||
{
|
||||
transportModel Newtonian;
|
||||
nu 9e-07;
|
||||
rho 1000;
|
||||
}
|
||||
|
||||
vapour
|
||||
{
|
||||
transportModel Newtonian;
|
||||
nu 4.273e-04;
|
||||
rho 0.02308;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -14,7 +14,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application interPhaseChangeFoam;
|
||||
application interFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
@ -30,7 +30,7 @@ divSchemes
|
||||
div(rhoPhi,U) Gauss linearUpwind grad(U);
|
||||
div(phi,omega) Gauss linearUpwind grad(omega);
|
||||
div(phi,k) Gauss linearUpwind grad(k);
|
||||
div(phi,alpha) Gauss interfaceCompression vanLeer 1;
|
||||
div(phi,alpha) Gauss interfaceCompression vanLeer 1;
|
||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user