OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Protected Member Functions | List of all members
FuelCellShop::Equation::ReactionSourceTermsKG< dim > Class Template Reference

This class assembles the reaction source terms for all other transport equations, if there's any. More...

#include <reaction_source_terms_KG.h>

Inheritance diagram for FuelCellShop::Equation::ReactionSourceTermsKG< dim >:
Inheritance graph
[legend]
Collaboration diagram for FuelCellShop::Equation::ReactionSourceTermsKG< dim >:
Collaboration graph
[legend]

Public Member Functions

Constructors, destructor, and initalization
 ReactionSourceTermsKG (FuelCell::SystemManagement &system_management, boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData > data=boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData >())
 Constructor. More...
 
virtual ~ReactionSourceTermsKG ()
 Destructor. More...
 
virtual void declare_parameters (ParameterHandler &param) const
 Declare parameters. More...
 
virtual void initialize (ParameterHandler &param)
 Initialize parameters. More...
 
void set_cathode_kinetics (FuelCellShop::Kinetics::BaseKinetics *kinetics)
 Set the pointer to cathode kinetics in the object. More...
 
void set_anode_kinetics (FuelCellShop::Kinetics::BaseKinetics *kinetics)
 Set the pointer to anode kinetics in the object. More...
 
Local CG FEM based assemblers
virtual void assemble_cell_matrix (FuelCell::ApplicationCore::MatrixVector &cell_matrices, const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &cell_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
 Assemble local cell matrix. More...
 
virtual void assemble_cell_residual (FuelCell::ApplicationCore::FEVector &cell_residual, const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &cell_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
 Assemble local cell residual. More...
 
Accessors & Info
virtual void adjust_internal_cell_couplings (std::vector< couplings_map > &dst, const std::vector< FuelCellShop::Material::PureGas * > &gases=std::vector< FuelCellShop::Material::PureGas * >())
 This function is used to adjust std::vector < internal_cell_couplings >, which is generated after getting internal_cell_couplings from all the equations being used in the application. More...
 
virtual void print_equation_info () const
 This function prints out the info for this class. More...
 
FuelCellShop::Kinetics::BaseKineticsget_cathode_kinetics () const
 Accessor for cathode catalyst layer FuelCellShop::Kinetics::BaseKinetics pointer. More...
 
FuelCellShop::Kinetics::BaseKineticsget_anode_kinetics () const
 Accessor for anode catalyst layer FuelCellShop::Kinetics::BaseKinetics pointer. More...
 
- Public Member Functions inherited from FuelCellShop::Equation::ReactionSourceTermsBase< dim >
 ReactionSourceTermsBase (FuelCell::SystemManagement &system_management, boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData > data=boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData >())
 Constructor. More...
 
virtual ~ReactionSourceTermsBase ()
 Destructor. More...
 
- Public Member Functions inherited from FuelCellShop::Equation::EquationBase< dim >
virtual void assemble_bdry_matrix (FuelCell::ApplicationCore::MatrixVector &bdry_matrices, const typename FuelCell::ApplicationCore::DoFApplication< dim >::FaceInfo &bdry_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
 Assemble local boundary matrix. More...
 
virtual void assemble_bdry_residual (FuelCell::ApplicationCore::FEVector &bdry_residual, const typename FuelCell::ApplicationCore::DoFApplication< dim >::FaceInfo &bdry_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
 Assemble local boundary residual. More...
 
const couplings_mapget_internal_cell_couplings () const
 This function returns internal_cell_couplings of a derived equation class. More...
 
const couplings_mapget_internal_flux_couplings () const
 This function returns internal_flux_couplings (DG FEM only) of a derived equation class. More...
 
const
component_materialID_value_map
get_component_materialID_value () const
 This function returns component_materialID_value of a derived equation class. More...
 
const
component_boundaryID_value_map
get_component_boundaryID_value () const
 This function returns component_boundaryID_value of a derived equation class. More...
 
const std::vector< BoundaryType > & get_boundary_types () const
 This function returns boundary_types of a derived equation class. More...
 
const std::vector< std::vector
< BoundaryType > > & 
get_multi_boundary_types () const
 This function returns multi_boundary_types of a derived equation class. More...
 
const std::vector< OutputType > & get_output_types () const
 This function returns output_types of a derived equation class. More...
 
const std::vector< std::vector
< OutputType > > & 
get_multi_output_types () const
 This function returns multi_output_types of a derived equation class. More...
 
const std::string & get_equation_name () const
 This function returns equation_name of a derived equation class. More...
 
const std::vector< unsigned int > & get_matrix_block_indices () const
 This function returns matrix_block_indices of a derived equation class. More...
 
const std::vector< unsigned int > & get_residual_indices () const
 This function returns residual_indices of a derived equation class. More...
 

Protected Member Functions

void set_species_couplings (unsigned int reacting_species_equation_number, unsigned int species_number, std::vector< couplings_map > &equation_map)
 Function used to set the appropriate couplings between equations. More...
 
void set_density_couplings (unsigned int species_number, couplings_map::iterator iter)
 
Local CG FEM based assemblers - make_ functions
virtual void make_assemblers_generic_constant_data ()
 This function computes Local CG FEM based assemblers - constant data (generic). More...
 
virtual void make_assemblers_cell_constant_data (const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &cell_info)
 This function computes. More...
 
virtual void make_assemblers_cell_variable_data (const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &cell_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
 This function computes. More...
 
- Protected Member Functions inherited from FuelCellShop::Equation::EquationBase< dim >
 EquationBase (FuelCell::SystemManagement &sys_management, boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData > data=boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData >())
 Constructor. More...
 
virtual ~EquationBase ()
 Destructor. More...
 
virtual void set_parameters (const std::vector< std::string > &name_dvar, const std::vector< double > &value_dvar, ParameterHandler &param)
 Set parameters using the parameter file, in order to run parametric/optimization studies. More...
 
virtual void make_assemblers_bdry_constant_data (const typename FuelCell::ApplicationCore::DoFApplication< dim >::FaceInfo &bdry_info)
 
virtual void make_assemblers_bdry_variable_data (const typename FuelCell::ApplicationCore::DoFApplication< dim >::FaceInfo &bdry_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
 
void select_cell_assemblers (const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &cell_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
 This routine is used to select the make_assembly routines that need to be called inside assemble_cell_matrix to compute. More...
 
virtual void make_internal_cell_couplings ()
 This function fills out internal_cell_couplings of a derived equation class. More...
 
virtual void make_internal_flux_couplings ()
 This function fills out internal_flux_couplings (DG FEM only) of a derived equation class. More...
 
virtual void make_component_materialID_value ()
 This function fills out component_materialID_value of a derived equation class. More...
 
virtual void make_component_boundaryID_value ()
 This function fills out component_boundaryID_value of a derived equation class. More...
 
virtual void make_boundary_types ()
 This function fills out boundary_types of a derived equation class. More...
 
virtual void make_multi_boundary_types ()
 This function fills out multi_boundary_types of a derived equation class. More...
 
virtual void make_output_types ()
 This function fills out output_types of a derived equation class. More...
 
virtual void make_multi_output_types ()
 This function fills out multi_output_types of a derived equation class. More...
 
virtual void assemble_cell_Jacobian_matrix (FuelCell::ApplicationCore::MatrixVector &cell_matrices, const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &cell_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
 Assemble the local Jacobian Matrix for Non-Linear problems. More...
 
virtual void assemble_bdry_Jacobian_matrix (FuelCell::ApplicationCore::MatrixVector &bdry_matrices, const typename FuelCell::ApplicationCore::DoFApplication< dim >::FaceInfo &bdry_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
 Assemble local Jacobian boundary matrix for Non-Linear problems. More...
 
virtual void assemble_cell_linear_matrix (FuelCell::ApplicationCore::MatrixVector &cell_matrices, const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &cell_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
 Assemble the local cell matrix for Linear problems. More...
 
virtual void assemble_cell_residual_rhs (FuelCell::ApplicationCore::FEVector &cell_residual, const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &cell_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
 Assemble local cell RHS for nonlinear problems. More...
 
virtual void assemble_cell_linear_rhs (FuelCell::ApplicationCore::FEVector &cell_residual, const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &cell_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
 Assemble local cell RHS for Linear problems. More...
 
virtual void assemble_bdry_linear_matrix (FuelCell::ApplicationCore::MatrixVector &bdry_matrices, const typename FuelCell::ApplicationCore::DoFApplication< dim >::FaceInfo &bdry_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
 Assemble local boundary matrix for linear problems. More...
 
virtual void assemble_bdry_linear_rhs (FuelCell::ApplicationCore::FEVector &bdry_residual, const typename FuelCell::ApplicationCore::DoFApplication< dim >::FaceInfo &bdry_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
 Assemble local boundary RHS for linear problems. More...
 
void standard_to_block_wise (FullMatrix< double > &target) const
 This function changes the order of dealii::FullMatrix<double> target from standard to block-wise. More...
 
void standard_to_block_wise (Vector< double > &target) const
 This function changes the order of dealii::Vector<double> target from standard to block-wise. More...
 
void dealII_to_appframe (FuelCell::ApplicationCore::MatrixVector &dst, const FullMatrix< double > &src, const std::vector< unsigned int > &matrix_block_indices) const
 This function converts the standard ordered structure dealii::FullMatrix<double> src into the block-wise ordered structure FuelCell::ApplicationCore::MatrixVector dst. More...
 
void dealII_to_appframe (FuelCell::ApplicationCore::FEVector &dst, const Vector< double > &src, const std::vector< unsigned int > &residual_indices) const
 This function converts the standard ordered structure dealii::Vector<double> src into the block-wise ordered structure FuelCell::ApplicationCore::FEVector dst. More...
 
bool belongs_to_boundary (const unsigned int &tria_boundary_id, const unsigned int &param_boundary_id) const
 This function returns true if a boundary indicator of an external face on the triangulation coincides with a boundary indicator defined in the parameters file of a derived equation class. More...
 
void print_caller_name (const std::string &caller_name) const
 This function is used to print out the name of another function that has been declared in the scope of this class, but not yet been implemented. More...
 

Protected Attributes

Kinetics Objects
FuelCellShop::Kinetics::BaseKineticscathode_kinetics
 Pointer to Cathode Kinetics object, initialized in the constructor. More...
 
FuelCellShop::Kinetics::BaseKineticsanode_kinetics
 Pointer to Anode Kinetics object, initialized in the constructor. More...
 
Counters
unsigned int last_iter_cell
 Variable used to store the index in cell_info->global_data of the previous Newton solution The solution at the previous iteration is used to compute cell_matrix and cell_residual. More...
 
- Protected Attributes inherited from FuelCellShop::Equation::EquationBase< dim >
unsigned int dofs_per_cell
 Number of degrees of freedom per cell. More...
 
unsigned int n_q_points_cell
 Number of quadrature points per cell. More...
 
unsigned int n_q_points_bdry
 Number of quadrature points per boundary. More...
 
DoFHandler< dim >
::active_cell_iterator 
cell
 Currently active DoFHandler<dim> active cell iterator. More...
 
DoFHandler< dim >
::active_face_iterator 
bdry
 Currently active DoFHandler<dim> active boundary iterator. More...
 
std::vector< double > JxW_cell
 Jacobian of mapping by Weight in the quadrature points of a cell. More...
 
std::vector< double > JxW_bdry
 Jacobian of mapping by Weight in the quadrature points of a boundary. More...
 
std::vector< Point< dim > > normal_vectors
 Normal vectors in the quadrature points of a boundary. More...
 
std::vector< std::vector
< Point< dim > > > 
tangential_vectors
 Tangential vectors in the quadrature points of a boundary. More...
 
FuelCell::SystemManagementsystem_management
 Pointer to the external YourApplication<dim>::system_management object. More...
 
couplings_map internal_cell_couplings
 This object contains the info on how the equations and solution variables of a derived equation class are coupled. More...
 
couplings_map internal_flux_couplings
 This object contains the info on how the "X" and "Y" of a derived equation class are coupled (DG FEM only). More...
 
component_materialID_value_map component_materialID_value
 This object reflects the following structure (see FuelCell::InitialAndBoundaryData namespace docs): More...
 
component_boundaryID_value_map component_boundaryID_value
 This object reflects the following structure (see FuelCell::InitialAndBoundaryData namespace docs): More...
 
std::vector< BoundaryTypeboundary_types
 The list of boundary types of a derived equation class. More...
 
std::vector< std::vector
< BoundaryType > > 
multi_boundary_types
 The list of multiple boundary types of a derived equation class. More...
 
std::vector< OutputTypeoutput_types
 The list of output types of a derived equation class. More...
 
std::vector< std::vector
< OutputType > > 
multi_output_types
 The list of multiple output types of a derived equation class. More...
 
std::string equation_name
 The name of a derived equation class. More...
 
std::string name_base_variable
 Const std::string member storing name of the base solution variable corresponding to the equation represented by this class. More...
 
std::vector< unsigned int > matrix_block_indices
 The system matrix block indices (a derived equation class) drawn from the global structure (a derived equation class + other active equation classes included into the computation). More...
 
std::vector< unsigned int > residual_indices
 The residual indices (a derived equation class) drawn from the global structure (a derived equation class + other active equation classes included into the computation). More...
 
std::vector< bool > counter
 This vector contains the collection of internal "counters" used by the derived equation classes. More...
 
EquationFlags assemble_flags
 This vector contains a collection of internal flags to tell derived equation classes what needs to be re-computed. More...
 
boost::shared_ptr
< FuelCell::ApplicationCore::ApplicationData
data
 Data object for the application data to be passed to the equation classes. More...
 
std::string solution_vector_name
 The name of the solution vector in FEVectors. More...
 
std::string residual_vector_name
 The name of the residual vector name in FEVectors. More...
 

Methods and Data related to fluid transport equations

unsigned int n_species
 Number of species, $ N $. More...
 
unsigned int indexO2
 Keeps oxygen set of fluid transport equations. More...
 
unsigned int indexH2
 Keeps hydrogen set of fluid transport equations. More...
 
unsigned int indexH2O
 Keeps water vapor set of fluid transport equations. More...
 
double multiplierO2
 Oxygen source multiplier, $ \quad \left[ \frac{\text{g}}{A sec} \right] $. More...
 
double multiplierH2
 Hydrogen source multiplier, $ \quad \left[ \frac{\text{g}}{A sec} \right] $. More...
 
double multiplierH2O
 Water vapor source multiplier, $ \quad \left[ \frac{\text{g}}{A sec} \right] $. More...
 
std::vector< double > molar_mass
 Molar mass of pure gas, $ M_i \quad \left[ \frac{\text{g}}{\text{mol}} \right] $. More...
 
std::vector
< FEValuesExtractors::Scalar > 
density_extractors
 Density extractors. More...
 
FEValuesExtractors::Scalar electronic_electrical_potential_extractor
 Electronic electrical potential extractor. More...
 
FEValuesExtractors::Scalar protonic_electrical_potential_extractor
 Protonic electrical potential extractor. More...
 
std::vector< double > T_mixture
 Constant temperature of species mixture in the quadrature points of a cell, $ T_{\text{mixture}}^{\text{const}} \quad \left[ \text{K} \right] $. More...
 
std::vector< double > ORR_current_density
 ORR current density in the quadrature points of a cell at a previous Newton iteration. More...
 
std::vector< double > DORR_current_density_Doxygen_concentration
 ORR current density derivative with respect to oxygen concentration (gas, NOT gas-liquid) in the quadrature points of a cell at a previous Newton iteration. More...
 
std::vector< double > DORR_current_density_Delectronic_electrical_potential
 ORR current density derivative with respect to electronic electrical potential in the quadrature points of a cell at a previous Newton iteration. More...
 
std::vector< double > DORR_current_density_Dprotonic_electrical_potential
 ORR current density derivative with respect to protonic electrical potential in the quadrature points of a cell at a previous Newton iteration. More...
 
std::vector< double > HOR_current_density
 HOR current density in the quadrature points of a cell at a previous Newton iteration. More...
 
std::vector< double > DHOR_current_density_Dhydrogen_concentration
 HOR current density derivative with respect to hydrogen concentration (gas, NOT gas-liquid) in the quadrature points of a cell at a previous Newton iteration. More...
 
std::vector< double > DHOR_current_density_Delectronic_electrical_potential
 HOR current density derivative with respect to electronic electrical potential in the quadrature points of a cell at a previous Newton iteration. More...
 
std::vector< double > DHOR_current_density_Dprotonic_electrical_potential
 HOR current density derivative with respect to protonic electrical potential in the quadrature points of a cell at a previous Newton iteration. More...
 
std::vector< std::vector
< double > > 
density_old
 Density of each species in the quadrature points of a cell at a previous Newton iteration. More...
 
std::vector< double > electronic_electrical_potential_old
 Electronic electrical potential in the quadrature points of a cell at a previous Newton iteration. More...
 
std::vector< double > protonic_electrical_potential_old
 Protonic electrical potential in the quadrature points of a cell at a previous Newton iteration. More...
 
std::vector< std::vector
< std::vector< double > > > 
phi_density
 Density shape functions. More...
 
std::vector< std::vector
< double > > 
phi_electronic_electrical_potential
 Electronic electrical potential shape functions. More...
 
std::vector< std::vector
< double > > 
phi_protonic_electrical_potential
 Protonic electrical potential shape functions. More...
 
std::string eq_generic_prefix
 For internal use only. More...
 
std::vector< std::string > eq_postfixes
 For internal use only. More...
 
std::vector< std::string > var_postfixes
 For internal use only. More...
 
std::string eq_name
 For internal use only. More...
 
std::string var_name
 For internal use only. More...
 
virtual void make_matrix_block_indices ()
 This function fills out the max number of matrix_block_indices which need to be updated due to the source terms. More...
 
virtual void make_residual_indices ()
 This function fills out the max number of residual_indices which need to be updated due to the source terms. More...
 

Additional Inherited Members

- Public Attributes inherited from FuelCellShop::Equation::EquationBase< dim >
bool variable_initial_data
 true, if variable initial data is prescribed on a part of the domain. More...
 
bool variable_boundary_data
 true, if variable Dirichlet boundary conditions are prescribed on a part of the boundary. More...
 

Detailed Description

template<int dim>
class FuelCellShop::Equation::ReactionSourceTermsKG< dim >

This class assembles the reaction source terms for all other transport equations, if there's any.

Author
Marc Secanell, 2015
Valentin N. Zingan, 2013 - all couplings with fluid transport equations

Constructor & Destructor Documentation

Constructor.

template<int dim>
virtual FuelCellShop::Equation::ReactionSourceTermsKG< dim >::~ReactionSourceTermsKG ( )
virtual

Destructor.

Member Function Documentation

template<int dim>
virtual void FuelCellShop::Equation::ReactionSourceTermsKG< dim >::adjust_internal_cell_couplings ( std::vector< couplings_map > &  dst,
const std::vector< FuelCellShop::Material::PureGas * > &  gases = std::vector< FuelCellShop::Material::PureGas * >() 
)
virtual

This function is used to adjust std::vector < internal_cell_couplings >, which is generated after getting internal_cell_couplings from all the equations being used in the application.

Note
It's very important to use this function, if we are considering source terms due to reaction in the catalyst layers. It's also noteworthy that this function should be used after whole vector of internal_cell_couplings is created, and BEFORE make_cell_couplings of SystemManagement is called.
template<int dim>
virtual void FuelCellShop::Equation::ReactionSourceTermsKG< dim >::assemble_cell_matrix ( FuelCell::ApplicationCore::MatrixVector cell_matrices,
const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &  cell_info,
FuelCellShop::Layer::BaseLayer< dim > *const  layer 
)
virtual

Assemble local cell matrix.

Reimplemented from FuelCellShop::Equation::ReactionSourceTermsBase< dim >.

template<int dim>
virtual void FuelCellShop::Equation::ReactionSourceTermsKG< dim >::assemble_cell_residual ( FuelCell::ApplicationCore::FEVector cell_residual,
const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &  cell_info,
FuelCellShop::Layer::BaseLayer< dim > *const  layer 
)
virtual

Assemble local cell residual.

Reimplemented from FuelCellShop::Equation::ReactionSourceTermsBase< dim >.

template<int dim>
virtual void FuelCellShop::Equation::ReactionSourceTermsKG< dim >::declare_parameters ( ParameterHandler &  param) const
virtual

Declare parameters.

Reimplemented from FuelCellShop::Equation::ReactionSourceTermsBase< dim >.

template<int dim>
FuelCellShop::Kinetics::BaseKinetics* FuelCellShop::Equation::ReactionSourceTermsKG< dim >::get_anode_kinetics ( ) const
inline
template<int dim>
FuelCellShop::Kinetics::BaseKinetics* FuelCellShop::Equation::ReactionSourceTermsKG< dim >::get_cathode_kinetics ( ) const
inline
template<int dim>
virtual void FuelCellShop::Equation::ReactionSourceTermsKG< dim >::initialize ( ParameterHandler &  param)
virtual

Initialize parameters.

Reimplemented from FuelCellShop::Equation::ReactionSourceTermsBase< dim >.

template<int dim>
virtual void FuelCellShop::Equation::ReactionSourceTermsKG< dim >::make_assemblers_cell_constant_data ( const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &  cell_info)
protectedvirtual

This function computes.

Local CG FEM based assemblers - constant data (cell)

and allocates the memory for shape functions, shape function gradients, and JxW_cell in

Local CG FEM based assemblers - variable data (cell)

.

Reimplemented from FuelCellShop::Equation::EquationBase< dim >.

template<int dim>
virtual void FuelCellShop::Equation::ReactionSourceTermsKG< dim >::make_assemblers_cell_variable_data ( const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &  cell_info,
FuelCellShop::Layer::BaseLayer< dim > *const  layer 
)
protectedvirtual

This function computes.

Local CG FEM based assemblers - variable data (cell)

.

Reimplemented from FuelCellShop::Equation::EquationBase< dim >.

template<int dim>
virtual void FuelCellShop::Equation::ReactionSourceTermsKG< dim >::make_assemblers_generic_constant_data ( )
protectedvirtual

This function computes Local CG FEM based assemblers - constant data (generic).

Warning
For the DEVELOPERS: block_index for VariableInfo are not filled here, but indices_exist flag is set to TRUE (as it is needed at other places before cell_matrix or cell_residual assembly). Developers need to be wary of this fact that the block_index are still not filled yet, and they need to fill them before doing cell_matrix assembly.

Reimplemented from FuelCellShop::Equation::EquationBase< dim >.

template<int dim>
virtual void FuelCellShop::Equation::ReactionSourceTermsKG< dim >::make_matrix_block_indices ( )
protectedvirtual

This function fills out the max number of matrix_block_indices which need to be updated due to the source terms.

The real number might be less depending on in which CL we are.

Reimplemented from FuelCellShop::Equation::EquationBase< dim >.

template<int dim>
virtual void FuelCellShop::Equation::ReactionSourceTermsKG< dim >::make_residual_indices ( )
protectedvirtual

This function fills out the max number of residual_indices which need to be updated due to the source terms.

The real number might be less depending on in which CL we are.

Reimplemented from FuelCellShop::Equation::EquationBase< dim >.

template<int dim>
virtual void FuelCellShop::Equation::ReactionSourceTermsKG< dim >::print_equation_info ( ) const
virtual

This function prints out the info for this class.

Reimplemented from FuelCellShop::Equation::ReactionSourceTermsBase< dim >.

template<int dim>
void FuelCellShop::Equation::ReactionSourceTermsKG< dim >::set_anode_kinetics ( FuelCellShop::Kinetics::BaseKinetics kinetics)
inline

Set the pointer to anode kinetics in the object.

Note
If an application uses anode kinetics model, this method should be called neccessarily before initializing this object (using initialize method).

References FuelCellShop::Equation::ReactionSourceTermsKG< dim >::anode_kinetics.

template<int dim>
void FuelCellShop::Equation::ReactionSourceTermsKG< dim >::set_cathode_kinetics ( FuelCellShop::Kinetics::BaseKinetics kinetics)
inline

Set the pointer to cathode kinetics in the object.

Note
If an application uses cathode kinetics model, this method should be called neccessarily before initializing this object (using initialize method).

References FuelCellShop::Equation::ReactionSourceTermsKG< dim >::cathode_kinetics.

template<int dim>
void FuelCellShop::Equation::ReactionSourceTermsKG< dim >::set_density_couplings ( unsigned int  species_number,
couplings_map::iterator  iter 
)
inlineprotected
template<int dim>
void FuelCellShop::Equation::ReactionSourceTermsKG< dim >::set_species_couplings ( unsigned int  reacting_species_equation_number,
unsigned int  species_number,
std::vector< couplings_map > &  equation_map 
)
inlineprotected

Function used to set the appropriate couplings between equations.

In this case, given the reacting species equation number and the species equation number, the function sets up the coupling with electrical and protonic potential in the case of electrochemical reactions. It also checks to make sure the coupling could be set.

Used in adjusnt_internal_cell_couplings

References FuelCellShop::Equation::ReactionSourceTermsKG< dim >::eq_name, and FuelCellShop::Equation::ReactionSourceTermsKG< dim >::eq_postfixes.

Member Data Documentation

template<int dim>
std::vector< FEValuesExtractors::Scalar > FuelCellShop::Equation::ReactionSourceTermsKG< dim >::density_extractors
protected

Density extractors.

template<int dim>
std::vector< std::vector<double> > FuelCellShop::Equation::ReactionSourceTermsKG< dim >::density_old
protected

Density of each species in the quadrature points of a cell at a previous Newton iteration.

template<int dim>
std::vector<double> FuelCellShop::Equation::ReactionSourceTermsKG< dim >::DHOR_current_density_Delectronic_electrical_potential
protected

HOR current density derivative with respect to electronic electrical potential in the quadrature points of a cell at a previous Newton iteration.

template<int dim>
std::vector<double> FuelCellShop::Equation::ReactionSourceTermsKG< dim >::DHOR_current_density_Dhydrogen_concentration
protected

HOR current density derivative with respect to hydrogen concentration (gas, NOT gas-liquid) in the quadrature points of a cell at a previous Newton iteration.

template<int dim>
std::vector<double> FuelCellShop::Equation::ReactionSourceTermsKG< dim >::DHOR_current_density_Dprotonic_electrical_potential
protected

HOR current density derivative with respect to protonic electrical potential in the quadrature points of a cell at a previous Newton iteration.

template<int dim>
std::vector<double> FuelCellShop::Equation::ReactionSourceTermsKG< dim >::DORR_current_density_Delectronic_electrical_potential
protected

ORR current density derivative with respect to electronic electrical potential in the quadrature points of a cell at a previous Newton iteration.

template<int dim>
std::vector<double> FuelCellShop::Equation::ReactionSourceTermsKG< dim >::DORR_current_density_Doxygen_concentration
protected

ORR current density derivative with respect to oxygen concentration (gas, NOT gas-liquid) in the quadrature points of a cell at a previous Newton iteration.

template<int dim>
std::vector<double> FuelCellShop::Equation::ReactionSourceTermsKG< dim >::DORR_current_density_Dprotonic_electrical_potential
protected

ORR current density derivative with respect to protonic electrical potential in the quadrature points of a cell at a previous Newton iteration.

template<int dim>
FEValuesExtractors::Scalar FuelCellShop::Equation::ReactionSourceTermsKG< dim >::electronic_electrical_potential_extractor
protected

Electronic electrical potential extractor.

template<int dim>
std::vector<double> FuelCellShop::Equation::ReactionSourceTermsKG< dim >::electronic_electrical_potential_old
protected

Electronic electrical potential in the quadrature points of a cell at a previous Newton iteration.

template<int dim>
std::string FuelCellShop::Equation::ReactionSourceTermsKG< dim >::eq_generic_prefix
protected

For internal use only.

template<int dim>
std::string FuelCellShop::Equation::ReactionSourceTermsKG< dim >::eq_name
protected
template<int dim>
std::vector<std::string> FuelCellShop::Equation::ReactionSourceTermsKG< dim >::eq_postfixes
protected
template<int dim>
std::vector<double> FuelCellShop::Equation::ReactionSourceTermsKG< dim >::HOR_current_density
protected

HOR current density in the quadrature points of a cell at a previous Newton iteration.

template<int dim>
unsigned int FuelCellShop::Equation::ReactionSourceTermsKG< dim >::indexH2
protected

Keeps hydrogen set of fluid transport equations.

template<int dim>
unsigned int FuelCellShop::Equation::ReactionSourceTermsKG< dim >::indexH2O
protected

Keeps water vapor set of fluid transport equations.

template<int dim>
unsigned int FuelCellShop::Equation::ReactionSourceTermsKG< dim >::indexO2
protected

Keeps oxygen set of fluid transport equations.

template<int dim>
unsigned int FuelCellShop::Equation::ReactionSourceTermsKG< dim >::last_iter_cell
protected

Variable used to store the index in cell_info->global_data of the previous Newton solution The solution at the previous iteration is used to compute cell_matrix and cell_residual.

template<int dim>
std::vector<double> FuelCellShop::Equation::ReactionSourceTermsKG< dim >::molar_mass
protected

Molar mass of pure gas, $ M_i \quad \left[ \frac{\text{g}}{\text{mol}} \right] $.

template<int dim>
double FuelCellShop::Equation::ReactionSourceTermsKG< dim >::multiplierH2
protected

Hydrogen source multiplier, $ \quad \left[ \frac{\text{g}}{A sec} \right] $.

template<int dim>
double FuelCellShop::Equation::ReactionSourceTermsKG< dim >::multiplierH2O
protected

Water vapor source multiplier, $ \quad \left[ \frac{\text{g}}{A sec} \right] $.

template<int dim>
double FuelCellShop::Equation::ReactionSourceTermsKG< dim >::multiplierO2
protected

Oxygen source multiplier, $ \quad \left[ \frac{\text{g}}{A sec} \right] $.

template<int dim>
unsigned int FuelCellShop::Equation::ReactionSourceTermsKG< dim >::n_species
protected

Number of species, $ N $.

template<int dim>
std::vector<double> FuelCellShop::Equation::ReactionSourceTermsKG< dim >::ORR_current_density
protected

ORR current density in the quadrature points of a cell at a previous Newton iteration.

template<int dim>
std::vector< std::vector< std::vector<double> > > FuelCellShop::Equation::ReactionSourceTermsKG< dim >::phi_density
protected

Density shape functions.

phi_density [ s ] [ q ] [ k ] denotes $ k $-th density shape function computed in $ q $-th quadrature point of a cell for species $ s $.

template<int dim>
std::vector< std::vector<double> > FuelCellShop::Equation::ReactionSourceTermsKG< dim >::phi_electronic_electrical_potential
protected

Electronic electrical potential shape functions.

phi_electronic_electrical_potential [ q ] [ k ] denotes $ k $-th electronic electrical potential shape function computed in $ q $-th quadrature point of a cell.

template<int dim>
std::vector< std::vector<double> > FuelCellShop::Equation::ReactionSourceTermsKG< dim >::phi_protonic_electrical_potential
protected

Protonic electrical potential shape functions.

phi_protonic_electrical_potential [ q ] [ k ] denotes $ k $-th protonic electrical potential shape function computed in $ q $-th quadrature point of a cell.

template<int dim>
FEValuesExtractors::Scalar FuelCellShop::Equation::ReactionSourceTermsKG< dim >::protonic_electrical_potential_extractor
protected

Protonic electrical potential extractor.

template<int dim>
std::vector<double> FuelCellShop::Equation::ReactionSourceTermsKG< dim >::protonic_electrical_potential_old
protected

Protonic electrical potential in the quadrature points of a cell at a previous Newton iteration.

template<int dim>
std::vector<double> FuelCellShop::Equation::ReactionSourceTermsKG< dim >::T_mixture
protected

Constant temperature of species mixture in the quadrature points of a cell, $ T_{\text{mixture}}^{\text{const}} \quad \left[ \text{K} \right] $.

template<int dim>
std::string FuelCellShop::Equation::ReactionSourceTermsKG< dim >::var_name
protected
template<int dim>
std::vector<std::string> FuelCellShop::Equation::ReactionSourceTermsKG< dim >::var_postfixes
protected

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