18 #ifndef _FCST_FUELCELLSHOP_EQUATION_REACTION_SOURCE_TERMS_H_
19 #define _FCST_FUELCELLSHOP_EQUATION_REACTION_SOURCE_TERMS_H_
32 namespace FuelCellShop
48 <<
"For " << arg1 <<
" kinetics source terms, \"" << arg2 <<
"\" is not found as one of the solution variables.");
85 virtual void initialize(ParameterHandler& param);
138 const std::vector< FuelCellShop::Material::PureGas* >& gases = std::vector< FuelCellShop::Material::PureGas* >() );
265 const FEValuesBase<dim>& test_fe,
266 const std::vector< std::vector<double> >& test_shape_functions,
267 const double& sourceterm_factor);
613 template<
typename INFO>
std::vector< double > dheat_dphiS_cell
Derivative of heat produced w.r.t.
Definition: reaction_source_terms.h:501
std::vector< std::string > eq_postfixes
For internal use only.
Definition: reaction_source_terms.h:863
double factor_saturationtranseq_cell
Factor for.
Definition: reaction_source_terms.h:564
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.
double M_water
Molar weight of water in grams/mole.
Definition: reaction_source_terms.h:392
virtual void initialize(ParameterHandler ¶m)
Initialize parameters.
double factor_watertranseq_cell
Factor for.
Definition: reaction_source_terms.h:557
FuelCellShop::Kinetics::BaseKinetics * get_anode_kinetics() const
Accessor for anode catalyst layer FuelCellShop::Kinetics::BaseKinetics pointer.
Definition: reaction_source_terms.h:203
std::string var_name
For internal use only.
Definition: reaction_source_terms.h:878
virtual void make_assemblers_generic_constant_data()
This function computes Local CG FEM based assemblers - constant data (generic).
std::vector< std::vector< double > > phi_s_cell
shape functions.
Definition: reaction_source_terms.h:451
FuelCellShop::Kinetics::BaseKinetics * anode_kinetics
Pointer to Anode Kinetics object, initialized in the constructor.
Definition: reaction_source_terms.h:322
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.h:776
std::vector< double > T_mixture
Constant temperature of species mixture in the quadrature points of a cell, .
Definition: reaction_source_terms.h:722
virtual void print_equation_info() const
This function prints out the info for this class.
bool cell_matrix_counter
Counter set to TRUE when cell_matrix is being assembled.
Definition: reaction_source_terms.h:577
std::vector< double > dcurrent_dphiM_cell
Derivative of current w.r.t.
Definition: reaction_source_terms.h:478
unsigned int n_species
Number of species, .
Definition: reaction_source_terms.h:649
FuelCellShop::Equation::ReactionHeat * cathode_reactionheat
Pointer to Cathode ReactionHeat object.
Definition: reaction_source_terms.h:334
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.h:792
std::vector< double > dcurrent_dxOxygen_cell
Derivative of current w.r.t.
Definition: reaction_source_terms.h:489
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.
std::vector< std::vector< double > > phi_xWater_cell
shape functions.
Definition: reaction_source_terms.h:442
std::vector< std::vector< double > > phi_protonic_electrical_potential
Protonic electrical potential shape functions.
Definition: reaction_source_terms.h:849
std::vector< double > current_cell
Current produced [A/cm^3] at all quadrature points in the cell.
Definition: reaction_source_terms.h:457
bool water_vapour_phase
This boolean data member indicates that whether the water is produced in vapour phase (i...
Definition: reaction_source_terms.h:301
double factor_protontranseq_cell
Factor for.
Definition: reaction_source_terms.h:538
FuelCell::SystemManagement * system_management
Pointer to the external YourApplication<dim>::system_management object.
Definition: equation_base.h:817
FuelCellShop::Equation::ReactionHeat * anode_reactionheat
Pointer to Anode Reactionheat object.
Definition: reaction_source_terms.h:341
VariableInfo x_oxygen
VariableInfo structure corresponding to "oxygen_molar_fraction".
Definition: reaction_source_terms.h:351
std::vector< std::vector< std::vector< double > > > phi_density
Density shape functions.
Definition: reaction_source_terms.h:831
bool rev_heat
This boolean data member indicates that the reversible (entropic) heat source due to net reaction for...
Definition: reaction_source_terms.h:290
virtual void make_assemblers_cell_constant_data(const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &cell_info)
This function computes.
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.h:803
double factor_oxygentranseq_cell
Factor for.
Definition: reaction_source_terms.h:550
bool get_rev_heat() const
Method to get whether the reversible (entropic) heating due to net reaction forming liquid water prod...
Definition: reaction_source_terms.h:168
unsigned int indexH2
Keeps hydrogen set of fluid transport equations.
Definition: reaction_source_terms.h:659
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.h:741
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.h:591
double multiplierH2
Hydrogen source multiplier, .
Definition: reaction_source_terms.h:678
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.h:784
FuelCellShop::Kinetics::BaseKinetics * get_cathode_kinetics() const
Accessor for cathode catalyst layer FuelCellShop::Kinetics::BaseKinetics pointer. ...
Definition: reaction_source_terms.h:195
FEValuesExtractors::Scalar electronic_electrical_potential_extractor
Electronic electrical potential extractor.
Definition: reaction_source_terms.h:706
VariableInfo phi_s
VariableInfo structure corresponding to "electronic_electrical_potential".
Definition: reaction_source_terms.h:361
double F
Universal Faraday's constant.
Definition: reaction_source_terms.h:387
This class is created for the objects handed to the mesh loops.
Definition: mesh_loop_info_objects.h:625
void make_assemblers_cell_variable_data2(const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &cell_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
As before but for fluid transport equations.
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.h:733
std::vector< std::vector< double > > phi_xOxygen_cell
shape functions.
Definition: reaction_source_terms.h:415
std::vector< MatrixBlock< FullMatrix< double > > > MatrixVector
The matrix vector used in the mesh loops.
Definition: matrix_block.h:102
std::vector< double > molar_mass
Molar mass of pure gas, .
Definition: reaction_source_terms.h:692
virtual void declare_parameters(ParameterHandler ¶m) const
Declare parameters.
bool cell_residual_counter
Counter set to TRUE when cell_residual is being assembled.
Definition: reaction_source_terms.h:585
std::vector< double > dheat_dT_cell
Derivative of heat produced w.r.t.
Definition: reaction_source_terms.h:513
std::vector< double > dcurrent_dxWater_cell
Derivative of current w.r.t.
Definition: reaction_source_terms.h:495
std::vector< double > dcurrent_dT_cell
Derivative of current w.r.t.
Definition: reaction_source_terms.h:483
DeclException2(VariableShouldExistForEquation, std::string, std::string,<< "The user-defined variable with name \""<< arg1<< "\" should be one of the solution variables for equation with name \""<< arg2<< "\"")
Exception thrown when a particular variable required by the equation class, does not exist in the use...
VariableInfo s_liquid_water
VariableInfo structure corresponding to "liquid_water_saturation".
Definition: reaction_source_terms.h:382
std::vector< std::string > var_postfixes
For internal use only.
Definition: reaction_source_terms.h:868
std::vector< double > heat_cell
Heat produced due to electrochemical reaction [W/cm^2] at all quadrature points in the cell...
Definition: reaction_source_terms.h:466
double factor_electrontranseq_cell
Factor for.
Definition: reaction_source_terms.h:544
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.h:749
double multiplierH2O
Water vapor source multiplier, .
Definition: reaction_source_terms.h:683
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.h:768
Virtual class used to provide the interface for all kinetic/reaction children.
Definition: base_kinetics.h:107
std::string eq_name
For internal use only.
Definition: reaction_source_terms.h:873
std::vector< FEValuesExtractors::Scalar > density_extractors
Density extractors.
Definition: reaction_source_terms.h:701
std::vector< double > dcurrent_dphiS_cell
Derivative of current w.r.t.
Definition: reaction_source_terms.h:472
FEValuesExtractors::Scalar protonic_electrical_potential_extractor
Protonic electrical potential extractor.
Definition: reaction_source_terms.h:711
double factor_rev_heat_ccl
This represents the fraction of reversible heat released corresponding to half-cell reaction of ORR...
Definition: reaction_source_terms.h:295
bool irrev_heat_acl
This boolean data member indicates that the ir-reversible heating due to HOR, inside the anode cataly...
Definition: reaction_source_terms.h:284
virtual ~ReactionSourceTerms()
Destructor.
virtual void make_residual_indices()
This function fills out the max number of residual_indices which need to be updated due to the source...
unsigned int indexO2
Keeps oxygen set of fluid transport equations.
Definition: reaction_source_terms.h:654
double multiplierO2
Oxygen source multiplier, .
Definition: reaction_source_terms.h:673
This class assembles the reaction source terms for all other transport equations, if there's any...
Definition: reaction_source_terms.h:60
This class contains generic data and methods heavily used by all derived equation classes...
Definition: equation_base.h:199
bool water_vap_heat_ccl
This boolean data member indicates that the heat sink due to evaporation of water produced during the...
Definition: reaction_source_terms.h:307
std::vector< double > dheat_dphiM_cell
Derivative of heat produced w.r.t.
Definition: reaction_source_terms.h:507
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.h:817
IMPORTANT: Add all new solution variables and equations here !
Definition: system_management.h:271
double active_area_cell
Active area [cm^2/cm^3] of the cell.
Definition: reaction_source_terms.h:532
This simple structure stores certain information regarding a particular variable for the equation (al...
Definition: equation_base.h:121
FuelCellShop::Kinetics::BaseKinetics * cathode_kinetics
Pointer to Cathode Kinetics object, initialized in the constructor.
Definition: reaction_source_terms.h:317
VariableInfo lambda
VariableInfo structure corresponding to "membrane_water_content".
Definition: reaction_source_terms.h:366
bool get_irrev_heat_acl() const
Method to get whether the ir-reversible heating due to HOR, inside the anode catalyst layer is ON or ...
Definition: reaction_source_terms.h:159
virtual void assemble_matrix_for_equation(FuelCell::ApplicationCore::MatrixVector &cell_matrices, const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &cell_info, const std::string &eq_name, const FEValuesBase< dim > &test_fe, const std::vector< std::vector< double > > &test_shape_functions, const double &sourceterm_factor)
This function is specifically created for assembly of cell matrices for the following equations...
unsigned int indexH2O
Keeps water vapor set of fluid transport equations.
Definition: reaction_source_terms.h:664
double get_factor_rev_heat_ccl() const
Method to get the fraction of reversible heat released corresponding to half-cell reaction of ORR...
Definition: reaction_source_terms.h:177
void make_assemblers_cell_constant_data2(const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &cell_info)
As before but for fluid transport equations.
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.
bool get_water_vap_heat_ccl() const
Method to get whether the heat sink due to evaoration of water produced during the ORR inside the ath...
Definition: reaction_source_terms.h:187
std::vector< std::vector< double > > phi_T_cell
shape functions.
Definition: reaction_source_terms.h:406
std::string eq_generic_prefix
For internal use only.
Definition: reaction_source_terms.h:858
VariableInfo t_rev
VariableInfo structure corresponding to "temperature_of_REV".
Definition: reaction_source_terms.h:377
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.h:757
std::vector< double > dheat_dxOxygen_cell
Derivative of heat produced w.r.t.
Definition: reaction_source_terms.h:519
VariableInfo phi_m
VariableInfo structure corresponding to "protonic_electrical_potential".
Definition: reaction_source_terms.h:372
BlockVector< double > FEVector
The vector class used by applications.
Definition: application_data.h:39
std::vector< std::vector< double > > phi_phiM_cell
shape functions.
Definition: reaction_source_terms.h:433
void set_cathode_kinetics(FuelCellShop::Kinetics::BaseKinetics *kinetics)
Set the pointer to cathode kinetics in the object.
Definition: reaction_source_terms.h:91
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.h:810
Virtual class used to characterize a generic layer interface.
Definition: base_layer.h:58
VariableInfo x_water
VariableInfo structure corresponding to "water_molar_fraction".
Definition: reaction_source_terms.h:356
std::vector< std::vector< double > > phi_electronic_electrical_potential
Electronic electrical potential shape functions.
Definition: reaction_source_terms.h:840
This class is used to compute non-linear reaction heat source terms in a catalyst layer...
Definition: reaction_heat.h:94
ReactionSourceTerms(FuelCell::SystemManagement &system_management)
Constructor.
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...
void set_anode_kinetics(FuelCellShop::Kinetics::BaseKinetics *kinetics)
Set the pointer to anode kinetics in the object.
Definition: reaction_source_terms.h:100
bool get_irrev_heat_ccl() const
Method to get whether the ir-reversible heating due to ORR, inside the cathode catalyst layer is ON o...
Definition: reaction_source_terms.h:150
std::vector< double > dheat_dxWater_cell
Derivative of heat produced w.r.t.
Definition: reaction_source_terms.h:525
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...
bool irrev_heat_ccl
This boolean data member indicates that the ir-reversible heating due to ORR, inside the cathode cata...
Definition: reaction_source_terms.h:278
std::vector< std::vector< double > > phi_phiS_cell
shape functions.
Definition: reaction_source_terms.h:424