17 #ifndef _FUELCELLSHOP__BASE__KINETICS_H
18 #define _FUELCELLSHOP__BASE__KINETICS_H
21 #include <deal.II/base/parameter_handler.h>
22 #include <deal.II/base/point.h>
23 #include <deal.II/base/function.h>
24 #include <deal.II/lac/vector.h>
25 #include <deal.II/fe/fe_values.h>
40 using namespace dealii;
42 namespace FuelCellShop
125 iterator->second->declare_parameters(param);
147 static boost::shared_ptr<FuelCellShop::Kinetics::BaseKinetics >
create_Kinetics (ParameterHandler ¶m,
148 std::string kinetics_name)
151 boost::shared_ptr<FuelCellShop::Kinetics::BaseKinetics > pointer;
157 if (iterator->second)
159 pointer = iterator->second->create_replica();
173 pointer->initialize(param);
216 Assert( conc_vec.size() > 0, ExcMessage(
"Atleast one reactant concentration should be passed inside BaseKinetics::set_reactant_concentrations. !!") );
218 for (
unsigned int i=0; i<conc_vec.size(); ++i )
222 conc_vec[i].get_variablename() !=
water_molar_fraction), ExcMessage(
"Molar fractions can't be setup using BaseKinetics::set_reactant_concentrations.") );
224 reactants_map[ conc_vec[i].get_variablename() ] = conc_vec[i];
233 derivative_flags = flags;
252 electrolyte = electrolyte_in;
262 name_reaction_kinetics = name;
278 return name_reaction_kinetics;
293 const std::type_info& info =
typeid(*this);
295 <<
" called in Class "
296 << info.name() << std::endl;
308 const std::type_info& info =
typeid(*this);
310 <<
" called in Class "
311 << info.name() << std::endl;
318 std::vector<double>& coverage)
const
320 const std::type_info& info =
typeid(*this);
322 <<
" called in Class "
323 << info.name() << std::endl;
332 const std::type_info& info =
typeid(*this);
334 <<
" called in Class "
335 << info.name() << std::endl;
345 const std::type_info& info =
typeid(*this);
347 <<
" called in Class "
348 << info.name() << std::endl;
387 virtual boost::shared_ptr<FuelCellShop::Kinetics::BaseKinetics >
create_replica ()
389 const std::type_info& info =
typeid(*this);
391 <<
" called in Class "
392 << info.name() << std::endl;
413 kin_param_initialized =
false;
421 const std::type_info& info =
typeid(*this);
423 <<
" called in Class "
424 << info.name() << std::endl;
434 const std::type_info& info =
typeid(*this);
436 <<
" called in Class "
437 << info.name() << std::endl;
448 virtual void init_kin_param() = 0;
std::map< VariableNames, SolutionVariable > reactants_map
Map of SolutionVariables storing a pointer to the solution vector storing the concentration of each o...
Definition: base_kinetics.h:503
BaseKinetics()
Constructor.
Definition: base_kinetics.h:401
unsigned int n_quad
Number of quadrature points in the cell.
Definition: base_kinetics.h:469
ReactionNames name_reaction_kinetics
Enumeration with the reaction name for which the class returns kinetic parameters.
Definition: base_kinetics.h:458
virtual ~BaseKinetics()
Destructor.
Definition: base_kinetics.h:109
virtual void initialize(ParameterHandler &)
Member function used to read in data and initialize the necessary data to compute the coefficients...
Definition: base_kinetics.h:432
void set_catalyst(FuelCellShop::Material::CatalystBase *cat_in)
Set a pointer to the catalyst that will be used.
Definition: base_kinetics.h:240
double F()
Faraday constant, .
Definition: fcst_constants.h:37
void set_p_t(const double &P_Tot)
Set the total gas pressure [Pascals] in the cell.
Definition: base_kinetics.h:266
VariableNames get_variablename() const
Function to get the VariableNames enumeration corresponding to this struct.
Definition: fcst_variables.h:170
static boost::shared_ptr< FuelCellShop::Kinetics::BaseKinetics > create_Kinetics(ParameterHandler ¶m, std::string kinetics_name)
Function called in create_CatalystLayer and used to select the appropriate BaseKinetics type that wil...
Definition: base_kinetics.h:147
double K
Boltzmann constant.
Definition: base_kinetics.h:491
VariableNames
The enumeration containing the names of some of the available FCST solution variables and their deriv...
Definition: system_management.h:63
This structure is used to encapsulate data from constant values and variable solution data that is us...
Definition: fcst_variables.h:86
double p_total
Total gas pressure [Pascals] in the cell for isobaric case.
Definition: base_kinetics.h:497
Definition: system_management.h:71
SolutionVariable phi_m
Struct storing a pointer to the solution vector for the electrolyte potential.
Definition: base_kinetics.h:506
This class implements the interface to compute the properties of a "standard" catalyst.
Definition: catalyst_base.h:65
void set_derivative_flags(const std::vector< VariableNames > &flags)
Set the variables for which you would like to compute the derivaitives.
Definition: base_kinetics.h:231
void set_temperature(const SolutionVariable &temperature)
Set temperature.
Definition: base_kinetics.h:202
virtual void derivative_current(std::map< VariableNames, std::vector< double > > &)
Function to return the derivative of the current density w.r.t solution variables.
Definition: base_kinetics.h:306
double R
Universal gas constant.
Definition: base_kinetics.h:486
SolutionVariable T
Struct stroing a pointer to the solution vector for the temperature.
Definition: base_kinetics.h:512
static void declare_Kinetics_parameters(ParameterHandler ¶m)
Function used to declare all the data necessary in the parameter files for all BaseKinetics children...
Definition: base_kinetics.h:118
virtual void declare_parameters(ParameterHandler &) const
Declare parameters for a parameter file.
Definition: base_kinetics.h:419
Definition: system_management.h:69
Definition: system_management.h:76
void set_electrolyte(FuelCellShop::Material::PolymerElectrolyteBase *electrolyte_in)
Member function used to set the electrolyte pointer to that used by the application.
Definition: base_kinetics.h:250
double R()
Universal gas constant, .
Definition: fcst_constants.h:32
virtual void OH_coverage(std::vector< double > &) const
Used to return the coverage of the intermediate species if they are computed.
Definition: base_kinetics.h:330
virtual void O_coverage(std::vector< double > &) const
Used to return the coverage of the intermediate species if they are computed.
Definition: base_kinetics.h:343
void set_electrolyte_potential(const SolutionVariable &phi)
Set the electrolyte phase potential.
Definition: base_kinetics.h:186
void set_reactant_concentrations(const std::vector< SolutionVariable > &conc_vec)
Set reactant concentrations at the catalyst/electrolyte interface.
Definition: base_kinetics.h:214
std::map< std::string, BaseKinetics * > _mapFactory
This object is used to store all objects of type BaseKinetics.
Definition: base_kinetics.h:365
FuelCellShop::Material::PolymerElectrolyteBase * electrolyte
Pointer to the electrolyte object created in the application that is used to calculate the properties...
Definition: base_kinetics.h:480
FCSTLogStream log
Object used to output data to file and, if file attached recorded to a file as well.
void set_solid_potential(const SolutionVariable &phi)
Set the solid phase potential.
Definition: base_kinetics.h:194
virtual boost::shared_ptr< FuelCellShop::Kinetics::BaseKinetics > create_replica()
This member function is used to create an object of type BaseKinetics.
Definition: base_kinetics.h:387
ReactionNames
Definition: system_management.h:177
This class implements the interface to compute the properties of a "standard" polymer electrolyte mem...
Definition: polymer_electrolyte_material_base.h:59
Definition: system_management.h:68
static _mapFactory * get_mapFactory()
Definition: base_kinetics.h:373
Virtual class used to provide the interface for all kinetic/reaction children.
Definition: base_kinetics.h:102
virtual void compute_coverages(const std::string &name_species, std::vector< double > &coverage) const
Used to return the coverage of the intermediate species if they are computed.
Definition: base_kinetics.h:317
double F
Universal Farday's constant.
Definition: base_kinetics.h:488
virtual void set_reaction_kinetics(const ReactionNames name)
Member function used to specify the reaction for which the kinetic parameters are needed...
Definition: base_kinetics.h:260
Definition: system_management.h:67
ReactionNames get_reaction_name() const
Returns the name of the reaction that this kinetics class is using.
Definition: base_kinetics.h:276
double K()
Boltzmann constant, .
Definition: fcst_constants.h:52
bool kin_param_initialized
Boolean variable to determine whether init_kin_param has been already called or not.
Definition: base_kinetics.h:453
Definition: system_management.h:72
virtual bool has_coverage(const VariableNames &type)
Definition: base_kinetics.h:353
FuelCellShop::Material::CatalystBase * get_cat() const
Function to get pointer to catalyst class.
Definition: base_kinetics.h:282
virtual void current_density(std::vector< double > &)
Function to return the value of the current [A/cm^2].
Definition: base_kinetics.h:291
FuelCellShop::Material::CatalystBase * catalyst
Pointer to the catalyst object that is created at the application level and passed to the kinetics cl...
Definition: base_kinetics.h:475
std::vector< VariableNames > derivative_flags
Flags for derivatives: These flags are used to request derivatives which are computed using the deriv...
Definition: base_kinetics.h:464