mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
INT: Org integration of VOF, Euler phase solvers and models.
Integration of VOF MULES new interfaces. Update of VOF solvers and all instances of MULES in the code. Integration of reactingTwoPhaseEuler and reactingMultiphaseEuler solvers and sub-models Updating reactingEuler tutorials accordingly (most of them tested) New eRefConst thermo used in tutorials. Some modifications at thermo specie level affecting mostly eThermo. hThermo mostly unaffected New chtMultiRegionTwoPhaseEulerFoam solver for quenching and tutorial. Phases sub-models for reactingTwoPhaseEuler and reactingMultiphaseEuler were moved to src/phaseSystemModels/reactingEulerFoam in order to be used by BC for chtMultiRegionTwoPhaseEulerFoam. Update of interCondensatingEvaporatingFoam solver.
This commit is contained in:
committed by
Andrew Heather
parent
0628bfb017
commit
8170f2ad92
@ -108,6 +108,9 @@ wmake $targetType rigidBodyMeshMotion
|
||||
wmake $targetType semiPermeableBaffle
|
||||
wmake $targetType atmosphericModels
|
||||
|
||||
phaseSystemModels/Allwmake $targetType $*
|
||||
wmake $targetType TurbulenceModels/compressible/turbulentFluidThermoModels/
|
||||
|
||||
# Needs access to Turbulence
|
||||
|
||||
wmake $targetType thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties
|
||||
|
||||
@ -58,6 +58,7 @@ $(ints)/lists/labelListIOList.C
|
||||
primitives/Scalar/doubleScalar/doubleScalar.C
|
||||
primitives/Scalar/floatScalar/floatScalar.C
|
||||
primitives/Scalar/scalar/scalar.C
|
||||
primitives/Scalar/scalar/incGamma.C
|
||||
primitives/Scalar/scalar/invIncGamma.C
|
||||
primitives/Scalar/lists/scalarList.C
|
||||
primitives/Scalar/lists/scalarIOList.C
|
||||
|
||||
@ -245,6 +245,36 @@ Foam::IOobject Foam::IOobject::selectIO
|
||||
}
|
||||
|
||||
|
||||
Foam::word Foam::IOobject::group(const word& name)
|
||||
{
|
||||
word::size_type i = name.find_last_of('.');
|
||||
|
||||
if (i == word::npos || i == 0)
|
||||
{
|
||||
return word::null;
|
||||
}
|
||||
else
|
||||
{
|
||||
return name.substr(i+1, word::npos);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::word Foam::IOobject::member(const word& name)
|
||||
{
|
||||
word::size_type i = name.find_last_of('.');
|
||||
|
||||
if (i == word::npos || i == 0)
|
||||
{
|
||||
return name;
|
||||
}
|
||||
else
|
||||
{
|
||||
return name.substr(0, i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::IOobject::IOobject
|
||||
|
||||
@ -229,6 +229,13 @@ public:
|
||||
template<class StringType>
|
||||
static inline word groupName(StringType name, const word& group);
|
||||
|
||||
|
||||
//- Return group (extension part of name)
|
||||
static word group(const word& name);
|
||||
|
||||
//- Return member (name without the extension)
|
||||
static word member(const word& name);
|
||||
|
||||
//- Return the IOobject, but also consider an alternative file name.
|
||||
//
|
||||
// \param io The expected IOobject to use
|
||||
|
||||
@ -63,6 +63,9 @@ public:
|
||||
|
||||
// Member Operators
|
||||
|
||||
|
||||
inline operator Type() const;
|
||||
|
||||
inline Type operator[](const label) const;
|
||||
|
||||
inline UniformField field() const;
|
||||
|
||||
@ -36,6 +36,13 @@ inline Foam::UniformField<Type>::UniformField(const Type& value)
|
||||
{}
|
||||
|
||||
|
||||
template<class Type>
|
||||
inline Foam::UniformField<Type>::operator Type() const
|
||||
{
|
||||
return value_;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
inline Type Foam::UniformField<Type>::operator[](const label) const
|
||||
{
|
||||
@ -50,4 +57,65 @@ inline Foam::UniformField<Type> Foam::UniformField<Type>::field() const
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
inline UniformField<Type> min
|
||||
(
|
||||
const UniformField<Type>& u1,
|
||||
const UniformField<Type>& u2
|
||||
)
|
||||
{
|
||||
return UniformField<Type>(min(u1.operator Type(), u2.operator Type()));
|
||||
}
|
||||
|
||||
|
||||
template<class Type, class OtherType>
|
||||
inline OtherType min(const UniformField<Type>& u, const OtherType& o)
|
||||
{
|
||||
return min(u.operator Type(), o);
|
||||
}
|
||||
|
||||
|
||||
template<class Type, class OtherType>
|
||||
inline OtherType min(const OtherType& o, const UniformField<Type>& u)
|
||||
{
|
||||
return min(o, u.operator Type());
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
inline UniformField<Type> max
|
||||
(
|
||||
const UniformField<Type>& u1,
|
||||
const UniformField<Type>& u2
|
||||
)
|
||||
{
|
||||
return UniformField<Type>(max(u1.operator Type(), u2.operator Type()));
|
||||
}
|
||||
|
||||
|
||||
template<class Type, class OtherType>
|
||||
inline OtherType max(const UniformField<Type>& u, const OtherType& o)
|
||||
{
|
||||
return max(u.operator Type(), o);
|
||||
}
|
||||
|
||||
|
||||
template<class Type, class OtherType>
|
||||
inline OtherType max(const OtherType& o, const UniformField<Type>& u)
|
||||
{
|
||||
return max(o, u.operator Type());
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -698,6 +698,161 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::clone() const
|
||||
}
|
||||
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh>>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::New
|
||||
(
|
||||
const word& name,
|
||||
const Mesh& mesh,
|
||||
const dimensionSet& ds,
|
||||
const word& patchFieldType
|
||||
)
|
||||
{
|
||||
return tmp<GeometricField<Type, PatchField, GeoMesh>>
|
||||
(
|
||||
new GeometricField<Type, PatchField, GeoMesh>
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
name,
|
||||
mesh.thisDb().time().timeName(),
|
||||
mesh.thisDb(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
mesh,
|
||||
ds,
|
||||
patchFieldType
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh>>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::New
|
||||
(
|
||||
const word& name,
|
||||
const Mesh& mesh,
|
||||
const dimensioned<Type>& dt,
|
||||
const word& patchFieldType
|
||||
)
|
||||
{
|
||||
return tmp<GeometricField<Type, PatchField, GeoMesh>>
|
||||
(
|
||||
new GeometricField<Type, PatchField, GeoMesh>
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
name,
|
||||
mesh.thisDb().time().timeName(),
|
||||
mesh.thisDb(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
mesh,
|
||||
dt,
|
||||
patchFieldType
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh>>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::New
|
||||
(
|
||||
const word& name,
|
||||
const Mesh& mesh,
|
||||
const dimensioned<Type>& dt,
|
||||
const wordList& patchFieldTypes,
|
||||
const wordList& actualPatchTypes
|
||||
)
|
||||
{
|
||||
return tmp<GeometricField<Type, PatchField, GeoMesh>>
|
||||
(
|
||||
new GeometricField<Type, PatchField, GeoMesh>
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
name,
|
||||
mesh.thisDb().time().timeName(),
|
||||
mesh.thisDb(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
mesh,
|
||||
dt,
|
||||
patchFieldTypes,
|
||||
actualPatchTypes
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh>>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::New
|
||||
(
|
||||
const word& newName,
|
||||
const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf
|
||||
)
|
||||
{
|
||||
return tmp<GeometricField<Type, PatchField, GeoMesh>>
|
||||
(
|
||||
new GeometricField<Type, PatchField, GeoMesh>
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
newName,
|
||||
tgf().instance(),
|
||||
tgf().local(),
|
||||
tgf().db(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
tgf
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh>>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::New
|
||||
(
|
||||
const word& newName,
|
||||
const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf,
|
||||
const wordList& patchFieldTypes,
|
||||
const wordList& actualPatchTypes
|
||||
)
|
||||
{
|
||||
return tmp<GeometricField<Type, PatchField, GeoMesh>>
|
||||
(
|
||||
new GeometricField<Type, PatchField, GeoMesh>
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
newName,
|
||||
tgf().instance(),
|
||||
tgf().local(),
|
||||
tgf().db(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
tgf,
|
||||
patchFieldTypes,
|
||||
actualPatchTypes
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
|
||||
@ -461,6 +461,53 @@ public:
|
||||
//- Clone
|
||||
tmp<GeometricField<Type, PatchField, GeoMesh>> clone() const;
|
||||
|
||||
//- Return a temporary field constructed from name, mesh, dimensionSet
|
||||
// and patch type.
|
||||
static tmp<GeometricField<Type, PatchField, GeoMesh>> New
|
||||
(
|
||||
const word& name,
|
||||
const Mesh&,
|
||||
const dimensionSet&,
|
||||
const word& patchFieldType=PatchField<Type>::calculatedType()
|
||||
);
|
||||
|
||||
//- Return a temporary field constructed from mesh, dimensioned<Type>
|
||||
// and patch type.
|
||||
static tmp<GeometricField<Type, PatchField, GeoMesh>> New
|
||||
(
|
||||
const word& name,
|
||||
const Mesh&,
|
||||
const dimensioned<Type>&,
|
||||
const word& patchFieldType=PatchField<Type>::calculatedType()
|
||||
);
|
||||
|
||||
//- Return a temporary field constructed from mesh, dimensioned<Type>
|
||||
// and patch types.
|
||||
static tmp<GeometricField<Type, PatchField, GeoMesh>> New
|
||||
(
|
||||
const word& name,
|
||||
const Mesh&,
|
||||
const dimensioned<Type>&,
|
||||
const wordList& patchFieldTypes,
|
||||
const wordList& actualPatchTypes = wordList()
|
||||
);
|
||||
|
||||
//- Rename temporary field and return
|
||||
static tmp<GeometricField<Type, PatchField, GeoMesh>> New
|
||||
(
|
||||
const word& newName,
|
||||
const tmp<GeometricField<Type, PatchField, GeoMesh>>&
|
||||
);
|
||||
|
||||
//- Rename and reset patch fields types of temporary field and return
|
||||
static tmp<GeometricField<Type, PatchField, GeoMesh>> New
|
||||
(
|
||||
const word& newName,
|
||||
const tmp<GeometricField<Type, PatchField, GeoMesh>>&,
|
||||
const wordList& patchFieldTypes,
|
||||
const wordList& actualPatchTypes = wordList()
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~GeometricField();
|
||||
|
||||
456
src/OpenFOAM/primitives/Scalar/scalar/incGamma.C
Normal file
456
src/OpenFOAM/primitives/Scalar/scalar/incGamma.C
Normal file
@ -0,0 +1,456 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Global
|
||||
Foam::incGamma
|
||||
|
||||
Description
|
||||
Calculates the upper and lower incomplete gamma functions as well as their
|
||||
normalized versions.
|
||||
|
||||
The algorithm is described in detail in DiDonato et al. (1986).
|
||||
|
||||
\verbatim
|
||||
DiDonato, A. R., & Morris Jr, A. H. (1986).
|
||||
Computation of the incomplete gamma function ratios and their inverse.
|
||||
ACM Transactions on Mathematical Software (TOMS), 12(4), 377-393.
|
||||
\endverbatim
|
||||
|
||||
All equation numbers in the following code refer to the above paper.
|
||||
The algorithm in function 'incGammaRatio_Q' is described in section 3.
|
||||
The accuracy parameter IND is set to a value of 1.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "mathematicalConstants.H"
|
||||
|
||||
using namespace Foam::constant::mathematical;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Eqn. (13)
|
||||
static scalar calcQE11(const scalar a, const scalar x, const int e = 30)
|
||||
{
|
||||
scalar a_2n = 0;
|
||||
scalar b_2n = 1;
|
||||
|
||||
scalar a_2np1 = 1;
|
||||
scalar b_2np1 = x;
|
||||
|
||||
int n = 1;
|
||||
for (n = 1; (2*n) <= e; n++)
|
||||
{
|
||||
const scalar a_2nm1 = a_2np1;
|
||||
const scalar b_2nm1 = b_2np1;
|
||||
|
||||
a_2n = a_2nm1 + (n - a)*a_2n;
|
||||
b_2n = b_2nm1 + (n - a)*b_2n;
|
||||
|
||||
a_2np1 = x*a_2n + n*a_2nm1;
|
||||
b_2np1 = x*b_2n + n*b_2nm1;
|
||||
}
|
||||
|
||||
if (2*(n - 1) < e)
|
||||
{
|
||||
return a_2np1/b_2np1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return a_2n/b_2n;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Eqn. (15)
|
||||
static scalar calcPE15(const scalar a, const scalar x, const int nmax = 20)
|
||||
{
|
||||
scalar prod = 1;
|
||||
scalar sum = 0;
|
||||
|
||||
for (int n = 1; n <= nmax; n++)
|
||||
{
|
||||
prod *= (a + n);
|
||||
sum += pow(x, n)/prod;
|
||||
}
|
||||
|
||||
const scalar R = (exp(-x)*pow(x, a))/tgamma(a);
|
||||
|
||||
return R/a*(1 + sum);
|
||||
}
|
||||
|
||||
|
||||
// Eq. (16)
|
||||
static scalar calcQE16(const scalar a, const scalar x, const int N = 20)
|
||||
{
|
||||
scalar an = 1;
|
||||
scalar sum = 0;
|
||||
|
||||
for (int n = 1; n <= (N - 1); n++)
|
||||
{
|
||||
an *= (a - n);
|
||||
sum += an/pow(x, n);
|
||||
}
|
||||
|
||||
const scalar R = (exp(-x)*pow(x, a))/tgamma(a);
|
||||
|
||||
return R/x*(1 + sum);
|
||||
}
|
||||
|
||||
|
||||
// Eq. (18)
|
||||
static scalar calcTE18
|
||||
(
|
||||
const scalar a,
|
||||
const scalar e0,
|
||||
const scalar x,
|
||||
const scalar lambda,
|
||||
const scalar sigma,
|
||||
const scalar phi
|
||||
)
|
||||
{
|
||||
static const scalar D0[] =
|
||||
{
|
||||
-0.333333333333333E-00,
|
||||
0.833333333333333E-01,
|
||||
-0.148148148148148E-01,
|
||||
0.115740740740741E-02,
|
||||
0.352733686067019E-03,
|
||||
-0.178755144032922E-03,
|
||||
0.391926317852244E-04,
|
||||
-0.218544851067999E-05,
|
||||
-0.185406221071516E-05,
|
||||
0.829671134095309E-06,
|
||||
-0.176659527368261E-06,
|
||||
0.670785354340150E-08,
|
||||
0.102618097842403E-07,
|
||||
-0.438203601845335E-08
|
||||
};
|
||||
|
||||
static const scalar D1[] =
|
||||
{
|
||||
-0.185185185185185E-02,
|
||||
-0.347222222222222E-02,
|
||||
0.264550264550265E-02,
|
||||
-0.990226337448560E-03,
|
||||
0.205761316872428E-03,
|
||||
-0.401877572016461E-06,
|
||||
-0.180985503344900E-04,
|
||||
0.764916091608111E-05,
|
||||
-0.161209008945634E-05,
|
||||
0.464712780280743E-08,
|
||||
0.137863344691572E-06,
|
||||
-0.575254560351770E-07,
|
||||
0.119516285997781E-07
|
||||
};
|
||||
|
||||
static const scalar D2[] =
|
||||
{
|
||||
0.413359788359788E-02,
|
||||
-0.268132716049383E-02,
|
||||
0.771604938271605E-03,
|
||||
0.200938786008230E-05,
|
||||
-0.107366532263652E-03,
|
||||
0.529234488291201E-04,
|
||||
-0.127606351886187E-04,
|
||||
0.342357873409614E-07,
|
||||
0.137219573090629E-05,
|
||||
-0.629899213838006E-06,
|
||||
0.142806142060642E-06
|
||||
};
|
||||
|
||||
const scalar u = 1/a;
|
||||
scalar z = sqrt(2*phi);
|
||||
|
||||
if (lambda < 1)
|
||||
{
|
||||
z = -z;
|
||||
}
|
||||
|
||||
if (sigma > (e0/sqrt(a)))
|
||||
{
|
||||
const scalar C0 =
|
||||
D0[6]*pow6(z) + D0[5]*pow5(z) + D0[4]*pow4(z)
|
||||
+ D0[3]*pow3(z) + D0[2]*sqr(z) + D0[1]*z + D0[0];
|
||||
|
||||
const scalar C1 =
|
||||
D1[4]*pow4(z) + D1[3]*pow3(z) + D1[2]*sqr(z) + D1[1]*z + D1[0];
|
||||
|
||||
const scalar C2 = D2[1]*z + D2[0];
|
||||
|
||||
return C2*sqr(u) + C1*u + C0;
|
||||
}
|
||||
else
|
||||
{
|
||||
const scalar C0 = D0[2]*sqr(z) + D0[1]*z + D0[0];
|
||||
const scalar C1 = D1[1]*z + D1[0];
|
||||
const scalar C2 = D2[1]*z + D2[0];
|
||||
|
||||
return C2*sqr(u) + C1*u + C0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::scalar Foam::incGammaRatio_Q(const scalar a, const scalar x)
|
||||
{
|
||||
const scalar BIG = 14;
|
||||
const scalar x0 = 17;
|
||||
const scalar e0 = 0.025;
|
||||
|
||||
if (a < 1)
|
||||
{
|
||||
if (a == 0.5)
|
||||
{
|
||||
// Eqn. (8)
|
||||
if (x < 0.25)
|
||||
{
|
||||
return 1 - erf(sqrt(x));
|
||||
}
|
||||
else
|
||||
{
|
||||
return erfc(sqrt(x));
|
||||
}
|
||||
}
|
||||
else if ( x < 1.1)
|
||||
{
|
||||
// Eqn. (12)
|
||||
scalar alpha = x/2.59;
|
||||
|
||||
if (x < 0.5)
|
||||
{
|
||||
alpha = log(sqrt(0.765))/log(x);
|
||||
}
|
||||
|
||||
scalar sum = 0;
|
||||
|
||||
for (int n = 1; n <= 10; n++)
|
||||
{
|
||||
sum += pow((-x), n)/((a + n)*factorial(n));
|
||||
}
|
||||
|
||||
const scalar J = -a*sum;
|
||||
|
||||
if (a > alpha || a == alpha)
|
||||
{
|
||||
// Eqn. (9)
|
||||
return 1 - (pow(x, a)*(1 - J))/tgamma(a + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Eqn. (10)
|
||||
const scalar L = exp(a*log(x)) - 1;
|
||||
const scalar H = 1/(tgamma(a + 1)) - 1;
|
||||
|
||||
return (pow(x, a)*J - L)/tgamma(a + 1) - H;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Eqn. (11)
|
||||
const scalar R = (exp(-x)*pow(x, a))/tgamma(a);
|
||||
|
||||
return R*calcQE11(a, x);
|
||||
}
|
||||
}
|
||||
else if (a >= BIG)
|
||||
{
|
||||
const scalar sigma = fabs(1 - x/a);
|
||||
|
||||
if (sigma <= e0/sqrt(a))
|
||||
{
|
||||
// Eqn. (19)
|
||||
const scalar lambda = x/a;
|
||||
const scalar phi = lambda - 1 - log(lambda);
|
||||
const scalar y = a*phi;
|
||||
|
||||
const scalar E = 0.5 - (1 - y/3)*sqrt(y/pi);
|
||||
|
||||
if (lambda <= 1)
|
||||
{
|
||||
return
|
||||
1
|
||||
- (
|
||||
E
|
||||
- (1 - y)/sqrt(2*pi*a)
|
||||
*calcTE18(a, e0, x, lambda, sigma, phi)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
return
|
||||
E
|
||||
+ (1 - y)/sqrt(2*pi*a)
|
||||
*calcTE18(a, e0, x, lambda, sigma, phi);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sigma <= 0.4)
|
||||
{
|
||||
// Eqn. (17)
|
||||
const scalar lambda = x/a;
|
||||
const scalar phi = lambda - 1 - log(lambda);
|
||||
const scalar y = a*phi;
|
||||
|
||||
if (lambda <= 1)
|
||||
{
|
||||
return
|
||||
1
|
||||
- (0.5*erfc(sqrt(y))
|
||||
- exp(-y)/sqrt(2*pi*a)
|
||||
*calcTE18(a, e0, x, lambda, sigma, phi));
|
||||
}
|
||||
else
|
||||
{
|
||||
return
|
||||
0.5*erfc(sqrt(y))
|
||||
+ exp(-y)/sqrt(2*pi*a)
|
||||
*calcTE18(a, e0, x, lambda, sigma, phi);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (x <= max(a, log(10.0)))
|
||||
{
|
||||
// Eqn. (15)
|
||||
return 1 - calcPE15(a, x);
|
||||
}
|
||||
else if (x < x0)
|
||||
{
|
||||
// Eqn. (11)
|
||||
const scalar R = (exp(-x)*pow(x, a))/tgamma(a);
|
||||
|
||||
return R*calcQE11(a, x);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Eqn. (16)
|
||||
return calcQE16(a, x);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (a > x || x >= x0)
|
||||
{
|
||||
if (x <= max(a, log(10.0)))
|
||||
{
|
||||
// Eqn. (15)
|
||||
return 1 - calcPE15(a, x);
|
||||
}
|
||||
else if ( x < x0)
|
||||
{
|
||||
// Eqn. (11)
|
||||
const scalar R = (exp(-x)*pow(x, a))/tgamma(a);
|
||||
|
||||
return R*calcQE11(a, x);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Eqn. (16)
|
||||
return calcQE16(a, x);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (floor(2*a) == 2*a)
|
||||
{
|
||||
// Eqn. (14)
|
||||
if (floor(a) == a)
|
||||
{
|
||||
scalar sum = 0;
|
||||
|
||||
for (int n = 0; n <= (a - 1); n++)
|
||||
{
|
||||
sum += pow(x, n)/factorial(n);
|
||||
}
|
||||
|
||||
return exp(-x)*sum;
|
||||
}
|
||||
else
|
||||
{
|
||||
int i = a - 0.5;
|
||||
scalar prod = 1;
|
||||
scalar sum = 0;
|
||||
|
||||
for (int n = 1; n <= i; n++)
|
||||
{
|
||||
prod *= (n - 0.5);
|
||||
sum += pow(x, n)/prod;
|
||||
}
|
||||
|
||||
return erfc(sqrt(x)) + exp(-x)/sqrt(pi*x)*sum;
|
||||
}
|
||||
}
|
||||
else if (x <= max(a, log(10.0)))
|
||||
{
|
||||
// Eqn. (15)
|
||||
return 1 - calcPE15(a, x);
|
||||
}
|
||||
else if ( x < x0)
|
||||
{
|
||||
// Eqn. (11)
|
||||
const scalar R = (exp(-x)*pow(x, a))/tgamma(a);
|
||||
|
||||
return R*calcQE11(a, x);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Eqn. (16)
|
||||
return calcQE16(a, x);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::scalar Foam::incGammaRatio_P(const scalar a, const scalar x)
|
||||
{
|
||||
return 1 - incGammaRatio_Q(a, x);
|
||||
}
|
||||
|
||||
|
||||
Foam::scalar Foam::incGamma_Q(const scalar a, const scalar x)
|
||||
{
|
||||
return incGammaRatio_Q(a, x)*tgamma(a);
|
||||
}
|
||||
|
||||
|
||||
Foam::scalar Foam::incGamma_P(const scalar a, const scalar x)
|
||||
{
|
||||
return incGammaRatio_P(a, x)*tgamma(a);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -136,6 +136,18 @@ namespace Foam
|
||||
{
|
||||
//- Inverse normalized incomplete gamma function
|
||||
scalar invIncGamma(const scalar a, const scalar P);
|
||||
|
||||
//- Normalized upper incomplete gamma function
|
||||
scalar incGammaRatio_Q(const scalar a, const scalar x);
|
||||
|
||||
//- Normalized lower incomplete gamma function
|
||||
scalar incGammaRatio_P(const scalar a, const scalar x);
|
||||
|
||||
//- Upper incomplete gamma function
|
||||
scalar incGamma_Q(const scalar a, const scalar x);
|
||||
|
||||
//- Lower incomplete gamma function
|
||||
scalar incGamma_P(const scalar a, const scalar x);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -42,6 +42,25 @@ public:
|
||||
typedef arg2 type;
|
||||
};
|
||||
|
||||
inline scalar operator+(const scalar& t, const one&) noexcept
|
||||
{
|
||||
return t + 1;
|
||||
}
|
||||
|
||||
inline scalar operator+(const one&, const scalar& t) noexcept
|
||||
{
|
||||
return 1 + t;
|
||||
}
|
||||
|
||||
inline scalar operator-(const scalar& t, const one&) noexcept
|
||||
{
|
||||
return t - 1;
|
||||
}
|
||||
|
||||
inline scalar operator-(const one&, const scalar& t) noexcept
|
||||
{
|
||||
return 1 - t;
|
||||
}
|
||||
|
||||
inline constexpr const one& operator*(const one& o, const one&) noexcept
|
||||
{
|
||||
@ -83,6 +102,39 @@ inline constexpr const Type& operator/(const Type& val, const one&) noexcept
|
||||
return val;
|
||||
}
|
||||
|
||||
inline constexpr const one& min(const one& o, const one&) noexcept
|
||||
{
|
||||
return o;
|
||||
}
|
||||
|
||||
template<class Type>
|
||||
inline Type min(const one&, const Type& t) noexcept
|
||||
{
|
||||
return min(scalar(1), t);
|
||||
}
|
||||
|
||||
template<class Type>
|
||||
inline Type min(const Type& t, const one&) noexcept
|
||||
{
|
||||
return min(t, scalar(1));
|
||||
}
|
||||
|
||||
inline constexpr const one& max(const one& o, const one&) noexcept
|
||||
{
|
||||
return o;
|
||||
}
|
||||
|
||||
template<class Type>
|
||||
inline Type max(const one&, const Type& t) noexcept
|
||||
{
|
||||
return max(scalar(1), t);
|
||||
}
|
||||
|
||||
template<class Type>
|
||||
inline Type max(const Type& t, const one&) noexcept
|
||||
{
|
||||
return max(t, scalar(1));
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -25,6 +25,9 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "zero.H"
|
||||
#include "scalar.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
@ -89,6 +92,39 @@ inline constexpr zero operator/(const zero&, const Type& val) noexcept
|
||||
return Zero;
|
||||
}
|
||||
|
||||
inline zero min(const zero&, const zero&)
|
||||
{
|
||||
return Zero;
|
||||
}
|
||||
|
||||
template<class Type>
|
||||
inline Type min(const zero&, const Type& t)
|
||||
{
|
||||
return min(scalar(0), t);
|
||||
}
|
||||
|
||||
template<class Type>
|
||||
inline Type min(const Type& t, const zero&)
|
||||
{
|
||||
return min(t, scalar(0));
|
||||
}
|
||||
|
||||
inline zero max(const zero&, const zero&)
|
||||
{
|
||||
return Zero;
|
||||
}
|
||||
|
||||
template<class Type>
|
||||
inline Type max(const zero&, const Type& t)
|
||||
{
|
||||
return max(scalar(0), t);
|
||||
}
|
||||
|
||||
template<class Type>
|
||||
inline Type max(const Type& t, const zero&)
|
||||
{
|
||||
return max(t, scalar(0));
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -2,21 +2,22 @@ compressibleTurbulenceModel.C
|
||||
turbulentFluidThermoModels/turbulentFluidThermoModels.C
|
||||
|
||||
BCs = turbulentFluidThermoModels/derivedFvPatchFields
|
||||
$(BCs)/temperatureCoupledBase/temperatureCoupledBase.C
|
||||
$(BCs)/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
|
||||
|
||||
$(BCs)/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.C
|
||||
$(BCs)/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C
|
||||
$(BCs)/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C
|
||||
$(BCs)/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C
|
||||
$(BCs)/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C
|
||||
$(BCs)/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C
|
||||
$(BCs)/fixedIncidentRadiation/fixedIncidentRadiationFvPatchScalarField.C
|
||||
$(BCs)/lumpedMassWallTemperature/lumpedMassWallTemperatureFvPatchScalarField.C
|
||||
$(BCs)/outletMappedUniformInletHeatAddition/outletMappedUniformInletHeatAdditionFvPatchField.C
|
||||
$(BCs)/outletMachNumberPressure/outletMachNumberPressureFvPatchScalarField.C
|
||||
|
||||
turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C
|
||||
turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C
|
||||
turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatPhaseChangeWallFunction/alphatPhaseChangeWallFunctionFvPatchScalarField.C
|
||||
$(BCs)/temperatureCoupledBase/temperatureCoupledBase.C
|
||||
$(BCs)/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
|
||||
$(BCs)/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C
|
||||
$(BCs)/lumpedMassWallTemperature/lumpedMassWallTemperatureFvPatchScalarField.C
|
||||
|
||||
$(BCs)/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C
|
||||
$(BCs)/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libcompressibleTurbulenceModels
|
||||
|
||||
@ -160,14 +160,14 @@ public:
|
||||
// [kg/m/s]
|
||||
virtual tmp<volScalarField> alphaEff() const
|
||||
{
|
||||
return alpha();
|
||||
return this->transport_.alphahe();
|
||||
}
|
||||
|
||||
//- Return the effective turbulent thermal diffusivity for enthalpy
|
||||
// for a patch [kg/m/s]
|
||||
virtual tmp<scalarField> alphaEff(const label patchi) const
|
||||
{
|
||||
return alpha(patchi);
|
||||
return this->transport_.alphahe(patchi);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -38,12 +38,12 @@ const Foam::Enum
|
||||
Foam::temperatureCoupledBase::KMethodType
|
||||
>
|
||||
Foam::temperatureCoupledBase::KMethodTypeNames_
|
||||
({
|
||||
{
|
||||
{ KMethodType::mtFluidThermo, "fluidThermo" },
|
||||
{ KMethodType::mtSolidThermo, "solidThermo" },
|
||||
{ KMethodType::mtDirectionalSolidThermo, "directionalSolidThermo" },
|
||||
{ KMethodType::mtLookup, "lookup" },
|
||||
});
|
||||
{ KMethodType::mtLookup, "lookup" }
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
@ -70,7 +70,7 @@ Foam::temperatureCoupledBase::temperatureCoupledBase
|
||||
)
|
||||
:
|
||||
patch_(patch),
|
||||
method_(KMethodTypeNames_.get("kappaMethod", dict)),
|
||||
method_(KMethodTypeNames_.lookup("kappaMethod", dict)),
|
||||
kappaName_(dict.lookupOrDefault<word>("kappa", "none")),
|
||||
alphaAniName_(dict.lookupOrDefault<word>("alphaAni","none"))
|
||||
{
|
||||
@ -127,6 +127,11 @@ Foam::temperatureCoupledBase::temperatureCoupledBase
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::temperatureCoupledBase::~temperatureCoupledBase()
|
||||
{}
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa
|
||||
@ -169,13 +174,6 @@ Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa
|
||||
|
||||
return thermo.kappa(patchi);
|
||||
}
|
||||
else if (mesh.foundObject<basicThermo>("phaseProperties"))
|
||||
{
|
||||
const basicThermo& thermo =
|
||||
mesh.lookupObject<basicThermo>("phaseProperties");
|
||||
|
||||
return thermo.kappa(patchi);
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorInFunction
|
||||
@ -193,26 +191,6 @@ Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa
|
||||
const solidThermo& thermo =
|
||||
mesh.lookupObject<solidThermo>(basicThermo::dictName);
|
||||
|
||||
if (!thermo.isotropic())
|
||||
{
|
||||
word regionName = "";
|
||||
if (mesh.name() != polyMesh::defaultRegion)
|
||||
{
|
||||
regionName = " for region " + mesh.name();
|
||||
}
|
||||
|
||||
const word& patchName = mesh.boundaryMesh()[patchi].name();
|
||||
|
||||
WarningInFunction
|
||||
<< "Applying isotropic thermal conductivity assumption to "
|
||||
<< "anisotropic model" << regionName << " at patch "
|
||||
<< patchName << nl
|
||||
<< "Consider using an isotropic conductivity model or "
|
||||
<< "set 'kappaMethod' to "
|
||||
<< KMethodTypeNames_[mtDirectionalSolidThermo]
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
return thermo.kappa(patchi);
|
||||
break;
|
||||
}
|
||||
@ -269,6 +247,8 @@ Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@ -38,6 +38,7 @@ Description
|
||||
- 'directionalSolidThermo': uses look up for volSymmTensorField for
|
||||
transformed kappa vector. Field name definable in 'alphaAni',
|
||||
named 'Anialpha' in solid solver by default
|
||||
- 'phaseSystem' : used for multiphase thermos
|
||||
|
||||
\par Keywords provided by this class:
|
||||
\table
|
||||
@ -143,6 +144,9 @@ public:
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~temperatureCoupledBase();
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Method to obtain K
|
||||
@ -158,7 +162,7 @@ public:
|
||||
}
|
||||
|
||||
//- Given patch temperature calculate corresponding K field
|
||||
tmp<scalarField> kappa(const scalarField& Tp) const;
|
||||
virtual tmp<scalarField> kappa(const scalarField& Tp) const;
|
||||
|
||||
//- Write
|
||||
void write(Ostream&) const;
|
||||
|
||||
@ -28,6 +28,7 @@ License
|
||||
#include "NicenoKEqn.H"
|
||||
#include "fvOptions.H"
|
||||
#include "twoPhaseSystem.H"
|
||||
#include "dragModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -181,11 +182,13 @@ tmp<volScalarField> NicenoKEqn<BasicTurbulenceModel>::bubbleG() const
|
||||
refCast<const twoPhaseSystem>(liquid.fluid());
|
||||
const transportModel& gas = fluid.otherPhase(liquid);
|
||||
|
||||
const dragModel& drag = fluid.lookupSubModel<dragModel>(gas, liquid);
|
||||
|
||||
volScalarField magUr(mag(this->U_ - gasTurbulence.U()));
|
||||
|
||||
tmp<volScalarField> bubbleG
|
||||
(
|
||||
Cp_*sqr(magUr)*fluid.drag(gas).K()/liquid.rho()
|
||||
Cp_*sqr(magUr)*drag.K()/liquid.rho()
|
||||
);
|
||||
|
||||
return bubbleG;
|
||||
|
||||
@ -28,6 +28,7 @@ License
|
||||
#include "LaheyKEpsilon.H"
|
||||
#include "fvOptions.H"
|
||||
#include "twoPhaseSystem.H"
|
||||
#include "dragModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -191,6 +192,8 @@ tmp<volScalarField> LaheyKEpsilon<BasicTurbulenceModel>::bubbleG() const
|
||||
const twoPhaseSystem& fluid = refCast<const twoPhaseSystem>(liquid.fluid());
|
||||
const transportModel& gas = fluid.otherPhase(liquid);
|
||||
|
||||
const dragModel& drag = fluid.lookupSubModel<dragModel>(gas, liquid);
|
||||
|
||||
volScalarField magUr(mag(this->U_ - gasTurbulence.U()));
|
||||
|
||||
tmp<volScalarField> bubbleG
|
||||
@ -198,7 +201,7 @@ tmp<volScalarField> LaheyKEpsilon<BasicTurbulenceModel>::bubbleG() const
|
||||
Cp_
|
||||
*(
|
||||
pow3(magUr)
|
||||
+ pow(fluid.drag(gas).CdRe()*liquid.nu()/gas.d(), 4.0/3.0)
|
||||
+ pow(drag.CdRe()*liquid.nu()/gas.d(), 4.0/3.0)
|
||||
*pow(magUr, 5.0/3.0)
|
||||
)
|
||||
*gas
|
||||
|
||||
@ -29,6 +29,7 @@ License
|
||||
#include "fvOptions.H"
|
||||
#include "twoPhaseSystem.H"
|
||||
#include "virtualMassModel.H"
|
||||
#include "dragModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -122,8 +123,11 @@ void continuousGasKEpsilon<BasicTurbulenceModel>::correctNut()
|
||||
const twoPhaseSystem& fluid = refCast<const twoPhaseSystem>(gas.fluid());
|
||||
const transportModel& liquid = fluid.otherPhase(gas);
|
||||
|
||||
const virtualMassModel& virtualMass =
|
||||
fluid.lookupSubModel<virtualMassModel>(gas, liquid);
|
||||
|
||||
volScalarField thetal(liquidTurbulence.k()/liquidTurbulence.epsilon());
|
||||
volScalarField rhodv(gas.rho() + fluid.virtualMass(gas).Cvm()*liquid.rho());
|
||||
volScalarField rhodv(gas.rho() + virtualMass.Cvm()*liquid.rho());
|
||||
volScalarField thetag((rhodv/(18*liquid.rho()*liquid.nu()))*sqr(gas.d()));
|
||||
volScalarField expThetar
|
||||
(
|
||||
@ -206,12 +210,15 @@ continuousGasKEpsilon<BasicTurbulenceModel>::rhoEff() const
|
||||
const twoPhaseSystem& fluid = refCast<const twoPhaseSystem>(gas.fluid());
|
||||
const transportModel& liquid = fluid.otherPhase(gas);
|
||||
|
||||
const virtualMassModel& virtualMass =
|
||||
fluid.lookupSubModel<virtualMassModel>(gas, liquid);
|
||||
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject::groupName("rhoEff", this->alphaRhoPhi_.group()),
|
||||
gas.rho() + (fluid.virtualMass(gas).Cvm() + 3.0/20.0)*liquid.rho()
|
||||
gas.rho() + (virtualMass.Cvm() + 3.0/20.0)*liquid.rho()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -29,6 +29,7 @@ License
|
||||
#include "fvOptions.H"
|
||||
#include "bound.H"
|
||||
#include "twoPhaseSystem.H"
|
||||
#include "dragModel.H"
|
||||
#include "virtualMassModel.H"
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
#include "inletOutletFvPatchFields.H"
|
||||
@ -389,7 +390,7 @@ tmp<volScalarField> mixtureKEpsilon<BasicTurbulenceModel>::Ct2() const
|
||||
volScalarField beta
|
||||
(
|
||||
(6*this->Cmu_/(4*sqrt(3.0/2.0)))
|
||||
*fluid.drag(gas).K()/liquid.rho()
|
||||
*fluid.Kd()/liquid.rho()
|
||||
*(liquidTurbulence.k_/liquidTurbulence.epsilon_)
|
||||
);
|
||||
volScalarField Ct0((3 + beta)/(1 + beta + 2*gas.rho()/liquid.rho()));
|
||||
@ -413,9 +414,11 @@ tmp<volScalarField> mixtureKEpsilon<BasicTurbulenceModel>::rhogEff() const
|
||||
{
|
||||
const transportModel& gas = this->transport();
|
||||
const twoPhaseSystem& fluid = refCast<const twoPhaseSystem>(gas.fluid());
|
||||
const virtualMassModel& virtualMass =
|
||||
fluid.lookupSubModel<virtualMassModel>(gas, fluid.otherPhase(gas));
|
||||
return
|
||||
gas.rho()
|
||||
+ fluid.virtualMass(gas).Cvm()*fluid.otherPhase(gas).rho();
|
||||
+ virtualMass.Cvm()*fluid.otherPhase(gas).rho();
|
||||
}
|
||||
|
||||
|
||||
@ -491,6 +494,8 @@ tmp<volScalarField> mixtureKEpsilon<BasicTurbulenceModel>::bubbleG() const
|
||||
const twoPhaseSystem& fluid = refCast<const twoPhaseSystem>(gas.fluid());
|
||||
const transportModel& liquid = fluid.otherPhase(gas);
|
||||
|
||||
const dragModel& drag = fluid.lookupSubModel<dragModel>(gas, liquid);
|
||||
|
||||
volScalarField magUr(mag(liquidTurbulence.U() - this->U()));
|
||||
|
||||
// Lahey model
|
||||
@ -500,7 +505,7 @@ tmp<volScalarField> mixtureKEpsilon<BasicTurbulenceModel>::bubbleG() const
|
||||
*liquid*liquid.rho()
|
||||
*(
|
||||
pow3(magUr)
|
||||
+ pow(fluid.drag(gas).CdRe()*liquid.nu()/gas.d(), 4.0/3.0)
|
||||
+ pow(drag.CdRe()*liquid.nu()/gas.d(), 4.0/3.0)
|
||||
*pow(magUr, 5.0/3.0)
|
||||
)
|
||||
*gas
|
||||
@ -510,7 +515,7 @@ tmp<volScalarField> mixtureKEpsilon<BasicTurbulenceModel>::bubbleG() const
|
||||
// Simple model
|
||||
// tmp<volScalarField> bubbleG
|
||||
// (
|
||||
// Cp_*liquid*fluid.drag(gas).K()*sqr(magUr)
|
||||
// Cp_*liquid*drag.K()*sqr(magUr)
|
||||
// );
|
||||
|
||||
return bubbleG;
|
||||
|
||||
@ -254,7 +254,6 @@ fields/surfaceFields/surfaceFields.C
|
||||
fvMatrices/fvMatrices.C
|
||||
fvMatrices/fvScalarMatrix/fvScalarMatrix.C
|
||||
fvMatrices/solvers/MULES/MULES.C
|
||||
fvMatrices/solvers/MULES/CMULES.C
|
||||
fvMatrices/solvers/isoAdvection/isoCutCell/isoCutCell.C
|
||||
fvMatrices/solvers/isoAdvection/isoCutFace/isoCutFace.C
|
||||
fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C
|
||||
|
||||
@ -139,6 +139,24 @@ void Foam::fv::optionList::reset(const dictionary& dict)
|
||||
}
|
||||
|
||||
|
||||
bool Foam::fv::optionList::appliesToField(const word& fieldName) const
|
||||
{
|
||||
forAll(*this, i)
|
||||
{
|
||||
const option& source = this->operator[](i);
|
||||
|
||||
label fieldi = source.applyToField(fieldName);
|
||||
|
||||
if (fieldi != -1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool Foam::fv::optionList::read(const dictionary& dict)
|
||||
{
|
||||
return readOptions(optionsDict(dict));
|
||||
|
||||
@ -131,6 +131,9 @@ public:
|
||||
//- Reset the source list
|
||||
void reset(const dictionary& dict);
|
||||
|
||||
//- Return whether there is something to apply to the field
|
||||
bool appliesToField(const word& fieldName) const;
|
||||
|
||||
|
||||
// Sources
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::pimpleControl::read()
|
||||
bool Foam::pimpleControl::read()
|
||||
{
|
||||
solutionControl::read(false);
|
||||
|
||||
@ -49,6 +49,8 @@ void Foam::pimpleControl::read()
|
||||
SIMPLErho_ = pimpleDict.lookupOrDefault("SIMPLErho", false);
|
||||
turbOnFinalIterOnly_ =
|
||||
pimpleDict.lookupOrDefault("turbOnFinalIterOnly", true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -97,7 +97,7 @@ protected:
|
||||
// Protected Member Functions
|
||||
|
||||
//- Read controls from fvSolution dictionary
|
||||
virtual void read();
|
||||
virtual bool read();
|
||||
|
||||
//- Return true if all convergence checks are satisfied
|
||||
virtual bool criteriaSatisfied();
|
||||
|
||||
@ -38,9 +38,10 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::simpleControl::read()
|
||||
bool Foam::simpleControl::read()
|
||||
{
|
||||
solutionControl::read(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -65,7 +65,7 @@ protected:
|
||||
// Protected Member Functions
|
||||
|
||||
//- Read controls from fvSolution dictionary
|
||||
void read();
|
||||
bool read();
|
||||
|
||||
//- Return true if all convergence checks are satisfied
|
||||
bool criteriaSatisfied();
|
||||
|
||||
@ -37,7 +37,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::solutionControl::read(const bool absTolOnly)
|
||||
bool Foam::solutionControl::read(const bool absTolOnly)
|
||||
{
|
||||
const dictionary solutionDict(this->dict());
|
||||
|
||||
@ -127,12 +127,14 @@ void Foam::solutionControl::read(const bool absTolOnly)
|
||||
<< " iniResid : " << fd.initialResidual << endl;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void Foam::solutionControl::read()
|
||||
bool Foam::solutionControl::read()
|
||||
{
|
||||
read(false);
|
||||
return read(false);
|
||||
}
|
||||
|
||||
|
||||
@ -200,6 +202,14 @@ void Foam::solutionControl::setFirstIterFlag
|
||||
}
|
||||
|
||||
|
||||
bool Foam::solutionControl::writeData(Ostream&) const
|
||||
{
|
||||
NotImplemented;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
@ -260,11 +270,16 @@ Foam::Pair<Foam::scalar> Foam::solutionControl::maxResidual
|
||||
|
||||
Foam::solutionControl::solutionControl(fvMesh& mesh, const word& algorithmName)
|
||||
:
|
||||
IOobject
|
||||
regIOobject
|
||||
(
|
||||
"solutionControl",
|
||||
mesh.time().timeName(),
|
||||
mesh
|
||||
IOobject
|
||||
(
|
||||
typeName,
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
),
|
||||
mesh_(mesh),
|
||||
residualControl_(),
|
||||
|
||||
@ -48,7 +48,7 @@ namespace Foam
|
||||
|
||||
class solutionControl
|
||||
:
|
||||
public IOobject
|
||||
public regIOobject
|
||||
{
|
||||
public:
|
||||
|
||||
@ -122,10 +122,10 @@ protected:
|
||||
// Protected Member Functions
|
||||
|
||||
//- Read controls from fvSolution dictionary
|
||||
virtual void read(const bool absTolOnly);
|
||||
virtual bool read(const bool absTolOnly);
|
||||
|
||||
//- Read controls from fvSolution dictionary
|
||||
virtual void read();
|
||||
virtual bool read();
|
||||
|
||||
//- Return index of field in residualControl_ if present
|
||||
virtual label applyToField
|
||||
@ -171,6 +171,9 @@ protected:
|
||||
const bool force = false
|
||||
);
|
||||
|
||||
//- Dummy write for regIOobject
|
||||
virtual bool writeData(Ostream&) const;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@ -40,7 +40,6 @@ Description
|
||||
flux used in the bounded-solution.
|
||||
|
||||
SourceFiles
|
||||
CMULES.C
|
||||
CMULESTemplates.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -68,14 +67,49 @@ void correct
|
||||
const RdeltaTType& rDeltaT,
|
||||
const RhoType& rho,
|
||||
volScalarField& psi,
|
||||
const surfaceScalarField& phi,
|
||||
const surfaceScalarField& phiCorr,
|
||||
const SpType& Sp,
|
||||
const SuType& Su
|
||||
);
|
||||
|
||||
template<class RhoType>
|
||||
void correct
|
||||
(
|
||||
const RhoType& rho,
|
||||
volScalarField& psi,
|
||||
const surfaceScalarField& phiCorr
|
||||
);
|
||||
|
||||
template<class RhoType, class SpType, class SuType>
|
||||
void correct
|
||||
(
|
||||
const RhoType& rho,
|
||||
volScalarField& psi,
|
||||
const surfaceScalarField& phiCorr,
|
||||
const SpType& Sp,
|
||||
const SuType& Su
|
||||
);
|
||||
|
||||
template<class RhoType, class PsiMaxType, class PsiMinType>
|
||||
void correct
|
||||
(
|
||||
const RhoType& rho,
|
||||
volScalarField& psi,
|
||||
const surfaceScalarField& phi,
|
||||
surfaceScalarField& phiCorr,
|
||||
const PsiMaxType& psiMax,
|
||||
const PsiMinType& psiMin
|
||||
);
|
||||
|
||||
template
|
||||
<
|
||||
class RhoType,
|
||||
class SpType,
|
||||
class SuType,
|
||||
class PsiMaxType,
|
||||
class PsiMinType
|
||||
>
|
||||
void correct
|
||||
(
|
||||
const RhoType& rho,
|
||||
volScalarField& psi,
|
||||
@ -83,20 +117,19 @@ void correct
|
||||
surfaceScalarField& phiCorr,
|
||||
const SpType& Sp,
|
||||
const SuType& Su,
|
||||
const scalar psiMax,
|
||||
const scalar psiMin
|
||||
const PsiMaxType& psiMax,
|
||||
const PsiMinType& psiMin
|
||||
);
|
||||
|
||||
void correct
|
||||
(
|
||||
volScalarField& psi,
|
||||
const surfaceScalarField& phi,
|
||||
surfaceScalarField& phiCorr,
|
||||
const scalar psiMax,
|
||||
const scalar psiMin
|
||||
);
|
||||
|
||||
template<class RdeltaTType, class RhoType, class SpType, class SuType>
|
||||
template
|
||||
<
|
||||
class RdeltaTType,
|
||||
class RhoType,
|
||||
class SpType,
|
||||
class SuType,
|
||||
class PsiMaxType,
|
||||
class PsiMinType
|
||||
>
|
||||
void limiterCorr
|
||||
(
|
||||
scalarField& allLambda,
|
||||
@ -107,11 +140,20 @@ void limiterCorr
|
||||
const surfaceScalarField& phiCorr,
|
||||
const SpType& Sp,
|
||||
const SuType& Su,
|
||||
const scalar psiMax,
|
||||
const scalar psiMin
|
||||
const PsiMaxType& psiMax,
|
||||
const PsiMinType& psiMin
|
||||
);
|
||||
|
||||
template<class RdeltaTType, class RhoType, class SpType, class SuType>
|
||||
|
||||
template
|
||||
<
|
||||
class RdeltaTType,
|
||||
class RhoType,
|
||||
class SpType,
|
||||
class SuType,
|
||||
class PsiMaxType,
|
||||
class PsiMinType
|
||||
>
|
||||
void limitCorr
|
||||
(
|
||||
const RdeltaTType& rDeltaT,
|
||||
@ -121,8 +163,8 @@ void limitCorr
|
||||
surfaceScalarField& phiCorr,
|
||||
const SpType& Sp,
|
||||
const SuType& Su,
|
||||
const scalar psiMax,
|
||||
const scalar psiMin
|
||||
const PsiMaxType& psiMax,
|
||||
const PsiMinType& psiMin
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -40,7 +40,6 @@ void Foam::MULES::correct
|
||||
const RdeltaTType& rDeltaT,
|
||||
const RhoType& rho,
|
||||
volScalarField& psi,
|
||||
const surfaceScalarField& phi,
|
||||
const surfaceScalarField& phiCorr,
|
||||
const SpType& Sp,
|
||||
const SuType& Su
|
||||
@ -76,8 +75,67 @@ void Foam::MULES::correct
|
||||
}
|
||||
|
||||
|
||||
template<class RhoType>
|
||||
void Foam::MULES::correct
|
||||
(
|
||||
const RhoType& rho,
|
||||
volScalarField& psi,
|
||||
const surfaceScalarField& phiCorr
|
||||
)
|
||||
{
|
||||
correct(rho, psi, phiCorr, zeroField(), zeroField());
|
||||
}
|
||||
|
||||
|
||||
template<class RhoType, class SpType, class SuType>
|
||||
void Foam::MULES::correct
|
||||
(
|
||||
const RhoType& rho,
|
||||
volScalarField& psi,
|
||||
const surfaceScalarField& phiCorr,
|
||||
const SpType& Sp,
|
||||
const SuType& Su
|
||||
)
|
||||
{
|
||||
const fvMesh& mesh = psi.mesh();
|
||||
|
||||
if (fv::localEulerDdt::enabled(mesh))
|
||||
{
|
||||
const volScalarField& rDeltaT = fv::localEulerDdt::localRDeltaT(mesh);
|
||||
correct(rDeltaT, rho, psi, phiCorr, Sp, Su);
|
||||
}
|
||||
else
|
||||
{
|
||||
const scalar rDeltaT = 1.0/mesh.time().deltaTValue();
|
||||
correct(rDeltaT, rho, psi, phiCorr, Sp, Su);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class RhoType, class PsiMaxType, class PsiMinType>
|
||||
void Foam::MULES::correct
|
||||
(
|
||||
const RhoType& rho,
|
||||
volScalarField& psi,
|
||||
const surfaceScalarField& phi,
|
||||
surfaceScalarField& phiCorr,
|
||||
const PsiMaxType& psiMax,
|
||||
const PsiMinType& psiMin
|
||||
)
|
||||
{
|
||||
correct(rho, psi, phi, phiCorr, zeroField(), zeroField(), psiMax, psiMin);
|
||||
}
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
class RhoType,
|
||||
class SpType,
|
||||
class SuType,
|
||||
class PsiMaxType,
|
||||
class PsiMinType
|
||||
>
|
||||
void Foam::MULES::correct
|
||||
(
|
||||
const RhoType& rho,
|
||||
volScalarField& psi,
|
||||
@ -85,8 +143,8 @@ void Foam::MULES::correct
|
||||
surfaceScalarField& phiCorr,
|
||||
const SpType& Sp,
|
||||
const SuType& Su,
|
||||
const scalar psiMax,
|
||||
const scalar psiMin
|
||||
const PsiMaxType& psiMax,
|
||||
const PsiMinType& psiMin
|
||||
)
|
||||
{
|
||||
const fvMesh& mesh = psi.mesh();
|
||||
@ -107,7 +165,8 @@ void Foam::MULES::correct
|
||||
psiMax,
|
||||
psiMin
|
||||
);
|
||||
correct(rDeltaT, rho, psi, phi, phiCorr, Sp, Su);
|
||||
|
||||
correct(rDeltaT, rho, psi, phiCorr, Sp, Su);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -126,12 +185,20 @@ void Foam::MULES::correct
|
||||
psiMin
|
||||
);
|
||||
|
||||
correct(rDeltaT, rho, psi, phi, phiCorr, Sp, Su);
|
||||
correct(rDeltaT, rho, psi, phiCorr, Sp, Su);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class RdeltaTType, class RhoType, class SpType, class SuType>
|
||||
template
|
||||
<
|
||||
class RdeltaTType,
|
||||
class RhoType,
|
||||
class SpType,
|
||||
class SuType,
|
||||
class PsiMaxType,
|
||||
class PsiMinType
|
||||
>
|
||||
void Foam::MULES::limiterCorr
|
||||
(
|
||||
scalarField& allLambda,
|
||||
@ -142,8 +209,8 @@ void Foam::MULES::limiterCorr
|
||||
const surfaceScalarField& phiCorr,
|
||||
const SpType& Sp,
|
||||
const SuType& Su,
|
||||
const scalar psiMax,
|
||||
const scalar psiMin
|
||||
const PsiMaxType& psiMax,
|
||||
const PsiMinType& psiMin
|
||||
)
|
||||
{
|
||||
const scalarField& psiIf = psi;
|
||||
@ -155,7 +222,7 @@ void Foam::MULES::limiterCorr
|
||||
|
||||
const label nLimiterIter
|
||||
(
|
||||
MULEScontrols.get<label>("nLimiterIter")
|
||||
readLabel(MULEScontrols.lookup("nLimiterIter"))
|
||||
);
|
||||
|
||||
const scalar smoothLimiter
|
||||
@ -168,6 +235,20 @@ void Foam::MULES::limiterCorr
|
||||
MULEScontrols.lookupOrDefault<scalar>("extremaCoeff", 0)
|
||||
);
|
||||
|
||||
const scalar boundaryExtremaCoeff
|
||||
(
|
||||
MULEScontrols.lookupOrDefault<scalar>
|
||||
(
|
||||
"boundaryExtremaCoeff",
|
||||
extremaCoeff
|
||||
)
|
||||
);
|
||||
|
||||
const scalar boundaryDeltaExtremaCoeff
|
||||
(
|
||||
max(boundaryExtremaCoeff - extremaCoeff, 0)
|
||||
);
|
||||
|
||||
const labelUList& owner = mesh.owner();
|
||||
const labelUList& neighb = mesh.neighbour();
|
||||
tmp<volScalarField::Internal> tVsc = mesh.Vsc();
|
||||
@ -201,8 +282,11 @@ void Foam::MULES::limiterCorr
|
||||
surfaceScalarField::Boundary& lambdaBf =
|
||||
lambda.boundaryFieldRef();
|
||||
|
||||
scalarField psiMaxn(psiIf.size(), psiMin);
|
||||
scalarField psiMinn(psiIf.size(), psiMax);
|
||||
scalarField psiMaxn(psiIf.size());
|
||||
scalarField psiMinn(psiIf.size());
|
||||
|
||||
psiMaxn = psiMin;
|
||||
psiMinn = psiMax;
|
||||
|
||||
scalarField sumPhip(psiIf.size(), Zero);
|
||||
scalarField mSumPhim(psiIf.size(), Zero);
|
||||
@ -263,12 +347,20 @@ void Foam::MULES::limiterCorr
|
||||
}
|
||||
else
|
||||
{
|
||||
forAll(phiCorrPf, pFacei)
|
||||
// Add the optional additional allowed boundary extrema
|
||||
if (boundaryDeltaExtremaCoeff > 0)
|
||||
{
|
||||
const label pfCelli = pFaceCells[pFacei];
|
||||
forAll(phiCorrPf, pFacei)
|
||||
{
|
||||
const label pfCelli = pFaceCells[pFacei];
|
||||
|
||||
psiMaxn[pfCelli] = max(psiMaxn[pfCelli], psiMax);
|
||||
psiMinn[pfCelli] = min(psiMinn[pfCelli], psiMin);
|
||||
const scalar extrema =
|
||||
boundaryDeltaExtremaCoeff
|
||||
*(psiMax[pfCelli] - psiMin[pfCelli]);
|
||||
|
||||
psiMaxn[pfCelli] += extrema;
|
||||
psiMinn[pfCelli] -= extrema;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -474,7 +566,15 @@ void Foam::MULES::limiterCorr
|
||||
}
|
||||
|
||||
|
||||
template<class RdeltaTType, class RhoType, class SpType, class SuType>
|
||||
template
|
||||
<
|
||||
class RdeltaTType,
|
||||
class RhoType,
|
||||
class SpType,
|
||||
class SuType,
|
||||
class PsiMaxType,
|
||||
class PsiMinType
|
||||
>
|
||||
void Foam::MULES::limitCorr
|
||||
(
|
||||
const RdeltaTType& rDeltaT,
|
||||
@ -484,8 +584,8 @@ void Foam::MULES::limitCorr
|
||||
surfaceScalarField& phiCorr,
|
||||
const SpType& Sp,
|
||||
const SuType& Su,
|
||||
const scalar psiMax,
|
||||
const scalar psiMin
|
||||
const PsiMaxType& psiMax,
|
||||
const PsiMinType& psiMin
|
||||
)
|
||||
{
|
||||
const fvMesh& mesh = psi.mesh();
|
||||
|
||||
@ -30,28 +30,6 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::MULES::explicitSolve
|
||||
(
|
||||
volScalarField& psi,
|
||||
const surfaceScalarField& phi,
|
||||
surfaceScalarField& phiPsi,
|
||||
const scalar psiMax,
|
||||
const scalar psiMin
|
||||
)
|
||||
{
|
||||
addProfiling(solve, "MULES::explicitSolve");
|
||||
|
||||
explicitSolve
|
||||
(
|
||||
geometricOneField(),
|
||||
psi,
|
||||
phi,
|
||||
phiPsi,
|
||||
zeroField(), zeroField(),
|
||||
psiMax, psiMin
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
void Foam::MULES::limitSum(UPtrList<scalarField>& phiPsiCorrs)
|
||||
{
|
||||
@ -102,4 +80,40 @@ void Foam::MULES::limitSum(UPtrList<scalarField>& phiPsiCorrs)
|
||||
}
|
||||
|
||||
|
||||
void Foam::MULES::limitSum
|
||||
(
|
||||
const UPtrList<const scalarField>& alphas,
|
||||
UPtrList<scalarField>& phiPsiCorrs,
|
||||
const labelHashSet& fixed
|
||||
)
|
||||
{
|
||||
labelHashSet notFixed(identity(phiPsiCorrs.size()));
|
||||
notFixed -= fixed;
|
||||
|
||||
forAll(phiPsiCorrs[0], facei)
|
||||
{
|
||||
scalar alphaNotFixed = 0, corrNotFixed = 0;
|
||||
forAllConstIter(labelHashSet, notFixed, iter)
|
||||
{
|
||||
alphaNotFixed += alphas[iter.key()][facei];
|
||||
corrNotFixed += phiPsiCorrs[iter.key()][facei];
|
||||
}
|
||||
|
||||
scalar corrFixed = 0;
|
||||
forAllConstIter(labelHashSet, fixed, iter)
|
||||
{
|
||||
corrFixed += phiPsiCorrs[iter.key()][facei];
|
||||
}
|
||||
|
||||
const scalar sumCorr = corrNotFixed + corrFixed;
|
||||
|
||||
const scalar lambda = - sumCorr/alphaNotFixed;
|
||||
|
||||
forAllConstIter(labelHashSet, notFixed, iter)
|
||||
{
|
||||
phiPsiCorrs[iter.key()][facei] += lambda*alphas[iter.key()][facei];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -52,6 +52,8 @@ SourceFiles
|
||||
#include "zero.H"
|
||||
#include "zeroField.H"
|
||||
#include "UPtrList.H"
|
||||
#include "HashSet.H"
|
||||
#include "UniformField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -73,6 +75,14 @@ void explicitSolve
|
||||
const SuType& Su
|
||||
);
|
||||
|
||||
template<class RhoType>
|
||||
void explicitSolve
|
||||
(
|
||||
const RhoType& rho,
|
||||
volScalarField& psi,
|
||||
const surfaceScalarField& phiPsi
|
||||
);
|
||||
|
||||
template<class RhoType, class SpType, class SuType>
|
||||
void explicitSolve
|
||||
(
|
||||
@ -83,7 +93,26 @@ void explicitSolve
|
||||
const SuType& Su
|
||||
);
|
||||
|
||||
template<class RhoType, class SpType, class SuType>
|
||||
template<class RhoType, class PsiMaxType, class PsiMinType>
|
||||
void explicitSolve
|
||||
(
|
||||
const RhoType& rho,
|
||||
volScalarField& psi,
|
||||
const surfaceScalarField& phiBD,
|
||||
surfaceScalarField& phiPsi,
|
||||
const PsiMaxType& psiMax,
|
||||
const PsiMinType& psiMin
|
||||
);
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
class RhoType,
|
||||
class SpType,
|
||||
class SuType,
|
||||
class PsiMaxType,
|
||||
class PsiMinType
|
||||
>
|
||||
void explicitSolve
|
||||
(
|
||||
const RhoType& rho,
|
||||
@ -92,20 +121,20 @@ void explicitSolve
|
||||
surfaceScalarField& phiPsi,
|
||||
const SpType& Sp,
|
||||
const SuType& Su,
|
||||
const scalar psiMax,
|
||||
const scalar psiMin
|
||||
const PsiMaxType& psiMax,
|
||||
const PsiMinType& psiMin
|
||||
);
|
||||
|
||||
void explicitSolve
|
||||
(
|
||||
volScalarField& psi,
|
||||
const surfaceScalarField& phiBD,
|
||||
surfaceScalarField& phiPsi,
|
||||
const scalar psiMax,
|
||||
const scalar psiMin
|
||||
);
|
||||
|
||||
template<class RdeltaTType, class RhoType, class SpType, class SuType>
|
||||
template
|
||||
<
|
||||
class RdeltaTType,
|
||||
class RhoType,
|
||||
class SpType,
|
||||
class SuType,
|
||||
class PsiMaxType,
|
||||
class PsiMinType
|
||||
>
|
||||
void limiter
|
||||
(
|
||||
scalarField& allLambda,
|
||||
@ -116,11 +145,20 @@ void limiter
|
||||
const surfaceScalarField& phiCorr,
|
||||
const SpType& Sp,
|
||||
const SuType& Su,
|
||||
const scalar psiMax,
|
||||
const scalar psiMin
|
||||
const PsiMaxType& psiMax,
|
||||
const PsiMinType& psiMin
|
||||
);
|
||||
|
||||
template<class RdeltaTType, class RhoType, class SpType, class SuType>
|
||||
|
||||
template
|
||||
<
|
||||
class RdeltaTType,
|
||||
class RhoType,
|
||||
class SpType,
|
||||
class SuType,
|
||||
class PsiMaxType,
|
||||
class PsiMinType
|
||||
>
|
||||
void limit
|
||||
(
|
||||
const RdeltaTType& rDeltaT,
|
||||
@ -130,8 +168,30 @@ void limit
|
||||
surfaceScalarField& phiPsi,
|
||||
const SpType& Sp,
|
||||
const SuType& Su,
|
||||
const scalar psiMax,
|
||||
const scalar psiMin,
|
||||
const PsiMaxType& psiMax,
|
||||
const PsiMinType& psiMin,
|
||||
const bool returnCorr
|
||||
);
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
class RhoType,
|
||||
class SpType,
|
||||
class SuType,
|
||||
class PsiMaxType,
|
||||
class PsiMinType
|
||||
>
|
||||
void limit
|
||||
(
|
||||
const RhoType& rho,
|
||||
const volScalarField& psi,
|
||||
const surfaceScalarField& phi,
|
||||
surfaceScalarField& phiPsi,
|
||||
const SpType& Sp,
|
||||
const SuType& Su,
|
||||
const PsiMaxType& psiMax,
|
||||
const PsiMinType& psiMin,
|
||||
const bool returnCorr
|
||||
);
|
||||
|
||||
@ -141,6 +201,20 @@ void limitSum(UPtrList<scalarField>& phiPsiCorrs);
|
||||
template<class SurfaceScalarFieldList>
|
||||
void limitSum(SurfaceScalarFieldList& phiPsiCorrs);
|
||||
|
||||
void limitSum
|
||||
(
|
||||
const UPtrList<const scalarField>& alphas,
|
||||
UPtrList<scalarField>& phiPsiCorrs,
|
||||
const labelHashSet& fixed
|
||||
);
|
||||
|
||||
template<class SurfaceScalarFieldList>
|
||||
void limitSum
|
||||
(
|
||||
const SurfaceScalarFieldList& alphas,
|
||||
SurfaceScalarFieldList& phiPsiCorrs,
|
||||
const labelHashSet& fixed
|
||||
);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -80,6 +80,18 @@ void Foam::MULES::explicitSolve
|
||||
}
|
||||
|
||||
|
||||
template<class RhoType>
|
||||
void Foam::MULES::explicitSolve
|
||||
(
|
||||
const RhoType& rho,
|
||||
volScalarField& psi,
|
||||
const surfaceScalarField& phiPsi
|
||||
)
|
||||
{
|
||||
explicitSolve(rho, psi, phiPsi, zeroField(), zeroField());
|
||||
}
|
||||
|
||||
|
||||
template<class RhoType, class SpType, class SuType>
|
||||
void Foam::MULES::explicitSolve
|
||||
(
|
||||
@ -105,7 +117,39 @@ void Foam::MULES::explicitSolve
|
||||
}
|
||||
|
||||
|
||||
template<class RhoType, class SpType, class SuType>
|
||||
template<class RhoType, class PsiMaxType, class PsiMinType>
|
||||
void Foam::MULES::explicitSolve
|
||||
(
|
||||
const RhoType& rho,
|
||||
volScalarField& psi,
|
||||
const surfaceScalarField& phiBD,
|
||||
surfaceScalarField& phiPsi,
|
||||
const PsiMaxType& psiMax,
|
||||
const PsiMinType& psiMin
|
||||
)
|
||||
{
|
||||
explicitSolve
|
||||
(
|
||||
rho,
|
||||
psi,
|
||||
phiBD,
|
||||
phiPsi,
|
||||
zeroField(),
|
||||
zeroField(),
|
||||
psiMax,
|
||||
psiMin
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
class RhoType,
|
||||
class SpType,
|
||||
class SuType,
|
||||
class PsiMaxType,
|
||||
class PsiMinType
|
||||
>
|
||||
void Foam::MULES::explicitSolve
|
||||
(
|
||||
const RhoType& rho,
|
||||
@ -114,8 +158,8 @@ void Foam::MULES::explicitSolve
|
||||
surfaceScalarField& phiPsi,
|
||||
const SpType& Sp,
|
||||
const SuType& Su,
|
||||
const scalar psiMax,
|
||||
const scalar psiMin
|
||||
const PsiMaxType& psiMax,
|
||||
const PsiMinType& psiMin
|
||||
)
|
||||
{
|
||||
const fvMesh& mesh = psi.mesh();
|
||||
@ -125,47 +169,27 @@ void Foam::MULES::explicitSolve
|
||||
if (fv::localEulerDdt::enabled(mesh))
|
||||
{
|
||||
const volScalarField& rDeltaT = fv::localEulerDdt::localRDeltaT(mesh);
|
||||
|
||||
limit
|
||||
(
|
||||
rDeltaT,
|
||||
rho,
|
||||
psi,
|
||||
phi,
|
||||
phiPsi,
|
||||
Sp,
|
||||
Su,
|
||||
psiMax,
|
||||
psiMin,
|
||||
false
|
||||
);
|
||||
|
||||
limit(rDeltaT, rho, psi, phi, phiPsi, Sp, Su, psiMax, psiMin, false);
|
||||
explicitSolve(rDeltaT, rho, psi, phiPsi, Sp, Su);
|
||||
}
|
||||
else
|
||||
{
|
||||
const scalar rDeltaT = 1.0/mesh.time().deltaTValue();
|
||||
|
||||
limit
|
||||
(
|
||||
rDeltaT,
|
||||
rho,
|
||||
psi,
|
||||
phi,
|
||||
phiPsi,
|
||||
Sp,
|
||||
Su,
|
||||
psiMax,
|
||||
psiMin,
|
||||
false
|
||||
);
|
||||
|
||||
limit(rDeltaT, rho, psi, phi, phiPsi, Sp, Su, psiMax, psiMin, false);
|
||||
explicitSolve(rDeltaT, rho, psi, phiPsi, Sp, Su);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class RdeltaTType, class RhoType, class SpType, class SuType>
|
||||
template
|
||||
<
|
||||
class RdeltaTType,
|
||||
class RhoType,
|
||||
class SpType,
|
||||
class SuType,
|
||||
class PsiMaxType,
|
||||
class PsiMinType
|
||||
>
|
||||
void Foam::MULES::limiter
|
||||
(
|
||||
scalarField& allLambda,
|
||||
@ -176,8 +200,8 @@ void Foam::MULES::limiter
|
||||
const surfaceScalarField& phiCorr,
|
||||
const SpType& Sp,
|
||||
const SuType& Su,
|
||||
const scalar psiMax,
|
||||
const scalar psiMin
|
||||
const PsiMaxType& psiMax,
|
||||
const PsiMinType& psiMin
|
||||
)
|
||||
{
|
||||
const scalarField& psiIf = psi;
|
||||
@ -202,6 +226,20 @@ void Foam::MULES::limiter
|
||||
MULEScontrols.lookupOrDefault<scalar>("extremaCoeff", 0)
|
||||
);
|
||||
|
||||
const scalar boundaryExtremaCoeff
|
||||
(
|
||||
MULEScontrols.lookupOrDefault<scalar>
|
||||
(
|
||||
"boundaryExtremaCoeff",
|
||||
extremaCoeff
|
||||
)
|
||||
);
|
||||
|
||||
const scalar boundaryDeltaExtremaCoeff
|
||||
(
|
||||
max(boundaryExtremaCoeff - extremaCoeff, 0)
|
||||
);
|
||||
|
||||
const scalarField& psi0 = psi.oldTime();
|
||||
|
||||
const labelUList& owner = mesh.owner();
|
||||
@ -237,8 +275,11 @@ void Foam::MULES::limiter
|
||||
scalarField& lambdaIf = lambda;
|
||||
surfaceScalarField::Boundary& lambdaBf = lambda.boundaryFieldRef();
|
||||
|
||||
scalarField psiMaxn(psiIf.size(), psiMin);
|
||||
scalarField psiMinn(psiIf.size(), psiMax);
|
||||
scalarField psiMaxn(psiIf.size());
|
||||
scalarField psiMinn(psiIf.size());
|
||||
|
||||
psiMaxn = psiMin;
|
||||
psiMinn = psiMax;
|
||||
|
||||
scalarField sumPhiBD(psiIf.size(), Zero);
|
||||
|
||||
@ -305,12 +346,20 @@ void Foam::MULES::limiter
|
||||
}
|
||||
else
|
||||
{
|
||||
forAll(phiCorrPf, pFacei)
|
||||
// Add the optional additional allowed boundary extrema
|
||||
if (boundaryDeltaExtremaCoeff > 0)
|
||||
{
|
||||
const label pfCelli = pFaceCells[pFacei];
|
||||
forAll(phiCorrPf, pFacei)
|
||||
{
|
||||
const label pfCelli = pFaceCells[pFacei];
|
||||
|
||||
psiMaxn[pfCelli] = max(psiMaxn[pfCelli], psiMax);
|
||||
psiMinn[pfCelli] = min(psiMinn[pfCelli], psiMin);
|
||||
const scalar extrema =
|
||||
boundaryDeltaExtremaCoeff
|
||||
*(psiMax[pfCelli] - psiMin[pfCelli]);
|
||||
|
||||
psiMaxn[pfCelli] += extrema;
|
||||
psiMinn[pfCelli] -= extrema;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -518,7 +567,15 @@ void Foam::MULES::limiter
|
||||
}
|
||||
|
||||
|
||||
template<class RdeltaTType, class RhoType, class SpType, class SuType>
|
||||
template
|
||||
<
|
||||
class RdeltaTType,
|
||||
class RhoType,
|
||||
class SpType,
|
||||
class SuType,
|
||||
class PsiMaxType,
|
||||
class PsiMinType
|
||||
>
|
||||
void Foam::MULES::limit
|
||||
(
|
||||
const RdeltaTType& rDeltaT,
|
||||
@ -528,8 +585,8 @@ void Foam::MULES::limit
|
||||
surfaceScalarField& phiPsi,
|
||||
const SpType& Sp,
|
||||
const SuType& Su,
|
||||
const scalar psiMax,
|
||||
const scalar psiMin,
|
||||
const PsiMaxType& psiMax,
|
||||
const PsiMinType& psiMin,
|
||||
const bool returnCorr
|
||||
)
|
||||
{
|
||||
@ -597,6 +654,42 @@ void Foam::MULES::limit
|
||||
}
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
class RhoType,
|
||||
class SpType,
|
||||
class SuType,
|
||||
class PsiMaxType,
|
||||
class PsiMinType
|
||||
>
|
||||
void Foam::MULES::limit
|
||||
(
|
||||
const RhoType& rho,
|
||||
const volScalarField& psi,
|
||||
const surfaceScalarField& phi,
|
||||
surfaceScalarField& phiPsi,
|
||||
const SpType& Sp,
|
||||
const SuType& Su,
|
||||
const PsiMaxType& psiMax,
|
||||
const PsiMinType& psiMin,
|
||||
const bool rtnCorr
|
||||
)
|
||||
{
|
||||
const fvMesh& mesh = psi.mesh();
|
||||
|
||||
if (fv::localEulerDdt::enabled(mesh))
|
||||
{
|
||||
const volScalarField& rDeltaT = fv::localEulerDdt::localRDeltaT(mesh);
|
||||
limit(rDeltaT, rho, psi, phi, phiPsi, Sp, Su, psiMax, psiMin, rtnCorr);
|
||||
}
|
||||
else
|
||||
{
|
||||
const scalar rDeltaT = 1.0/mesh.time().deltaTValue();
|
||||
limit(rDeltaT, rho, psi, phi, phiPsi, Sp, Su, psiMax, psiMin, rtnCorr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class SurfaceScalarFieldList>
|
||||
void Foam::MULES::limitSum(SurfaceScalarFieldList& phiPsiCorrs)
|
||||
{
|
||||
@ -633,4 +726,57 @@ void Foam::MULES::limitSum(SurfaceScalarFieldList& phiPsiCorrs)
|
||||
}
|
||||
|
||||
|
||||
template<class SurfaceScalarFieldList>
|
||||
void Foam::MULES::limitSum
|
||||
(
|
||||
const SurfaceScalarFieldList& alphas,
|
||||
SurfaceScalarFieldList& phiPsiCorrs,
|
||||
const labelHashSet& fixed
|
||||
)
|
||||
{
|
||||
{
|
||||
UPtrList<const scalarField> alphasInternal(alphas.size());
|
||||
forAll(alphas, phasei)
|
||||
{
|
||||
alphasInternal.set(phasei, &alphas[phasei]);
|
||||
}
|
||||
UPtrList<scalarField> phiPsiCorrsInternal(phiPsiCorrs.size());
|
||||
forAll(phiPsiCorrs, phasei)
|
||||
{
|
||||
phiPsiCorrsInternal.set(phasei, &phiPsiCorrs[phasei]);
|
||||
}
|
||||
|
||||
limitSum(alphasInternal, phiPsiCorrsInternal, fixed);
|
||||
}
|
||||
|
||||
const surfaceScalarField::Boundary& bfld =
|
||||
phiPsiCorrs[0].boundaryField();
|
||||
|
||||
forAll(bfld, patchi)
|
||||
{
|
||||
if (bfld[patchi].coupled())
|
||||
{
|
||||
UPtrList<const scalarField> alphasPatch(alphas.size());
|
||||
forAll(alphas, phasei)
|
||||
{
|
||||
alphasPatch.set
|
||||
(
|
||||
phasei,
|
||||
&alphas[phasei].boundaryField()[patchi]
|
||||
);
|
||||
}
|
||||
UPtrList<scalarField> phiPsiCorrsPatch(phiPsiCorrs.size());
|
||||
forAll(phiPsiCorrs, phasei)
|
||||
{
|
||||
phiPsiCorrsPatch.set
|
||||
(
|
||||
phasei,
|
||||
&phiPsiCorrs[phasei].boundaryFieldRef()[patchi]
|
||||
);
|
||||
}
|
||||
|
||||
limitSum(alphasPatch, phiPsiCorrsPatch, fixed);
|
||||
}
|
||||
}
|
||||
}
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -303,7 +303,15 @@ bool Foam::functionObjects::scalarTransport::execute()
|
||||
|
||||
if (bounded01_)
|
||||
{
|
||||
MULES::explicitSolve(s, phi, tTPhiUD.ref(), 1, 0);
|
||||
MULES::explicitSolve
|
||||
(
|
||||
geometricOneField(),
|
||||
s,
|
||||
phi,
|
||||
tTPhiUD.ref(),
|
||||
oneField(),
|
||||
zeroField()
|
||||
);
|
||||
}
|
||||
}
|
||||
else if (phi.dimensions() == dimMass/dimTime)
|
||||
|
||||
15
src/phaseSystemModels/Allwclean
Executable file
15
src/phaseSystemModels/Allwclean
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
wclean libso reactingEulerFoam/phaseSystems
|
||||
wclean libso reactingEulerFoam/interfacialModels
|
||||
wclean libso reactingEulerFoam/interfacialCompositionModels
|
||||
wclean libso reactingEulerFoam/derivedFvPatchFields
|
||||
|
||||
wclean libso reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem
|
||||
wclean libso reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseCompressibleTurbulenceModels
|
||||
|
||||
wclean libso reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem
|
||||
wclean libso reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
23
src/phaseSystemModels/Allwmake
Executable file
23
src/phaseSystemModels/Allwmake
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Parse arguments for library compilation
|
||||
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
|
||||
|
||||
wmakeLnInclude reactingEulerFoam/interfacialCompositionModels
|
||||
wmakeLnInclude reactingEulerFoam/interfacialModels
|
||||
wmakeLnInclude reactingEulerFoam/derivedFvPatchFields
|
||||
|
||||
wmake $targetType reactingEulerFoam/phaseSystems
|
||||
wmake $targetType reactingEulerFoam/interfacialModels
|
||||
wmake $targetType reactingEulerFoam/interfacialCompositionModels
|
||||
wmake $targetType reactingEulerFoam/derivedFvPatchFields
|
||||
|
||||
wmake $targetType reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem
|
||||
wmake $targetType reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseCompressibleTurbulenceModels
|
||||
|
||||
wmake $targetType reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem
|
||||
wmake $targetType reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -0,0 +1,52 @@
|
||||
wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.C
|
||||
wallBoilingSubModels/partitioningModels/partitioningModel/newPartitioningModel.C
|
||||
wallBoilingSubModels/partitioningModels/phaseFraction/phaseFraction.C
|
||||
wallBoilingSubModels/partitioningModels/Lavieville/Lavieville.C
|
||||
wallBoilingSubModels/partitioningModels/cosine/cosine.C
|
||||
wallBoilingSubModels/partitioningModels/linear/linear.C
|
||||
|
||||
wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.C
|
||||
wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/newNucleationSiteModel.C
|
||||
wallBoilingSubModels/nucleationSiteModels/LemmertChawla/LemmertChawla.C
|
||||
|
||||
wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.C
|
||||
wallBoilingSubModels/departureDiameterModels/departureDiameterModel/newDepartureDiameterModel.C
|
||||
wallBoilingSubModels/departureDiameterModels/TolubinskiKostanchuk/TolubinskiKostanchuk.C
|
||||
wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshii/KocamustafaogullariIshii.C
|
||||
|
||||
wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.C
|
||||
wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/newDepartureFrequencyModel.C
|
||||
wallBoilingSubModels/departureFrequencyModels/Cole/Cole.C
|
||||
|
||||
wallBoilingSubModels/CHFModels/CHFModel/CHFModel.C
|
||||
wallBoilingSubModels/CHFModels/CHFModel/newCHFModel.C
|
||||
wallBoilingSubModels/CHFModels/Zuber/Zuber.C
|
||||
|
||||
wallBoilingSubModels/CHFSubCoolModels/CHFSubCoolModel/CHFSubCoolModel.C
|
||||
wallBoilingSubModels/CHFSubCoolModels/CHFSubCoolModel/newCHFSubCoolModel.C
|
||||
wallBoilingSubModels/CHFSubCoolModels/HuaXu/HuaXu.C
|
||||
|
||||
wallBoilingSubModels/filmBoilingModels/filmBoilingModel/filmBoilingModel.C
|
||||
wallBoilingSubModels/filmBoilingModels/filmBoilingModel/newfilmBoilingModel.C
|
||||
wallBoilingSubModels/filmBoilingModels/Bromley/Bromley.C
|
||||
|
||||
wallBoilingSubModels/LeidenfrostModels/LeidenfrostModel/LeidenfrostModel.C
|
||||
wallBoilingSubModels/LeidenfrostModels/LeidenfrostModel/newLeidenfrostModel.C
|
||||
wallBoilingSubModels/LeidenfrostModels/Spiegler/Spiegler.C
|
||||
|
||||
wallBoilingSubModels/MHFModels/MHFModel/MHFModel.C
|
||||
wallBoilingSubModels/MHFModels/MHFModel/newMHFModel.C
|
||||
wallBoilingSubModels/MHFModels/Jeschar/Jeschar.C
|
||||
|
||||
wallBoilingSubModels/TDNBModels/TDNBModel/TDNBModel.C
|
||||
wallBoilingSubModels/TDNBModels/TDNBModel/newTDNBModel.C
|
||||
wallBoilingSubModels/TDNBModels/Schroeder/Schroeder.C
|
||||
|
||||
alphatPhaseChangeWallFunction/alphatPhaseChangeWallFunctionFvPatchScalarField.C
|
||||
alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C
|
||||
alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C
|
||||
alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C
|
||||
copiedFixedValue/copiedFixedValueFvPatchScalarField.C
|
||||
fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libreactingEulerianFvPatchFields
|
||||
@ -0,0 +1,20 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I../phaseSystems/lnInclude \
|
||||
-I../interfacialModels/lnInclude\
|
||||
-I../interfacialCompositionModels/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/incompressible/transportModel \
|
||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude
|
||||
|
||||
LIB_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lmeshTools \
|
||||
-lreactingPhaseSystem \
|
||||
-lreactingEulerianInterfacialModels \
|
||||
-lreactingEulerianInterfacialCompositionModels
|
||||
@ -0,0 +1,219 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2015-2019 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace compressible
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::
|
||||
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(p, iF),
|
||||
vaporPhaseName_("vapor"),
|
||||
relax_(1.0),
|
||||
fixedDmdt_(0.0),
|
||||
L_(0.0)
|
||||
{
|
||||
checkType();
|
||||
}
|
||||
|
||||
|
||||
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::
|
||||
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(p, iF, dict),
|
||||
vaporPhaseName_(dict.lookup("vaporPhase")),
|
||||
relax_(dict.lookupOrDefault<scalar>("relax", 1.0)),
|
||||
fixedDmdt_(dict.lookupOrDefault<scalar>("fixedDmdt", 0.0)),
|
||||
L_(dict.lookupOrDefault<scalar>("L", 0.0))
|
||||
{}
|
||||
|
||||
|
||||
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::
|
||||
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
|
||||
(
|
||||
const alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField& psf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
|
||||
(
|
||||
psf,
|
||||
p,
|
||||
iF,
|
||||
mapper
|
||||
),
|
||||
fixedDmdt_(psf.fixedDmdt_),
|
||||
L_(psf.L_)
|
||||
{}
|
||||
|
||||
|
||||
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::
|
||||
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
|
||||
(
|
||||
const alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField& psf
|
||||
)
|
||||
:
|
||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(psf),
|
||||
relax_(psf.relax_),
|
||||
fixedDmdt_(psf.fixedDmdt_),
|
||||
L_(psf.L_)
|
||||
{}
|
||||
|
||||
|
||||
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::
|
||||
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
|
||||
(
|
||||
const alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField& psf,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(psf, iF),
|
||||
relax_(psf.relax_),
|
||||
fixedDmdt_(psf.fixedDmdt_),
|
||||
L_(psf.L_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::
|
||||
activePhasePair(const phasePairKey& phasePair) const
|
||||
{
|
||||
if (phasePair == phasePairKey(vaporPhaseName_, internalField().group()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const scalarField& alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::
|
||||
dmdt(const phasePairKey& phasePair) const
|
||||
{
|
||||
if (activePhasePair(phasePair))
|
||||
{
|
||||
return dmdt_;
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< " dmdt requested for invalid phasePair!"
|
||||
<< abort(FatalError);
|
||||
|
||||
return mDotL_;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const scalarField& alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::
|
||||
mDotL(const phasePairKey& phasePair) const
|
||||
{
|
||||
if (activePhasePair(phasePair))
|
||||
{
|
||||
return mDotL_;
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< " mDotL requested for invalid phasePair!"
|
||||
<< abort(FatalError);
|
||||
|
||||
return mDotL_;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
if (updated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
dmdt_ = (1 - relax_)*dmdt_ + relax_*fixedDmdt_;
|
||||
mDotL_ = dmdt_*L_;
|
||||
|
||||
operator==(calcAlphat(*this));
|
||||
|
||||
fixedValueFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
void alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::write
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
os.writeEntry("vaporPhase", vaporPhaseName_);
|
||||
os.writeEntry("relax", relax_);
|
||||
os.writeEntry("fixedDmdt", fixedDmdt_);
|
||||
os.writeEntry("L", L_);
|
||||
dmdt_.writeEntry("dmdt", os);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makePatchTypeField
|
||||
(
|
||||
fvPatchScalarField,
|
||||
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace compressible
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,187 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2015-2018 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::compressible::
|
||||
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
|
||||
|
||||
Description
|
||||
A simple alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField with
|
||||
a fixed volumetric phase-change mass flux.
|
||||
|
||||
See also
|
||||
Foam::compressible::
|
||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
|
||||
|
||||
SourceFiles
|
||||
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField_H
|
||||
#define alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField_H
|
||||
|
||||
#include "alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace compressible
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
|
||||
:
|
||||
public alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- name on the phase
|
||||
word vaporPhaseName_;
|
||||
|
||||
//- dmdt relaxationFactor
|
||||
scalar relax_;
|
||||
|
||||
//- Volumetric phase-change mass flux in near wall cells
|
||||
scalar fixedDmdt_;
|
||||
|
||||
//- Latent heat
|
||||
scalar L_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("compressible::alphatFixedDmdtWallBoilingWallFunction");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping given
|
||||
// alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
|
||||
// onto a new patch
|
||||
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
|
||||
(
|
||||
const alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
|
||||
(
|
||||
const alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<fvPatchScalarField> clone() const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
|
||||
(
|
||||
*this
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
|
||||
(
|
||||
const alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<fvPatchScalarField> clone
|
||||
(
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
|
||||
(
|
||||
*this,
|
||||
iF
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Is there phase change mass transfer for this phasePair
|
||||
virtual bool activePhasePair(const phasePairKey&) const;
|
||||
|
||||
//- Return the rate of phase-change for specific phase pair
|
||||
virtual const scalarField& dmdt(const phasePairKey&) const;
|
||||
|
||||
//- Return the rate of phase-change for specific phase pair
|
||||
virtual const scalarField& mDotL(const phasePairKey&) const;
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace compressible
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,351 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2015-2019 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
#include "phaseSystem.H"
|
||||
#include "compressibleTurbulenceModel.H"
|
||||
#include "ThermalDiffusivity.H"
|
||||
#include "PhaseCompressibleTurbulenceModel.H"
|
||||
#include "wallFvPatch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace compressible
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
scalar alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::maxExp_
|
||||
= 50.0;
|
||||
scalar alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::tolerance_
|
||||
= 0.01;
|
||||
label alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::maxIters_
|
||||
= 10;
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
void alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::checkType()
|
||||
{
|
||||
if (!isA<wallFvPatch>(patch()))
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Patch type for patch " << patch().name() << " must be wall\n"
|
||||
<< "Current patch type is " << patch().type() << nl
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tmp<scalarField>
|
||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::Psmooth
|
||||
(
|
||||
const scalarField& Prat
|
||||
) const
|
||||
{
|
||||
return 9.24*(pow(Prat, 0.75) - 1)*(1 + 0.28*exp(-0.007*Prat));
|
||||
}
|
||||
|
||||
|
||||
tmp<scalarField>
|
||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::yPlusTherm
|
||||
(
|
||||
const scalarField& P,
|
||||
const scalarField& Prat
|
||||
) const
|
||||
{
|
||||
tmp<scalarField> typsf(new scalarField(this->size()));
|
||||
scalarField& ypsf = typsf.ref();
|
||||
|
||||
forAll(ypsf, facei)
|
||||
{
|
||||
scalar ypt = 11.0;
|
||||
|
||||
for (int i=0; i<maxIters_; i++)
|
||||
{
|
||||
scalar f = ypt - (log(E_*ypt)/kappa_ + P[facei])/Prat[facei];
|
||||
scalar df = 1 - 1.0/(ypt*kappa_*Prat[facei]);
|
||||
scalar yptNew = ypt - f/df;
|
||||
|
||||
if (yptNew < VSMALL)
|
||||
{
|
||||
ypsf[facei] = 0;
|
||||
}
|
||||
else if (mag(yptNew - ypt) < tolerance_)
|
||||
{
|
||||
ypsf[facei] = yptNew;
|
||||
}
|
||||
else
|
||||
{
|
||||
ypt = yptNew;
|
||||
}
|
||||
}
|
||||
|
||||
ypsf[facei] = ypt;
|
||||
}
|
||||
|
||||
return typsf;
|
||||
}
|
||||
|
||||
tmp<scalarField>
|
||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::calcAlphat
|
||||
(
|
||||
const scalarField& prevAlphat
|
||||
) const
|
||||
{
|
||||
|
||||
// Lookup the fluid model
|
||||
const phaseSystem& fluid =
|
||||
db().lookupObject<phaseSystem>("phaseProperties");
|
||||
|
||||
const phaseModel& phase
|
||||
(
|
||||
fluid.phases()[internalField().group()]
|
||||
);
|
||||
|
||||
const label patchi = patch().index();
|
||||
|
||||
// Retrieve turbulence properties from model
|
||||
const phaseCompressibleTurbulenceModel& turbModel =
|
||||
db().lookupObject<phaseCompressibleTurbulenceModel>
|
||||
(
|
||||
IOobject::groupName(turbulenceModel::propertiesName, phase.name())
|
||||
);
|
||||
|
||||
const scalar Cmu25 = pow025(Cmu_);
|
||||
|
||||
const scalarField& y = turbModel.y()[patchi];
|
||||
|
||||
const tmp<scalarField> tmuw = turbModel.mu(patchi);
|
||||
const scalarField& muw = tmuw();
|
||||
|
||||
const tmp<scalarField> talphaw = phase.thermo().alpha(patchi);
|
||||
const scalarField& alphaw = talphaw();
|
||||
|
||||
const tmp<volScalarField> tk = turbModel.k();
|
||||
const volScalarField& k = tk();
|
||||
const fvPatchScalarField& kw = k.boundaryField()[patchi];
|
||||
|
||||
const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi];
|
||||
const scalarField magUp(mag(Uw.patchInternalField() - Uw));
|
||||
const scalarField magGradUw(mag(Uw.snGrad()));
|
||||
|
||||
const fvPatchScalarField& rhow = turbModel.rho().boundaryField()[patchi];
|
||||
const fvPatchScalarField& hew =
|
||||
phase.thermo().he().boundaryField()[patchi];
|
||||
|
||||
const fvPatchScalarField& Tw =
|
||||
phase.thermo().T().boundaryField()[patchi];
|
||||
|
||||
scalarField Tp(Tw.patchInternalField());
|
||||
|
||||
// Heat flux [W/m2] - lagging alphatw
|
||||
const scalarField qDot
|
||||
(
|
||||
(prevAlphat + alphaw)*hew.snGrad()
|
||||
);
|
||||
|
||||
scalarField uTau(Cmu25*sqrt(kw));
|
||||
|
||||
scalarField yPlus(uTau*y/(muw/rhow));
|
||||
|
||||
scalarField Pr(muw/alphaw);
|
||||
|
||||
// Molecular-to-turbulent Prandtl number ratio
|
||||
scalarField Prat(Pr/Prt_);
|
||||
|
||||
// Thermal sublayer thickness
|
||||
scalarField P(this->Psmooth(Prat));
|
||||
|
||||
scalarField yPlusTherm(this->yPlusTherm(P, Prat));
|
||||
|
||||
tmp<scalarField> talphatConv(new scalarField(this->size()));
|
||||
scalarField& alphatConv = talphatConv.ref();
|
||||
|
||||
// Populate boundary values
|
||||
forAll(alphatConv, facei)
|
||||
{
|
||||
// Evaluate new effective thermal diffusivity
|
||||
scalar alphaEff = 0.0;
|
||||
if (yPlus[facei] < yPlusTherm[facei])
|
||||
{
|
||||
scalar A = qDot[facei]*rhow[facei]*uTau[facei]*y[facei];
|
||||
scalar B = qDot[facei]*Pr[facei]*yPlus[facei];
|
||||
scalar C = Pr[facei]*0.5*rhow[facei]*uTau[facei]*sqr(magUp[facei]);
|
||||
alphaEff = A/(B + C + VSMALL);
|
||||
}
|
||||
else
|
||||
{
|
||||
scalar A = qDot[facei]*rhow[facei]*uTau[facei]*y[facei];
|
||||
scalar B =
|
||||
qDot[facei]*Prt_*(1.0/kappa_*log(E_*yPlus[facei]) + P[facei]);
|
||||
scalar magUc =
|
||||
uTau[facei]/kappa_*log(E_*yPlusTherm[facei]) - mag(Uw[facei]);
|
||||
scalar C =
|
||||
0.5*rhow[facei]*uTau[facei]
|
||||
*(Prt_*sqr(magUp[facei]) + (Pr[facei] - Prt_)*sqr(magUc));
|
||||
alphaEff = A/(B + C + VSMALL);
|
||||
}
|
||||
|
||||
// Update convective heat transfer turbulent thermal diffusivity
|
||||
alphatConv[facei] = max(0.0, alphaEff - alphaw[facei]);
|
||||
}
|
||||
|
||||
return talphatConv;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::
|
||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
alphatPhaseChangeWallFunctionFvPatchScalarField(p, iF),
|
||||
Prt_(0.85),
|
||||
Cmu_(0.09),
|
||||
kappa_(0.41),
|
||||
E_(9.8)
|
||||
{
|
||||
checkType();
|
||||
}
|
||||
|
||||
|
||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::
|
||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
alphatPhaseChangeWallFunctionFvPatchScalarField(p, iF, dict),
|
||||
Prt_(dict.lookupOrDefault<scalar>("Prt", 0.85)),
|
||||
Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)),
|
||||
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
|
||||
E_(dict.lookupOrDefault<scalar>("E", 9.8))
|
||||
{}
|
||||
|
||||
|
||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::
|
||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
|
||||
(
|
||||
const alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
alphatPhaseChangeWallFunctionFvPatchScalarField(ptf, p, iF, mapper),
|
||||
Prt_(ptf.Prt_),
|
||||
Cmu_(ptf.Cmu_),
|
||||
kappa_(ptf.kappa_),
|
||||
E_(ptf.E_)
|
||||
{}
|
||||
|
||||
|
||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::
|
||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
|
||||
(
|
||||
const alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField& awfpsf
|
||||
)
|
||||
:
|
||||
alphatPhaseChangeWallFunctionFvPatchScalarField(awfpsf),
|
||||
Prt_(awfpsf.Prt_),
|
||||
Cmu_(awfpsf.Cmu_),
|
||||
kappa_(awfpsf.kappa_),
|
||||
E_(awfpsf.E_)
|
||||
{}
|
||||
|
||||
|
||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::
|
||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
|
||||
(
|
||||
const alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField& awfpsf,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
alphatPhaseChangeWallFunctionFvPatchScalarField(awfpsf, iF),
|
||||
Prt_(awfpsf.Prt_),
|
||||
Cmu_(awfpsf.Cmu_),
|
||||
kappa_(awfpsf.kappa_),
|
||||
E_(awfpsf.E_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
if (updated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
operator==(calcAlphat(*this));
|
||||
|
||||
fixedValueFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
void alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::write
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
os.writeEntry("Prt", Prt_);
|
||||
os.writeEntry("Cmu", Cmu_);
|
||||
os.writeEntry("kappa", kappa_);
|
||||
os.writeEntry("E", E_);
|
||||
dmdt_.writeEntry("dmdt", os);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makePatchTypeField
|
||||
(
|
||||
fvPatchScalarField,
|
||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace compressible
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,230 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2015-2018 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::compressible::
|
||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
|
||||
|
||||
Description
|
||||
This boundary condition provides a thermal wall function for turbulent
|
||||
thermal diffusivity (usually\c alphat) based on the Jayatilleke model for
|
||||
the Eulerian multiphase solvers.
|
||||
|
||||
Usage
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
Prt | Turbulent Prandtl number | no | 0.85
|
||||
Cmu | Model coefficient | no | 0.09
|
||||
kappa | von Karman constant | no | 0.41
|
||||
E | Model coefficient | no | 9.8
|
||||
\endtable
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
<patchName>
|
||||
{
|
||||
type alphatPhaseChangeJayatillekeWallFunction;
|
||||
Prt 0.85;
|
||||
kappa 0.41;
|
||||
E 9.8;
|
||||
value uniform 0; // optional value entry
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
See also
|
||||
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField
|
||||
|
||||
SourceFiles
|
||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef compressible_alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField_H
|
||||
#define compressible_alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField_H
|
||||
|
||||
#include "alphatPhaseChangeWallFunctionFvPatchScalarField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace compressible
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
|
||||
:
|
||||
public alphatPhaseChangeWallFunctionFvPatchScalarField
|
||||
{
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Turbulent Prandtl number
|
||||
scalar Prt_;
|
||||
|
||||
//- Cmu coefficient
|
||||
scalar Cmu_;
|
||||
|
||||
//- Von Karman constant
|
||||
scalar kappa_;
|
||||
|
||||
//- E coefficient
|
||||
scalar E_;
|
||||
|
||||
// Solution parameters
|
||||
|
||||
static scalar maxExp_;
|
||||
static scalar tolerance_;
|
||||
static label maxIters_;
|
||||
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
//- Check the type of the patch
|
||||
void checkType();
|
||||
|
||||
//- 'P' function
|
||||
tmp<scalarField> Psmooth(const scalarField& Prat) const;
|
||||
|
||||
//- Calculate y+ at the edge of the thermal laminar sublayer
|
||||
tmp<scalarField> yPlusTherm
|
||||
(
|
||||
const scalarField& P,
|
||||
const scalarField& Prat
|
||||
) const;
|
||||
|
||||
//- Update turbulent thermal diffusivity
|
||||
tmp<scalarField> calcAlphat
|
||||
(
|
||||
const scalarField& prevAlphat
|
||||
) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("compressible::alphatPhaseChangeJayatillekeWallFunction");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping given
|
||||
// alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
|
||||
// onto a new patch
|
||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
|
||||
(
|
||||
const alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
|
||||
(
|
||||
const alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<fvPatchScalarField> clone() const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
|
||||
(
|
||||
*this
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
|
||||
(
|
||||
const alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<fvPatchScalarField> clone
|
||||
(
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
|
||||
(
|
||||
*this,
|
||||
iF
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace compressible
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2015-2016 OpenFOAM Foundation
|
||||
| Copyright (C) 2015-2018 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -39,7 +39,7 @@ namespace compressible
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(alphatPhaseChangeWallFunctionFvPatchScalarField,0);
|
||||
defineTypeNameAndDebug(alphatPhaseChangeWallFunctionFvPatchScalarField, 0);
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -122,7 +122,8 @@ alphatPhaseChangeWallFunctionFvPatchScalarField
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void alphatPhaseChangeWallFunctionFvPatchScalarField::write(Ostream& os) const
|
||||
void alphatPhaseChangeWallFunctionFvPatchScalarField::
|
||||
write(Ostream& os) const
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
dmdt_.writeEntry("dmdt", os);
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2015-2016 OpenFOAM Foundation
|
||||
| Copyright (C) 2015-2018 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -26,9 +26,6 @@ License
|
||||
Class
|
||||
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField
|
||||
|
||||
Group
|
||||
grpCmpWallFunctions
|
||||
|
||||
Description
|
||||
Abstract base-class for all alphatWallFunctions supporting phase-change.
|
||||
|
||||
@ -41,10 +38,11 @@ SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef compressible_alphatPhaseChangeWallFunctionFvPatchScalarField_H
|
||||
#define compressible_alphatPhaseChangeWallFunctionFvPatchScalarField_H
|
||||
#ifndef alphatPhaseChangeWallFunctionFvPatchScalarField_H
|
||||
#define alphatPhaseChangeWallFunctionFvPatchScalarField_H
|
||||
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
#include "phasePairKey.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -123,13 +121,43 @@ public:
|
||||
// Member functions
|
||||
|
||||
//- Return the rate of phase-change
|
||||
const scalarField& dmdt() const
|
||||
virtual const scalarField& dmdt() const
|
||||
{
|
||||
return dmdt_;
|
||||
}
|
||||
|
||||
//- Return the enthalpy source due to phase-change
|
||||
const scalarField& mDotL() const
|
||||
virtual const scalarField& mDotL() const
|
||||
{
|
||||
return mDotL_;
|
||||
}
|
||||
|
||||
//- Is there phase change mass transfer for this phasePair
|
||||
virtual bool activePhasePair(const phasePairKey&) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//- Return the rate of phase-change for specific phase pair
|
||||
virtual const scalarField& dmdt(const phasePairKey&) const
|
||||
{
|
||||
return dmdt_;
|
||||
}
|
||||
|
||||
//- Return the rate of phase-change for specific phase pair
|
||||
virtual const scalarField& mDotL(const phasePairKey&) const
|
||||
{
|
||||
return mDotL_;
|
||||
}
|
||||
|
||||
//- Return the rate of phase-change for specific phase
|
||||
virtual scalarField dmdt(const word&) const
|
||||
{
|
||||
return dmdt_;
|
||||
}
|
||||
|
||||
//- Return the enthalpy source due to phase-change for specific phase
|
||||
virtual scalarField mDotL(const word&) const
|
||||
{
|
||||
return mDotL_;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,476 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2015-2018 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::compressible::alphatWallBoilingWallFunctionFvPatchScalarField
|
||||
|
||||
Description
|
||||
A thermal wall function for simulation of boiling wall.
|
||||
|
||||
This alpha wall function can handle the following regimes:
|
||||
single phase
|
||||
subcooled nucleate wall boiling
|
||||
transitional boiling
|
||||
film boiling.
|
||||
|
||||
The wall function uses a partition method to transfer heat either
|
||||
to the liquid or vapor phase. At the moment, this function works
|
||||
in a wall temperature fixed mode. i.e, there is no consideration
|
||||
for the sudden change of heat transfer coefficient (htc) after
|
||||
reaching TDBN (deviation from nucleate boiling temperature).
|
||||
|
||||
References:
|
||||
\verbatim
|
||||
Numerical simulation of immersion quenching process of an engine cylinder head
|
||||
Vedanth Srinivasan, Kil-Min Moon, David Greif, De Ming Wang, Myung-hwan Kim
|
||||
Applied Mathematical Modelling 34 (2010) 2111-2128
|
||||
\endverbatim
|
||||
|
||||
|
||||
For the single phase non-boiling regime the standard
|
||||
JayatillekeWallFunction is used.
|
||||
|
||||
For the sub-cool nucleate boiling regime the following runtime
|
||||
selectable submodels are used:
|
||||
- nucleation site density
|
||||
- bubble departure frequency
|
||||
- bubble departure diameter
|
||||
|
||||
Implements a version of the well-known RPI wall boiling model
|
||||
(Kurul & Podowski, 1991). The model implementation is similar to the model
|
||||
described by Peltola & Pättikangas (2012) but has been extended with the
|
||||
wall heat flux partitioning models.
|
||||
|
||||
References:
|
||||
\verbatim
|
||||
"On the modeling of multidimensional effects in boiling channels"
|
||||
Kurul, N., Podowski, M.Z.,
|
||||
ANS Proceedings, National Heat Transfer Conference,
|
||||
Minneapolis, Minnesota, USA, July 28-31, 1991,
|
||||
ISBN: 0-89448-162-1, pp. 30-40
|
||||
\endverbatim
|
||||
|
||||
\verbatim
|
||||
"Development and validation of a boiling model for OpenFOAM
|
||||
multiphase solver"
|
||||
Peltola, J., Pättikangas, T.J.H.,
|
||||
CFD4NRS-4 Conference Proceedings, paper 59,
|
||||
Daejeon, Korea, September 10-12 2012
|
||||
\endverbatim
|
||||
|
||||
|
||||
The transition boiling regime flux (TBF) is modelled following
|
||||
a temperature based linear interpolation between the critical heat flux
|
||||
(CHF) and the minimum heat flux (MHF) in such a way that when the wall
|
||||
temperature is between the range of TDBN and the Leidenfrost temperature
|
||||
(TLeiden) a linear interpolation is used between CHF and MHF.
|
||||
|
||||
Thus, the following models are required:
|
||||
LeidenfrostModel
|
||||
CHFModel
|
||||
CHFSubCoolModel
|
||||
MHFModel
|
||||
TDNBModel
|
||||
filmBoilingModel
|
||||
|
||||
The linear interpolation is as follows:
|
||||
|
||||
TBF = CHF*phi + (1 - phi)*MHF
|
||||
|
||||
where phi:
|
||||
|
||||
phi = wp*(Tw - TDNB)/(TLeiden - TDNB),
|
||||
|
||||
where:
|
||||
wp model constant
|
||||
Tw wall temperature
|
||||
|
||||
|
||||
The film boiling regime is applied when Tw is larger than TLeiden. In
|
||||
this regime the corrlation from the filmBoilingModel is used for
|
||||
calculating the cht from the wall.
|
||||
|
||||
The filmBoilingModel is needed in the vapor field in order to calculate
|
||||
the heat transfer to the vapor phase in film boiling regime.
|
||||
|
||||
|
||||
Usage
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
phaseType | 'vapor' or 'liquid' | yes |
|
||||
relax |wall boiling model relaxation| yes |
|
||||
Prt | inherited from alphatPhaseChangeJayatillekeWallFunction
|
||||
Cmu | inherited from alphatPhaseChangeJayatillekeWallFunction
|
||||
kappa | inherited from alphatPhaseChangeJayatillekeWallFunction
|
||||
E | inherited from alphatPhaseChangeJayatillekeWallFunction
|
||||
dmdt | phase change mass flux | no |
|
||||
value | initial alphat value | yes |
|
||||
|
||||
if phaseType 'vapor':
|
||||
|
||||
partitioningModel| | yes |
|
||||
filmBoilingModel | | yes |
|
||||
LeidenfrostModel | | yes |
|
||||
|
||||
if phaseType 'liquid':
|
||||
|
||||
partitioningModel| | yes |
|
||||
nucleationSiteModel| | yes |
|
||||
departureDiamModel| | yes |
|
||||
departureFreqModel| | yes |
|
||||
K | bubbles area constant| no | 4
|
||||
|
||||
LeidenfrostModel | | no |
|
||||
CHFModel | | no |
|
||||
CHFSubCoolModel | | no |
|
||||
MHFModel | | no |
|
||||
TDNBModel | | no |
|
||||
filmBoilingModel | | no |
|
||||
wp | | no | 1
|
||||
\endtable
|
||||
|
||||
NOTE: Runtime selectabale submodels may require model specific entries
|
||||
|
||||
Example usage:
|
||||
\verbatim
|
||||
hotWall
|
||||
{
|
||||
type compressible::alphatWallBoilingWallFunction;
|
||||
phaseType liquid;
|
||||
Prt 0.85;
|
||||
Cmu 0.09;
|
||||
kappa 0.41;
|
||||
E 9.8;
|
||||
relax 0.1;
|
||||
dmdt uniform 0;
|
||||
partitioningModel
|
||||
{
|
||||
type Lavieville;
|
||||
alphaCrit 0.2;
|
||||
}
|
||||
nucleationSiteModel
|
||||
{
|
||||
type LemmertChawla;
|
||||
}
|
||||
departureDiamModel
|
||||
{
|
||||
type TolubinskiKostanchuk;
|
||||
}
|
||||
departureFreqModel
|
||||
{
|
||||
type Cole;
|
||||
}
|
||||
|
||||
LeidenfrostModel
|
||||
{
|
||||
type Spiegler;
|
||||
Tcrit 647;
|
||||
}
|
||||
CHFModel
|
||||
{
|
||||
type Zuber;
|
||||
}
|
||||
CHFSubCoolModel
|
||||
{
|
||||
type HuaXu;
|
||||
Kburn 0.5;
|
||||
}
|
||||
MHFModel
|
||||
{
|
||||
type Jeschar;
|
||||
Kmhf 1;
|
||||
}
|
||||
TDNBModel
|
||||
{
|
||||
type Schroeder;
|
||||
}
|
||||
filmBoilingModel
|
||||
{
|
||||
type Bromley;
|
||||
}
|
||||
value uniform 0.01;
|
||||
\endverbatim
|
||||
|
||||
See also
|
||||
Foam::alphatPhaseChangeJayatillekeWallFunctionFvPatchField
|
||||
|
||||
SourceFiles
|
||||
alphatWallBoilingWallFunctionFvPatchScalarField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef compressible_alphatWallBoilingWallFunctionFvPatchScalarField_H
|
||||
#define compressible_alphatWallBoilingWallFunctionFvPatchScalarField_H
|
||||
|
||||
#include "alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H"
|
||||
#include "partitioningModel.H"
|
||||
#include "nucleationSiteModel.H"
|
||||
#include "departureDiameterModel.H"
|
||||
#include "departureFrequencyModel.H"
|
||||
|
||||
#include "LeidenfrostModel.H"
|
||||
#include "filmBoilingModel.H"
|
||||
#include "CHFModel.H"
|
||||
#include "CHFSubCoolModel.H"
|
||||
#include "MHFModel.H"
|
||||
#include "TDNBModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace compressible
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class alphatWallBoilingWallFunctionFvPatchScalarField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class alphatWallBoilingWallFunctionFvPatchScalarField
|
||||
:
|
||||
public alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
|
||||
{
|
||||
public:
|
||||
|
||||
// Data types
|
||||
|
||||
//- Enumeration listing the possible operational modes
|
||||
enum phaseType
|
||||
{
|
||||
vaporPhase,
|
||||
liquidPhase
|
||||
};
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Private data
|
||||
|
||||
//- Enumeration of regimes per face
|
||||
enum regimeType
|
||||
{
|
||||
subcool,
|
||||
transient,
|
||||
film,
|
||||
nonBoiling
|
||||
};
|
||||
|
||||
//- name of the other phase (vapor/liquid phase)
|
||||
word otherPhaseName_;
|
||||
|
||||
//- Heat source type names
|
||||
static const Enum<phaseType> phaseTypeNames_;
|
||||
|
||||
//- Heat source type
|
||||
phaseType phaseType_;
|
||||
|
||||
//- dmdt relaxationFactor
|
||||
scalar relax_;
|
||||
|
||||
//- Patch face area by cell volume
|
||||
scalarField AbyV_;
|
||||
|
||||
// Sub-cooling nucleating boiling
|
||||
|
||||
//- Convective turbulent thermal diffusivity
|
||||
scalarField alphatConv_;
|
||||
|
||||
//- Departure diameter field
|
||||
scalarField dDep_;
|
||||
|
||||
//- Quenching surface heat flux
|
||||
scalarField qq_;
|
||||
|
||||
//- Model constant for area of bubbles
|
||||
scalar K_;
|
||||
|
||||
//- Run-time selected heat flux partitioning model
|
||||
autoPtr<wallBoilingModels::partitioningModel>
|
||||
partitioningModel_;
|
||||
|
||||
//- Run-time selected nucleation site density model
|
||||
autoPtr<wallBoilingModels::nucleationSiteModel>
|
||||
nucleationSiteModel_;
|
||||
|
||||
//- Run-time selected bubble departure diameter model
|
||||
autoPtr<wallBoilingModels::departureDiameterModel>
|
||||
departureDiamModel_;
|
||||
|
||||
//- Run-time selected bubble departure frequency model
|
||||
autoPtr<wallBoilingModels::departureFrequencyModel>
|
||||
departureFreqModel_;
|
||||
|
||||
|
||||
// Film boiling model
|
||||
|
||||
//- Run-time selected for filmBoiling model
|
||||
autoPtr<wallBoilingModels::filmBoilingModel>
|
||||
filmBoilingModel_;
|
||||
|
||||
// Transition boiling model
|
||||
|
||||
//- Run-time selected for Leidenfrost tempearure
|
||||
autoPtr<wallBoilingModels::LeidenfrostModel>
|
||||
LeidenfrostModel_;
|
||||
|
||||
//- Run-time selected for CHF
|
||||
autoPtr<wallBoilingModels::CHFModel> CHFModel_;
|
||||
|
||||
//- Run-time selected for CHF sub-cool
|
||||
autoPtr<wallBoilingModels::CHFSubCoolModel> CHFSoobModel_;
|
||||
|
||||
//- Run-time selected for MHF
|
||||
autoPtr<wallBoilingModels::MHFModel> MHFModel_;
|
||||
|
||||
//- Run-time selected for MHF
|
||||
autoPtr<wallBoilingModels::TDNBModel> TDNBModel_;
|
||||
|
||||
//- Wetting parameter for transient boiling
|
||||
scalar wp_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("compressible::alphatWallBoilingWallFunction");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
alphatWallBoilingWallFunctionFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
alphatWallBoilingWallFunctionFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping given
|
||||
// alphatWallBoilingWallFunctionFvPatchScalarField
|
||||
// onto a new patch
|
||||
alphatWallBoilingWallFunctionFvPatchScalarField
|
||||
(
|
||||
const alphatWallBoilingWallFunctionFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
alphatWallBoilingWallFunctionFvPatchScalarField
|
||||
(
|
||||
const alphatWallBoilingWallFunctionFvPatchScalarField&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<fvPatchScalarField> clone() const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new alphatWallBoilingWallFunctionFvPatchScalarField(*this)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
alphatWallBoilingWallFunctionFvPatchScalarField
|
||||
(
|
||||
const alphatWallBoilingWallFunctionFvPatchScalarField&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<fvPatchScalarField> clone
|
||||
(
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new alphatWallBoilingWallFunctionFvPatchScalarField(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
using alphatPhaseChangeWallFunctionFvPatchScalarField::dmdt;
|
||||
|
||||
//- Is there phase change mass transfer for this phasePair
|
||||
virtual bool activePhasePair(const phasePairKey&) const;
|
||||
|
||||
//- Return the rate of phase-change for specific phase pair
|
||||
virtual const scalarField& dmdt(const phasePairKey&) const;
|
||||
|
||||
//- Return the rate of phase-change for specific phase pair
|
||||
virtual const scalarField& mDotL(const phasePairKey&) const;
|
||||
|
||||
//- Return the departure diameter field
|
||||
const scalarField& dDeparture() const
|
||||
{
|
||||
return dDep_;
|
||||
}
|
||||
|
||||
//- Return the quenching surface heat flux [W/m2]
|
||||
const scalarField& qq() const
|
||||
{
|
||||
return qq_;
|
||||
}
|
||||
|
||||
//- Return the evaporation surface heat flux [W/m2]
|
||||
tmp<scalarField> qe() const
|
||||
{
|
||||
return mDotL_/AbyV_;
|
||||
}
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace compressible
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,131 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2015-2019 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "copiedFixedValueFvPatchScalarField.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::copiedFixedValueFvPatchScalarField::copiedFixedValueFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
sourceFieldName_("default")
|
||||
{}
|
||||
|
||||
|
||||
Foam::copiedFixedValueFvPatchScalarField::copiedFixedValueFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF, dict),
|
||||
sourceFieldName_(dict.lookup("sourceFieldName"))
|
||||
{}
|
||||
|
||||
|
||||
Foam::copiedFixedValueFvPatchScalarField::copiedFixedValueFvPatchScalarField
|
||||
(
|
||||
const copiedFixedValueFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(ptf, p, iF, mapper),
|
||||
sourceFieldName_(ptf.sourceFieldName_)
|
||||
{}
|
||||
|
||||
|
||||
Foam::copiedFixedValueFvPatchScalarField::copiedFixedValueFvPatchScalarField
|
||||
(
|
||||
const copiedFixedValueFvPatchScalarField& awfpsf
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(awfpsf),
|
||||
sourceFieldName_(awfpsf.sourceFieldName_)
|
||||
{}
|
||||
|
||||
|
||||
Foam::copiedFixedValueFvPatchScalarField::copiedFixedValueFvPatchScalarField
|
||||
(
|
||||
const copiedFixedValueFvPatchScalarField& awfpsf,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(awfpsf, iF),
|
||||
sourceFieldName_(awfpsf.sourceFieldName_)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::copiedFixedValueFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
if (this->updated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
operator==
|
||||
(
|
||||
patch().lookupPatchField<volScalarField, scalar>(sourceFieldName_)
|
||||
);
|
||||
|
||||
fixedValueFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
void Foam::copiedFixedValueFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
os.writeEntry("sourceFieldName", sourceFieldName_);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makePatchTypeField
|
||||
(
|
||||
fvPatchScalarField,
|
||||
copiedFixedValueFvPatchScalarField
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,135 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2015-2018 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::copiedFixedValueFvPatchScalarField
|
||||
|
||||
Description
|
||||
Copies the boundary values from a user specified field.
|
||||
|
||||
See also
|
||||
Foam::fixedValueFvPatchField
|
||||
|
||||
SourceFiles
|
||||
copiedFixedValueFvPatchScalarField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef copiedFixedValueFvPatchScalarField_H
|
||||
#define copiedFixedValueFvPatchScalarField_H
|
||||
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class copiedFixedValueFvPatchScalarField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class copiedFixedValueFvPatchScalarField
|
||||
:
|
||||
public fixedValueFvPatchScalarField
|
||||
{
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
word sourceFieldName_;
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("copiedFixedValue");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
copiedFixedValueFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
copiedFixedValueFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping given
|
||||
// copiedFixedValueFvPatchScalarField
|
||||
// onto a new patch
|
||||
copiedFixedValueFvPatchScalarField
|
||||
(
|
||||
const copiedFixedValueFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
copiedFixedValueFvPatchScalarField
|
||||
(
|
||||
const copiedFixedValueFvPatchScalarField&
|
||||
);
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
copiedFixedValueFvPatchScalarField
|
||||
(
|
||||
const copiedFixedValueFvPatchScalarField&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,193 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2015-2019 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fixedMultiPhaseHeatFluxFvPatchScalarField.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
#include "phaseSystem.H"
|
||||
#include "compressibleTurbulenceModel.H"
|
||||
#include "ThermalDiffusivity.H"
|
||||
#include "PhaseCompressibleTurbulenceModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::
|
||||
fixedMultiPhaseHeatFluxFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
q_(p.size(), Zero),
|
||||
relax_(1.0),
|
||||
Tmin_(0.0)
|
||||
{}
|
||||
|
||||
|
||||
Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::
|
||||
fixedMultiPhaseHeatFluxFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF, dict),
|
||||
q_("q", dict, p.size()),
|
||||
relax_(dict.lookupOrDefault<scalar>("relax", 1.0)),
|
||||
Tmin_(dict.lookupOrDefault<scalar>("Tmin", 273))
|
||||
{}
|
||||
|
||||
|
||||
Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::
|
||||
fixedMultiPhaseHeatFluxFvPatchScalarField
|
||||
(
|
||||
const fixedMultiPhaseHeatFluxFvPatchScalarField& psf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(psf, p, iF, mapper),
|
||||
q_(psf.q_, mapper),
|
||||
relax_(psf.relax_),
|
||||
Tmin_(psf.Tmin_)
|
||||
{}
|
||||
|
||||
|
||||
Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::
|
||||
fixedMultiPhaseHeatFluxFvPatchScalarField
|
||||
(
|
||||
const fixedMultiPhaseHeatFluxFvPatchScalarField& psf
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(psf),
|
||||
q_(psf.q_),
|
||||
relax_(psf.relax_),
|
||||
Tmin_(psf.Tmin_)
|
||||
{}
|
||||
|
||||
|
||||
Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::
|
||||
fixedMultiPhaseHeatFluxFvPatchScalarField
|
||||
(
|
||||
const fixedMultiPhaseHeatFluxFvPatchScalarField& psf,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(psf, iF),
|
||||
q_(psf.q_),
|
||||
relax_(psf.relax_),
|
||||
Tmin_(psf.Tmin_)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
if (updated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Lookup the fluid model
|
||||
const phaseSystem& fluid =
|
||||
(
|
||||
db().lookupObject<phaseSystem>("phaseProperties")
|
||||
);
|
||||
|
||||
const scalarField& Tp = *this;
|
||||
|
||||
scalarField A(Tp.size(), Zero);
|
||||
scalarField B(Tp.size(), Zero);
|
||||
scalarField Q(Tp.size(), Zero);
|
||||
|
||||
forAll(fluid.phases(), phasei)
|
||||
{
|
||||
const phaseModel& phase = fluid.phases()[phasei];
|
||||
const fluidThermo& thermo = phase.thermo();
|
||||
|
||||
const fvPatchScalarField& alpha =
|
||||
phase.boundaryField()[patch().index()];
|
||||
|
||||
const fvPatchScalarField& T =
|
||||
thermo.T().boundaryField()[patch().index()];
|
||||
|
||||
const scalarField kappaEff(phase.kappaEff(patch().index()));
|
||||
|
||||
if (debug)
|
||||
{
|
||||
scalarField q0(T.snGrad()*alpha*kappaEff);
|
||||
Q += q0;
|
||||
|
||||
Info<< patch().name() << " " << phase.name()
|
||||
<< ": Heat flux " << gMin(q0) << " - " << gMax(q0) << endl;
|
||||
}
|
||||
|
||||
A += T.patchInternalField()*alpha*kappaEff*patch().deltaCoeffs();
|
||||
B += alpha*kappaEff*patch().deltaCoeffs();
|
||||
}
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Info<< patch().name() << " " << ": overall heat flux "
|
||||
<< gMin(Q) << " - " << gMax(Q) << " W/m2, power: "
|
||||
<< gSum(patch().magSf()*Q) << " W" << endl;
|
||||
}
|
||||
|
||||
operator==((1 - relax_)*Tp + relax_*max(Tmin_,(q_ + A)/(B)));
|
||||
|
||||
fixedValueFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
void Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
os.writeEntry("relax", relax_);
|
||||
q_.writeEntry("q", os);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makePatchTypeField
|
||||
(
|
||||
fvPatchScalarField,
|
||||
fixedMultiPhaseHeatFluxFvPatchScalarField
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,147 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2015-2018 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::fixedMultiPhaseHeatFluxFvPatchScalarField
|
||||
|
||||
Description
|
||||
Calculates a wall temperature that produces the specified overall wall heat
|
||||
flux across all the phases in an Eulerian multi-phase simulation.
|
||||
|
||||
Intended to be used with copiedFixedValue to ensure that phase wall
|
||||
temperature are consistent:
|
||||
- Set 'fixedMultiPhaseHeatFlux' boundary for one of the phases
|
||||
- Use 'copiedFixedValue' for all the other phases.
|
||||
|
||||
See also
|
||||
Foam::fixedValueFvPatchField
|
||||
|
||||
SourceFiles
|
||||
fixedMultiPhaseHeatFluxFvPatchScalarField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef fixedMultiPhaseHeatFluxFvPatchScalarField_H
|
||||
#define fixedMultiPhaseHeatFluxFvPatchScalarField_H
|
||||
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class fixedMultiPhaseHeatFluxFvPatchScalarField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class fixedMultiPhaseHeatFluxFvPatchScalarField
|
||||
:
|
||||
public fixedValueFvPatchScalarField
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Heat power [W] or flux [W/m2]
|
||||
scalarField q_;
|
||||
|
||||
//- Relaxation factor
|
||||
scalar relax_;
|
||||
|
||||
//- Minimum temperature limit [K]
|
||||
scalar Tmin_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("fixedMultiPhaseHeatFlux");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
fixedMultiPhaseHeatFluxFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
fixedMultiPhaseHeatFluxFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping given
|
||||
// fixedMultiPhaseHeatFluxFvPatchScalarField
|
||||
// onto a new patch
|
||||
fixedMultiPhaseHeatFluxFvPatchScalarField
|
||||
(
|
||||
const fixedMultiPhaseHeatFluxFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
fixedMultiPhaseHeatFluxFvPatchScalarField
|
||||
(
|
||||
const fixedMultiPhaseHeatFluxFvPatchScalarField&
|
||||
);
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
fixedMultiPhaseHeatFluxFvPatchScalarField
|
||||
(
|
||||
const fixedMultiPhaseHeatFluxFvPatchScalarField&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,60 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "CHFModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
defineTypeNameAndDebug(CHFModel, 0);
|
||||
defineRunTimeSelectionTable(CHFModel, dictionary);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::CHFModel::CHFModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::CHFModel::~CHFModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::wallBoilingModels::CHFModel::write(Ostream& os) const
|
||||
{
|
||||
os.writeKeyword("type") << this->type() << token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,127 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::wallBoilingModels::CHFModel
|
||||
|
||||
Description
|
||||
Base class for nucleation site density models
|
||||
|
||||
SourceFiles
|
||||
CHFModel.C
|
||||
newCHFModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef CHFModel_H
|
||||
#define CHFModel_H
|
||||
|
||||
#include "volFields.H"
|
||||
#include "dictionary.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
#include "phaseModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class CHFModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class CHFModel
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
CHFModel(const CHFModel&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const CHFModel&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("CHFModel");
|
||||
|
||||
|
||||
//- Declare runtime construction
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
CHFModel,
|
||||
dictionary,
|
||||
(
|
||||
const dictionary& dict
|
||||
),
|
||||
(dict)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
CHFModel();
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
//- Select null constructed
|
||||
static autoPtr<CHFModel> New(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~CHFModel();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Calculate temperature
|
||||
virtual tmp<scalarField> CHF
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const = 0;
|
||||
|
||||
virtual void write(Ostream& os) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
} // End namespace wallBoilingModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,60 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2015-2018 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "CHFModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::wallBoilingModels::CHFModel>
|
||||
Foam::wallBoilingModels::CHFModel::New
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word CHFModelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting CHFModel: "
|
||||
<< CHFModelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(CHFModelType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown CHFModelType type "
|
||||
<< CHFModelType << endl << endl
|
||||
<< "Valid CHFModel types are : " << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,113 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "Zuber.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "uniformDimensionedFields.H"
|
||||
#include "phasePairKey.H"
|
||||
#include "phaseSystem.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
namespace CHFModels
|
||||
{
|
||||
defineTypeNameAndDebug(Zuber, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
CHFModel,
|
||||
Zuber,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::CHFModels::Zuber::Zuber
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
CHFModel(),
|
||||
Cn_(dict.lookupOrDefault<scalar>("Cn", 0.131))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::CHFModels::Zuber::~Zuber()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::wallBoilingModels::CHFModels::Zuber::CHF
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const
|
||||
{
|
||||
const uniformDimensionedVectorField& g =
|
||||
liquid.mesh().time().lookupObject<uniformDimensionedVectorField>("g");
|
||||
|
||||
const scalarField rhoVapor(vapor.thermo().rho(patchi));
|
||||
const scalarField rhoLiq(liquid.thermo().rho(patchi));
|
||||
|
||||
const phasePairKey pair(liquid.name(), vapor.name());
|
||||
const scalarField sigma
|
||||
(
|
||||
liquid.fluid().sigma(pair)().boundaryField()[patchi]
|
||||
);
|
||||
|
||||
return
|
||||
Cn_*rhoVapor*L*pow
|
||||
(
|
||||
sigma*mag(g.value())*(max(rhoLiq - rhoVapor, 0.0)/sqr(rhoVapor)),
|
||||
0.25
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
void Foam::wallBoilingModels::CHFModels::Zuber::write(Ostream& os) const
|
||||
{
|
||||
CHFModel::write(os);
|
||||
os.writeKeyword("Cn") << Cn_ << token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
|
||||
@ -0,0 +1,111 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::wallBoilingModels:CHFModels:::Zuber
|
||||
|
||||
Description
|
||||
Critical heat flux (CHF) correlation
|
||||
|
||||
References:
|
||||
\verbatim
|
||||
N. Zuber, On the stability of boiling heat transfer,
|
||||
Trans. ASME 80 (1958) 711
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
Zuber.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Zuber_H
|
||||
#define Zuber_H
|
||||
|
||||
#include "CHFModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
namespace CHFModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class Zuber Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class Zuber
|
||||
:
|
||||
public CHFModel
|
||||
{
|
||||
|
||||
// Private data:
|
||||
|
||||
//- Coefficient constant
|
||||
scalar Cn_;
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("Zuber");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from a dictionary
|
||||
Zuber(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~Zuber();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Calculate and return the nucleation-site density
|
||||
virtual tmp<scalarField> CHF
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const;
|
||||
|
||||
virtual void write(Ostream& os) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace CHFModels
|
||||
} // End namespace wallBoilingModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,63 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "CHFSubCoolModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
defineTypeNameAndDebug(CHFSubCoolModel, 0);
|
||||
defineRunTimeSelectionTable(CHFSubCoolModel, dictionary);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::CHFSubCoolModel::CHFSubCoolModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::CHFSubCoolModel::~CHFSubCoolModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::wallBoilingModels::CHFSubCoolModel::write
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
os.writeKeyword("type") << this->type() << token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,127 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::CHFModels::CHFSubCoolModel
|
||||
|
||||
Description
|
||||
Base class for nucleation site density models
|
||||
|
||||
SourceFiles
|
||||
CHFSubCoolModel.C
|
||||
newCHFSubCoolModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef CHFSubCoolModel_H
|
||||
#define CHFSubCoolModel_H
|
||||
|
||||
#include "volFields.H"
|
||||
#include "dictionary.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
#include "phaseModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class CHFSubCoolModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class CHFSubCoolModel
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
CHFSubCoolModel(const CHFSubCoolModel&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const CHFSubCoolModel&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("CHFSubCoolModel");
|
||||
|
||||
|
||||
//- Declare runtime construction
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
CHFSubCoolModel,
|
||||
dictionary,
|
||||
(
|
||||
const dictionary& dict
|
||||
),
|
||||
(dict)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
CHFSubCoolModel();
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
//- Select null constructed
|
||||
static autoPtr<CHFSubCoolModel> New(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~CHFSubCoolModel();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Calculate temperature
|
||||
virtual tmp<scalarField> CHFSubCool
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const = 0;
|
||||
|
||||
virtual void write(Ostream& os) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
} // End namespace wallBoilingModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,58 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "CHFSubCoolModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::wallBoilingModels::CHFSubCoolModel>
|
||||
Foam::wallBoilingModels::CHFSubCoolModel::New
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word CHFModelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting CHFSubCoolModel: "
|
||||
<< CHFModelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(CHFModelType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown CHFModelType type "
|
||||
<< CHFModelType << endl << endl
|
||||
<< "Valid CHFSubCoolModel types are : " << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,133 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "HuaXu.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "uniformDimensionedFields.H"
|
||||
#include "phasePairKey.H"
|
||||
#include "phaseSystem.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
namespace CHFModels
|
||||
{
|
||||
defineTypeNameAndDebug(HuaXu, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
CHFSubCoolModel,
|
||||
HuaXu,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::CHFModels::HuaXu::HuaXu
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
CHFSubCoolModel(),
|
||||
Kburn_(dict.lookupOrDefault<scalar>("Kburn", 1.5))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::CHFModels::HuaXu::~HuaXu()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::wallBoilingModels::CHFModels::HuaXu::CHFSubCool
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const
|
||||
{
|
||||
const uniformDimensionedVectorField& g =
|
||||
liquid.mesh().time().lookupObject<uniformDimensionedVectorField>("g");
|
||||
|
||||
const scalarField alphaLiq(liquid.alpha(patchi));
|
||||
|
||||
const scalarField rhoVapor(vapor.thermo().rho(patchi));
|
||||
const scalarField rhoLiq(liquid.thermo().rho(patchi));
|
||||
tmp<volScalarField> tCp = liquid.thermo().Cp();
|
||||
const volScalarField& Cp = tCp();
|
||||
const fvPatchScalarField& Cpw = Cp.boundaryField()[patchi];
|
||||
|
||||
const phasePairKey pair(liquid.name(), vapor.name());
|
||||
const scalarField sigma
|
||||
(
|
||||
liquid.fluid().sigma(pair)().boundaryField()[patchi]
|
||||
);
|
||||
|
||||
const scalarField Pe
|
||||
(
|
||||
pow(sigma, 0.75)
|
||||
/
|
||||
(
|
||||
alphaLiq
|
||||
* pow(mag(g.value())*(rhoLiq-rhoVapor), 0.25)
|
||||
* sqrt(rhoVapor)
|
||||
)
|
||||
);
|
||||
|
||||
const scalarField Ja
|
||||
(
|
||||
rhoLiq*Cpw*max(Tsatw - Tl, scalar(0))/(rhoVapor*L)
|
||||
);
|
||||
|
||||
return
|
||||
Kburn_*(1 + 0.345*Ja/pow(Pe, 0.25));
|
||||
}
|
||||
|
||||
|
||||
void Foam::wallBoilingModels::CHFModels::HuaXu::write
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
CHFSubCoolModel::write(os);
|
||||
os.writeKeyword("Kburn") << Kburn_ << token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
|
||||
@ -0,0 +1,114 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::wallBoilingModels:CHFModels:::HuaXu
|
||||
|
||||
Description
|
||||
|
||||
Critical heat flux for soob cool boiling flows.
|
||||
|
||||
References:
|
||||
\verbatim
|
||||
T.C. Hua, J.J. Xu, Quenching boiling in subcooled liquid nitrogen
|
||||
for solidification of aqueous materials, Mater.
|
||||
Sci. Eng. A 292 (2000) 169–172.
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
HuaXu.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef HuaXu_H
|
||||
#define HuaXu_H
|
||||
|
||||
#include "CHFSubCoolModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
namespace CHFModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class HuaXu Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class HuaXu
|
||||
:
|
||||
public CHFSubCoolModel
|
||||
{
|
||||
|
||||
// Private data:
|
||||
|
||||
//- Burn out factor
|
||||
scalar Kburn_;
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("HuaXu");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from a dictionary
|
||||
HuaXu(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~HuaXu();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Calculate and return the nucleation-site density
|
||||
virtual tmp<scalarField> CHFSubCool
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const;
|
||||
|
||||
|
||||
virtual void write(Ostream& os) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace CHFModels
|
||||
} // End namespace wallBoilingModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,60 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "LeidenfrostModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
defineTypeNameAndDebug(LeidenfrostModel, 0);
|
||||
defineRunTimeSelectionTable(LeidenfrostModel, dictionary);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::LeidenfrostModel::LeidenfrostModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::LeidenfrostModel::~LeidenfrostModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::wallBoilingModels::LeidenfrostModel::write(Ostream& os) const
|
||||
{
|
||||
os.writeKeyword("type") << this->type() << token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,127 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::wallBoilingModels::LeidenfrostModel
|
||||
|
||||
Description
|
||||
Base class for nucleation site density models
|
||||
|
||||
SourceFiles
|
||||
LeidenfrostModel.C
|
||||
newLeidenfrostModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef LeidenfrostModel_H
|
||||
#define LeidenfrostModel_H
|
||||
|
||||
#include "volFields.H"
|
||||
#include "dictionary.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
#include "phaseModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class LeidenfrostModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class LeidenfrostModel
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
LeidenfrostModel(const LeidenfrostModel&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const LeidenfrostModel&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("LeidenfrostModel");
|
||||
|
||||
|
||||
//- Declare runtime construction
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
LeidenfrostModel,
|
||||
dictionary,
|
||||
(
|
||||
const dictionary& dict
|
||||
),
|
||||
(dict)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
LeidenfrostModel();
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
//- Select null constructed
|
||||
static autoPtr<LeidenfrostModel> New(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~LeidenfrostModel();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Calculate temperature
|
||||
virtual tmp<scalarField> TLeid
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const = 0;
|
||||
|
||||
virtual void write(Ostream& os) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
} // End namespace wallBoilingModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,58 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "LeidenfrostModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::wallBoilingModels::LeidenfrostModel>
|
||||
Foam::wallBoilingModels::LeidenfrostModel::New
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word LeidenfrostModelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting LeidenfrostModel: "
|
||||
<< LeidenfrostModelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(LeidenfrostModelType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown LeidenfrostModelType type "
|
||||
<< LeidenfrostModelType << endl << endl
|
||||
<< "Valid LeidenfrostModel types are : " << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,101 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "Spiegler.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "uniformDimensionedFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
namespace LeidenfrostModels
|
||||
{
|
||||
defineTypeNameAndDebug(Spiegler, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
LeidenfrostModel,
|
||||
Spiegler,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::LeidenfrostModels::Spiegler::Spiegler
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
LeidenfrostModel(),
|
||||
Tcrit_(dict.lookupOrDefault<scalar>("Tcrit", 374))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::LeidenfrostModels::Spiegler::~Spiegler()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::wallBoilingModels::LeidenfrostModels::Spiegler::TLeid
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const
|
||||
{
|
||||
return tmp<scalarField>
|
||||
(
|
||||
new scalarField
|
||||
(
|
||||
liquid.thermo().p().boundaryField()[patchi].size(),
|
||||
27*Tcrit_/32
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
void Foam::wallBoilingModels::LeidenfrostModels::Spiegler::write
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
LeidenfrostModel::write(os);
|
||||
os.writeKeyword("Tcrit") << Tcrit_ << token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,114 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::wallBoilingModels:LeidenfrostModels:::Spiegler
|
||||
|
||||
Description
|
||||
Leidenfrost temperature model.
|
||||
|
||||
References:
|
||||
\verbatim
|
||||
SPIEGLER P., HOPENFELD J., SILBERBERG M., BUMPUS J. and NORMAN A.,
|
||||
Onset of stable film boiling and the foam limit, International
|
||||
Journal of Heat and Mass Transfer, 6,11, pp.987-989, 1963
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
Spiegler.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Spiegler_H
|
||||
#define Spiegler_H
|
||||
|
||||
#include "LeidenfrostModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
namespace LeidenfrostModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class Spiegler Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class Spiegler
|
||||
:
|
||||
public LeidenfrostModel
|
||||
{
|
||||
|
||||
private:
|
||||
|
||||
//- Critical temperature
|
||||
scalar Tcrit_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("Spiegler");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from a dictionary
|
||||
Spiegler(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~Spiegler();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Calculate and return the nucleation-site density
|
||||
virtual tmp<scalarField> TLeid
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const;
|
||||
|
||||
|
||||
virtual void write(Ostream& os) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace LeidenfrostModels
|
||||
} // End namespace wallBoilingModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,116 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "Jeschar.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "uniformDimensionedFields.H"
|
||||
#include "phasePairKey.H"
|
||||
#include "phaseSystem.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
namespace CHFModels
|
||||
{
|
||||
defineTypeNameAndDebug(Jeschar, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
MHFModel,
|
||||
Jeschar,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::CHFModels::Jeschar::Jeschar
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
MHFModel(),
|
||||
Kmhf_(dict.lookupOrDefault<scalar>("Kmhf", 1))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::CHFModels::Jeschar::~Jeschar()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::wallBoilingModels::CHFModels::Jeschar::MHF
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const
|
||||
{
|
||||
const uniformDimensionedVectorField& g =
|
||||
liquid.mesh().time().lookupObject<uniformDimensionedVectorField>("g");
|
||||
|
||||
const scalarField rhoVapor(vapor.thermo().rho(patchi));
|
||||
const scalarField rhoLiq(liquid.thermo().rho(patchi));
|
||||
|
||||
const phasePairKey pair(liquid.name(), vapor.name());
|
||||
const scalarField sigma
|
||||
(
|
||||
liquid.fluid().sigma(pair)().boundaryField()[patchi]
|
||||
);
|
||||
|
||||
return
|
||||
Kmhf_*0.09*rhoVapor*L
|
||||
*(
|
||||
pow(sigma/(mag(g.value())*(rhoLiq - rhoVapor)), 0.25)
|
||||
* sqrt(mag(g.value())*(rhoLiq - rhoVapor)/(rhoLiq + rhoVapor))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
void Foam::wallBoilingModels::CHFModels::Jeschar::write
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
MHFModel::write(os);
|
||||
os.writeKeyword("Kmhf") << Kmhf_ << token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
|
||||
@ -0,0 +1,113 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::wallBoilingModels:MHFModels:::Jeschar
|
||||
|
||||
Description
|
||||
Minimum heat flux (MHF) model.
|
||||
|
||||
References:
|
||||
\verbatim
|
||||
Jeschar, E. Specht, C. Kohler, Heat Transfer during Cooling of
|
||||
Heated Metallic Objects with Evaporating Liquids,
|
||||
Theory and Technology in Quenching, Springer, 1992. Chapter 4.
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
Jeschar.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Jeschar_H
|
||||
#define Jeschar_H
|
||||
|
||||
#include "MHFModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
namespace CHFModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class Jeschar Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class Jeschar
|
||||
:
|
||||
public MHFModel
|
||||
{
|
||||
|
||||
// Private data:
|
||||
|
||||
//- Burn out factor
|
||||
scalar Kmhf_;
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("Jeschar");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from a dictionary
|
||||
Jeschar(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~Jeschar();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Calculate and return the nucleation-site density
|
||||
virtual tmp<scalarField> MHF
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const;
|
||||
|
||||
|
||||
virtual void write(Ostream& os) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace CHFModels
|
||||
} // End namespace wallBoilingModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,60 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "MHFModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
defineTypeNameAndDebug(MHFModel, 0);
|
||||
defineRunTimeSelectionTable(MHFModel, dictionary);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::MHFModel::MHFModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::MHFModel::~MHFModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::wallBoilingModels::MHFModel::write(Ostream& os) const
|
||||
{
|
||||
os.writeKeyword("type") << this->type() << token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,127 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::MHFModels::MHFModel
|
||||
|
||||
Description
|
||||
Base class for nucleation site density models
|
||||
|
||||
SourceFiles
|
||||
MHFModel.C
|
||||
newMHFModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef MHFModel_H
|
||||
#define MHFModel_H
|
||||
|
||||
#include "volFields.H"
|
||||
#include "dictionary.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
#include "phaseModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class MHFModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class MHFModel
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
MHFModel(const MHFModel&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const MHFModel&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("MHFModel");
|
||||
|
||||
|
||||
//- Declare runtime construction
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
MHFModel,
|
||||
dictionary,
|
||||
(
|
||||
const dictionary& dict
|
||||
),
|
||||
(dict)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
MHFModel();
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
//- Select null constructed
|
||||
static autoPtr<MHFModel> New(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~MHFModel();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Calculate temperature
|
||||
virtual tmp<scalarField> MHF
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const = 0;
|
||||
|
||||
virtual void write(Ostream& os) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
} // End namespace wallBoilingModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,60 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2016 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "MHFModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::wallBoilingModels::MHFModel>
|
||||
Foam::wallBoilingModels::MHFModel::New
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word MHFModelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting MHFModel: "
|
||||
<< MHFModelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(MHFModelType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown MHFModelType type "
|
||||
<< MHFModelType << endl << endl
|
||||
<< "Valid MHFModel types are : " << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,109 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "Schroeder.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "physicoChemicalConstants.H"
|
||||
|
||||
using Foam::constant::physicoChemical::R;
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
namespace TDNBModels
|
||||
{
|
||||
defineTypeNameAndDebug(Schroeder, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
TDNBModel,
|
||||
Schroeder,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
using Foam::constant::physicoChemical::R;
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::TDNBModels::Schroeder::Schroeder
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
TDNBModel(),
|
||||
kg_(dict.lookupOrDefault<scalar>("kg", 5/3))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::TDNBModels::Schroeder::~Schroeder()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::wallBoilingModels::TDNBModels::Schroeder::TDNB
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const
|
||||
{
|
||||
// Converting from g/mol to Kg/mol
|
||||
const scalarField W(1e-3*liquid.thermo().W()().boundaryField()[patchi]);
|
||||
|
||||
// isoentropic expansion factor for ideal gases
|
||||
|
||||
return
|
||||
Tsatw
|
||||
/
|
||||
(
|
||||
1 - log(2*kg_ + 1)*(R.value()*Tsatw)/(W*L)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
void Foam::wallBoilingModels::TDNBModels::Schroeder::write
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
TDNBModel::write(os);
|
||||
os.writeKeyword("kg") << kg_ << token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
|
||||
@ -0,0 +1,131 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::wallBoilingModels:TDNBModels:::Schroeder
|
||||
|
||||
Description
|
||||
Departure from nulceate boiling correlation.
|
||||
|
||||
References:
|
||||
\verbatim
|
||||
Schroeder-Richter D. and Bartsch G. Analytical calculation of
|
||||
DNB-superheating by a pos-tulated thermo-mechanical effect of
|
||||
nucleate boiling.
|
||||
International Journal of Multiphase Flow, 20(6):1143–1167, 1994.
|
||||
|
||||
\endverbatim
|
||||
|
||||
|
||||
\verbatim
|
||||
THEORETICAL CRITICAL HEAT FLUX PREDICTION BASEDNON-EQUILIBRIUM
|
||||
THERMODYNAMICS CONSIDERATIONSTHE SUBCOOLED BOILING PHENOMENON
|
||||
|
||||
Germán Thelera and Daniel Freisba TECNA
|
||||
Estudios y Proyectos de Ingenierı́a S.A.
|
||||
Encarnación Ezcurra 365, C1107CLA Buenos Aires, Argentina
|
||||
Westinghouse
|
||||
Electric Germany GmbH
|
||||
Dudenstraße 44, 68167 Mannheim, Germany
|
||||
\endverbatim
|
||||
|
||||
|
||||
SourceFiles
|
||||
Schroeder.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Schroeder_H
|
||||
#define Schroeder_H
|
||||
|
||||
#include "TDNBModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
namespace TDNBModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class Schroeder Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class Schroeder
|
||||
:
|
||||
public TDNBModel
|
||||
{
|
||||
|
||||
// Private data:
|
||||
|
||||
//- Isoentropic expansion factor for ideal gases
|
||||
// 5/3 monoatomic
|
||||
// 7/5 diatomic
|
||||
scalar kg_;
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("Schroeder");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from a dictionary
|
||||
Schroeder(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~Schroeder();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Calculate and return the nucleation-site density
|
||||
virtual tmp<scalarField> TDNB
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const;
|
||||
|
||||
|
||||
virtual void write(Ostream& os) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace TDNBModels
|
||||
} // End namespace wallBoilingModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,60 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "TDNBModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
defineTypeNameAndDebug(TDNBModel, 0);
|
||||
defineRunTimeSelectionTable(TDNBModel, dictionary);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::TDNBModel::TDNBModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::TDNBModel::~TDNBModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::wallBoilingModels::TDNBModel::write(Ostream& os) const
|
||||
{
|
||||
os.writeKeyword("type") << this->type() << token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,127 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::wallBoilingModels::TDNBModel
|
||||
|
||||
Description
|
||||
Base class for nucleation site density models
|
||||
|
||||
SourceFiles
|
||||
TDNBModel.C
|
||||
newTDNBModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef TDNBModel_H
|
||||
#define TDNBModel_H
|
||||
|
||||
#include "volFields.H"
|
||||
#include "dictionary.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
#include "phaseModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class TDNBModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class TDNBModel
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
TDNBModel(const TDNBModel&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const TDNBModel&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("TDNBModel");
|
||||
|
||||
|
||||
//- Declare runtime construction
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
TDNBModel,
|
||||
dictionary,
|
||||
(
|
||||
const dictionary& dict
|
||||
),
|
||||
(dict)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
TDNBModel();
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
//- Select null constructed
|
||||
static autoPtr<TDNBModel> New(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~TDNBModel();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Calculate temperature
|
||||
virtual tmp<scalarField> TDNB
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const = 0;
|
||||
|
||||
virtual void write(Ostream& os) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
} // End namespace wallBoilingModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,60 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2016 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "TDNBModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::wallBoilingModels::TDNBModel>
|
||||
Foam::wallBoilingModels::TDNBModel::New
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word TDNBModelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting TDNBModel: "
|
||||
<< TDNBModelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(TDNBModelType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown TDNBModelType type "
|
||||
<< TDNBModelType << endl << endl
|
||||
<< "Valid TDNBModel types are : " << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,120 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2016-2019 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "KocamustafaogullariIshii.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "uniformDimensionedFields.H"
|
||||
#include "compressibleTurbulenceModel.H"
|
||||
#include "ThermalDiffusivity.H"
|
||||
#include "PhaseCompressibleTurbulenceModel.H"
|
||||
#include "phaseSystem.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
namespace departureDiameterModels
|
||||
{
|
||||
defineTypeNameAndDebug(KocamustafaogullariIshii, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
departureDiameterModel,
|
||||
KocamustafaogullariIshii,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::departureDiameterModels::
|
||||
KocamustafaogullariIshii::KocamustafaogullariIshii
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
departureDiameterModel(),
|
||||
phi_(readScalar(dict.lookup("phi")))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::departureDiameterModels::
|
||||
KocamustafaogullariIshii::~KocamustafaogullariIshii()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::wallBoilingModels::departureDiameterModels::
|
||||
KocamustafaogullariIshii::dDeparture
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const
|
||||
{
|
||||
// Gravitational acceleration
|
||||
const uniformDimensionedVectorField& g =
|
||||
liquid.mesh().time().lookupObject<uniformDimensionedVectorField>("g");
|
||||
|
||||
const scalarField rhoLiquid(liquid.thermo().rho(patchi));
|
||||
const scalarField rhoVapor(vapor.thermo().rho(patchi));
|
||||
|
||||
const scalarField rhoM((rhoLiquid - rhoVapor)/rhoVapor);
|
||||
|
||||
const tmp<volScalarField>& tsigma
|
||||
(
|
||||
liquid.fluid().sigma(phasePairKey(liquid.name(), vapor.name()))
|
||||
);
|
||||
const volScalarField& sigma = tsigma();
|
||||
const fvPatchScalarField& sigmaw = sigma.boundaryField()[patchi];
|
||||
|
||||
return
|
||||
0.0012*pow(rhoM, 0.9)*0.0208*phi_
|
||||
*sqrt(sigmaw/(mag(g.value())*(rhoLiquid - rhoVapor)));
|
||||
}
|
||||
|
||||
|
||||
void Foam::wallBoilingModels::departureDiameterModels::
|
||||
KocamustafaogullariIshii::write(Ostream& os) const
|
||||
{
|
||||
departureDiameterModel::write(os);
|
||||
os.writeEntry("phi", phi_);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,116 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2016-2018 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::wallBoilingModels::departureDiameterModels::KocamustafaogullariIshii
|
||||
|
||||
Description
|
||||
A correlation for bubble departure diameter.
|
||||
|
||||
Requires model parameter 'phi': contact angle in degrees.
|
||||
|
||||
Reference:
|
||||
\verbatim
|
||||
Kocamustafaogullari, G., & Ishii, M. (1983).
|
||||
Interfacial area and nucleation site density in boiling systems.
|
||||
International Journal of Heat and Mass Transfer, 26(9), 1377-1387.
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
KocamustafaogullariIshii.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef KocamustafaogullariIshii_H
|
||||
#define KocamustafaogullariIshii_H
|
||||
|
||||
#include "departureDiameterModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
namespace departureDiameterModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class KocamustafaogullariIshii Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class KocamustafaogullariIshii
|
||||
:
|
||||
public departureDiameterModel
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Contact angle
|
||||
scalar phi_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("KocamustafaogullariIshii");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from a dictionary
|
||||
KocamustafaogullariIshii(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~KocamustafaogullariIshii();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Calculate and return the departure diameter field
|
||||
virtual tmp<scalarField> dDeparture
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const;
|
||||
|
||||
virtual void write(Ostream& os) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace departureDiameterModels
|
||||
} // End namespace wallBoilingModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,101 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2016-2019 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "TolubinskiKostanchuk.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
namespace departureDiameterModels
|
||||
{
|
||||
defineTypeNameAndDebug(TolubinskiKostanchuk, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
departureDiameterModel,
|
||||
TolubinskiKostanchuk,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::departureDiameterModels::
|
||||
TolubinskiKostanchuk::TolubinskiKostanchuk
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
departureDiameterModel(),
|
||||
dRef_(dict.lookupOrDefault<scalar>("dRef", 6e-4)),
|
||||
dMax_(dict.lookupOrDefault<scalar>("dMax", 0.0014)),
|
||||
dMin_(dict.lookupOrDefault<scalar>("dMin", 1e-6))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::departureDiameterModels::
|
||||
TolubinskiKostanchuk::~TolubinskiKostanchuk()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::wallBoilingModels::departureDiameterModels::
|
||||
TolubinskiKostanchuk::dDeparture
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const
|
||||
{
|
||||
return max(min(dRef_*exp(-(Tsatw - Tl)/45), dMax_), dMin_);
|
||||
}
|
||||
|
||||
|
||||
void Foam::wallBoilingModels::departureDiameterModels::
|
||||
TolubinskiKostanchuk::write(Ostream& os) const
|
||||
{
|
||||
departureDiameterModel::write(os);
|
||||
os.writeEntry("dRef", dRef_);
|
||||
os.writeEntry("dMax", dMax_);
|
||||
os.writeEntry("dMin", dMin_);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,122 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2016-2018 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::wallBoilingModels::departureDiameterModels::TolubinskiKostanchuk
|
||||
|
||||
Description
|
||||
Tolubinski-Kostanchuk correlation for bubble departure diameter.
|
||||
|
||||
Reference:
|
||||
\verbatim
|
||||
Tolubinsky, V. I., & Kostanchuk, D. M. (1970).
|
||||
Vapour bubbles growth rate and heat transfer intensity at subcooled
|
||||
water boiling.
|
||||
In International Heat Transfer Conference 4 (Vol. 23). Begel House Inc.
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
TolubinskiKostanchuk.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef TolubinskiKostanchuk_H
|
||||
#define TolubinskiKostanchuk_H
|
||||
|
||||
#include "departureDiameterModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
namespace departureDiameterModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class TolubinskiKostanchuk Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class TolubinskiKostanchuk
|
||||
:
|
||||
public departureDiameterModel
|
||||
{
|
||||
|
||||
// Private data:
|
||||
|
||||
//- Coefficient of the temperature term
|
||||
scalar dRef_;
|
||||
|
||||
//- Maximum diameter
|
||||
scalar dMax_;
|
||||
|
||||
//- Minimum diameter
|
||||
scalar dMin_;
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("TolubinskiKostanchuk");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from a dictionary
|
||||
TolubinskiKostanchuk(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~TolubinskiKostanchuk();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Calculate and return the departure diameter field
|
||||
virtual tmp<scalarField> dDeparture
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const;
|
||||
|
||||
virtual void write(Ostream& os) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace departureDiameterModels
|
||||
} // End namespace wallBoilingModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,61 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2016-2019 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "departureDiameterModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
defineTypeNameAndDebug(departureDiameterModel, 0);
|
||||
defineRunTimeSelectionTable(departureDiameterModel, dictionary);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::departureDiameterModel::departureDiameterModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::departureDiameterModel::~departureDiameterModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::wallBoilingModels::departureDiameterModel::write(Ostream& os) const
|
||||
{
|
||||
os.writeEntry("type", this->type());
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,129 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2016-2018 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::wallBoilingModels::departureDiameterModel
|
||||
|
||||
Description
|
||||
Base class for bubble departure diameter models
|
||||
|
||||
SourceFiles
|
||||
departureDiameterModel.C
|
||||
newdepartureDiameterModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef departureDiameterModel_H
|
||||
#define departureDiameterModel_H
|
||||
|
||||
#include "volFields.H"
|
||||
#include "dictionary.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
#include "phaseModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class departureDiameterModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class departureDiameterModel
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
departureDiameterModel(const departureDiameterModel&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const departureDiameterModel&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("departureDiameterModel");
|
||||
|
||||
|
||||
//- Declare runtime construction
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
departureDiameterModel,
|
||||
dictionary,
|
||||
(
|
||||
const dictionary& dict
|
||||
),
|
||||
(dict)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
departureDiameterModel();
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
//- Select null constructed
|
||||
static autoPtr<departureDiameterModel> New(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~departureDiameterModel();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Calculate and return the departure diameter field
|
||||
virtual tmp<scalarField> dDeparture
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const = 0;
|
||||
|
||||
virtual void write(Ostream& os) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
} // End namespace wallBoilingModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,58 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "departureDiameterModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::wallBoilingModels::departureDiameterModel>
|
||||
Foam::wallBoilingModels::departureDiameterModel::New
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word departureDiameterModelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting departureDiameterModel: "
|
||||
<< departureDiameterModelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(departureDiameterModelType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown departureDiameterModelType type "
|
||||
<< departureDiameterModelType << endl << endl
|
||||
<< "Valid departureDiameterModel types are : " << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,99 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2016-2018 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "Cole.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "uniformDimensionedFields.H"
|
||||
#include "compressibleTurbulenceModel.H"
|
||||
#include "ThermalDiffusivity.H"
|
||||
#include "PhaseCompressibleTurbulenceModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
namespace departureFrequencyModels
|
||||
{
|
||||
defineTypeNameAndDebug(Cole, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
departureFrequencyModel,
|
||||
Cole,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::departureFrequencyModels::
|
||||
Cole::Cole(const dictionary& dict)
|
||||
:
|
||||
departureFrequencyModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::departureFrequencyModels::
|
||||
Cole::~Cole()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::wallBoilingModels::departureFrequencyModels::
|
||||
Cole::fDeparture
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& dDep
|
||||
) const
|
||||
{
|
||||
// Gravitational acceleration
|
||||
const uniformDimensionedVectorField& g =
|
||||
liquid.mesh().time().lookupObject<uniformDimensionedVectorField>("g");
|
||||
|
||||
const scalarField rhoLiquid(liquid.thermo().rho(patchi));
|
||||
const scalarField rhoVapor(vapor.thermo().rho(patchi));
|
||||
|
||||
return sqrt
|
||||
(
|
||||
4*mag(g).value()
|
||||
*max(rhoLiquid - rhoVapor, scalar(0.1))
|
||||
/(3*dDep*rhoLiquid)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,107 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2016-2018 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::wallBoilingModels::departureFrequencyModels::Cole
|
||||
|
||||
Description
|
||||
Cole correlation for bubble departure frequency.
|
||||
|
||||
Reference:
|
||||
\verbatim
|
||||
Cole, R. (1960).
|
||||
A photographic study of pool boiling in the region of the critical heat
|
||||
flux.
|
||||
AIChE Journal, 6(4), 533-538.
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
Cole.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Cole_H
|
||||
#define Cole_H
|
||||
|
||||
#include "departureFrequencyModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
namespace departureFrequencyModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class Cole Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class Cole
|
||||
:
|
||||
public departureFrequencyModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("Cole");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from a dictionary
|
||||
Cole(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~Cole();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Calculate and return the bubble departure frequency
|
||||
virtual tmp<scalarField> fDeparture
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& dDep
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace departureFrequencyModels
|
||||
} // End namespace wallBoilingModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,62 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2016-2019 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "departureFrequencyModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
defineTypeNameAndDebug(departureFrequencyModel, 0);
|
||||
defineRunTimeSelectionTable(departureFrequencyModel, dictionary);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::departureFrequencyModel::departureFrequencyModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::departureFrequencyModel::~departureFrequencyModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::wallBoilingModels::departureFrequencyModel::write(Ostream& os) const
|
||||
{
|
||||
os.writeEntry("type", this->type());
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,127 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2016-2018 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::wallBoilingModels::departureFrequencyModel
|
||||
|
||||
Description
|
||||
Base class for bubble departure frequency models
|
||||
|
||||
SourceFiles
|
||||
departureFrequencyModel.C
|
||||
newdepartureFrequencyModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef departureFrequencyModel_H
|
||||
#define departureFrequencyModel_H
|
||||
|
||||
#include "volFields.H"
|
||||
#include "dictionary.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
#include "phaseModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class departureFrequencyModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class departureFrequencyModel
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
departureFrequencyModel(const departureFrequencyModel&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const departureFrequencyModel&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("departureFrequencyModel");
|
||||
|
||||
|
||||
//- Declare runtime construction
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
departureFrequencyModel,
|
||||
dictionary,
|
||||
(
|
||||
const dictionary& dict
|
||||
),
|
||||
(dict)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
departureFrequencyModel();
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
//- Select null constructed
|
||||
static autoPtr<departureFrequencyModel> New(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~departureFrequencyModel();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Calculate and return the bubble departure frequency
|
||||
virtual tmp<scalarField> fDeparture
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& dDep
|
||||
) const = 0;
|
||||
|
||||
virtual void write(Ostream& os) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
} // End namespace wallBoilingModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,58 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "departureFrequencyModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::wallBoilingModels::departureFrequencyModel>
|
||||
Foam::wallBoilingModels::departureFrequencyModel::New
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word departureFrequencyModelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting departureFrequencyModel: "
|
||||
<< departureFrequencyModelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(departureFrequencyModelType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown departureFrequencyModelType type "
|
||||
<< departureFrequencyModelType << endl << endl
|
||||
<< "Valid departureFrequencyModel types are : " << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,122 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "Bromley.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "uniformDimensionedFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
namespace filmBoilingModels
|
||||
{
|
||||
defineTypeNameAndDebug(Bromley, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
filmBoilingModel,
|
||||
Bromley,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::filmBoilingModels::Bromley::Bromley
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
filmBoilingModel(),
|
||||
Cn_(dict.lookupOrDefault<scalar>("Cn", 0.62))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::filmBoilingModels::Bromley::~Bromley()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::wallBoilingModels::filmBoilingModels::Bromley::htcFilmBoil
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const
|
||||
{
|
||||
|
||||
const fvPatchScalarField& Tw =
|
||||
liquid.thermo().T().boundaryField()[patchi];
|
||||
const uniformDimensionedVectorField& g =
|
||||
liquid.mesh().time().lookupObject<uniformDimensionedVectorField>("g");
|
||||
|
||||
const scalarField rhoVapor(vapor.thermo().rho(patchi));
|
||||
const scalarField rhoLiq(liquid.thermo().rho(patchi));
|
||||
const scalarField kappaVapor(vapor.kappa(patchi));
|
||||
|
||||
tmp<volScalarField> tCp = vapor.thermo().Cp();
|
||||
const volScalarField& Cp = tCp();
|
||||
const scalarField& CpVapor = Cp.boundaryField()[patchi];
|
||||
|
||||
const scalarField muVapor(vapor.mu(patchi));
|
||||
const scalarField dbVapor(vapor.d()().boundaryField()[patchi]);
|
||||
|
||||
return
|
||||
Cn_*pow
|
||||
(
|
||||
pow3(kappaVapor)
|
||||
*rhoVapor*(rhoLiq - rhoVapor)*mag(g.value())
|
||||
*(L + 0.4*CpVapor*max((Tw-Tsatw), scalar(0)))
|
||||
/(dbVapor*muVapor*max((Tw-Tsatw), scalar(1e-4))),
|
||||
0.25
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
void Foam::wallBoilingModels::filmBoilingModels::Bromley::write
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
filmBoilingModel::write(os);
|
||||
os.writeKeyword("Cn") << Cn_ << token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
|
||||
@ -0,0 +1,112 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::wallBoilingModels:filmBoilingModels:::Bromley
|
||||
|
||||
Description
|
||||
Boiling film correlation.
|
||||
|
||||
References:
|
||||
\verbatim
|
||||
A. Bromley, Heat transfer in stable film boiling,
|
||||
Chem. Eng. Prog. 58 (1950) 67–72.
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
Bromley.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Bromley_H
|
||||
#define Bromley_H
|
||||
|
||||
#include "filmBoilingModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
namespace filmBoilingModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class Bromley Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class Bromley
|
||||
:
|
||||
public filmBoilingModel
|
||||
{
|
||||
|
||||
// Private data:
|
||||
|
||||
//- Coefficient for nucleation site density
|
||||
scalar Cn_;
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("Bromley");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from a dictionary
|
||||
Bromley(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~Bromley();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Calculate and return the nucleation-site density
|
||||
virtual tmp<scalarField> htcFilmBoil
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const;
|
||||
|
||||
|
||||
virtual void write(Ostream& os) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace filmBoilingModels
|
||||
} // End namespace wallBoilingModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,60 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "filmBoilingModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
defineTypeNameAndDebug(filmBoilingModel, 0);
|
||||
defineRunTimeSelectionTable(filmBoilingModel, dictionary);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::filmBoilingModel::filmBoilingModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::filmBoilingModel::~filmBoilingModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::wallBoilingModels::filmBoilingModel::write(Ostream& os) const
|
||||
{
|
||||
os.writeKeyword("type") << this->type() << token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,127 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::filmBoilingModels::filmBoilingModel
|
||||
|
||||
Description
|
||||
Base class for nucleation site density models
|
||||
|
||||
SourceFiles
|
||||
filmBoilingModel.C
|
||||
newfilmBoilingModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef filmBoilingModel_H
|
||||
#define filmBoilingModel_H
|
||||
|
||||
#include "volFields.H"
|
||||
#include "dictionary.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
#include "phaseModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class filmBoilingModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class filmBoilingModel
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
filmBoilingModel(const filmBoilingModel&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const filmBoilingModel&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("filmBoilingModel");
|
||||
|
||||
|
||||
//- Declare runtime construction
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
filmBoilingModel,
|
||||
dictionary,
|
||||
(
|
||||
const dictionary& dict
|
||||
),
|
||||
(dict)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
filmBoilingModel();
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
//- Select null constructed
|
||||
static autoPtr<filmBoilingModel> New(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~filmBoilingModel();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Calculate temperature
|
||||
virtual tmp<scalarField> htcFilmBoil
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const = 0;
|
||||
|
||||
virtual void write(Ostream& os) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
} // End namespace wallBoilingModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,58 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "filmBoilingModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::wallBoilingModels::filmBoilingModel>
|
||||
Foam::wallBoilingModels::filmBoilingModel::New
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word filmBoilingModelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting filmBoilingModel: "
|
||||
<< filmBoilingModelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(filmBoilingModelType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown filmBoilingModelType type "
|
||||
<< filmBoilingModelType << endl << endl
|
||||
<< "Valid filmBoilingModel types are : " << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,89 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2016-2018 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "LemmertChawla.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
namespace nucleationSiteModels
|
||||
{
|
||||
defineTypeNameAndDebug(LemmertChawla, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
nucleationSiteModel,
|
||||
LemmertChawla,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::nucleationSiteModels::LemmertChawla::LemmertChawla
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
nucleationSiteModel(),
|
||||
Cn_(dict.lookupOrDefault<scalar>("Cn", 1))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::nucleationSiteModels::LemmertChawla::~LemmertChawla()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::wallBoilingModels::nucleationSiteModels::LemmertChawla::N
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const
|
||||
{
|
||||
const fvPatchScalarField& Tw =
|
||||
liquid.thermo().T().boundaryField()[patchi];
|
||||
|
||||
return Cn_*9.922e5*pow(max((Tw - Tsatw)/10, scalar(0)), 1.805);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,118 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2016-2018 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::wallBoilingModels::nucleationSiteModels::LemmertChawla
|
||||
|
||||
Description
|
||||
Lemmert & Chawla function for nucleation site density,
|
||||
correlation by Egorov & Menter.
|
||||
|
||||
References:
|
||||
\verbatim
|
||||
Lemmert, M., & Chawla, J. M. (1977).
|
||||
Influence of flow velocity on surface boiling heat transfer coefficient.
|
||||
Heat Transfer in Boiling, 237, 247.
|
||||
|
||||
Egorov, Y., & Menter, F. (2004).
|
||||
Experimental implementation of the RPI wall boiling model in CFX-5.6.
|
||||
Staudenfeldweg, 12, 83624.
|
||||
Technical Report ANSYS/TR-04-10, ANSYS Gmbh.
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
LemmertChawla.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef LemmertChawla_H
|
||||
#define LemmertChawla_H
|
||||
|
||||
#include "nucleationSiteModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
namespace nucleationSiteModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class LemmertChawla Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class LemmertChawla
|
||||
:
|
||||
public nucleationSiteModel
|
||||
{
|
||||
|
||||
// Private data:
|
||||
|
||||
//- Coefficient for nucleation site density
|
||||
scalar Cn_;
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("LemmertChawla");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from a dictionary
|
||||
LemmertChawla(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~LemmertChawla();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Calculate and return the nucleation-site density
|
||||
virtual tmp<scalarField> N
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace nucleationSiteModels
|
||||
} // End namespace wallBoilingModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,60 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2016-2018 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "nucleationSiteModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::wallBoilingModels::nucleationSiteModel>
|
||||
Foam::wallBoilingModels::nucleationSiteModel::New
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word nucleationSiteModelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting nucleationSiteModel: "
|
||||
<< nucleationSiteModelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(nucleationSiteModelType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown nucleationSiteModelType type "
|
||||
<< nucleationSiteModelType << endl << endl
|
||||
<< "Valid nucleationSiteModel types are : " << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,62 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2016-2019 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "nucleationSiteModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
defineTypeNameAndDebug(nucleationSiteModel, 0);
|
||||
defineRunTimeSelectionTable(nucleationSiteModel, dictionary);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::nucleationSiteModel::nucleationSiteModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::nucleationSiteModel::~nucleationSiteModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::wallBoilingModels::nucleationSiteModel::write(Ostream& os) const
|
||||
{
|
||||
os.writeEntry("type", this->type());
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,129 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2016-2018 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::wallBoilingModels::nucleationSiteModel
|
||||
|
||||
Description
|
||||
Base class for nucleation site density models
|
||||
|
||||
SourceFiles
|
||||
nucleationSiteModel.C
|
||||
newnucleationSiteModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef nucleationSiteModel_H
|
||||
#define nucleationSiteModel_H
|
||||
|
||||
#include "volFields.H"
|
||||
#include "dictionary.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
#include "phaseModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class nucleationSiteModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class nucleationSiteModel
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
nucleationSiteModel(const nucleationSiteModel&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const nucleationSiteModel&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("nucleationSiteModel");
|
||||
|
||||
|
||||
//- Declare runtime construction
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
nucleationSiteModel,
|
||||
dictionary,
|
||||
(
|
||||
const dictionary& dict
|
||||
),
|
||||
(dict)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
nucleationSiteModel();
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
//- Select null constructed
|
||||
static autoPtr<nucleationSiteModel> New(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~nucleationSiteModel();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Calculate and return the nucleation-site density
|
||||
virtual tmp<scalarField> N
|
||||
(
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const = 0;
|
||||
|
||||
virtual void write(Ostream& os) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
} // End namespace wallBoilingModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,97 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2016-2019 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "Lavieville.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
namespace partitioningModels
|
||||
{
|
||||
defineTypeNameAndDebug(Lavieville, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
partitioningModel,
|
||||
Lavieville,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::partitioningModels::
|
||||
Lavieville::Lavieville(const dictionary& dict)
|
||||
:
|
||||
partitioningModel(),
|
||||
alphaCrit_(readScalar(dict.lookup("alphaCrit")))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallBoilingModels::partitioningModels::
|
||||
Lavieville::~Lavieville()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::wallBoilingModels::partitioningModels::
|
||||
Lavieville::fLiquid
|
||||
(
|
||||
const scalarField& alphaLiquid
|
||||
) const
|
||||
{
|
||||
return
|
||||
pos0(alphaLiquid - alphaCrit_)
|
||||
*(
|
||||
1 - 0.5*exp(-20*(alphaLiquid - alphaCrit_))
|
||||
)
|
||||
+ neg(alphaLiquid - alphaCrit_)
|
||||
*(
|
||||
0.5*pow(alphaLiquid/alphaCrit_, 20*alphaCrit_)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
void Foam::wallBoilingModels::partitioningModels::
|
||||
Lavieville::write(Ostream& os) const
|
||||
{
|
||||
partitioningModel::write(os);
|
||||
os.writeKeyword("alphaCrit") << alphaCrit_ << token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,111 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2016-2018 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::wallBoilingModels::partitioningModels::Lavieville
|
||||
|
||||
Description
|
||||
Lavieville wall heat flux partitioning model.
|
||||
|
||||
Model parameters:
|
||||
alphaCrit: critical liquid fraction
|
||||
|
||||
Reference:
|
||||
\verbatim
|
||||
Lavieville, J., Quemerais, E., Mimouni, S., Boucker, M., &
|
||||
Mechitoua, N. (2006).
|
||||
NEPTUNE CFD V1. 0 theory manual.
|
||||
NEPTUNE report Nept_2004_L1, 2(3).
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
Lavieville.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Lavieville_H
|
||||
#define Lavieville_H
|
||||
|
||||
#include "partitioningModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace wallBoilingModels
|
||||
{
|
||||
namespace partitioningModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class Lavieville Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class Lavieville
|
||||
:
|
||||
public partitioningModel
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Critical liquid fraction
|
||||
scalar alphaCrit_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("Lavieville");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from a dictionary
|
||||
Lavieville(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~Lavieville();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Liquid blending function
|
||||
virtual tmp<scalarField> fLiquid(const scalarField& alphaLiquid) const;
|
||||
|
||||
virtual void write(Ostream& os) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace partitioningModels
|
||||
} // End namespace wallBoilingModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user