Cantera  4.0.0a1
Loading...
Searching...
No Matches

Represents a wall between between two ReactorBase objects. More...

#include <Wall.h>

Inheritance diagram for Wall:
[legend]

Detailed Description

Represents a wall between between two ReactorBase objects.

Walls can move (changing the volume of the adjacent reactors) and allow heat transfer between reactors.

Definition at line 137 of file Wall.h.

Public Member Functions

string type () const override
 String indicating the wall model implemented.
 
double velocity () const
 Wall velocity \( v(t) \) at current reactor network time.
 
void setVelocity (shared_ptr< Func1 > f)
 Set the wall velocity to a specified function of time, \( v(t) \).
 
double expansionRate () override
 Rate of volume change (m^3/s) for the adjacent reactors.
 
double heatFlux () const
 Heat flux function \( q_0(t) \) evaluated at current reactor network time.
 
void setHeatFlux (shared_ptr< Func1 > q)
 Specify the heat flux function \( q_0(t) \).
 
double heatRate () override
 Heat flow rate through the wall (W).
 
void setThermalResistance (double Rth)
 Set the thermal resistance of the wall [K*m^2/W].
 
void setHeatTransferCoeff (double U)
 Set the overall heat transfer coefficient [W/m^2/K].
 
double getHeatTransferCoeff () const
 Get the overall heat transfer coefficient [W/m^2/K].
 
void setEmissivity (double epsilon)
 Set the emissivity.
 
double getEmissivity () const
 Get the emissivity.
 
void setExpansionRateCoeff (double k)
 Set the expansion rate coefficient.
 
double getExpansionRateCoeff () const
 Get the expansion rate coefficient.
 
void addExpansionRateJacobian (SparseTriplets &trips, size_t row, double coeff, bool includePressureSpecies=true) override
 Add Jacobian terms proportional to derivatives of the wall expansion rate.
 
void addHeatRateJacobian (SparseTriplets &trips, size_t row, double coeff) override
 Add Jacobian terms proportional to derivatives of the wall heat rate.
 
 WallBase (shared_ptr< ReactorBase > r0, shared_ptr< ReactorBase > r1, const string &name="(none)")
 
- Public Member Functions inherited from WallBase
 WallBase (shared_ptr< ReactorBase > r0, shared_ptr< ReactorBase > r1, const string &name="(none)")
 
string type () const override
 String indicating the connector implemented.
 
virtual double expansionRate ()
 Rate of volume change (m^3/s) for the adjacent reactors at current reactor network time.
 
virtual double heatRate ()
 Heat flow rate through the wall (W) at current reactor network time.
 
double area ()
 Area in (m^2).
 
virtual void setArea (double a)
 Set the area [m^2].
 
virtual void initialize ()
 Called just before the start of integration.
 
virtual bool ready ()
 True if the wall is correctly configured and ready to use.
 
ReactorBaseleft () const
 Return a reference to the Reactor or Reservoir to the left of the wall.
 
ReactorBaseright ()
 Return a reference to the Reactor or Reservoir to the right of the wall.
 
void setSimTime (double time)
 Set current reactor network time.
 
virtual void addExpansionRateJacobian (SparseTriplets &trips, size_t row, double coeff, bool includePressureSpecies=true)
 Add Jacobian terms proportional to derivatives of the wall expansion rate.
 
virtual void addHeatRateJacobian (SparseTriplets &trips, size_t row, double coeff)
 Add Jacobian terms proportional to derivatives of the wall heat rate.
 
 ConnectorNode (const string &name="(none)")
 Transitional constructor.
 
 ConnectorNode (shared_ptr< ReactorBase > r0, shared_ptr< ReactorBase > r1, const string &name="(none)")
 Instantiate a ConnectorNode object with associated ReactorBase objects.
 
 ConnectorNode (const ConnectorNode &)=delete
 
- Public Member Functions inherited from ConnectorNode
 ConnectorNode (const string &name="(none)")
 Transitional constructor.
 
 ConnectorNode (shared_ptr< ReactorBase > r0, shared_ptr< ReactorBase > r1, const string &name="(none)")
 Instantiate a ConnectorNode object with associated ReactorBase objects.
 
 ConnectorNode (const ConnectorNode &)=delete
 
ConnectorNodeoperator= (const ConnectorNode &)=delete
 
virtual string type () const
 String indicating the connector implemented.
 
string name () const
 Retrieve connector name.
 
void setName (const string &name)
 Set connector name.
 
void setDefaultName (map< string, int > &counts)
 Set the default name of a connector. Returns false if it was previously set.
 

Protected Attributes

double m_k = 0.0
 expansion rate coefficient
 
double m_rrth = 0.0
 heat transfer coefficient
 
double m_emiss = 0.0
 emissivity
 
Func1m_vf = nullptr
 Velocity function.
 
Func1m_qf = nullptr
 Heat flux function.
 
- Protected Attributes inherited from WallBase
ReactorBasem_left = nullptr
 
ReactorBasem_right = nullptr
 
double m_time = 0.0
 current reactor network time
 
double m_area = 1.0
 
- Protected Attributes inherited from ConnectorNode
pair< shared_ptr< ReactorBase >, shared_ptr< ReactorBase > > m_nodes
 Pair of reactors forming end points of the connector.
 
string m_name
 ConnectorNode name.
 
bool m_defaultNameSet = false
 true if default name has been previously set.
 

Member Function Documentation

◆ type()

string type ( ) const
inlineoverridevirtual

String indicating the wall model implemented.

Usually corresponds to the name of the derived class.

Reimplemented from ConnectorNode.

Definition at line 144 of file Wall.h.

◆ velocity()

double velocity ( ) const

Wall velocity \( v(t) \) at current reactor network time.

Since
New in Cantera 3.0.

Definition at line 30 of file Wall.cpp.

◆ setVelocity()

void setVelocity ( shared_ptr< Func1 f)
inline

Set the wall velocity to a specified function of time, \( v(t) \).

Since
Changed in Cantera 3.2. Previous version used a raw pointer.

Definition at line 154 of file Wall.h.

◆ expansionRate()

double expansionRate ( )
overridevirtual

Rate of volume change (m^3/s) for the adjacent reactors.

The volume rate of change is given by

\[ \dot V = K A (P_{left} - P_{right}) + F(t) \]

where K is the specified expansion rate coefficient, A is the wall area, and and F(t) is a specified function evaluated at the current network time. Positive values for expansionRate correspond to increases in the volume of reactor on left, and decreases in the volume of the reactor on the right.

Since
New in Cantera 3.0.

Reimplemented from WallBase.

Definition at line 37 of file Wall.cpp.

◆ heatFlux()

double heatFlux ( ) const

Heat flux function \( q_0(t) \) evaluated at current reactor network time.

Since
New in Cantera 3.0.

Definition at line 51 of file Wall.cpp.

◆ setHeatFlux()

void setHeatFlux ( shared_ptr< Func1 q)
inline

Specify the heat flux function \( q_0(t) \).

Since
Changed in Cantera 3.2. Previous version used a raw pointer.

Definition at line 180 of file Wall.h.

◆ heatRate()

double heatRate ( )
overridevirtual

Heat flow rate through the wall (W).

The heat flux is given by

\[ Q = h A (T_{left} - T_{right}) + A G(t) \]

where h is the heat transfer coefficient, A is the wall area, and G(t) is a specified function of time evaluated at the current network time. Positive values denote a flux from left to right.

Since
New in Cantera 3.0.

Reimplemented from WallBase.

Definition at line 58 of file Wall.cpp.

◆ setThermalResistance()

void setThermalResistance ( double  Rth)
inline

Set the thermal resistance of the wall [K*m^2/W].

Definition at line 198 of file Wall.h.

◆ setHeatTransferCoeff()

void setHeatTransferCoeff ( double  U)
inline

Set the overall heat transfer coefficient [W/m^2/K].

Definition at line 203 of file Wall.h.

◆ getHeatTransferCoeff()

double getHeatTransferCoeff ( ) const
inline

Get the overall heat transfer coefficient [W/m^2/K].

Definition at line 208 of file Wall.h.

◆ setEmissivity()

void setEmissivity ( double  epsilon)
inline

Set the emissivity.

Definition at line 213 of file Wall.h.

◆ getEmissivity()

double getEmissivity ( ) const
inline

Get the emissivity.

Definition at line 222 of file Wall.h.

◆ setExpansionRateCoeff()

void setExpansionRateCoeff ( double  k)
inline

Set the expansion rate coefficient.

Definition at line 227 of file Wall.h.

◆ getExpansionRateCoeff()

double getExpansionRateCoeff ( ) const
inline

Get the expansion rate coefficient.

Definition at line 232 of file Wall.h.

◆ addExpansionRateJacobian()

void addExpansionRateJacobian ( SparseTriplets &  trips,
size_t  row,
double  coeff,
bool  includePressureSpecies = true 
)
overridevirtual

Add Jacobian terms proportional to derivatives of the wall expansion rate.

Adds entries for coeff * d(expansionRate)/dy_j to the specified global row of the reactor network Jacobian. The wall supplies scalar derivatives with respect to left and right pressures, while adjacent reactors supply pressure derivatives with respect to their state variables.

Parameters
[in,out]tripsSparse Jacobian entries. Implementations append entries using global row and column indices in the reactor network.
rowGlobal row index receiving these chain-rule terms.
coeffMultiplicative factor applied to d(expansionRate)/dy_j.
includePressureSpeciesInclude pressure derivatives with respect to species state variables when pressure is a derived quantity. These terms may be dense and are controlled by preconditioner sparsity settings.
Since
New in Cantera 4.0.

Reimplemented from WallBase.

Definition at line 78 of file Wall.cpp.

◆ addHeatRateJacobian()

void addHeatRateJacobian ( SparseTriplets &  trips,
size_t  row,
double  coeff 
)
overridevirtual

Add Jacobian terms proportional to derivatives of the wall heat rate.

Adds entries for coeff * d(heatRate)/dy_j to the specified global row of the reactor network Jacobian. The wall supplies scalar derivatives with respect to left and right temperatures, while adjacent reactors supply temperature derivatives with respect to their state variables.

Parameters
[in,out]tripsSparse Jacobian entries. Implementations append entries using global row and column indices in the reactor network.
rowGlobal row index receiving these chain-rule terms.
coeffMultiplicative factor applied to d(heatRate)/dy_j.
Since
New in Cantera 4.0.

Reimplemented from WallBase.

Definition at line 91 of file Wall.cpp.

◆ WallBase()

WallBase ( shared_ptr< ReactorBase r0,
shared_ptr< ReactorBase r1,
const string &  name = "(none)" 
)

Definition at line 26 of file Wall.cpp.

Member Data Documentation

◆ m_k

double m_k = 0.0
protected

expansion rate coefficient

Definition at line 243 of file Wall.h.

◆ m_rrth

double m_rrth = 0.0
protected

heat transfer coefficient

Definition at line 246 of file Wall.h.

◆ m_emiss

double m_emiss = 0.0
protected

emissivity

Definition at line 249 of file Wall.h.

◆ m_vf

Func1* m_vf = nullptr
protected

Velocity function.

Definition at line 252 of file Wall.h.

◆ m_qf

Func1* m_qf = nullptr
protected

Heat flux function.

Definition at line 255 of file Wall.h.


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