46 #define ACCESS_CARRIER_FIELDS(Type, nullArg) \
52 PtrDictionary<CarrierField<Type>>& coupled::carrierFields() const \
54 return CAT3(carrier, CAPITALIZE(Type), Fields_); \
59 #undef ACCESS_CARRIER_FIELDS
62 void Foam::clouds::coupled::clearCarrierFields()
64 #define CLEAR_TYPE_CARRIER_FIELDS(Type, nullArg) \
67 PtrDictionary<CarrierField<Type>>, \
68 carrierFields<Type>(), \
75 #undef CLEAR_TYPE_CARRIER_FIELDS
79 void Foam::clouds::coupled::resetCarrierFields(
const bool predict)
81 #define RESET_TYPE_CARRIER_FIELDS(Type, nullArg) \
84 PtrDictionary<CarrierField<Type>>, \
85 carrierFields<Type>(), \
89 iter().reset(predict); \
92 #undef RESET_TYPE_CARRIER_FIELDS
96 #define ACCESS_CARRIER_EQNS(Type, nullArg) \
102 PtrDictionary<CarrierEqn<Type>>& coupled::carrierEqns() const \
104 return CAT3(carrier, CAPITALIZE(Type), Eqns_); \
109 #undef ACCESS_CARRIER_EQNS
120 typeIOobject<volVectorField> io
122 "ddt(" +
U.name() +
")",
123 U.mesh().time().name(),
130 autoPtr<volVectorField>
141 if (Uc.psi().hasStoredOldTimes())
145 else if (!dUdtcPtr_.valid())
153 "ddt(" + Uc.psi().name() +
")",
154 Uc.psi().mesh().time().name(),
173 #define CLEAR_TYPE_CARRIER_EQNS(Type, nullArg) \
176 PtrDictionary<CarrierEqn<Type>>, \
177 carrierEqns<Type>(), \
184 #undef CLEAR_TYPE_CARRIER_EQNS
190 resetCarrierFields(predict);
196 clearCarrierFields();
204 dUdtcPtr_(readDUdtc(
c)),
230 return dUdtc() + (Uc.psi() &
fvc::grad(Uc.psi()));
234 nuc(
c.derivedField<scalar>(*
this, &coupled::calcNuc))
Functions for calculating the time derivative for a Lagrangian equation.
Generic GeometricField class.
void reset(const GeometricField< Type, GeoMesh, PrimitiveField2 > &)
Reset the field contents to the given field.
word group() const
Return group (extension part of name)
word member() const
Return member (name without the extension)
static word groupName(Name name, const word &group)
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Base class for clouds. Provides a basic evolution algorithm, models, and a database for caching deriv...
Base class for clouds which are coupled to a fluid.
void initialise(const bool predict)
Initialisation hook.
static word carrierName(const word &name)
Modify a name to disambiguate it as relating to the carrier.
coupled(const cloud &c)
Construct from a reference to the cloud.
void clearCarrierEqns()
Clear the carrier equations.
const CarrierField< vector > & Uc
Carrier velocity.
void partition()
Partition hook.
virtual ~coupled()
Destructor.
A class for handling words, derived from string.
#define RESET_TYPE_CARRIER_FIELDS(Type, nullArg)
#define ACCESS_CARRIER_EQNS(Type, nullArg)
#define CLEAR_TYPE_CARRIER_EQNS(Type, nullArg)
#define CLEAR_TYPE_CARRIER_FIELDS(Type, nullArg)
#define ACCESS_CARRIER_FIELDS(Type, nullArg)
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FOR_ALL_FIELD_TYPES(Macro,...)
Calculate the curl of the given volField by constructing the Hodge-dual of the symmetric part of the ...
Calculate the first temporal derivative.
defineTypeNameAndDebug(coupled, 0)
const dimensionedScalar c
Speed of light in a vacuum.
tmp< VolField< Type > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
tmp< VolField< Type > > curl(const VolField< Type > &vf)
tmp< VolField< typename outerProduct< vector, Type >::type > > grad(const SurfaceField< Type > &ssf)
VolField< vector > volVectorField
const dimensionSet dimTime
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
const dimensionSet dimVelocity
FOR_ALL_FIELD_TYPES(makeFieldSourceTypedef)