34template<
class ParcelType>
39template<
class ParcelType>
48template<
class ParcelType>
86template<
class ParcelType>
87template<
class CloudType>
90 ParcelType::readFields(c);
94template<
class ParcelType>
95template<
class CloudType,
class CompositionType>
99 const CompositionType& compModel
102 const bool readOnProc = c.size();
104 ParcelType::readFields(c);
111 c.checkFieldIOobject(c, mass0);
122 const wordList& phaseTypes = compModel.phaseTypes();
123 const label nPhases = phaseTypes.
size();
125 if (compModel.nPhase() == 1)
127 stateLabels = compModel.stateLabels()[0];
144 "Y" + phaseTypes[j] + stateLabels[j],
161template<
class ParcelType>
162template<
class CloudType>
165 ParcelType::writeFields(c);
169template<
class ParcelType>
170template<
class CloudType,
class CompositionType>
174 const CompositionType& compModel
177 ParcelType::writeFields(c);
179 const label np = c.size();
180 const bool writeOnProc = c.size();
192 mass0.write(writeOnProc);
195 const wordList& phaseTypes = compModel.phaseTypes();
196 wordList stateLabels(phaseTypes.size(),
"");
197 if (compModel.nPhase() == 1)
199 stateLabels = compModel.stateLabels()[0];
208 "Y" + phaseTypes[j] + stateLabels[j],
222 Y.write(writeOnProc);
228template<
class ParcelType>
237 ParcelType::writeProperties(
os, filters, delim, namesOnly);
240 #define writeProp(Name, Value) \
241 ParcelType::writeProperty(os, Name, Value, namesOnly, delim, filters)
250template<
class ParcelType>
251template<
class CloudType>
258 ParcelType::readObjects(c, obr);
262template<
class ParcelType>
263template<
class CloudType>
270 ParcelType::writeObjects(c, obr);
274template<
class ParcelType>
275template<
class CloudType,
class CompositionType>
279 const CompositionType& compModel,
283 ParcelType::readObjects(c, obr);
285 if (!c.size())
return;
299 const wordList& phaseTypes = compModel.phaseTypes();
300 wordList stateLabels(phaseTypes.size(),
"");
301 if (compModel.nPhase() == 1)
303 stateLabels = compModel.stateLabels()[0];
308 const word fieldName =
"Y" + phaseTypes[j] + stateLabels[j];
322template<
class ParcelType>
323template<
class CloudType,
class CompositionType>
327 const CompositionType& compModel,
331 ParcelType::writeObjects(
c, obr);
333 const label np =
c.size();
334 const bool writeOnProc =
c.size();
349 const wordList& phaseTypes = compModel.phaseTypes();
350 wordList stateLabels(phaseTypes.size(),
"");
351 if (compModel.nPhase() == 1)
353 stateLabels = compModel.stateLabels()[0];
358 const word fieldName =
"Y" + phaseTypes[j] + stateLabels[j];
375template<
class ParcelType>
376Foam::Ostream& Foam::operator<<
393 reinterpret_cast<const char*
>(&
p.mass0_),
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
void setSize(const label n)
Alias for resize().
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
A primitive field of type <T> with automated input and output.
@ NO_READ
Nothing to be read.
@ MUST_READ
Reading required.
streamFormat format() const noexcept
Get the current stream format.
@ ASCII
"ascii" (normal default)
virtual bool check(const char *operation) const
Check IOstream status for given operation.
bool fatalCheckNativeSizes(const char *operation) const
Assert that the label/scalar byte-size associated with the stream are the native label/scalar sizes.
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 > &list)
Transfer the contents of the argument List into this list and annul the argument list.
virtual Ostream & write(const char c) override
Write character.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Reacting parcel class with one/two-way coupling with the continuous phase.
static void writeObjects(const CloudType &c, objectRegistry &obr)
Write particle fields as objects into the obr registry.
static const std::size_t sizeofFields
Size in bytes of the fields.
ReactingParcel(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti)
Construct from mesh, coordinates and topology.
static void writeFields(const CloudType &c, const CompositionType &compModel)
Write - composition supplied.
const scalarField & Y() const
Return const access to mass fractions of mixture [].
scalarField Y_
Mass fractions of mixture [].
static void readObjects(CloudType &c, const objectRegistry &obr)
Read particle fields as objects from the obr registry.
scalar mass0() const
Return const access to initial mass [kg].
scalar mass0_
Initial mass [kg].
void writeProperties(Ostream &os, const wordRes &filters, const word &delim, const bool namesOnly=false) const
Write individual parcel properties to stream.
static void readFields(CloudType &c, const CompositionType &compModel)
Read - composition supplied.
void size(const label n)
Older name for setAddressableSize.
static const IOField< Type > & lookupIOField(const word &fieldName, const objectRegistry &obr)
Lookup an IOField within object registry.
static IOField< Type > & createIOField(const word &fieldName, const label nParticle, objectRegistry &obr)
Helper to construct IOField on a supplied object registry.
Registry of regIOobjects.
Mesh consisting of general polyhedral cells.
A class for handling character strings derived from std::string.
A List of wordRe with additional matching capabilities.
A class for handling words, derived from Foam::string.
PtrList< volScalarField > & Y
OBJstream os(runTime.globalPath()/outputName)
#define writeProp(Name, Value)
const dimensionedScalar c
Speed of light in a vacuum.
List< word > wordList
List of word.
DSMCCloud< dsmcParcel > CloudType
#define forAll(list, i)
Loop across all elements in list.