16 #ifndef _FCST_FUELCELLSHOP_EQUATION_REACTION_SOURCE_TERMS_KG_H_
17 #define _FCST_FUELCELLSHOP_EQUATION_REACTION_SOURCE_TERMS_KG_H_
23 namespace FuelCellShop
46 boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData >());
61 virtual void initialize(ParameterHandler& param);
114 const std::vector< FuelCellShop::Material::PureGas* >& gases = std::vector< FuelCellShop::Material::PureGas* >() );
406 inline void set_species_couplings (
unsigned int reacting_species_equation_number,
unsigned int species_number, std::vector< couplings_map >& equation_map)
408 unsigned int index = reacting_species_equation_number;
409 unsigned int g = species_number;
411 eq_name =
"Kerkhof-Geboers Fluid Transport Equations - steady-state - compressible - isothermal - single-phase - multi-component - mass conservation - " +
eq_postfixes[g-1];
413 couplings_map::iterator iter = equation_map[index].find(
eq_name);
415 if( iter != equation_map[index].end() )
417 iter->second[
"electronic_electrical_potential"] = DoFTools::always;
418 iter->second[
"protonic_electrical_potential"] = DoFTools::always;
421 AssertThrow(
false, ExcInternalError() );
427 if( species_number != -1 )
430 iter->second[
var_name] = DoFTools::always;
433 AssertThrow(
false, ExcNotImplemented() );
virtual void make_assemblers_generic_constant_data()
This function computes Local CG FEM based assemblers - constant data (generic).
std::vector< double > DORR_current_density_Doxygen_concentration
ORR current density derivative with respect to oxygen concentration (gas, NOT gas-liquid) in the quad...
Definition: reaction_source_terms_KG.h:287
std::vector< FEValuesExtractors::Scalar > density_extractors
Density extractors.
Definition: reaction_source_terms_KG.h:255
std::vector< double > T_mixture
Constant temperature of species mixture in the quadrature points of a cell, .
Definition: reaction_source_terms_KG.h:272
virtual void declare_parameters(ParameterHandler ¶m) const
Declare parameters.
std::string eq_generic_prefix
For internal use only.
Definition: reaction_source_terms_KG.h:376
boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData > data
Data object for the application data to be passed to the equation classes.
Definition: equation_base.h:890
FuelCellShop::Kinetics::BaseKinetics * anode_kinetics
Pointer to Anode Kinetics object, initialized in the constructor.
Definition: reaction_source_terms_KG.h:180
std::vector< std::vector< double > > phi_electronic_electrical_potential
Electronic electrical potential shape functions.
Definition: reaction_source_terms_KG.h:362
std::vector< std::vector< double > > density_old
Density of each species in the quadrature points of a cell at a previous Newton iteration.
Definition: reaction_source_terms_KG.h:331
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.
unsigned int indexO2
Keeps oxygen set of fluid transport equations.
Definition: reaction_source_terms_KG.h:220
FEValuesExtractors::Scalar electronic_electrical_potential_extractor
Electronic electrical potential extractor.
Definition: reaction_source_terms_KG.h:260
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.
Definition: reaction_source_terms_KG.h:406
void set_anode_kinetics(FuelCellShop::Kinetics::BaseKinetics *kinetics)
Set the pointer to anode kinetics in the object.
Definition: reaction_source_terms_KG.h:76
void set_density_couplings(unsigned int species_number, couplings_map::iterator iter)
Definition: reaction_source_terms_KG.h:424
virtual ~ReactionSourceTermsKG()
Destructor.
FuelCell::SystemManagement * system_management
Pointer to the external YourApplication<dim>::system_management object.
Definition: equation_base.h:798
virtual void make_assemblers_cell_constant_data(const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &cell_info)
This function computes.
virtual void make_residual_indices()
This function fills out the max number of residual_indices which need to be updated due to the source...
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 so...
std::vector< double > DHOR_current_density_Dhydrogen_concentration
HOR current density derivative with respect to hydrogen concentration (gas, NOT gas-liquid) in the qu...
Definition: reaction_source_terms_KG.h:313
unsigned int indexH2
Keeps hydrogen set of fluid transport equations.
Definition: reaction_source_terms_KG.h:225
std::string var_name
For internal use only.
Definition: reaction_source_terms_KG.h:396
std::vector< double > ORR_current_density
ORR current density in the quadrature points of a cell at a previous Newton iteration.
Definition: reaction_source_terms_KG.h:279
std::vector< std::vector< double > > phi_protonic_electrical_potential
Protonic electrical potential shape functions.
Definition: reaction_source_terms_KG.h:371
FuelCellShop::Kinetics::BaseKinetics * get_cathode_kinetics() const
Accessor for cathode catalyst layer FuelCellShop::Kinetics::BaseKinetics pointer. ...
Definition: reaction_source_terms_KG.h:125
std::string eq_name
For internal use only.
Definition: reaction_source_terms_KG.h:391
std::vector< std::string > var_postfixes
For internal use only.
Definition: reaction_source_terms_KG.h:386
double multiplierH2
Hydrogen source multiplier, .
Definition: reaction_source_terms_KG.h:240
std::vector< double > DORR_current_density_Dprotonic_electrical_potential
ORR current density derivative with respect to protonic electrical potential in the quadrature points...
Definition: reaction_source_terms_KG.h:301
FuelCellShop::Kinetics::BaseKinetics * get_anode_kinetics() const
Accessor for anode catalyst layer FuelCellShop::Kinetics::BaseKinetics pointer.
Definition: reaction_source_terms_KG.h:133
unsigned int last_iter_cell
Variable used to store the index in cell_info->global_data of the previous Newton solution The soluti...
Definition: reaction_source_terms_KG.h:191
std::vector< double > molar_mass
Molar mass of pure gas, .
Definition: reaction_source_terms_KG.h:250
virtual void print_equation_info() const
This function prints out the info for this class.
This class is created for the objects handed to the mesh loops.
Definition: mesh_loop_info_objects.h:544
virtual void initialize(ParameterHandler ¶m)
Initialize parameters.
std::vector< MatrixBlock< FullMatrix< double > > > MatrixVector
The matrix vector used in the mesh loops.
Definition: matrix_block.h:102
FuelCellShop::Kinetics::BaseKinetics * cathode_kinetics
Pointer to Cathode Kinetics object, initialized in the constructor.
Definition: reaction_source_terms_KG.h:175
std::vector< double > electronic_electrical_potential_old
Electronic electrical potential in the quadrature points of a cell at a previous Newton iteration...
Definition: reaction_source_terms_KG.h:337
unsigned int indexH2O
Keeps water vapor set of fluid transport equations.
Definition: reaction_source_terms_KG.h:230
std::vector< std::vector< std::vector< double > > > phi_density
Density shape functions.
Definition: reaction_source_terms_KG.h:353
Virtual class used to provide the interface for all kinetic/reaction children.
Definition: base_kinetics.h:102
std::vector< std::string > eq_postfixes
For internal use only.
Definition: reaction_source_terms_KG.h:381
This class assembles the reaction source terms for all other transport equations, if there's any...
Definition: reaction_source_terms_base.h:57
std::vector< double > protonic_electrical_potential_old
Protonic electrical potential in the quadrature points of a cell at a previous Newton iteration...
Definition: reaction_source_terms_KG.h:343
double multiplierO2
Oxygen source multiplier, .
Definition: reaction_source_terms_KG.h:235
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.
IMPORTANT: Add all new solution variables and equations here !
Definition: system_management.h:300
std::vector< double > DHOR_current_density_Delectronic_electrical_potential
HOR current density derivative with respect to electronic electrical potential in the quadrature poin...
Definition: reaction_source_terms_KG.h:319
ReactionSourceTermsKG(FuelCell::SystemManagement &system_management, boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData > data=boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData >())
Constructor.
std::vector< double > HOR_current_density
HOR current density in the quadrature points of a cell at a previous Newton iteration.
Definition: reaction_source_terms_KG.h:307
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.
BlockVector< double > FEVector
The vector class used by applications.
Definition: application_data.h:46
std::vector< double > DORR_current_density_Delectronic_electrical_potential
ORR current density derivative with respect to electronic electrical potential in the quadrature poin...
Definition: reaction_source_terms_KG.h:295
Virtual class used to characterize a generic layer interface.
Definition: base_layer.h:58
This class assembles the reaction source terms for all other transport equations, if there's any...
Definition: reaction_source_terms_KG.h:35
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 get...
std::vector< double > DHOR_current_density_Dprotonic_electrical_potential
HOR current density derivative with respect to protonic electrical potential in the quadrature points...
Definition: reaction_source_terms_KG.h:325
FEValuesExtractors::Scalar protonic_electrical_potential_extractor
Protonic electrical potential extractor.
Definition: reaction_source_terms_KG.h:265
double multiplierH2O
Water vapor source multiplier, .
Definition: reaction_source_terms_KG.h:245
unsigned int n_species
Number of species, .
Definition: reaction_source_terms_KG.h:215
void set_cathode_kinetics(FuelCellShop::Kinetics::BaseKinetics *kinetics)
Set the pointer to cathode kinetics in the object.
Definition: reaction_source_terms_KG.h:67