44 void Foam::fv::massTransfer::readCoeffs()
54 <<
"Cannot change the phases of a " << typeName <<
" model "
90 if (mesh().foundObject<volScalarField::Internal>(rhoNames()[i]))
96 const word physicalPropertiesName =
99 if (mesh().foundObject<IOdictionary>(physicalPropertiesName))
102 mesh().lookupObject<
IOdictionary>(physicalPropertiesName);
118 <<
"Could not determine the density " << rhoNames()[i]
119 <<
" for phase " << phaseNames()[i]
132 <<
"alphaOrField=" << alphaOrField.
name()
133 <<
", eqnField=" << eqn.
psi().name() <<
endl;
135 const label i = index(alphaNames(), alphaOrField.
name());
140 eqn +=
S(alphaOrField.
name())/
rho(i);
145 addSupType<scalar>(alphaOrField, eqn);
158 <<
"alphaOrRho=" << alphaOrRho.
name()
159 <<
", rhoOrField=" << rhoOrField.
name()
160 <<
", eqnField=" << eqn.
psi().name() <<
endl;
165 index(alphaNames(), alphaOrRho.
name()) != -1
166 && index(rhoNames(), rhoOrField.
name()) != -1
169 eqn +=
S(alphaOrRho.
name());
174 addSupType<scalar>(alphaOrRho, rhoOrField, eqn);
184 const word& modelType,
190 phaseNames_(lookupPhaseNames()),
191 alphaNames_(lookupPhaseFieldNames(
"alpha")),
192 rhoNames_(lookupPhaseFieldNames(
"rho"))
206 ||
group == phaseNames_.first()
207 ||
group == phaseNames_.second();
221 <<
"eqnField=" << eqn.
psi().name() <<
endl;
224 <<
"Field-less mass transfers are not possible"
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
static tmp< DimensionedField< Type, GeoMesh > > New(const word &name, const Mesh &mesh, const dimensionSet &, const Field< Type > &)
Return a temporary field constructed from name, mesh,.
Generic GeometricField class.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
word group() const
Return group (extension part of name)
const word & name() const
Return name.
static word groupName(Name name, const word &group)
A list of keyword definitions, which are a keyword followed by any number of values (e....
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Mesh data needed to do the Finite Volume discretisation.
const dictionary & coeffs() const
Return dictionary.
virtual bool read(const dictionary &dict)
Read source dictionary.
Base class for sources which are specified as a specific value (e.g., mass flow rate per unit volume)...
Base class for mass transfers between phases.
void addSupType(const VolField< Type > &field, fvMatrix< Type > &eqn) const
Add a source term to an equation.
const Pair< word > lookupPhaseFieldNames(const word &name) const
Lookup the phase field names.
virtual bool read(const dictionary &dict)
Read source dictionary.
tmp< volScalarField::Internal > rho(const label i) const
Return the density.
massTransfer(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from explicit source name and mesh.
virtual void addSup(fvMatrix< scalar > &eqn) const
Add a source term to a field-less proxy equation.
const Pair< word > lookupPhaseNames() const
Lookup the phase names.
virtual bool addsSupToField(const word &fieldName) const
Return true if the fvModel adds a source term to the given.
virtual tmp< DimensionedField< scalar, volMesh > > S(const word &fieldName) const
Return the source value.
A base class for physical properties.
A class for managing temporary objects.
A class for handling words, derived from string.
static const word null
An empty word.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#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_FIELD_SUP(Type, modelType)
#define IMPLEMENT_FV_MODEL_ADD_ALPHA_RHO_FIELD_SUP(Type, modelType)
#define IMPLEMENT_FV_MODEL_ADD_RHO_FIELD_SUP(Type, modelType)
#define DebugInFunction
Report an information message using Foam::Info.
const char *const group
Group name for atomic constants.
defineTypeNameAndDebug(bound, 0)
tmp< fvMatrix< Type > > S(const Pair< tmp< volScalarField::Internal >> &, const VolField< Type > &)
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensionedScalar sign(const dimensionedScalar &ds)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
const dimensionSet dimDensity
FOR_ALL_FIELD_TYPES(makeFieldSourceTypedef)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.