34template<
class ParcelType>
39template<
class ParcelType>
42 sizeof(SprayParcel<ParcelType>) -
sizeof(ParcelType)
48template<
class ParcelType>
96 readRawScalar(is, &
d0_);
98 readRawScalar(is, &
sigma_);
99 readRawScalar(is, &
mu_);
102 readRawScalar(is, &
y_);
103 readRawScalar(is, &
yDot_);
104 readRawScalar(is, &
tc_);
105 readRawScalar(is, &
ms_);
107 readRawScalar(is, &
tMom_);
108 readRawScalar(is, &
user_);
122template<
class ParcelType>
123template<
class CloudType>
130template<
class ParcelType>
131template<
class CloudType,
class CompositionType>
135 const CompositionType& compModel
138 const bool valid = c.size();
143 c.checkFieldIOobject(c, d0);
150 c.checkFieldIOobject(c, position0);
153 c.checkFieldIOobject(c, sigma);
156 c.checkFieldIOobject(c,
mu);
163 c.checkFieldIOobject(c, liquidCore);
170 c.checkFieldIOobject(c, KHindex);
177 c.checkFieldIOobject(c,
y);
184 c.checkFieldIOobject(c, yDot);
191 c.checkFieldIOobject(c, tc);
198 c.checkFieldIOobject(c, ms);
205 c.checkFieldIOobject(c, injector);
212 c.checkFieldIOobject(c, tMom);
219 c.checkFieldIOobject(c, user);
225 p.position0_ = position0[i];
228 p.liquidCore_ = liquidCore[i];
229 p.KHindex_ = KHindex[i];
234 p.injector_ = injector[i];
243template<
class ParcelType>
244template<
class CloudType>
251template<
class ParcelType>
252template<
class CloudType,
class CompositionType>
256 const CompositionType& compModel
261 const label np = c.size();
262 const bool valid = np;
295 position0[i] =
p.position0_;
298 liquidCore[i] =
p.liquidCore_;
299 KHindex[i] =
p.KHindex_;
304 injector[i] =
p.injector_;
311 position0.
write(valid);
314 liquidCore.
write(valid);
315 KHindex.
write(valid);
320 injector.
write(valid);
326template<
class ParcelType>
338 #define writeProp(Name, Value) \
339 ParcelType::writeProperty(os, Name, Value, namesOnly, delim, filters)
359template<
class ParcelType>
360template<
class CloudType>
371template<
class ParcelType>
372template<
class CloudType>
383template<
class ParcelType>
384template<
class CloudType,
class CompositionType>
388 const CompositionType& compModel,
394 if (!c.size())
return;
396 const auto& d0 = cloud::lookupIOField<scalar>(
"d0", obr);
397 const auto& position0 = cloud::lookupIOField<vector>(
"position0", obr);
398 const auto& sigma = cloud::lookupIOField<scalar>(
"sigma", obr);
399 const auto&
mu = cloud::lookupIOField<scalar>(
"mu", obr);
400 const auto& liquidCore = cloud::lookupIOField<scalar>(
"liquidCore", obr);
401 const auto& KHindex = cloud::lookupIOField<scalar>(
"KHindex", obr);
402 const auto&
y = cloud::lookupIOField<scalar>(
"y", obr);
403 const auto& yDot = cloud::lookupIOField<scalar>(
"yDot", obr);
404 const auto& tc = cloud::lookupIOField<scalar>(
"tc", obr);
405 const auto& ms = cloud::lookupIOField<scalar>(
"ms", obr);
406 const auto& injector = cloud::lookupIOField<scalar>(
"injector", obr);
407 const auto& tMom = cloud::lookupIOField<scalar>(
"tMom", obr);
408 const auto& user = cloud::lookupIOField<scalar>(
"user", obr);
414 p.position0_ = position0[i];
417 p.liquidCore_ = liquidCore[i];
418 p.KHindex_ = KHindex[i];
423 p.injector_ = injector[i];
432template<
class ParcelType>
433template<
class CloudType,
class CompositionType>
437 const CompositionType& compModel,
443 const label np = c.size();
445 auto& d0 = cloud::createIOField<scalar>(
"d0", np, obr);
446 auto& position0 = cloud::createIOField<vector>(
"position0", np, obr);
447 auto& sigma = cloud::createIOField<scalar>(
"sigma", np, obr);
448 auto&
mu = cloud::createIOField<scalar>(
"mu", np, obr);
449 auto& liquidCore = cloud::createIOField<scalar>(
"liquidCore", np, obr);
450 auto& KHindex = cloud::createIOField<scalar>(
"KHindex", np, obr);
451 auto&
y = cloud::createIOField<scalar>(
"y", np, obr);
452 auto& yDot= cloud::createIOField<scalar>(
"yDot", np, obr);
453 auto& tc = cloud::createIOField<scalar>(
"tc", np, obr);
454 auto& ms = cloud::createIOField<scalar>(
"ms", np, obr);
455 auto& injector = cloud::createIOField<scalar>(
"injector", np, obr);
456 auto& tMom = cloud::createIOField<scalar>(
"tMom", np, obr);
457 auto& user = cloud::createIOField<scalar>(
"user", np, obr);
463 position0[i] =
p.position0_;
466 liquidCore[i] =
p.liquidCore_;
467 KHindex[i] =
p.KHindex_;
472 injector[i] =
p.injector_;
483template<
class ParcelType>
492 os << static_cast<const ParcelType&>(
p)
509 os << static_cast<const ParcelType&>(
p);
512 reinterpret_cast<const char*
>(&
p.d0_),
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
Templated base class for dsmc cloud.
A primitive field of type <T> with automated input and output.
streamFormat format() const noexcept
Get the current stream format.
std::enable_if< std::is_integral< T >::value, bool >::type checkLabelSize() const noexcept
virtual bool check(const char *operation) const
Check IOstream status for given operation.
std::enable_if< std::is_floating_point< T >::value, bool >::type checkScalarSize() const noexcept
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
virtual bool endRawRead()=0
End of low-level raw binary read.
virtual bool beginRawRead()=0
Start of low-level raw binary read.
virtual Istream & read(token &)=0
Return next token from stream.
virtual Ostream & write(const char c)
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 d0_
Initial droplet diameter.
vector position0_
Injection position.
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 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 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)
scalar injector_
Injected from injector (needed e.g. for calculating distance.
scalar KHindex_
Index for KH Breakup.
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 liquidCore_
Part of liquid core ( >0.5=liquid, <0.5=droplet )
void writeFields() const
Write fields.
Reads fields from the time directories and adds them to the mesh database for further post-processing...
Allows specification of different writing frequency of objects registered to the database.
static void readObjects(Cloud< injectedParticle > &c, const objectRegistry &obr)
Read particle fields as objects from the obr registry.
void writeProperties(Ostream &os, const wordRes &filters, const word &delim, const bool namesOnly) const
Write individual parcel properties to stream.
Registry of regIOobjects.
static constexpr direction nComponents
Number of components in bool is 1.
static string propertyList()
Mesh consisting of general polyhedral cells.
virtual bool write(const bool valid=true) const
Write using setting from DB.
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.
const volScalarField & mu
OBJstream os(runTime.globalPath()/outputName)
#define writeProp(Name, Value)
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const wordHashSet &selectedFields, LIFOStack< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type.