32 Foam::growthGroupFractionFvScalarFieldSource::w
34 const fvSource& model,
41 const label q = this->q();
44 const word wName =
popBal.
phases()[
i].name() +
":" + model.name() +
":w";
53 internalField().
mesh(),
69 internalField().
mesh()
71 internalField().
mesh(),
81 if (!haveW || !w.hasStoredOldTimes())
83 w.primitiveFieldRef() = scalar(0);
92 w.primitiveFieldRef() +=
138 const label i = this->i();
147 tinternalCoeff =
neg(source)*wi/xi;
152 tinternalCoeff =
neg(source)*wi/(xi - xiMinus1);
158 tinternalCoeff.
ref() -=
pos(source)*wi/(xiPlus1 - xi);
162 tinternalCoeff.
ref() +=
pos(source)*wi/xi;
165 return tinternalCoeff;
176 const label i = this->i();
186 tsourceCoeffs.
first() =
187 fiMinus1*w(model, i - 1)*(xi/xiMinus1)/(xi - xiMinus1);
195 -fiPlus1*w(model, i + 1)*(xi/xiPlus1)/(xiPlus1 - xi);
198 return tsourceCoeffs;
210 const label i = this->i();
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
static tmp< DimensionedField< Type, GeoMesh, PrimitiveField > > New(const word &name, const GeoMesh &mesh, const dimensionSet &, const PrimitiveField< Type > &)
Return a temporary field constructed from name, mesh,.
DimensionedField< Type, GeoMesh, PrimitiveField > Internal
Type of the internal field from which this GeometricField is derived.
An ordered pair of two objects of type <Type> with first() and second() elements.
const Type & second() const
Return second.
const Type & first() const
Return first.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Base class for finite volume sources.
Base class for source conditions of properties of the groups in a population balance model.
const populationBalanceModel & popBal() const
Return the population balance.
label i() const
Return the index of this group.
Base class for source conditions which create a growth source terms in the group fraction equations o...
Base class for source conditions that create a growth source terms in the group fraction equations of...
virtual tmp< DimensionedField< scalar, fvMesh > > internalCoeff(const fvSource &model, const DimensionedField< scalar, fvMesh > &source) const
Return the internal coefficient.
virtual tmp< DimensionedField< scalar, fvMesh > > sourceCoeff(const fvSource &model, const DimensionedField< scalar, fvMesh > &source) const
Return the combined source coefficient.
virtual Pair< tmp< DimensionedField< scalar, fvMesh > > > sourceCoeffs(const fvSource &model) const
Return the source coefficients for exchange with the groups below.
growthGroupFractionFvScalarFieldSource(const DimensionedField< scalar, fvMesh > &, const dictionary &dict)
Construct from internal field and dictionary.
Model for tracking the evolution of a dispersed phase size distribution due to coalescence (synonymou...
const volScalarField & f(const label i) const
Access a group fraction.
const dimensionedScalar & v(const label i) const
Access the representative volumes diameters of a group.
const UPtrList< const diameterModels::populationBalance > & diameters() const
Access the list of diameter models associated with each group.
label nGroups() const
Return the number of groups in the population balance.
const UPtrList< const phaseModel > & phases() const
Access the list of phases associated with each group.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
dimensionedScalar pos(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.
const dimensionSet & dimVolume
dimensionedScalar neg(const dimensionedScalar &ds)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
tmp< DimensionedField< typename powProduct< Type, r >::type, GeoMesh, Field > > pow(const DimensionedField< Type, GeoMesh, PrimitiveField > &df, typename powProduct< Type, r >::type)