52 void Foam::fv::phaseLimitStabilisation::readCoeffs(
const dictionary&
dict)
54 fieldName_ =
dict.lookup<word>(
"field");
55 rateName_ =
dict.lookup<word>(
"rate");
56 residualAlpha_ =
dict.lookup<scalar>(
"residualAlpha");
60 template<
class Type,
class RhoRateFieldType>
61 void Foam::fv::phaseLimitStabilisation::addStabilisation
64 const RhoRateFieldType& rhoRate,
68 eqn -=
fvm::Sp(
max(residualAlpha_ -
alpha(), scalar(0))*rhoRate, eqn.psi());
73 void Foam::fv::phaseLimitStabilisation::addSupType
76 const VolField<Type>& field,
80 addSupType(
alpha, geometricOneField(), field, eqn);
84 template<
class Type,
class RhoFieldType>
85 void Foam::fv::phaseLimitStabilisation::addSupType
88 const RhoFieldType&
rho,
89 const VolField<Type>& field,
93 if (
mesh().foundObject<volScalarField::Internal>(rateName_))
100 else if (
mesh().foundObject<uniformDimensionedScalarField>(rateName_))
102 const uniformDimensionedScalarField&
rate =
113 <<
" " << rateName_ <<
" from objectRegistry " << this->
name()
114 <<
" failed\n available objects of type "
117 <<
"\n available objects of type "
119 <<
mesh().
toc<uniformDimensionedScalarField>()
130 const word& modelType,
136 fieldName_(
word::null),
137 rateName_(
word::null),
155 fv::phaseLimitStabilisation
162 fv::phaseLimitStabilisation
191 readCoeffs(coeffs(
dict));
Macros for easy insertion into run-time selection tables.
DimensionedField< Type, GeoMesh, PrimitiveField > Internal
Type of the internal field from which this GeometricField is derived.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Mesh data needed to do the Finite Volume discretisation.
Finite volume model abstract base class.
static const dictionary & coeffs(const word &modelType, const dictionary &)
Return the coefficients sub-dictionary for a given model type.
virtual bool read(const dictionary &dict)
Read source dictionary.
Stabilisation source for phase transport equations.
virtual wordList addSupFields() const
Return the list of fields for which the fvModel adds source term.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
virtual bool movePoints()
Add a source term to an incompressible phase equation.
virtual bool read(const dictionary &dict)
Read dictionary.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
phaseLimitStabilisation(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from components.
Type & lookupObjectRef(const word &name) const
Lookup and return the object reference of the given Type.
wordList toc(const word &className) const
Return the list of names of IOobjects of given class name.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
#define IMPLEMENT_FV_MODEL_ADD_ALPHA_RHO_FIELD_SUP(Type, modelType)
#define IMPLEMENT_FV_MODEL_ADD_RHO_FIELD_SUP(Type, modelType)
Calculate the matrix for implicit and explicit sources.
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
addToRunTimeSelectionTable(fvConstraint, bound, dictionary)
defineTypeNameAndDebug(bound, 0)
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const VolField< Type > &)
List< word > wordList
A List of words.
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.
errorManip< error > abort(error &err)
FOR_ALL_FIELD_TYPES(makeDimensionedPointFieldFunctions)
VolField< scalar > volScalarField
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)