Loading...
Searching...
No Matches
ThermoParcel< ParcelType > Class Template Reference

Thermodynamic parcel class with one/two-way coupling with the continuous phase. Includes Kinematic parcel sub-models, plus: More...

#include <ThermoParcel.H>

Inheritance diagram for ThermoParcel< ParcelType >:
Collaboration diagram for ThermoParcel< ParcelType >:

Classes

class  constantProperties
 Class to hold thermo particle constant properties. More...
class  trackingData
class  iNew
 Factory class to read-construct particles (for parallel transfer). More...

Public Member Functions

 TypeName ("ThermoParcel")
 Runtime type information.
 AddToPropertyList (ParcelType, " T"+" Cp")
 String representation of properties.
 ThermoParcel (const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti)
 Construct from mesh, coordinates and topology.
 ThermoParcel (const polyMesh &mesh, const vector &position, const label celli)
 Construct from a position and a cell, searching for the rest of the.
 ThermoParcel (const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti, const label typeId, const scalar nParticle0, const scalar d0, const scalar dTarget0, const vector &U0, const vector &f0, const vector &angularMomentum0, const vector &torque0, const constantProperties &constProps)
 Construct from components.
 ThermoParcel (const polyMesh &mesh, Istream &is, bool readFields=true, bool newFormat=true)
 Construct from Istream.
 ThermoParcel (const ThermoParcel &p)
 Construct as a copy.
 ThermoParcel (const ThermoParcel &p, const polyMesh &mesh)
 Construct as a copy.
virtual autoPtr< particleclone () const
 Return a (basic particle) clone.
virtual autoPtr< particleclone (const polyMesh &mesh) const
 Return a (basic particle) clone.
scalar T () const
 Return const access to temperature.
scalar Cp () const
 Return const access to specific heat capacity.
scalar hs () const
 Return the parcel sensible enthalpy.
scalar & T ()
 Return access to temperature.
scalar & Cp ()
 Return access to specific heat capacity.
template<class TrackCloudType>
void setCellValues (TrackCloudType &cloud, trackingData &td)
 Set cell values.
template<class TrackCloudType>
void cellValueSourceCorrection (TrackCloudType &cloud, trackingData &td, const scalar dt)
 Correct cell values using latest transfer information.
template<class TrackCloudType>
void calcSurfaceValues (TrackCloudType &cloud, trackingData &td, const scalar T, scalar &Ts, scalar &rhos, scalar &mus, scalar &Pr, scalar &kappas) const
 Calculate surface thermo properties.
template<class TrackCloudType>
void calc (TrackCloudType &cloud, trackingData &td, const scalar dt)
 Update parcel properties over the time interval.
void writeProperties (Ostream &os, const wordRes &filters, const word &delim, const bool namesOnly=false) const
 Write individual parcel properties to stream.
template<class TrackCloudType>
Foam::scalar calcHeatTransfer (TrackCloudType &cloud, trackingData &td, const scalar dt, const scalar Re, const scalar Pr, const scalar kappa, const scalar NCpW, const scalar Sh, scalar &dhsTrans, scalar &Sph)

Static Public Member Functions

template<class CloudType>
static void readFields (CloudType &c)
 Read.
template<class CloudType>
static void writeFields (const CloudType &c)
 Write.
template<class CloudType>
static void readObjects (CloudType &c, const objectRegistry &obr)
 Read particle fields as objects from the obr registry.
template<class CloudType>
static void writeObjects (const CloudType &c, objectRegistry &obr)
 Write particle fields as objects into the obr registry.

Static Public Attributes

static const std::size_t sizeofFields
 Size in bytes of the fields.

Protected Member Functions

template<class TrackCloudType>
scalar calcHeatTransfer (TrackCloudType &cloud, trackingData &td, const scalar dt, const scalar Re, const scalar Pr, const scalar kappa, const scalar NCpW, const scalar Sh, scalar &dhsTrans, scalar &Sph)
 Calculate new particle temperature.

Protected Attributes

scalar T_
 Temperature [K].
scalar Cp_
 Specific heat capacity [J/(kg.K)].

Friends

Ostreamoperator<< (Ostream &, const ThermoParcel< ParcelType > &)

Detailed Description

template<class ParcelType>
class Foam::ThermoParcel< ParcelType >

Thermodynamic parcel class with one/two-way coupling with the continuous phase. Includes Kinematic parcel sub-models, plus:

  • heat transfer
Source files

Definition at line 67 of file ThermoParcel.H.

Constructor & Destructor Documentation

◆ ThermoParcel() [1/6]

template<class ParcelType>
ThermoParcel ( const polyMesh & mesh,
const barycentric & coordinates,
const label celli,
const label tetFacei,
const label tetPti )
inline

Construct from mesh, coordinates and topology.

Other properties initialised as null

Definition at line 69 of file ThermoParcelI.H.

References coordinates(), Cp_, mesh, and T_.

Referenced by ThermoParcel< ParcelType >::iNew::operator()(), readFields(), readObjects(), writeFields(), and writeObjects().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ThermoParcel() [2/6]

template<class ParcelType>
ThermoParcel ( const polyMesh & mesh,
const vector & position,
const label celli )
inline

Construct from a position and a cell, searching for the rest of the.

required topology. Other properties are initialised as null.

Definition at line 85 of file ThermoParcelI.H.

References Cp_, mesh, and T_.

◆ ThermoParcel() [3/6]

template<class ParcelType>
ThermoParcel ( const polyMesh & mesh,
const barycentric & coordinates,
const label celli,
const label tetFacei,
const label tetPti,
const label typeId,
const scalar nParticle0,
const scalar d0,
const scalar dTarget0,
const vector & U0,
const vector & f0,
const vector & angularMomentum0,
const vector & torque0,
const constantProperties & constProps )
inline

Construct from components.

Definition at line 99 of file ThermoParcelI.H.

References coordinates(), and mesh.

Here is the call graph for this function:

◆ ThermoParcel() [4/6]

template<class ParcelType>
ThermoParcel ( const polyMesh & mesh,
Istream & is,
bool readFields = true,
bool newFormat = true )

Construct from Istream.

Definition at line 43 of file ThermoParcelIO.C.

References IOstreamOption::ASCII, IOstream::check(), Cp_, IOstream::fatalCheckNativeSizes(), IOstreamOption::format(), FUNCTION_NAME, mesh, Istream::read(), readFields(), sizeofFields, and T_.

Here is the call graph for this function:

◆ ThermoParcel() [5/6]

template<class ParcelType>
ThermoParcel ( const ThermoParcel< ParcelType > & p)

Construct as a copy.

◆ ThermoParcel() [6/6]

template<class ParcelType>
ThermoParcel ( const ThermoParcel< ParcelType > & p,
const polyMesh & mesh )

Construct as a copy.

Member Function Documentation

◆ calcHeatTransfer() [1/2]

template<class ParcelType>
template<class TrackCloudType>
scalar calcHeatTransfer ( TrackCloudType & cloud,
trackingData & td,
const scalar dt,
const scalar Re,
const scalar Pr,
const scalar kappa,
const scalar NCpW,
const scalar Sh,
scalar & dhsTrans,
scalar & Sph )
protected

Calculate new particle temperature.

Referenced by calc().

Here is the caller graph for this function:

◆ TypeName()

template<class ParcelType>
TypeName ( "ThermoParcel< ParcelType >" )

Runtime type information.

◆ AddToPropertyList()

template<class ParcelType>
AddToPropertyList ( ParcelType ,
" T"+" Cp"  )

String representation of properties.

◆ clone() [1/2]

◆ clone() [2/2]

◆ T() [1/2]

template<class ParcelType>
Foam::scalar T ( ) const
inline

Return const access to temperature.

Definition at line 200 of file ThermoParcelI.H.

References T_.

Referenced by calcSurfaceValues(), readFields(), readObjects(), ThermoParcel< ParcelType >::trackingData::trackingData(), writeFields(), and writeObjects().

Here is the caller graph for this function:

◆ Cp() [1/2]

template<class ParcelType>
Foam::scalar Cp ( ) const
inline

Return const access to specific heat capacity.

Definition at line 207 of file ThermoParcelI.H.

References Cp_.

Referenced by readFields(), readObjects(), writeFields(), and writeObjects().

Here is the caller graph for this function:

◆ hs()

template<class ParcelType>
Foam::scalar hs ( ) const
inline

Return the parcel sensible enthalpy.

Definition at line 214 of file ThermoParcelI.H.

References Cp_, and T_.

◆ T() [2/2]

template<class ParcelType>
Foam::scalar & T ( )
inline

Return access to temperature.

Definition at line 221 of file ThermoParcelI.H.

References T_.

◆ Cp() [2/2]

template<class ParcelType>
Foam::scalar & Cp ( )
inline

Return access to specific heat capacity.

Definition at line 228 of file ThermoParcelI.H.

References Cp_.

◆ setCellValues()

template<class ParcelType>
template<class TrackCloudType>
void setCellValues ( TrackCloudType & cloud,
trackingData & td )

Set cell values.

Definition at line 30 of file ThermoParcel.C.

References coordinates(), Foam::endl(), Foam::nl, td(), and WarningInFunction.

Here is the call graph for this function:

◆ cellValueSourceCorrection()

template<class ParcelType>
template<class TrackCloudType>
void cellValueSourceCorrection ( TrackCloudType & cloud,
trackingData & td,
const scalar dt )

Correct cell values using latest transfer information.

Definition at line 60 of file ThermoParcel.C.

References Foam::endl(), Foam::nl, td(), and WarningInFunction.

Here is the call graph for this function:

◆ calcSurfaceValues()

template<class ParcelType>
template<class TrackCloudType>
void calcSurfaceValues ( TrackCloudType & cloud,
trackingData & td,
const scalar T,
scalar & Ts,
scalar & rhos,
scalar & mus,
scalar & Pr,
scalar & kappas ) const

Calculate surface thermo properties.

Definition at line 94 of file ThermoParcel.C.

References coordinates(), Foam::endl(), Foam::max(), Foam::nl, Pr(), T(), td(), and WarningInFunction.

Referenced by calc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calc()

template<class ParcelType>
template<class TrackCloudType>
void calc ( TrackCloudType & cloud,
trackingData & td,
const scalar dt )

Update parcel properties over the time interval.

Definition at line 137 of file ThermoParcel.C.

References calcHeatTransfer(), calcSurfaceValues(), Foam::pow4(), Pr(), Foam::Re(), Foam::Su(), T0, T_, td(), and Foam::Zero.

Here is the call graph for this function:

◆ readFields()

template<class ParcelType>
template<class CloudType>
void readFields ( CloudType & c)
static

Read.

Definition at line 76 of file ThermoParcelIO.C.

References Cp, Cp(), IOobjectOption::MUST_READ, p, T(), T, and ThermoParcel().

Referenced by ThermoParcel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeFields()

template<class ParcelType>
template<class CloudType>
void writeFields ( const CloudType & c)
static

Write.

Definition at line 102 of file ThermoParcelIO.C.

References Cp, Cp(), IOobjectOption::NO_READ, p, T(), T, and ThermoParcel().

Here is the call graph for this function:

◆ writeProperties()

template<class ParcelType>
void writeProperties ( Ostream & os,
const wordRes & filters,
const word & delim,
const bool namesOnly = false ) const

Write individual parcel properties to stream.

Definition at line 127 of file ThermoParcelIO.C.

References Cp_, os(), T_, and writeProp.

Here is the call graph for this function:

◆ readObjects()

template<class ParcelType>
template<class CloudType>
void readObjects ( CloudType & c,
const objectRegistry & obr )
static

Read particle fields as objects from the obr registry.

Definition at line 150 of file ThermoParcelIO.C.

References Cp(), cloud::lookupIOField(), p, T(), and ThermoParcel().

Here is the call graph for this function:

◆ writeObjects()

template<class ParcelType>
template<class CloudType>
void writeObjects ( const CloudType & c,
objectRegistry & obr )
static

Write particle fields as objects into the obr registry.

Definition at line 176 of file ThermoParcelIO.C.

References Cp(), cloud::createIOField(), p, T(), and ThermoParcel().

Here is the call graph for this function:

◆ calcHeatTransfer() [2/2]

template<class ParcelType>
template<class TrackCloudType>
Foam::scalar calcHeatTransfer ( TrackCloudType & cloud,
trackingData & td,
const scalar dt,
const scalar Re,
const scalar Pr,
const scalar kappa,
const scalar NCpW,
const scalar Sh,
scalar & dhsTrans,
scalar & Sph )

Definition at line 246 of file ThermoParcel.C.

◆ operator<<

template<class ParcelType>
Ostream & operator<< ( Ostream & ,
const ThermoParcel< ParcelType > &  )
friend

Member Data Documentation

◆ sizeofFields

template<class ParcelType>
const std::size_t sizeofFields
static

Size in bytes of the fields.

Definition at line 76 of file ThermoParcel.H.

Referenced by ThermoParcel().

◆ T_

template<class ParcelType>
scalar T_
protected

Temperature [K].

Definition at line 334 of file ThermoParcel.H.

Referenced by calc(), hs(), T(), T(), ThermoParcel(), ThermoParcel(), ThermoParcel(), and writeProperties().

◆ Cp_

template<class ParcelType>
scalar Cp_
protected

Specific heat capacity [J/(kg.K)].

Definition at line 339 of file ThermoParcel.H.

Referenced by Cp(), Cp(), hs(), ThermoParcel(), ThermoParcel(), ThermoParcel(), and writeProperties().


The documentation for this class was generated from the following files:
  • src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H
  • src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.C
  • src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelI.H
  • src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelIO.C