fireFoam: Added optional hydrostatic initialization of the pressure and density

Also added the new prghTotalHydrostaticPressure p_rgh BC which uses the
hydrostatic pressure field as the reference state for the far-field
which provides much more accurate entrainment is large open domains
typical of many fire simulations.

The hydrostatic field solution is controlled by the optional entries in
the fvSolution.PIMPLE dictionary, e.g.

    hydrostaticInitialization yes;
    nHydrostaticCorrectors 5;

and the solver must also be specified for the hydrostatic p_rgh field
ph_rgh e.g.

    ph_rgh
    {
        $p_rgh;
    }

Suitable boundary conditions for ph_rgh cannot always be derived from
those for p_rgh and so the ph_rgh is read to provide them.

To avoid accuracy issues with IO, restart and post-processing the p_rgh
and ph_rgh the option to specify a suitable reference pressure is
provided via the optional pRef file in the constant directory, e.g.

    dimensions      [1 -1 -2 0 0 0 0];
    value           101325;

which is used in the relationship between p_rgh and p:

    p = p_rgh + rho*gh + pRef;

Note that if pRef is specified all pressure BC specifications in the
p_rgh and ph_rgh files are relative to the reference to avoid round-off
errors.

For examples of suitable BCs for p_rgh and ph_rgh for a range of
fireFoam cases please study the tutorials in
tutorials/combustion/fireFoam/les which have all been updated.

Henry G. Weller
CFD Direct Ltd.
This commit is contained in:
Henry Weller
2016-04-23 10:04:39 +01:00
parent 6a7c4aca53
commit 673e0d1704
30 changed files with 673 additions and 105 deletions

View File

@ -17,32 +17,20 @@ FoamFile
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 101325;
internalField uniform 0;
boundaryField
{
outlet
"(side|outlet)"
{
type fixedFluxPressure;
type prghTotalHydrostaticPressure;
p0 $internalField;
value $internalField;
}
ground
{
type fixedFluxPressure;
}
side
{
type totalPressure;
U U;
phi phi;
rho rho;
psi none;
gamma 1.4;
p0 $internalField;
value $internalField;
}
inlet

View File

@ -6,9 +6,9 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase
rm -f 0/ph_rgh
rm -rf constant/filmRegion/polyMesh
rm -rf constant/pyrolysisRegion/polyMesh
rm -rf system/pyrolysisRegion/filmRegion
#------------------------------------------------------------------------------

View File

@ -33,9 +33,11 @@ rm log.createPatch
# create actual patches
runApplication createPatch -region filmRegion -overwrite
cp 0/ph_rgh.orig 0/ph_rgh
# Run
runApplication `getApplication`
paraFoam -touchAll
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------

View File

@ -0,0 +1,21 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class uniformDimensionedScalarField;
location "constant";
object pRef;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
value 101325;
// ************************************************************************* //

View File

@ -58,6 +58,11 @@ solvers
mergeLevels 1;
};
ph_rgh
{
$p_rgh;
}
"(U|Yi|h|k)"
{
solver PBiCG;
@ -93,6 +98,9 @@ PIMPLE
nOuterCorrectors 1;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
hydrostaticInitialization yes;
nHydrostaticCorrectors 5;
}
relaxationFactors

View File

@ -17,7 +17,7 @@ FoamFile
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 101325;
internalField uniform 0;
boundaryField
{
@ -35,12 +35,7 @@ boundaryField
"(top|sides)"
{
type totalPressure;
U U;
phi phi;
rho rho;
psi none;
gamma 1.4;
type prghTotalHydrostaticPressure;
p0 $internalField;
value $internalField;
}

View File

@ -6,6 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase
rm -f 0/ph_rgh
rm -rf constant/panelRegion/polyMesh
rm -f 0/polyMesh/cellMap
rm -f constant/polyMesh/boundary

View File

@ -26,6 +26,8 @@ runApplication -s fBurner \
runApplication createPatch -overwrite
cp 0/ph_rgh.orig 0/ph_rgh
runApplication -s master \
decomposePar -force

View File

@ -0,0 +1,21 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class uniformDimensionedScalarField;
location "constant";
object pRef;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
value 101325;
// ************************************************************************* //

View File

@ -43,6 +43,12 @@ solvers
relTol 0;
};
ph_rgh
{
$p_rgh;
}
"(U|Yi|k|h|omega)"
{
solver PBiCG;
@ -88,6 +94,9 @@ PIMPLE
nOuterCorrectors 1;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
hydrostaticInitialization yes;
nHydrostaticCorrectors 5;
}
relaxationFactors

View File

@ -17,19 +17,14 @@ FoamFile
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 101325;
internalField uniform 0;
boundaryField
{
"(outlet|sides)"
{
type totalPressure;
type prghTotalHydrostaticPressure;
p0 $internalField;
U U;
phi phi;
rho none;
psi none;
gamma 1;
value $internalField;
}

View File

@ -0,0 +1,11 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
rm -f 0/ph_rgh
#------------------------------------------------------------------------------

View File

@ -9,6 +9,8 @@ runApplication blockMesh
runApplication topoSet
runApplication createPatch -overwrite
cp 0/ph_rgh.orig 0/ph_rgh
# Run
runApplication `getApplication`

View File

@ -0,0 +1,21 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class uniformDimensionedScalarField;
location "constant";
object pRef;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
value 101325;
// ************************************************************************* //

View File

@ -52,6 +52,11 @@ solvers
relTol 0;
};
ph_rgh
{
$p_rgh;
}
"(U|Yi|k|h|omega)"
{
@ -101,6 +106,9 @@ PIMPLE
nOuterCorrectors 1;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
hydrostaticInitialization yes;
nHydrostaticCorrectors 5;
}
relaxationFactors

View File

@ -17,18 +17,14 @@ FoamFile
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 101325;
internalField uniform 0;
boundaryField
{
"(outlet|sides)"
{
type totalPressure;
type prghTotalHydrostaticPressure;
p0 $internalField;
U U;
phi phi;
rho rho;
psi none;
gamma 1;
value $internalField;
}

View File

@ -0,0 +1,11 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
rm -f 0/ph_rgh
#------------------------------------------------------------------------------

View File

@ -9,6 +9,9 @@ application=`getApplication`
runApplication blockMesh
runApplication topoSet
runApplication createPatch -overwrite
cp 0/ph_rgh.orig 0/ph_rgh
runApplication decomposePar -force
# Run

View File

@ -0,0 +1,21 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class uniformDimensionedScalarField;
location "constant";
object pRef;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
value 101325;
// ************************************************************************* //

View File

@ -44,6 +44,11 @@ solvers
relTol 0;
};
ph_rgh
{
$p_rgh;
}
"(U|Yi|k|h)"
{
@ -92,6 +97,9 @@ PIMPLE
nOuterCorrectors 1;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
hydrostaticInitialization yes;
nHydrostaticCorrectors 5;
}
relaxationFactors