31 template<
class ParcelType>
35 template<
class ParcelType>
44 template<
class ParcelType>
66 is >>
mass0_ >> Yg >> Yl >> Ys;
70 is.
read(
reinterpret_cast<char*
>(&
mass0_), sizeofFields_);
82 "ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel"
92 template<
class ParcelType>
93 template<
class CloudType>
100 template<
class ParcelType>
101 template<
class CloudType,
class CompositionType>
105 const CompositionType& compModel
117 c.checkFieldIOobject(
c, mass0);
123 p.mass0_ = mass0[i++];
127 const label idGas = compModel.idGas();
128 const wordList& gasNames = compModel.componentNames(idGas);
129 const label idLiquid = compModel.idLiquid();
130 const wordList& liquidNames = compModel.componentNames(idLiquid);
131 const label idSolid = compModel.idSolid();
132 const wordList& solidNames = compModel.componentNames(idSolid);
133 const wordList& stateLabels = compModel.stateLabels();
139 p.YGas_.setSize(gasNames.
size(), 0.0);
140 p.YLiquid_.setSize(liquidNames.
size(), 0.0);
141 p.YSolid_.setSize(solidNames.
size(), 0.0);
151 "Y" + gasNames[j] + stateLabels[idGas],
161 p.YGas_[j] = YGas[i++]/(
p.Y()[idGas] + rootVSmall);
171 "Y" + liquidNames[j] + stateLabels[idLiquid],
181 p.YLiquid_[j] = YLiquid[i++]/(
p.Y()[idLiquid] + rootVSmall);
191 "Y" + solidNames[j] + stateLabels[idSolid],
201 p.YSolid_[j] = YSolid[i++]/(
p.Y()[idSolid] + rootVSmall);
207 template<
class ParcelType>
208 template<
class CloudType>
211 ParcelType::writeFields(
c);
215 template<
class ParcelType>
216 template<
class CloudType,
class CompositionType>
220 const CompositionType& compModel
223 ParcelType::writeFields(
c, compModel);
234 mass0[i++] =
p.mass0_;
239 const wordList& stateLabels = compModel.stateLabels();
241 const label idGas = compModel.idGas();
242 const wordList& gasNames = compModel.componentNames(idGas);
249 "Y" + gasNames[j] + stateLabels[idGas],
259 YGas[i++] = p0.
YGas()[j]*p0.Y()[idGas];
265 const label idLiquid = compModel.idLiquid();
266 const wordList& liquidNames = compModel.componentNames(idLiquid);
273 "Y" + liquidNames[j] + stateLabels[idLiquid],
283 YLiquid[i++] = p0.
YLiquid()[j]*p0.Y()[idLiquid];
286 YLiquid.
write(np > 0);
289 const label idSolid = compModel.idSolid();
290 const wordList& solidNames = compModel.componentNames(idSolid);
297 "Y" + solidNames[j] + stateLabels[idSolid],
307 YSolid[i++] = p0.
YSolid()[j]*p0.Y()[idSolid];
310 YSolid.
write(np > 0);
318 template<
class ParcelType>
327 os << static_cast<const ParcelType&>(
p)
335 os << static_cast<const ParcelType&>(
p);
338 reinterpret_cast<const char*
>(&
p.mass0_),
339 ReactingMultiphaseParcel<ParcelType>::sizeofFields_
341 os <<
p.YGas() <<
p.YLiquid() <<
p.YSolid();
347 "Ostream& operator<<"
350 "const ReactingMultiphaseParcel<ParcelType>&"
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
#define forAll(list, i)
Loop across all elements in list.
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Templated base class for dsmc cloud.
A primitive field of type <Type> with automated input and output.
streamFormat format() const
Return current stream format.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
virtual Istream & read(token &)=0
Return next token from stream.
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
void size(const label)
Override size to be inconsistent with allocated storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Multiphase variant of the reacting parcel class with one/two-way coupling with the continuous phase.
scalarField YLiquid_
Mass fractions of liquids [].
scalarField YSolid_
Mass fractions of solids [].
static void writeFields(const CloudType &c, const CompositionType &compModel)
Write.
scalarField YGas_
Mass fractions of gases [].
const scalarField & YGas() const
Return const access to mass fractions of gases.
ReactingMultiphaseParcel(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti, const label facei)
Construct from mesh, coordinates and topology.
scalar mass0_
Initial mass [kg].
const scalarField & YSolid() const
Return const access to mass fractions of solids.
const scalarField & YLiquid() const
Return const access to mass fractions of liquids.
static void readFields(CloudType &c, const CompositionType &compModel)
Read.
virtual bool write(const bool write=true) const
Write using setting from DB.
A class for handling character strings derived from std::string.
bool valid(const PtrList< ModelType > &l)
const dimensionedScalar c
Speed of light in a vacuum.
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 readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const HashSet< word > &selectedFields, LIFOStack< regIOobject * > &storedObjects)
Read the selected GeometricFields of the specified type.