34 template<
class ParcelType>
39 template<
class ParcelType>
48 template<
class ParcelType>
74 template<
class ParcelType>
75 template<
class CloudType>
82 template<
class ParcelType>
83 template<
class CloudType,
class CompositionType>
87 const CompositionType& compModel
90 const bool valid =
c.size();
99 c.checkFieldIOobject(
c, mass0);
104 p.mass0() = mass0[i];
108 const label idSolid = compModel.idSolid();
115 for (ReactingHeterogeneousParcel<ParcelType>&
p :
c)
121 for (label i = 0; i < nF; i++)
135 for (ReactingHeterogeneousParcel<ParcelType>&
p :
c)
156 for (ReactingHeterogeneousParcel<ParcelType>&
p :
c)
165 template<
class ParcelType>
166 template<
class CloudType>
176 template<
class ParcelType>
177 template<
class CloudType,
class CompositionType>
181 const CompositionType& compModel
188 const label np =
c.size();
189 const bool valid = np;
207 for (label i = 0; i < nF; i++)
219 for (
const ReactingHeterogeneousParcel<ParcelType>&
p0 :
c)
227 const label idSolid = compModel.idSolid();
243 for (
const ReactingHeterogeneousParcel<ParcelType>&
p0 :
c)
254 template<
class ParcelType>
258 const wordRes& filters,
263 ParcelType::writeProperties(
os, filters, delim, namesOnly);
266 #define writeProp(Name, Value) \ 267 ParcelType::writeProperty(os, Name, Value, namesOnly, delim, filters) 276 template<
class ParcelType>
277 template<
class CloudType>
284 ParcelType::readObjects(
c, obr);
288 template<
class ParcelType>
289 template<
class CloudType>
296 ParcelType::writeObjects(
c, obr);
300 template<
class ParcelType>
301 template<
class CloudType,
class CompositionType>
305 const CompositionType& compModel,
316 <<
"Reading of objects is still a work-in-progress" <<
nl;
321 template<
class ParcelType>
322 template<
class CloudType,
class CompositionType>
326 const CompositionType& compModel,
334 const label np =
c.size();
346 for (label i = 0; i < nF; i++)
348 const word fieldName =
"F" +
name(i);
349 auto&
F = cloud::createIOField<scalar>(fieldName, np, obr);
352 for (
const ReactingHeterogeneousParcel<ParcelType>&
p0 :
c)
359 const label idSolid = compModel.idSolid();
364 auto&
Y = cloud::createIOField<scalar>(fieldName, np, obr);
367 for (
const ReactingHeterogeneousParcel<ParcelType>&
p0 :
c)
379 template<
class ParcelType>
383 const ReactingHeterogeneousParcel<ParcelType>&
p 389 os << static_cast<const ParcelType&>(
p)
394 os << static_cast<const ParcelType&>(
p);
void size(const label n)
Older name for setAddressableSize.
DSMCCloud< dsmcParcel > CloudType
void transfer(List< T > &list)
Transfer the contents of the argument List into this list and annul the argument list.
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)...
constexpr char nl
The newline '\n' character (0x0a)
static const std::size_t sizeofFields
Size in bytes of the fields.
#define writeProp(Name, Value)
Reacting heterogeneous Parcel.
static void writeFields(const CloudType &c, const CompositionType &compModel)
Write - composition supplied.
const wordList solidNames(rp["solid"])
ReactingHeterogeneousParcel(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti)
Construct from mesh, position and topology.
static void readObjects(CloudType &c, const objectRegistry &obr)
Read particle fields as objects from the obr registry.
#define forAll(list, i)
Loop across all elements in list.
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
const scalarField & F() const
Return const access to F.
void setSize(const label n)
Alias for resize()
static void readFields(CloudType &c, const CompositionType &compModel)
Read - composition supplied.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
volVectorField F(fluid.F())
void writeFields(const fvMesh &mesh, const wordHashSet &selectedFields, const bool writeFaceFields)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
List< word > wordList
A List of words.
#define WarningInFunction
Report a warning using Foam::Warning.
PtrList< volScalarField > & Y
const dimensionedScalar c
Speed of light in a vacuum.
void writeProperties(Ostream &os, const wordRes &filters, const word &delim, const bool namesOnly) const
Write individual parcel properties to stream.
scalarField F_
Progress variables for reactions.
Mesh consisting of general polyhedral cells.
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const wordHashSet &selectedFields, LIFOStack< regIOobject *> &storedObjects)
Read the selected GeometricFields of the templated type.
Registry of regIOobjects.
virtual bool write(const bool valid=true) const
Write using setting from DB.
static void writeObjects(const CloudType &c, objectRegistry &obr)
Write particle fields as objects into the obr registry.
A class for handling character strings derived from std::string.
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.
const volScalarField & p0
Thermodynamic parcel class with one/two-way coupling with the continuous phase. Includes Kinematic pa...
static constexpr const zero Zero
Global zero (0)