28 #include "surfaceInterpolate.H" 44 phaseTurbulenceStabilisation,
53 void Foam::fv::phaseTurbulenceStabilisation::addSup
57 fvMatrix<scalar>& eqn,
64 Info<<
type() <<
": applying source to " << eqn.psi().name() <<
endl;
67 const fvMesh& mesh = this->
mesh();
70 phase_.fluid().movingPhases();
93 if (movingPhases[
phasei] != phase_)
100 momentumTransportModel::typeName,
112 turbulence.epsilon()/turbulence.k(),
113 1.0/phase_.time().deltaT()
117 transferRate += phaseTransferRate;
118 psiTransferRate += phaseTransferRate*(turbulence.*
psi)()();
128 eqn += transferCoeff*psiTransferRate;
129 eqn -=
fvm::Sp(transferCoeff*transferRate, eqn.psi());
137 const word& sourceName,
138 const word& modelType,
139 const dictionary& dict,
143 fvModel(sourceName, modelType, dict, mesh),
144 phaseName_(dict.
lookup(
"phase")),
145 alphaInversion_(
"alphaInversion",
dimless, dict),
148 mesh.lookupObject<phaseModel>(IOobject::groupName(
"alpha", phaseName_))
168 fieldNames_.append(kName);
173 fieldNames_.append(epsilonName);
178 fieldNames_.append(omegaName);
191 void Foam::fv::phaseTurbulenceStabilisation::addSup
195 fvMatrix<scalar>& eqn,
196 const word& fieldName
232 <<
"Support for field " << fieldName <<
" is not implemented" 240 const polyTopoChangeMap&
251 const polyDistributionMap&
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
defineTypeNameAndDebug(fixedTemperatureConstraint, 0)
#define forAll(list, i)
Loop across all elements in list.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
static tmp< DimensionedField< Type, GeoMesh > > New(const word &name, const Mesh &mesh, const dimensionSet &)
Return a temporary field constructed from name, mesh.
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...
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
const dimensionSet dimless
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
DimensionedField< scalar, volMesh > Internal
Type of the internal field from which this GeometricField is derived.
Macros for easy insertion into run-time selection tables.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
compressibleMomentumTransportModel momentumTransportModel
const dimensionSet dimTime
virtual bool movePoints()
Update for mesh motion.
stressControl lookup("compactNormalStress") >> compactNormalStress
Calculate the gradient of the given field.
static word groupName(Name name, const word &group)
const volScalarField & psi
UPtrList< phaseModel > phaseModelPartialList
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
virtual wordList addSupFields() const
Return the list of fields for which the option adds source term.
virtual tmp< volScalarField > k() const =0
Return the turbulence kinetic energy.
bool notNull(const T &t)
Return true if t is not a reference to the nullObject of type T.
addToRunTimeSelectionTable(fvConstraint, fixedTemperatureConstraint, dictionary)
virtual void addSup(fvMatrix< scalar > &eqn, const word &fieldName) const
Add explicit contribution to mixture epsilon or omega equation.
phaseCompressibleMomentumTransportModel momentumTransportModel
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
virtual tmp< volScalarField > omega() const =0
Return the turbulence specific dissipation rate.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
phaseTurbulenceStabilisation(const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from explicit source name and mesh.
virtual tmp< volScalarField > epsilon() const =0
Return the turbulence kinetic energy dissipation rate.
Calculate the matrix for implicit and explicit sources.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.