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_);
88 "ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel"
98 template<
class ParcelType>
99 template<
class CloudType>
106 template<
class ParcelType>
107 template<
class CloudType,
class CompositionType>
111 const CompositionType& compModel
123 c.checkFieldIOobject(
c, mass0);
129 p.mass0_ = mass0[i++];
133 const label idGas = compModel.idGas();
134 const wordList& gasNames = compModel.componentNames(idGas);
135 const label idLiquid = compModel.idLiquid();
136 const wordList& liquidNames = compModel.componentNames(idLiquid);
137 const label idSolid = compModel.idSolid();
138 const wordList& solidNames = compModel.componentNames(idSolid);
139 const wordList& stateLabels = compModel.stateLabels();
157 "Y" + gasNames[j] + stateLabels[idGas],
167 p.YGas_[j] = YGas[i++]/(
p.Y()[GAS] + rootVSmall);
177 "Y" + liquidNames[j] + stateLabels[idLiquid],
187 p.YLiquid_[j] = YLiquid[i++]/(
p.Y()[LIQ] + rootVSmall);
197 "Y" + solidNames[j] + stateLabels[idSolid],
207 p.YSolid_[j] = YSolid[i++]/(
p.Y()[SLD] + rootVSmall);
213 template<
class ParcelType>
214 template<
class CloudType>
217 ParcelType::writeFields(
c);
221 template<
class ParcelType>
222 template<
class CloudType,
class CompositionType>
226 const CompositionType& compModel
229 ParcelType::writeFields(
c, compModel);
240 mass0[i++] =
p.mass0_;
245 const wordList& stateLabels = compModel.stateLabels();
247 const label idGas = compModel.idGas();
248 const wordList& gasNames = compModel.componentNames(idGas);
255 "Y" + gasNames[j] + stateLabels[idGas],
265 YGas[i++] = p0.
YGas()[j]*p0.Y()[GAS];
271 const label idLiquid = compModel.idLiquid();
272 const wordList& liquidNames = compModel.componentNames(idLiquid);
279 "Y" + liquidNames[j] + stateLabels[idLiquid],
289 YLiquid[i++] = p0.
YLiquid()[j]*p0.Y()[LIQ];
292 YLiquid.
write(np > 0);
295 const label idSolid = compModel.idSolid();
296 const wordList& solidNames = compModel.componentNames(idSolid);
303 "Y" + solidNames[j] + stateLabels[idSolid],
313 YSolid[i++] = p0.
YSolid()[j]*p0.Y()[SLD];
316 YSolid.
write(np > 0);
324 template<
class ParcelType>
336 os << static_cast<const ParcelType&>(
p)
344 os << static_cast<const ParcelType&>(
p);
347 reinterpret_cast<const char*
>(&
p.mass0_),
348 ReactingMultiphaseParcel<ParcelType>::sizeofFields_
350 os << YGasLoc << YLiquidLoc << YSolidLoc;
356 "Ostream& operator<<"
359 "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.
void setSize(const label)
Reset size of List.
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.