34template<
class ParcelType>
39template<
class ParcelType>
48template<
class ParcelType>
103template<
class ParcelType>
104template<
class CloudType>
107 ParcelType::readFields(c);
111template<
class ParcelType>
112template<
class CloudType,
class CompositionType>
116 const CompositionType& compModel
119 const bool readOnProc = c.size();
121 ParcelType::readFields(c, compModel);
124 c.checkFieldIOobject(c, d0);
131 c.checkFieldIOobject(c, position0);
138 c.checkFieldIOobject(c,
sigma);
141 c.checkFieldIOobject(c,
mu);
148 c.checkFieldIOobject(c, liquidCore);
155 c.checkFieldIOobject(c, KHindex);
162 c.checkFieldIOobject(c,
y);
169 c.checkFieldIOobject(c, yDot);
176 c.checkFieldIOobject(c, tc);
183 c.checkFieldIOobject(c, ms);
190 c.checkFieldIOobject(c, injector);
197 c.checkFieldIOobject(c, tMom);
204 c.checkFieldIOobject(c, user);
210 p.position0_ = position0[i];
213 p.liquidCore_ = liquidCore[i];
214 p.KHindex_ = KHindex[i];
219 p.injector_ = injector[i];
228template<
class ParcelType>
229template<
class CloudType>
232 ParcelType::writeFields(c);
236template<
class ParcelType>
237template<
class CloudType,
class CompositionType>
241 const CompositionType& compModel
244 ParcelType::writeFields(c, compModel);
246 const label np = c.size();
247 const bool writeOnProc = c.size();
279 position0[i] =
p.position0_;
282 liquidCore[i] =
p.liquidCore_;
283 KHindex[i] =
p.KHindex_;
288 injector[i] =
p.injector_;
294 d0.write(writeOnProc);
295 position0.write(writeOnProc);
296 sigma.write(writeOnProc);
297 mu.write(writeOnProc);
298 liquidCore.write(writeOnProc);
299 KHindex.write(writeOnProc);
300 y.write(writeOnProc);
301 yDot.write(writeOnProc);
302 tc.write(writeOnProc);
303 ms.write(writeOnProc);
305 tMom.write(writeOnProc);
306 user.write(writeOnProc);
310template<
class ParcelType>
319 ParcelType::writeProperties(
os, filters, delim, namesOnly);
322 #define writeProp(Name, Value) \
323 ParcelType::writeProperty(os, Name, Value, namesOnly, delim, filters)
343template<
class ParcelType>
344template<
class CloudType>
351 ParcelType::readObjects(c, obr);
355template<
class ParcelType>
356template<
class CloudType>
363 ParcelType::writeObjects(c, obr);
367template<
class ParcelType>
368template<
class CloudType,
class CompositionType>
372 const CompositionType& compModel,
376 ParcelType::readObjects(c, compModel, obr);
378 if (!c.size())
return;
398 p.position0_ = position0[i];
401 p.liquidCore_ = liquidCore[i];
402 p.KHindex_ = KHindex[i];
407 p.injector_ = injector[i];
416template<
class ParcelType>
417template<
class CloudType,
class CompositionType>
421 const CompositionType& compModel,
425 ParcelType::writeObjects(c, compModel, obr);
427 const label np = c.size();
444 for (
const SprayParcel<ParcelType>&
p : c)
447 position0[i] =
p.position0_;
450 liquidCore[i] =
p.liquidCore_;
451 KHindex[i] =
p.KHindex_;
456 injector[i] =
p.injector_;
467template<
class ParcelType>
468Foam::Ostream& Foam::operator<<
496 reinterpret_cast<const char*
>(&
p.d0_),
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
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.
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 spray parcel, with added functionality for atomization and breakup.
scalar injector() const
Return const access to injector id.
static void writeObjects(const CloudType &c, objectRegistry &obr)
Write particle fields as objects into the obr registry.
scalar liquidCore() const
Return const access to liquid core.
scalar d0_
Initial droplet diameter.
scalar tMom() const
Return const access to momentum relaxation time.
vector position0_
Injection position.
scalar mu() const
Return const access to the liquid dynamic viscosity.
scalar mu_
Liquid dynamic viscosity [Pa.s].
static const std::size_t sizeofFields
Size in bytes of the fields.
scalar sigma_
Liquid surface tension [N/m].
scalar user_
Passive scalar (extra variable to be defined by user).
static void writeFields(const CloudType &c, const CompositionType &compModel)
Write.
scalar yDot() const
Return const access to rate of change of spherical deviation.
scalar d0() const
Return const access to initial droplet diameter.
static void readObjects(CloudType &c, const objectRegistry &obr)
Read particle fields as objects from the obr registry.
scalar tMom_
Momentum relaxation time (needed for calculating parcel acc.).
scalar KHindex() const
Return const access to Kelvin-Helmholtz breakup index.
scalar tc() const
Return const access to atomization characteristic time.
scalar y_
Spherical deviation.
void writeProperties(Ostream &os, const wordRes &filters, const word &delim, const bool namesOnly) const
Write individual parcel properties to stream.
scalar tc_
Characteristic time (used in atomization and/or breakup model).
SprayParcel(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti)
Construct from mesh, coordinates and topology.
scalar injector_
Injected from injector (needed e.g. for calculating distance.
scalar KHindex_
Index for KH Breakup.
scalar ms() const
Return const access to stripped parcel mass.
scalar y() const
Return const access to spherical deviation.
scalar sigma() const
Return const access to the liquid surface tension.
scalar ms_
Stripped parcel mass due to breakup.
scalar yDot_
Rate of change of spherical deviation.
static void readFields(CloudType &c, const CompositionType &compModel)
Read.
scalar user() const
Return const access to passive user scalar.
scalar liquidCore_
Part of liquid core ( >0.5=liquid, <0.5=droplet ).
const vector & position0() const
Return const access to initial droplet position.
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.
OBJstream os(runTime.globalPath()/outputName)
#define writeProp(Name, Value)
DSMCCloud< dsmcParcel > CloudType
static constexpr const zero Zero
Global zero (0).
dimensionedScalar sigma("sigma", dimMass/sqr(dimTime), transportProperties)