singleStepReactingMixture< ThermoType > Class Template Reference

Single step reacting mixture. More...

Inheritance diagram for singleStepReactingMixture< ThermoType >:
[legend]
Collaboration diagram for singleStepReactingMixture< ThermoType >:
[legend]

Public Types

typedef ThermoType thermoType
 The type of thermo package this mixture is instantiated for. More...
 
- Public Types inherited from reactingMixture< ThermoType >
typedef ThermoType thermoType
 The type of thermo package this mixture is instantiated for. More...
 
- Public Types inherited from List< word >
typedef SubList< wordsubList
 Declare type of subList. More...
 
- Public Types inherited from multiComponentMixture< ThermoType >
typedef ThermoType thermoType
 The type of thermodynamics this mixture is instantiated for. More...
 

Public Member Functions

 singleStepReactingMixture (const dictionary &, const fvMesh &, const word &)
 Construct from dictionary, mesh and phase name. More...
 
virtual ~singleStepReactingMixture ()=default
 Destructor. More...
 
void fresCorrect ()
 Calculates the residual for all components. More...
 
const dimensionedScalar stoicRatio () const
 Return the stoichiometric air-fuel mass ratio. More...
 
const dimensionedScalar s () const
 Return the Stoichiometric oxygen-fuel mass ratio. More...
 
const dimensionedScalar qFuel () const
 Return the heat of combustion [J/Kg]. More...
 
const List< scalar > & specieStoichCoeffs () const
 Return the stoichiometric coefficient for the reaction. More...
 
tmp< volScalarFieldfres (const label index) const
 Return the list of components residual. More...
 
label inertIndex () const
 Return the inert specie index. More...
 
label fuelIndex () const
 Return the fuel specie index. More...
 
const List< int > & specieProd () const
 Return the list to indicate if specie is produced/consumed. More...
 
const scalarListYprod0 () const
 Return the list of products mass concentrations. More...
 
void read (const dictionary &)
 Read dictionary. More...
 
- Public Member Functions inherited from reactingMixture< ThermoType >
 reactingMixture (const dictionary &thermoDict, const fvMesh &mesh, const word &phaseName)
 Construct from dictionary, mesh and phase name. More...
 
virtual ~reactingMixture ()=default
 Destructor. More...
 
void read (const dictionary &)
 Read dictionary. More...
 
virtual autoPtr< speciesCompositionTablespecieComposition () const
 Table of species composition. More...
 
- Public Member Functions inherited from hashedWordList
 hashedWordList ()=default
 Default construct an empty list. More...
 
 hashedWordList (const hashedWordList &list)
 Copy construct. More...
 
 hashedWordList (hashedWordList &&list)
 Move construct. More...
 
 hashedWordList (const wordUList &list)
 Copy construct from list of words. More...
 
 hashedWordList (const wordUList &list, bool unique)
 Copy construct from list of words, eliminating duplicates. More...
 
 hashedWordList (wordList &&list, bool unique=false)
 Move construct from list of words, optionally eliminating duplicates. More...
 
 hashedWordList (std::initializer_list< word > list)
 Construct from an initializer list. More...
 
template<class AnyType , class AnyHash >
 hashedWordList (const HashTable< AnyType, word, AnyHash > &tbl)
 Construct from the word keys of any HashTable, sorting immediately. More...
 
 hashedWordList (const label len, const char **array, bool unique=false)
 Construct from number and list of words,. More...
 
 hashedWordList (const char **array, bool unique=false)
 
 hashedWordList (Istream &is)
 Construct from Istream. More...
 
void clear ()
 Clear the list, i.e. set size to zero. More...
 
void append (const word &name, bool unique=false)
 
bool found (const word &name) const
 Search hashed values for the specified name. More...
 
const HashTable< label > & lookup () const
 Return the hash of words/indices for inspection. More...
 
void swap (hashedWordList &list)
 Swap contents. More...
 
void transfer (hashedWordList &list)
 
void transfer (wordList &list, bool unique=false)
 
void rehash () const
 Rebuild the lookup hash indices. More...
 
void rehash (bool unique)
 Rebuild the lookup hash indices, or make unique entries first. More...
 
void uniq ()
 
void sort ()
 Sort the list and rehash the indices. More...
 
const wordoperator[] (const label index) const
 Return name corresponding to specified index. More...
 
label operator[] (const word &name) const
 Return index corresponding to specified name, or -1 on failure. More...
 
bool operator() (const word &name) const
 Check hashed values for the specified name - same as found. More...
 
void operator= (const hashedWordList &list)
 Copy assignment. Rehashes the indices. More...
 
void operator= (const wordUList &list)
 Copy assignment from list of words. Rehashes the indices. More...
 
void operator= (std::initializer_list< word > list)
 Copy assignment from initializer list. Rehashes the indices. More...
 
void operator= (hashedWordList &&list)
 Move assignment operator. More...
 
void operator= (wordList &&list)
 Move assignment from list of words. Rehashes the indices. More...
 
bool contains (const word &name) const
 Deprecated(2019-01) Is the specified name found in the list? More...
 
- Public Member Functions inherited from List< word >
constexpr List () noexcept
 Default construct. More...
 
 List (const label len)
 Construct with given size. More...
 
 List (const label len, const word &val)
 Construct with given size and value for all elements. More...
 
 List (const label len, const Foam::zero)
 Construct with given size initializing all elements to zero. More...
 
 List (const Foam::one, const word &val)
 Construct with length=1, copying the value as the only content. More...
 
 List (const Foam::one, word &&val)
 Construct with length=1, moving the value as the only content. More...
 
 List (const Foam::one, const Foam::zero)
 Construct with length=1, initializing content to zero. More...
 
 List (const List< word > &a)
 Copy construct from list. More...
 
 List (const UList< word > &a)
 Copy construct contents from list. More...
 
 List (List< word > &a, bool reuse)
 Construct as copy or re-use as specified. More...
 
 List (const UList< word > &list, const labelUList &indices)
 Copy construct subset of list. More...
 
 List (const UList< word > &list, const FixedList< label, N > &indices)
 Copy construct subset of list. More...
 
 List (const FixedList< word, N > &list)
 Construct as copy of FixedList<T, N> More...
 
 List (const PtrList< word > &list)
 Construct as copy of PtrList<T> More...
 
 List (const SLList< word > &list)
 Construct as copy of SLList<T> More...
 
 List (const IndirectListBase< word, Addr > &list)
 Construct as copy of IndirectList contents. More...
 
 List (std::initializer_list< word > list)
 Construct from an initializer list. More...
 
 List (List< word > &&list)
 Move construct from List. More...
 
 List (DynamicList< word, SizeMin > &&list)
 Move construct from DynamicList. More...
 
 List (SortableList< word > &&list)
 Move construct from SortableList. More...
 
 List (SLList< word > &&list)
 Move construct from SLList. More...
 
 List (Istream &is)
 Construct from Istream. More...
 
autoPtr< List< word > > clone () const
 Clone. More...
 
 ~List ()
 Destructor. More...
 
void clear ()
 Clear the list, i.e. set size to zero. More...
 
void resize (const label len)
 Adjust allocated size of list. More...
 
void resize (const label len, const word &val)
 Adjust allocated size of list and set val for new elements. More...
 
void resize (const label newLen)
 
void resize_nocopy (const label len)
 Adjust allocated size of list without necessarily. More...
 
void setSize (const label n)
 Alias for resize() More...
 
void setSize (const label n, const word &val)
 Alias for resize() More...
 
void append (const word &val)
 Append an element at the end of the list. More...
 
void append (word &&val)
 Move append an element at the end of the list. More...
 
void append (const UList< word > &list)
 Append a List to the end of this list. More...
 
void append (const IndirectListBase< word, Addr > &list)
 Append IndirectList contents at the end of this list. More...
 
label appendUniq (const word &val)
 Append an element if not already in the list. More...
 
void transfer (List< word > &list)
 
void transfer (DynamicList< word, SizeMin > &list)
 
void transfer (SortableList< word > &list)
 
wordnewElmt (const label i)
 
void operator= (const UList< word > &a)
 Assignment to UList operator. Takes linear time. More...
 
void operator= (const List< word > &list)
 Assignment operator. Takes linear time. More...
 
void operator= (const SLList< word > &list)
 Assignment to SLList operator. Takes linear time. More...
 
void operator= (const IndirectListBase< word, Addr > &list)
 Assignment from IndirectList. Takes linear time. More...
 
void operator= (const FixedList< word, N > &list)
 Copy assignment from FixedList. More...
 
void operator= (std::initializer_list< word > list)
 Assignment to an initializer list. More...
 
void operator= (const word &val)
 Assignment of all entries to the given value. More...
 
void operator= (const Foam::zero)
 Assignment of all entries to zero. More...
 
void operator= (List< word > &&list)
 Move assignment. Takes constant time. More...
 
void operator= (DynamicList< word, SizeMin > &&list)
 Move assignment. Takes constant time. More...
 
void operator= (SortableList< word > &&list)
 Move assignment. Takes constant time. More...
 
void operator= (SLList< word > &&list)
 Move assignment. Takes constant time. More...
 
IstreamreadList (Istream &is)
 Read List from Istream, discarding contents of existing List. More...
 
IstreamreadList (Istream &is)
 
IstreamreadList (Istream &is)
 
void shallowCopy (const UList< word > &)=delete
 No shallowCopy permitted. More...
 
std::enable_if< std::is_same< bool, TypeT >::value, bool >::type set (const label i, bool val=true)
 A bitSet::set() method for a list of bool. More...
 
- Public Member Functions inherited from multiComponentMixture< ThermoType >
 multiComponentMixture (const dictionary &, const wordList &specieNames, const ReactionTable< ThermoType > &thermoData, const fvMesh &mesh, const word &phaseName)
 
 multiComponentMixture (const dictionary &thermoDict, const fvMesh &mesh, const word &phaseName)
 Construct from dictionary, mesh and phase name. More...
 
virtual ~multiComponentMixture ()=default
 Destructor. More...
 
const ThermoType & cellMixture (const label celli) const
 
const ThermoType & patchFaceMixture (const label patchi, const label facei) const
 
const ThermoType & cellVolMixture (const scalar p, const scalar T, const label celli) const
 
const ThermoType & patchFaceVolMixture (const scalar p, const scalar T, const label patchi, const label facei) const
 
const PtrList< ThermoType > & speciesData () const
 Return the raw specie thermodynamic data. More...
 
void read (const dictionary &)
 Read dictionary. More...
 
const ThermoType & getLocalThermo (const label speciei) const
 Return thermo based on index. More...
 
- Public Member Functions inherited from PtrList< Reaction< ThermoType > >
constexpr PtrList () noexcept
 Default construct. More...
 
 PtrList (const label len)
 Construct with specified size, each element initialized to nullptr. More...
 
 PtrList (const PtrList< Reaction< ThermoType > > &list)
 Copy construct using 'clone()' method on each element. More...
 
 PtrList (PtrList< Reaction< ThermoType > > &&list)
 Move construct. More...
 
 PtrList (UList< Reaction< ThermoType > * > &list)
 Take ownership of pointers in the list, set old pointers to null. More...
 
 PtrList (const PtrList< Reaction< ThermoType > > &list, const CloneArg &cloneArgs)
 Copy construct using 'clone()' method on each element. More...
 
 PtrList (PtrList< Reaction< ThermoType > > &list, bool reuse)
 Construct as copy or re-use as specified. More...
 
 PtrList (const SLPtrList< Reaction< ThermoType > > &list)
 Copy construct using 'clone()' on each element of SLPtrList<T> More...
 
 PtrList (Istream &is, const INew &inew)
 Construct from Istream using given Istream constructor class. More...
 
 PtrList (Istream &is)
 Construct from Istream using default Istream constructor class. More...
 
 ~PtrList ()
 Destructor. More...
 
PtrList< Reaction< ThermoType > > clone (Args &&... args) const
 Make a copy by cloning each of the list elements. More...
 
Foam::PtrList< Reaction< ThermoType > > clone (Args &&... args) const
 
const Reaction< ThermoType > * set (const label i) const
 Return const pointer to element (can be nullptr),. More...
 
autoPtr< Reaction< ThermoType > > set (const label i, Reaction< ThermoType > *ptr)
 Set element to given pointer and return old element (can be null) More...
 
autoPtr< Reaction< ThermoType > > set (const label i, autoPtr< Reaction< ThermoType > > &ptr)
 Set element to given autoPtr and return old element. More...
 
autoPtr< Reaction< ThermoType > > set (const label i, autoPtr< Reaction< ThermoType > > &&ptr)
 Set element to given autoPtr and return old element. More...
 
autoPtr< Reaction< ThermoType > > set (const label i, std::unique_ptr< Reaction< ThermoType > > &&ptr)
 Set element to given unique_ptr and return old element. More...
 
autoPtr< Reaction< ThermoType > > set (const label i, const refPtr< Reaction< ThermoType > > &ptr)
 Set element to given refPtr and return old element. More...
 
autoPtr< Reaction< ThermoType > > set (const label i, const tmp< Reaction< ThermoType > > &ptr)
 Set element to given tmp and return old element. More...
 
void clear ()
 Clear the PtrList. Delete allocated entries and set size to zero. More...
 
void resize (const label newLen)
 Adjust size of PtrList. More...
 
void setSize (const label newLen)
 Same as resize() More...
 
void emplace_append (Args &&... args)
 Construct and append an element to the end of the list. More...
 
void append (Reaction< ThermoType > *ptr)
 Append an element to the end of the list. More...
 
void append (autoPtr< Reaction< ThermoType > > &ptr)
 Move append an element to the end of the list. More...
 
void append (autoPtr< Reaction< ThermoType > > &&ptr)
 Move append an element to the end of the list. More...
 
void append (std::unique_ptr< Reaction< ThermoType > > &&ptr)
 Move append an element to the end of the list. More...
 
void append (const refPtr< Reaction< ThermoType > > &ptr)
 Move or clone append a refPtr to the end of the list. More...
 
void append (const tmp< Reaction< ThermoType > > &ptr)
 Move or clone append a tmp to the end of the list. More...
 
autoPtr< Reaction< ThermoType > > emplace (const label i, Args &&... args)
 Construct and set an element. More...
 
Foam::autoPtr< Reaction< ThermoType > > emplace (const label i, Args &&... args)
 
autoPtr< Reaction< ThermoType > > release (const label i)
 Release ownership of the pointer at the given position. More...
 
void transfer (PtrList< Reaction< ThermoType > > &list)
 Transfer into this list and annul the argument list. More...
 
void operator= (const PtrList< Reaction< ThermoType > > &list)
 Copy assignment. More...
 
void operator= (PtrList< Reaction< ThermoType > > &&list)
 Move assignment. More...
 

Static Public Member Functions

static word typeName ()
 Return the instantiated type name. More...
 
- Static Public Member Functions inherited from reactingMixture< ThermoType >
static word typeName ()
 Return the instantiated type name. More...
 
- Static Public Member Functions inherited from List< word >
static const List< word > & null ()
 Return a null List. More...
 
- Static Public Member Functions inherited from multiComponentMixture< ThermoType >
static word typeName ()
 Return the instantiated type name. More...
 

Protected Member Functions

void calculateqFuel ()
 Calculate qFuel. More...
 
void massAndAirStoichRatios ()
 Calculate air/fuel and oxygen/fuel ratio. More...
 
void calculateMaxProducts ()
 Calculate maximum products at stoichiometric mixture. More...
 
- Protected Member Functions inherited from PtrList< Reaction< ThermoType > >
void readIstream (Istream &is, const INew &inew)
 Read from Istream using Istream constructor class. More...
 
void free ()
 Delete the allocated entries, but retain the list size. More...
 

Protected Attributes

dimensionedScalar stoicRatio_
 Stoichiometric air-fuel mass ratio. More...
 
dimensionedScalar s_
 Stoichiometric oxygen-fuel mass ratio. More...
 
dimensionedScalar qFuel_
 Heat of combustion [J/Kg]. More...
 
scalarList specieStoichCoeffs_
 Stoichiometric coefficient for the reaction. More...
 
scalarList Yprod0_
 Mass concentrations at stoichiometric mixture for fres. More...
 
PtrList< volScalarFieldfres_
 List of components residual. More...
 
label inertIndex_
 Inert specie index. More...
 
label fuelIndex_
 Fuel specie index. More...
 
List< int > specieProd_
 List to indicate if specie is produced/consumed. More...
 

Detailed Description

template<class ThermoType>
class Foam::singleStepReactingMixture< ThermoType >

Single step reacting mixture.

Source files

Definition at line 55 of file singleStepReactingMixture.H.

Member Typedef Documentation

◆ thermoType

typedef ThermoType thermoType

The type of thermo package this mixture is instantiated for.

Definition at line 118 of file singleStepReactingMixture.H.

Constructor & Destructor Documentation

◆ singleStepReactingMixture()

singleStepReactingMixture ( const dictionary thermoDict,
const fvMesh mesh,
const word phaseName 
)

Construct from dictionary, mesh and phase name.

Definition at line 194 of file singleStepReactingMixture.C.

References Foam::dimless, Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, mesh, and Foam::Zero.

Here is the call graph for this function:

◆ ~singleStepReactingMixture()

virtual ~singleStepReactingMixture ( )
virtualdefault

Destructor.

Member Function Documentation

◆ calculateqFuel()

void calculateqFuel ( )
protected

Calculate qFuel.

Definition at line 34 of file singleStepReactingMixture.C.

References Foam::endl(), forAll, Foam::Info, and reaction.

Here is the call graph for this function:

◆ massAndAirStoichRatios()

void massAndAirStoichRatios ( )
protected

Calculate air/fuel and oxygen/fuel ratio.

Definition at line 61 of file singleStepReactingMixture.C.

References Foam::endl(), Foam::Info, and Foam::mag().

Here is the call graph for this function:

◆ calculateMaxProducts()

void calculateMaxProducts ( )
protected

Calculate maximum products at stoichiometric mixture.

Definition at line 85 of file singleStepReactingMixture.C.

References forAll, Foam::Info, Foam::mag(), Foam::nl, and reaction.

Here is the call graph for this function:

◆ typeName()

static word typeName ( )
inlinestatic

Return the instantiated type name.

Definition at line 139 of file singleStepReactingMixture.H.

◆ fresCorrect()

void fresCorrect ( )

Calculates the residual for all components.

Definition at line 135 of file singleStepReactingMixture.C.

References forAll, Foam::max(), reaction, and Y.

Here is the call graph for this function:

◆ stoicRatio()

const Foam::dimensionedScalar stoicRatio ( ) const
inline

Return the stoichiometric air-fuel mass ratio.

Definition at line 34 of file singleStepReactingMixtureI.H.

◆ s()

const Foam::dimensionedScalar s ( ) const
inline

Return the Stoichiometric oxygen-fuel mass ratio.

Definition at line 42 of file singleStepReactingMixtureI.H.

◆ qFuel()

const Foam::dimensionedScalar qFuel ( ) const
inline

Return the heat of combustion [J/Kg].

Definition at line 50 of file singleStepReactingMixtureI.H.

◆ specieStoichCoeffs()

const Foam::List< Foam::scalar > & specieStoichCoeffs ( ) const
inline

Return the stoichiometric coefficient for the reaction.

Definition at line 58 of file singleStepReactingMixtureI.H.

◆ fres()

Foam::tmp< Foam::volScalarField > fres ( const label  index) const
inline

Return the list of components residual.

Definition at line 67 of file singleStepReactingMixtureI.H.

◆ inertIndex()

Foam::label inertIndex ( ) const
inline

Return the inert specie index.

Definition at line 77 of file singleStepReactingMixtureI.H.

◆ fuelIndex()

Foam::label fuelIndex ( ) const
inline

Return the fuel specie index.

Definition at line 85 of file singleStepReactingMixtureI.H.

◆ specieProd()

const Foam::List< int > & specieProd ( ) const
inline

Return the list to indicate if specie is produced/consumed.

Definition at line 93 of file singleStepReactingMixtureI.H.

◆ Yprod0()

const Foam::scalarList & Yprod0 ( ) const
inline

Return the list of products mass concentrations.

Definition at line 101 of file singleStepReactingMixtureI.H.

◆ read()

void read ( const dictionary thermoDict)

Read dictionary.

Definition at line 255 of file singleStepReactingMixture.C.

Member Data Documentation

◆ stoicRatio_

dimensionedScalar stoicRatio_
protected

Stoichiometric air-fuel mass ratio.

Definition at line 65 of file singleStepReactingMixture.H.

◆ s_

dimensionedScalar s_
protected

Stoichiometric oxygen-fuel mass ratio.

Definition at line 68 of file singleStepReactingMixture.H.

◆ qFuel_

dimensionedScalar qFuel_
protected

Heat of combustion [J/Kg].

Definition at line 71 of file singleStepReactingMixture.H.

◆ specieStoichCoeffs_

scalarList specieStoichCoeffs_
protected

Stoichiometric coefficient for the reaction.

Definition at line 74 of file singleStepReactingMixture.H.

◆ Yprod0_

scalarList Yprod0_
protected

Mass concentrations at stoichiometric mixture for fres.

Definition at line 77 of file singleStepReactingMixture.H.

◆ fres_

PtrList<volScalarField> fres_
protected

List of components residual.

Definition at line 80 of file singleStepReactingMixture.H.

◆ inertIndex_

label inertIndex_
protected

Inert specie index.

Definition at line 83 of file singleStepReactingMixture.H.

◆ fuelIndex_

label fuelIndex_
protected

Fuel specie index.

Definition at line 86 of file singleStepReactingMixture.H.

◆ specieProd_

List<int> specieProd_
protected

List to indicate if specie is produced/consumed.

Definition at line 89 of file singleStepReactingMixture.H.


The documentation for this class was generated from the following files: