32 Foam::growthSizeGroupFvScalarFieldSource::w
34 const fvSource& model,
35 const diameterModels::sizeGroup& fi
39 const label q = this->q();
42 const word wName = fi.group().phase().name() +
":" + model.name() +
":w";
60 internalField().
mesh().time().
name(),
61 internalField().
mesh()
63 internalField().
mesh(),
73 if (!haveW || !w.hasStoredOldTimes())
75 const UPtrList<diameterModels::sizeGroup>& velGrpFis =
76 fi.group().sizeGroups();
78 w.primitiveFieldRef() = scalar(0);
82 w.primitiveFieldRef() +=
83 velGrpFis[i]*
pow(velGrpFis[i].
x(), scalar(q)/3 - 1);
88 return pow(fi.x(), scalar(q)/3)/w;
102 refCast<const diameterModels::sizeGroup>(this->internalField());
113 tinternalCoeff =
neg(source)*wi/xi;
118 tinternalCoeff =
neg(source)*wi/(xi - xiMinus1);
121 if (fi.
i() != popBalFis.
size() - 1)
124 tinternalCoeff.
ref() -=
pos(source)*wi/(xiPlus1 - xi);
128 tinternalCoeff.
ref() +=
pos(source)*wi/xi;
131 return tinternalCoeff;
142 refCast<const diameterModels::sizeGroup>(this->internalField());
154 tsourceCoeffs.
first() =
155 fiMinus1()*w(model, fiMinus1)*(xi/xiMinus1)/(xi - xiMinus1);
158 if (fi.
i() != popBalFis.
size() - 1)
163 - fiPlus1()*w(model, fiPlus1)*(xi/xiPlus1)/(xiPlus1 - xi);
166 return tsourceCoeffs;
178 refCast<const diameterModels::sizeGroup>(this->internalField());
186 fi.
i() == velGrpFis.
first().i()
188 : fi.
i() == velGrpFis.
last().i()
#define forAll(list, i)
Loop across all elements in list.
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 Mesh &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 templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
T & first()
Return reference to the first element of the list.
label size() const
Return the number of elements in the UPtrList.
T & last()
Return reference to the last element of the list.
const UPtrList< sizeGroup > & sizeGroups() const
Return the size groups belonging to this populationBalance.
Single size class fraction field representing a fixed particle volume as defined by the user through ...
const dimensionedScalar & x() const
Return representative volume of the sizeGroup.
const velocityGroup & group() const
Return const-reference to the velocityGroup.
label i() const
Return index of the size group within the population balance.
const populationBalanceModel & popBal() const
Return the populationBalance this velocityGroup belongs to.
const PtrList< sizeGroup > & sizeGroups() const
Return sizeGroups belonging to this velocityGroup.
Base class for finite volume sources.
virtual tmp< DimensionedField< scalar, volMesh > > sourceCoeff(const fvSource &model, const DimensionedField< scalar, volMesh > &source) const
Return the combined source coefficient.
virtual tmp< DimensionedField< scalar, volMesh > > internalCoeff(const fvSource &model, const DimensionedField< scalar, volMesh > &source) const
Return the internal coefficient.
virtual Pair< tmp< DimensionedField< scalar, volMesh > > > sourceCoeffs(const fvSource &model) const
Return the source coefficients for exchange with the groups below.
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.
void pow(LagrangianPatchField< typename powProduct< Type, r >::type > &f, const LagrangianPatchField< Type > &f1)
const dimensionSet dimVolume
dimensionedScalar neg(const dimensionedScalar &ds)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.