17 #ifndef _FUELCELLSHOP_POLYMER_ELECTROLYTE_MATERIAL_BASE__H
18 #define _FUELCELLSHOP_POLYMER_ELECTROLYTE_MATERIAL_BASE__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>
34 namespace FuelCellShop
78 iterator->second->declare_parameters(param);
101 std::string polymer_electrolyte_name)
103 boost::shared_ptr<FuelCellShop::Material::PolymerElectrolyteBase > pointer;
109 if (iterator->second)
111 pointer = iterator->second->create_replica();
121 FcstUtilities::log<<
"Concrete name in FuelCellShop::Material::PolymerElectrolyteBase::create_PolymerElectrolyte does not exist"<<std::endl;
125 pointer->initialize(param);
141 const std::type_info& info =
typeid(*this);
143 <<
" called in Class "
144 << info.name() << std::endl;
155 const std::type_info& info =
typeid(*this);
157 <<
" called in Class "
158 << info.name() << std::endl;
168 const std::type_info& info =
typeid(*this);
170 <<
" called in Class "
171 << info.name() << std::endl;
180 const std::type_info& info =
typeid(*this);
182 <<
" called in Class "
183 << info.name() << std::endl;
193 const std::type_info& info =
typeid(*this);
195 <<
" called in Class "
196 << info.name() << std::endl;
206 const std::type_info& info =
typeid(*this);
208 <<
" called in Class "
209 << info.name() << std::endl;
218 const std::type_info& info =
typeid(*this);
220 <<
" called in Class "
221 << info.name() << std::endl;
231 const std::type_info& info =
typeid(*this);
233 <<
" called in Class "
234 << info.name() << std::endl;
244 const std::type_info& info =
typeid(*this);
246 <<
" called in Class "
247 << info.name() << std::endl;
257 const std::type_info& info =
typeid(*this);
259 <<
" called in Class "
260 << info.name() << std::endl;
270 const std::type_info& info =
typeid(*this);
272 <<
" called in Class "
273 << info.name() << std::endl;
283 const std::type_info& info =
typeid(*this);
285 <<
" called in Class "
286 << info.name() << std::endl;
296 const std::type_info& info =
typeid(*this);
298 <<
" called in Class "
299 << info.name() << std::endl;
308 const std::type_info& info =
typeid(*this);
310 <<
" called in Class "
311 << info.name() << std::endl;
320 const std::type_info& info =
typeid(*this);
322 <<
" called in Class "
323 << info.name() << std::endl;
333 const std::type_info& info =
typeid(*this);
335 <<
" called in Class "
336 << info.name() << std::endl;
346 const std::type_info& info =
typeid(*this);
348 <<
" called in Class "
349 << info.name() << std::endl;
359 const std::type_info& info =
typeid(*this);
361 <<
" called in Class "
362 << info.name() << std::endl;
372 const std::type_info& info =
typeid(*this);
374 <<
" called in Class "
375 << info.name() << std::endl;
390 const std::type_info& info =
typeid(*this);
392 <<
" called in Class "
393 << info.name() << std::endl;
403 const std::type_info& info =
typeid(*this);
405 <<
" called in Class "
406 << info.name() << std::endl;
416 const std::type_info& info =
typeid(*this);
418 <<
" called in Class "
419 << info.name() << std::endl;
472 inline void set_T (
const double& Temp)
493 ExcMessage(
"Input solution variable not initialized properly in PolymerElectrolyteBase::set_membrane_water_content method.") );
509 ExcMessage(
"Input solution variable not initialized properly in PolymerElectrolyteBase::set_temperature method.") );
526 ExcMessage(
"Input solution variable not initialized properly in PolymerElectrolyteBase::set_water_molar_fraction method.") );
578 const std::type_info& info =
typeid(*this);
580 <<
" called in Class "
581 << info.name() << std::endl;
589 const std::type_info& info =
typeid(*this);
591 <<
" called in Class "
592 << info.name() << std::endl;
601 typedef std::map< std::string, FuelCellShop::Material::PolymerElectrolyteBase* >
_mapFactory;
622 virtual boost::shared_ptr<FuelCellShop::Material::PolymerElectrolyteBase >
create_replica ()
624 const std::type_info& info =
typeid(*this);
626 <<
" called in Class "
627 << info.name() << std::endl;
double permittivity
Permittivity of the material.
Definition: polymer_electrolyte_material_base.h:650
double H_H2
Henry's Constant [Pa-cm^3/mol] for dissolution of hydroge.
Definition: polymer_electrolyte_material_base.h:646
double given_thermoosmotic_coeff
Given thermo-osmotic diffusion coefficient [gm/(cm-s-K )] in the parameter file.
Definition: polymer_electrolyte_material_base.h:685
double T
Temperature [Kelvins] for isothermal case.
Definition: polymer_electrolyte_material_base.h:654
double D_H2
Effective diffusion coefficient of hydrogen [cm^2/s], given in the parameter file.
Definition: polymer_electrolyte_material_base.h:701
double diffusion_w
Diffusion of water in polymer electrolyte (if constant option is used), [cm2/s].
Definition: polymer_electrolyte_material_base.h:673
double H_O2
Henry's Constant [Pa-cm^3/mol] for dissolution of oxygen.
Definition: polymer_electrolyte_material_base.h:642
double get_H_O2() const
Get Henry's constant [Pa-cm^3/mol] for oxygen dissolution in the polymer electrolyte.
Definition: polymer_electrolyte_material_base.h:433
virtual void hydrogen_diffusivity(double &) const
Compute the oxygen diffusivity, [cm^2/s], inside the polymer electrolyte for constant case...
Definition: polymer_electrolyte_material_base.h:306
virtual void thermoosmotic_coeff(std::vector< double > &) const
Compute the thermo-osmotic diffusion coefficient, [gm/ (cm-s-K )], inside the polymer electrolyte at ...
Definition: polymer_electrolyte_material_base.h:268
std::string method_enthalpy_sorption
Method/semi-empirical relation to compute enthalpy of sorption of water.
Definition: polymer_electrolyte_material_base.h:740
double p_total
Total pressure (in Pascals).
Definition: polymer_electrolyte_material_base.h:662
VariableNames get_variablename() const
Function to get the VariableNames enumeration corresponding to this struct.
Definition: fcst_variables.h:170
const std::string name
Name of the layer.
Definition: base_material.h:155
double get_EW() const
Get Equivalent Weight (grams of dry polymer electrolyte per moles of ) of the polymer electrolyte mat...
Definition: polymer_electrolyte_material_base.h:445
virtual double get_dHlambda_dT(const double &) const
Compute of sorbed water in the polymer electrolyte as a function of .
Definition: polymer_electrolyte_material_base.h:401
FuelCellShop::Material::WaterVapor * water_mat
Pointer to FuelCellShop::Material::WaterVapor object, dynamically allocated when the class is constru...
Definition: polymer_electrolyte_material_base.h:766
FuelCellShop::SolutionVariable lambda_var
Solution variable, membrane water content .
Definition: polymer_electrolyte_material_base.h:749
virtual void declare_parameters(ParameterHandler ¶m) const
Declare parameters for a parameter file.
Definition: polymer_electrolyte_material_base.h:576
FuelCellShop::SolutionVariable xwater_var
Solution variable, water vapor molar fraction .
Definition: polymer_electrolyte_material_base.h:759
VariableNames
The enumeration containing the names of some of the available FCST solution variables and their deriv...
Definition: system_management.h:63
double D_Protons
Diffusion coefficient of protons [cm^2/s], given in the parameter file.
Definition: polymer_electrolyte_material_base.h:706
This structure is used to encapsulate data from constant values and variable solution data that is us...
Definition: fcst_variables.h:86
virtual void proton_conductivity_derivative(std::map< VariableNames, std::vector< double > > &) const
Compute the derivatives of proton conductivity at every quadrature point in the cell.
Definition: polymer_electrolyte_material_base.h:191
void set_water_molar_fraction(const FuelCellShop::SolutionVariable &x_in)
Set the solution variable, water vapor molar fraction .
Definition: polymer_electrolyte_material_base.h:523
virtual void oxygen_diffusivity(std::vector< double > &) const
Compute the oxygen diffusivity, [cm^2/s], inside the polymer electrolyte at every quadrature point in...
Definition: polymer_electrolyte_material_base.h:318
std::string method_electroosmotic_drag
Method/semi-empirical relation to compute Electro-osmotic drag.
Definition: polymer_electrolyte_material_base.h:730
virtual double get_d2Hlambda_dT2(const double &) const
Compute of sorbed water in the polymer electrolyte as a function of .
Definition: polymer_electrolyte_material_base.h:414
virtual void sorption_isotherm(std::vector< double > &) const
Compute the equilibrium water content, , inside the polymer electrolyte for vapor-equilibriated case...
Definition: polymer_electrolyte_material_base.h:139
double D_O2
Diffusion coefficient of oxygen [cm^2/s], given in the parameter file.
Definition: polymer_electrolyte_material_base.h:696
std::string method_diffusivity
Method/semi-empirical relation to compute water diffusivity.
Definition: polymer_electrolyte_material_base.h:725
virtual void water_diffusivity(std::vector< double > &) const
Compute the water diffusivity, [cm^2/s], inside the polymer electrolyte at every quadrature point in...
Definition: polymer_electrolyte_material_base.h:216
Definition: system_management.h:76
double get_density() const
Get the density [gm/cm^3] of the dry polymer electrolyte material.
Definition: polymer_electrolyte_material_base.h:427
Definition: system_management.h:73
virtual void oxygen_diffusivity(double &) const
Compute the oxygen diffusivity, [cm^2/s], inside the polymer electrolyte for constant case...
Definition: polymer_electrolyte_material_base.h:294
double get_H_H2() const
Get Henry's constant [Pa-cm^3/mol] for hydrogen dissolution in the polymer electrolyte.
Definition: polymer_electrolyte_material_base.h:439
virtual void initialize(ParameterHandler ¶m)
Initialize parameters.
Definition: polymer_electrolyte_material_base.h:587
void set_T(const double &Temp)
Specify the temperature [Kelvin] in the polymer electrolyte for isothermal case.
Definition: polymer_electrolyte_material_base.h:472
virtual void sorption_isotherm_derivative(std::map< VariableNames, std::vector< double > > &) const
Compute the derivatives for water sorption source terms, , at every quadrature point in the cell...
Definition: polymer_electrolyte_material_base.h:153
virtual void sorption_enthalpy(std::vector< double > &) const
Compute the enthalpy of sorption [J/mol] of water, at all quadrature points in the cell...
Definition: polymer_electrolyte_material_base.h:357
std::map< std::string, FuelCellShop::Material::PolymerElectrolyteBase * > _mapFactory
This object is used to store all objects of type PolymerElectrolyteBase.
Definition: polymer_electrolyte_material_base.h:601
FCSTLogStream log
Object used to output data to file and, if file attached recorded to a file as well.
virtual void water_diffusivity_derivative(std::map< VariableNames, std::vector< double > > &) const
Compute the derivatives of water diffusivity at every quadrature point in the cell.
Definition: polymer_electrolyte_material_base.h:229
double lambda
Membrane water content, for constant lambda case.
Definition: polymer_electrolyte_material_base.h:659
static _mapFactory * get_mapFactory()
Definition: polymer_electrolyte_material_base.h:609
std::string method_sorption
Method to compute equilibrium water content value from sorption isotherm.
Definition: polymer_electrolyte_material_base.h:720
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
virtual void sorption_enthalpy_derivative(std::map< VariableNames, std::vector< double > > &) const
Compute the derivatives of enthalpy of sorption of water, at every quadrature point in the cell...
Definition: polymer_electrolyte_material_base.h:370
PolymerElectrolyteBase(std::string name)
Constructor.
Definition: polymer_electrolyte_material_base.h:541
double sigma_p
Proton conductivity value [S/cm], given in the parameter file; used with "Constant" method...
Definition: polymer_electrolyte_material_base.h:668
virtual void electroosmotic_drag_derivative(std::map< VariableNames, std::vector< double > > &) const
Compute the derivatives of electro-osmotic drag coefficient, at every quadrature point in the cell...
Definition: polymer_electrolyte_material_base.h:255
double EW
Equivalent weight.
Definition: polymer_electrolyte_material_base.h:634
virtual void oxygen_diffusivity_derivative(std::map< VariableNames, std::vector< double > > &) const
Compute the derivatives of oxygen diffusivity, at every quadrature point in the cell.
Definition: polymer_electrolyte_material_base.h:331
virtual ~PolymerElectrolyteBase()
Destructor.
Definition: polymer_electrolyte_material_base.h:567
void set_membrane_water_content(const FuelCellShop::SolutionVariable &l_in)
Set the solution variable, membrane water content .
Definition: polymer_electrolyte_material_base.h:490
virtual boost::shared_ptr< FuelCellShop::Material::PolymerElectrolyteBase > create_replica()
This member function is used to create an object of type PolymerElectrolyteBase.
Definition: polymer_electrolyte_material_base.h:622
PolymerElectrolyteBase()
Constructor.
Definition: polymer_electrolyte_material_base.h:554
void set_lambda(const double &L)
Specify the water content in the polymer electrolyte for constant lambda case.
Definition: polymer_electrolyte_material_base.h:480
void set_temperature(const FuelCellShop::SolutionVariable &T_in)
Set the solution variable, temperature [Kelvin].
Definition: polymer_electrolyte_material_base.h:506
std::string method_conductivity
Method/Semi-empirical relation to compute protonic conductivity.
Definition: polymer_electrolyte_material_base.h:715
std::string method_thermoosmosis
Method/semi-empirical relation to compute thermo-osmotic diffusion coefficient.
Definition: polymer_electrolyte_material_base.h:735
static boost::shared_ptr< FuelCellShop::Material::PolymerElectrolyteBase > create_PolymerElectrolyte(ParameterHandler ¶m, std::string polymer_electrolyte_name)
Function called in create_CatalystLayer and used to select the appropriate PolymerElectrolyteBase chi...
Definition: polymer_electrolyte_material_base.h:100
double given_n_drag
Given electroosmotic drag value in the parameter file.
Definition: polymer_electrolyte_material_base.h:679
virtual void electroosmotic_drag(std::vector< double > &) const
Compute the electro-osmotic drag coefficient inside the polymer electrolyte at every quadrature point...
Definition: polymer_electrolyte_material_base.h:242
virtual void thermoosmotic_coeff_derivative(std::map< VariableNames, std::vector< double > > &) const
Compute the derivatives of thermo-osmotic diffusion coefficient, at every quadrature point in the cel...
Definition: polymer_electrolyte_material_base.h:281
static void declare_PolymerElectrolyte_parameters(ParameterHandler ¶m)
Function used to declare all the data necessary in the parameter files for all PolymerElectrolyteBase...
Definition: polymer_electrolyte_material_base.h:71
virtual double get_Hlambda(const double &) const
Compute the molar enthalpy, [J/mol] of sorbed water in the polymer electrolyte as a function of ...
Definition: polymer_electrolyte_material_base.h:388
virtual void proton_conductivity(double &) const
Compute the proton conductivity, [S/cm], inside the polymer electrolyte for constant case...
Definition: polymer_electrolyte_material_base.h:166
double rho_M
Dry polymer electrolyte density [gm/cm^3].
Definition: polymer_electrolyte_material_base.h:637
void set_p_t(const double &p_t)
Specify the total pressure in Pascals.
Definition: polymer_electrolyte_material_base.h:464
double given_enthalpy_sorption
Given enthalpy of sorption of water [J/mol] in the parameter file.
Definition: polymer_electrolyte_material_base.h:691
virtual void proton_diffusivity(double &) const
Compute the proton diffusivity, [cm^2/s], inside the polymer electrolyte for constant case...
Definition: polymer_electrolyte_material_base.h:344
double get_permittivity() const
Get permittivity of the polymer electrolyte material.
Definition: polymer_electrolyte_material_base.h:451
virtual void water_diffusivity(double &) const
Compute the water diffusivity, [cm^2/s], inside the polymer electrolyte for constant case...
Definition: polymer_electrolyte_material_base.h:204
Virtual class used to provide the interface for all material classes.
Definition: base_material.h:54
FuelCellShop::SolutionVariable T_var
Solution variable, temperature .
Definition: polymer_electrolyte_material_base.h:754
const bool is_initialized() const
Function to determine whether the structure is initialized or not.
Definition: fcst_variables.h:179
virtual void proton_conductivity(std::vector< double > &) const
Compute the proton conductivity, [S/cm], inside the polymer electrolyte, at every quadrature point i...
Definition: polymer_electrolyte_material_base.h:178
This class describes properties of pure WaterVapor.
Definition: PureGas.h:1134