47 namespace functionObjects
74 const bool dUdt = tracking == trackingType::parabolic;
94 if (context == cloud::contextType::fvModel)
96 result = initPsicDdt(m, rhoc) || result;
99 result = initPsicDdt(m, rhocPhase) || result;
112 if (context == cloud::contextType::fvModel)
116 const label ic = iToic[i];
119 result = initPsicDdt(m, Yc[ic]) || result;
123 const label icPhase = iToicPhase[i];
124 if (icPhase != -1 && &YcPhase[icPhase] != &Yc[ic])
126 result = initPsicDdt(m, YcPhase[icPhase]) || result;
136 if (context == cloud::contextType::fvModel)
140 result = initPsicDdt(m, hec) || result;
142 if (hasThermocPhase() && &hecPhase != &hec)
144 result = initPsicDdt(m, hecPhase) || result;
152 if (context == cloud::contextType::fvModel)
154 result = initPsicDdt(m, Uc) || result;
155 if (hasPhase() && &UcPhase != &Uc)
157 result = initPsicDdt(m, UcPhase) || result;
181 thermo().correctPressure(subMesh);
199 numberEqn.
solve(
final);
202 numberByNumber0 = number/number.
oldTime();
205 oneEqn *= numberByNumber0();
226 if (context == cloud::contextType::fvModel &&
final)
228 carrierEqn(rhoc) += number*psicEqn(deltaT, m, rhoc);
231 carrierEqn(rhocPhase) += number*psicEqn(deltaT, m, rhocPhase);
239 this->thermo<multicomponentLagrangianThermo>();
243 if (i ==
thermo.defaultSpecie())
continue;
259 thermo.normaliseY(subMesh);
262 if (context == cloud::contextType::fvModel &&
final)
266 const label ic = iToic[i];
269 carrierEqn(Yc[ic]) +=
270 number*psicEqn(deltaT, m,
e, Yc[ic]);
274 const label icPhase = iToicPhase[i];
275 if (icPhase != -1 && &YcPhase[icPhase] != &Yc[ic])
277 carrierEqn(YcPhase[icPhase]) +=
278 number*psicEqn(deltaT, m,
e, YcPhase[icPhase]);
298 thermo().correct(subMesh);
304 if (context == cloud::contextType::fvModel &&
final)
308 carrierEqn(hec) += number*psicEqn(deltaT, m,
e, hec);
310 if (hasThermocPhase() && &hecPhase != &hec)
312 carrierEqn(hecPhase) += number*psicEqn(deltaT, m,
e, hecPhase);
330 if (context == cloud::contextType::fvModel &&
final)
332 carrierEqn(Uc) += number*psicEqn(deltaT, m,
U, Uc);
333 if (hasPhase() && &UcPhase != &Uc)
335 carrierEqn(UcPhase) += number*psicEqn(deltaT, m,
U, UcPhase);
Functions for calculating the time derivative for a Lagrangian equation.
Functions for calculating the time derivative for a Lagrangian equation.
#define forAll(list, i)
Loop across all elements in list.
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...
const GeoMesh & mesh() const
Return mesh.
This class stores the coefficients of a Lagrangian equation, and facilitates solving that equation an...
void solve(const bool final)
Solve.
bool valid() const
Determine whether this matrix has any valid coefficients.
Class containing Lagrangian geometry and topology.
List of Lagrangian models, constructed as a (Lagrangian) mesh object. Provides similar functions to t...
bool addsSupToField(const word &fieldName) const
Return true if the LagrangianModels adds a source term to the.
Mesh that relates to a sub-section of a Lagrangian mesh. This is used to construct fields that relate...
const Field0Type & oldTime() const
Return the old-time field.
Base class for clouds. Provides a basic evolution algorithm, models, and a database for caching deriv...
contextType
Context in which this cloud is used.
virtual void solve(const bool initial, const bool final)
Solve the cloud's evolution over the current time-step.
Foam::LagrangianModels & LagrangianModels() const
Access the models.
virtual void partition()
Partition hook.
CloudStateField< vector > U
Velocity.
Base class for clouds which are carried by a fluid.
void clearCarrierFields()
Clear the carrier fields.
void resetCarrierFields(const bool initial)
Reset the carrier fields.
void updateCarrier()
Update the cached carrier fields.
Base class for clouds which are coupled to a fluid with a thermodynamic model.
void clearCarrierEqns()
Clear the carrier equations.
Base class for clouds in which particles are grouped into parcels.
Base class for clouds of massive particles which are coupled to a fluid.
const CloudDerivedField< scalar > & m
Mass.
Cloud with spherical particles with multicomponent thermodynamic modelling, grouped into parcels.
virtual void solve(const bool initial, const bool final)
Solve the cloud's evolution over the current time-step.
virtual bool reCalculateModified()
Do we need to re-calculate particles that are modified?
virtual tmp< LagrangianSubVectorField > dUdt(const LagrangianSubMesh &) const
Return the acceleration with which to do second-order tracking.
multicomponentParcel(LagrangianMesh &mesh, const contextType context, const dictionary &dict)
Construct from a mesh and context.
virtual ~multicomponentParcel()
Destructor.
virtual void partition()
Partition hook.
virtual void calculate(const LagrangianSubScalarField &deltaT, const bool final)
Update the cloud properties.
Base class for clouds with multicomponent thermodynamic modelling.
Base class for clouds of spherical particles which are coupled to a carrier.
Base class for clouds with spherical particles.
void correct(const LagrangianSubScalarSubField &v)
Correct the shape to match the given volume.
const Thermo & thermo(const Args &... args) const
Get a reference to the thermodynamic model of a given type.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Base-class for multicomponent Lagrangian thermodynamic models.
Variant type that either contains and behaves as tmp object or represents a value of one....
A class for managing temporary objects.
static const word null
An empty word.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
tmp< LagrangianSubField< Type > > Ddt(const LagrangianSubSubField< Type > &psi)
Return the instantaneous time-derivative.
tmp< LagrangianEqn< Type > > Ddt(const LagrangianSubScalarField &deltaT, LagrangianSubSubField< Type > &psi)
Return the time-derivative matrix.
bool initDdt(const dimensionSet &mDims, const LagrangianSubSubField< Type > &psi, const bool instantaneousDdt=false)
Initialise time-derivative information. Registers fields used to.
addToRunTimeSelectionTable(cloud, dynamicParcel, LagrangianMesh)
defineTypeNameAndDebug(carried, 0)
makeCloudFunctionObject(dynamicParcel)
makeCloudFvModel(dynamicParcel)
const dimensionSet & dimless
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 & dimMass
tmp< DimensionedField< Type, GeoMesh, SubField > > toSubField(const DimensionedField< Type, GeoMesh, Field > &)
Return a temporary sub-field from a reference to a field.
PtrList< volScalarField > & Y
fluidMulticomponentThermo & thermo