26 #include "VoFTurbulenceDamping.H" 55 const word& sourceName,
56 const word& modelType,
57 const dictionary& dict,
61 fvModel(sourceName, modelType, dict, mesh),
62 phaseName_(dict.lookupOrDefault(
"phase", word::null)),
66 mesh.lookupObject<compressibleTwoPhaseMixture>
71 interface_(
refCast<const interfaceProperties>(mixture_)),
74 mesh.lookupObject<compressibleMomentumTransportModel>
78 betaStar_(
"betaStar",
dimless, 0),
86 fieldName_ = epsilonName;
87 C2_.read(turbulence_.coeffDict());
91 fieldName_ = omegaName;
92 betaStar_.read(turbulence_.coeffDict());
95 if (turbulence_.coeffDict().found(
"beta"))
97 beta_.read(turbulence_.coeffDict());
108 <<
"Cannot find either " << epsilonName <<
" or " << omegaName
125 fvMatrix<scalar>& eqn,
126 const word& fieldName
131 Info<<
type() <<
": applying source to " << eqn.psi().name() <<
endl;
136 mixture_.alpha1()()*mixture_.rho1()()*
sqr(mixture_.thermo1().nu()()())
137 + mixture_.alpha2()()*mixture_.rho2()()*
sqr(mixture_.thermo2().nu()()())
140 if (fieldName ==
"epsilon")
142 eqn += interface_.fraction()*C2_*aRhoSqrnu*turbulence_.k()()
145 else if (fieldName ==
"omega")
147 eqn += interface_.fraction()*beta_*aRhoSqrnu
148 /(
sqr(betaStar_)*
pow4(delta_));
153 <<
"Support for field " << fieldName <<
" is not implemented" 163 fvMatrix<scalar>& eqn,
164 const word& fieldName
169 Info<<
type() <<
": applying source to " << eqn.psi().name() <<
endl;
172 tmp<volScalarField::Internal> taRhoSqrnu;
174 if (mixture_.alpha1().name() == alpha.name())
176 taRhoSqrnu = mixture_.alpha1()()*mixture_.rho1()()
177 *
sqr(mixture_.thermo1().nu()()());
179 else if (mixture_.alpha2().name() == alpha.name())
181 taRhoSqrnu = mixture_.alpha2()()*mixture_.rho2()()
182 *
sqr(mixture_.thermo2().nu()()());
187 <<
"Unknown phase-fraction " << alpha.name()
193 eqn += interface_.fraction()*C2_*taRhoSqrnu*turbulence_.k()()
198 eqn += interface_.fraction()*beta_*taRhoSqrnu
199 /(
sqr(betaStar_)*
pow4(delta_));
204 <<
"Support for field " << fieldName <<
" is not implemented" virtual bool movePoints()
Update for mesh motion.
defineTypeNameAndDebug(fixedTemperatureConstraint, 0)
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
virtual void addSup(const volScalarField &rho, fvMatrix< scalar > &eqn, const word &fieldName) const
Add explicit contribution to epsilon or omega equation.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
To & refCast(From &r)
Reference type cast template function.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
Ostream & endl(Ostream &os)
Add newline and flush stream.
VoFTurbulenceDamping(const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from explicit source name and mesh.
const dimensionSet dimless
DimensionedField< scalar, volMesh > Internal
Type of the internal field from which this GeometricField is derived.
Macros for easy insertion into run-time selection tables.
const dimensionSet dimLength
GeometricField< scalar, fvPatchField, volMesh > volScalarField
compressibleMomentumTransportModel momentumTransportModel
static word groupName(Name name, const word &group)
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
addToRunTimeSelectionTable(fvConstraint, fixedTemperatureConstraint, dictionary)
List< word > wordList
A List of words.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
virtual wordList addSupFields() const
Return the list of fields for which the option adds source term.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
dimensionedScalar pow4(const dimensionedScalar &ds)