16 #ifndef _FUELCELLSHOP__REACTION_HEAT_H
17 #define _FUELCELLSHOP__REACTION_HEAT_H
25 #include <deal.II/base/subscriptor.h>
27 using namespace dealii;
29 namespace FuelCellShop
137 derivative_flags = flags;
150 const bool& flag_irrev_HOR =
true,
151 const bool& flag_rev_heat =
true,
152 const double& rev_heat_ORR_coef = 1.0,
153 const bool& flag_single_phase_ORR =
true)
155 factor_irrev_ORR = flag_irrev_ORR ? -1.0 : 0.0;
156 factor_rev_ORR = flag_rev_heat ? ((-1.0*rev_heat_ORR_coef)/(2.0*
Constants::F())) : 0.0;
157 factor_vap_ORR = flag_single_phase_ORR ? ((-1.0)/(2.0*
Constants::F())) : 0.0;
159 factor_irrev_HOR = flag_irrev_HOR ? 1.0 : 0.0;
160 factor_rev_HOR = flag_rev_heat ? ((rev_heat_ORR_coef-1.0)/(2.0*
Constants::F())) : 0.0;
162 factors_initialized =
true;
172 void heat_source (std::vector<double>& heat,
173 const std::vector<double>& current)
const;
181 void derivative_heat_source (std::map<
VariableNames, std::vector<double> >& heat_derived,
182 const std::map<
VariableNames, std::vector<double> >& current_derived,
183 const std::vector<double>& current)
const;
210 double deltaS = ((8.0*(1.0+
log(Temp))) - 92.84) * 4.184;
217 double dDs_dT = (4.184*8.0)/Temp;
242 #endif //_FUELCELLSHOP__REACTION_HEAT_H
double factor_vap_ORR
Factor for water vaporization heat sink in ORR.
Definition: reaction_heat.h:234
SolutionVariable phi_s
Struct stroing a pointer to the solution vector for the electronic/solid potential.
Definition: reaction_heat.h:201
double F()
Faraday constant, .
Definition: fcst_constants.h:37
VariableNames get_variablename() const
Function to get the VariableNames enumeration corresponding to this struct.
Definition: fcst_variables.h:170
bool factors_initialized
Flag to check whether factors are initialized or not.
Definition: reaction_heat.h:237
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
Definition: system_management.h:71
double factor_rev_ORR
Factor for reversible heating in ORR.
Definition: reaction_heat.h:228
void set_electrolyte_potential(const SolutionVariable &phi)
Set the electrolyte phase potential.
Definition: reaction_heat.h:111
Definition: system_management.h:76
std::vector< VariableNames > derivative_flags
Flags for derivatives: These flags are used to request derivatives which are computed using the deriv...
Definition: reaction_heat.h:193
void set_kinetics(FuelCellShop::Kinetics::BaseKinetics *kin)
Function to set Kinetics for enabling calculation source terms.
Definition: reaction_heat.h:99
void set_temperature(const SolutionVariable &temperature)
Set temperature.
Definition: reaction_heat.h:127
SolutionVariable T
Struct stroing a pointer to the solution vector for the temperature.
Definition: reaction_heat.h:203
FCSTLogStream log
Object used to output data to file and, if file attached recorded to a file as well.
Virtual class used to provide the interface for all kinetic/reaction children.
Definition: base_kinetics.h:102
double factor_irrev_HOR
Factor for irreversible heating in HOR.
Definition: reaction_heat.h:225
void initialize_factors(const bool &flag_irrev_ORR=true, const bool &flag_irrev_HOR=true, const bool &flag_rev_heat=true, const double &rev_heat_ORR_coef=1.0, const bool &flag_single_phase_ORR=true)
Method to initialize the flags and factors corresponding to various source term components in the app...
Definition: reaction_heat.h:149
void set_derivative_flags(const std::vector< VariableNames > &flags)
Set the variables for which we would like to compute the derivatives.
Definition: reaction_heat.h:135
double deriv_entropy_rxn(const double &Temp) const
Function to compute derivative of entropy change of reaction with respect to temperature [K]...
Definition: reaction_heat.h:215
Definition: system_management.h:72
double factor_irrev_ORR
Factor for irreversible heating in ORR.
Definition: reaction_heat.h:222
FuelCellShop::Kinetics::BaseKinetics * kinetics
Store pointer to the kinetics object.
Definition: reaction_heat.h:196
SolutionVariable phi_m
Struct storing a pointer to the solution vector for the electrolyte potential.
Definition: reaction_heat.h:199
double factor_rev_HOR
Factor for reversible heating in HOR.
Definition: reaction_heat.h:231
void set_solid_potential(const SolutionVariable &phi)
Set the solid phase potential.
Definition: reaction_heat.h:119
This class is used to compute non-linear reaction heat source terms in a catalyst layer...
Definition: reaction_heat.h:83
double entropy_rxn(const double &Temp) const
Function to compute entropy change of reaction [J/(mol-K)] as a function of temperature [K]...
Definition: reaction_heat.h:208