43 Foam::clouds::coupledToFluid::getRhocVf(
const word& phaseName)
const
52 const word thermocName =
61 <<
"Could not determine the carrier density"
64 return tmp<volScalarField>(
nullptr);
69 Foam::clouds::coupledToFluid::getMucVf(
const word& phaseName)
const
78 const word thermocName =
81 if (mesh_.poly().foundObject<fluidThermo>(thermocName))
83 return mesh_.poly().lookupObject<fluidThermo>(thermocName).
mu();
86 return NullObjectRef<volScalarField>();
91 Foam::clouds::coupledToFluid::calcNuc
93 const LagrangianModelRef& model,
94 const LagrangianSubMesh& subMesh
97 return muc(model, subMesh)/rhoc(model, subMesh);
107 if (trhocVf_.isTmp())
109 trhocVf_.ref() = getRhocVf(carriedCloud_.carrierPhaseName());
112 if (trhocPhaseVf_.isTmp())
114 trhocPhaseVf_.ref() = getRhocVf(carriedCloud_.phaseName());
129 carriedCloud_(carriedCloud),
130 trhocVf_(getRhocVf(carriedCloud.carrierPhaseName())),
133 carriedCloud.hasPhase()
134 ? getRhocVf(carriedCloud.phaseName())
137 mucVf_(getMucVf(carriedCloud.carrierPhaseName())),
138 rhoc(carriedCloud.carrierField<scalar>(trhocVf_())),
141 carriedCloud.hasPhase()
142 ? carriedCloud.carrierField<scalar>(trhocPhaseVf_())
143 : carriedCloud.noCarrierField<scalar>(
"rho",
"density", true)
148 ?
c.derivedField<scalar>
156 return rhoc(model, subMesh)*
nuc(model, subMesh);
159 : carriedCloud.carrierField<scalar>(mucVf_)
Generic GeometricField class.
static word groupName(Name name, const word &group)
const polyMesh & poly() const
Access the poly mesh.
Simple wrapper to provide an optional reference to a Lagrangian model.
Mesh that relates to a sub-section of a Lagrangian mesh. This is used to construct fields that relate...
Base class for clouds. Provides a basic evolution algorithm, models, and a database for caching deriv...
Base class for clouds which are carried by a fluid.
Base class for clouds which are coupled to a variable density fluid.
const CarrierField< scalar > & rhoc
Carrier density.
virtual ~coupledToFluid()
Destructor.
coupledToFluid(const cloud &c, const carried &)
Construct from a reference to the cloud.
void updateCarrier()
Update the cached carrier fields.
Base class for clouds which are coupled to a carrier.
const CloudDerivedField< scalar > & nuc
Carrier kinematic viscosity.
void updateCarrier()
Update the cached carrier fields.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type and name.
bool foundObject(const word &name) const
Is the named Type in registry.
A class for managing temporary objects.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
defineTypeNameAndDebug(carried, 0)
const dimensionedScalar mu
Atomic mass unit.
const dimensionedScalar c
Speed of light in a vacuum.
errorManipArg< error, int > exit(error &err, const int errNo=1)
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.
VolField< scalar > volScalarField
const T & NullObjectRef()
Return const reference to the nullObject of type T.
bool isNull(const T &t)
Return true if t is a reference to the nullObject of type T.