17 #ifndef _FUELCELLSHOP__RESPONSE_WATER_SORPTION_H 
   18 #define _FUELCELLSHOP__RESPONSE_WATER_SORPTION_H 
   28 using namespace dealii;
 
   30 namespace FuelCellShop
 
   33     namespace PostProcessing
 
  125                 if ( this->system_management->solution_in_userlist(
"membrane_water_content") )
 
  127                     lambda.solution_index = this->system_management->solution_name_to_index(
"membrane_water_content"); 
 
  128                     lambda.fetype_index = this->system_management->block_info->base_element[lambda.solution_index];
 
  129                     lambda.indices_exist = 
true;
 
  132                     throw std::runtime_error(
"membrane_water_content variable required for WaterSorptionResponse");
 
  134                 if ( this->system_management->solution_in_userlist(
"water_molar_fraction") )
 
  136                     x_w.solution_index = this->system_management->solution_name_to_index(
"water_molar_fraction"); 
 
  137                     x_w.fetype_index = this->system_management->block_info->base_element[x_w.solution_index];
 
  138                     x_w.indices_exist = 
true;
 
  141                     throw std::runtime_error(
"water_molar_fraction variable required for WaterSorptionResponse");
 
  143                 if ( this->system_management->solution_in_userlist(
"temperature_of_REV") )
 
  145                     tRev.solution_index = this->system_management->solution_name_to_index(
"temperature_of_REV"); 
 
  146                     tRev.fetype_index = this->system_management->block_info->base_element[tRev.solution_index];
 
  147                     tRev.indices_exist = 
true;
 
  150                 time_k = sorption_source->get_time_constant();
 
  172                                    std::map<FuelCellShop::PostProcessing::ResponsesNames, double>& respMap)
 const 
  179                 AssertThrow(base_layer == CatalystLayer,
 
  180                             ExcMessage(
"WaterSorptionResponse can only be used with a CatalystLayer object"));
 
  183                 unsigned int n_q_points_cell = (info.
fe(lambda.fetype_index)).n_quadrature_points;
 
  186                 unsigned int solIndex = info.
global_data->find_vector(
"Solution");
 
  194                 if (tRev.indices_exist)
 
  197                 std::vector<double> lambdaValue( info.
values[solIndex][lambda.solution_index] );
 
  199                 std::vector<double> lambdaEq(n_q_points_cell, 0.0);
 
  202                 for (
unsigned int q = 0; q < n_q_points_cell; ++q){
 
  203                     double JxW = info.
fe(lambda.fetype_index).JxW(q);
 
  215                                    std::map<FuelCellShop::PostProcessing::ResponsesNames, double>& resp)
 const 
  217                 throw std::runtime_error(
"WaterSorptionResponse::compute_responses(solution_variables, info, layer, resp) not implemented");
 
WaterSorptionResponse(const FuelCell::SystemManagement &sm, const FuelCellShop::Equation::SorptionSourceTerms< dim > *sst)
Definition: response_water_sorption.h:111
 
const unsigned int dim
Definition: fcst_constants.h:23
 
This class assembles source terms corresponding to sorption/desorption of water inside the catalyst l...
Definition: sorption_source_terms.h:101
 
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
 
FuelCellShop::Equation::VariableInfo x_w
VariableInfo structure corresponding to the "water_molar_fraction". 
Definition: response_water_sorption.h:242
 
SmartPointer< const FEVectors > global_data
The smart pointer to the FEVectors object called global_data. 
Definition: mesh_loop_info_objects.h:674
 
This structure is used to encapsulate data from constant values and variable solution data that is us...
Definition: fcst_variables.h:86
 
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 class used to develop a common interface to a set of functions used to evaluate functionals t...
Definition: base_response.h:131
 
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
 
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
 
Class used to calculate the amount of water sorbed inside the catalyst layer. 
Definition: response_water_sorption.h:106
 
This class is created for the objects handed to the mesh loops. 
Definition: mesh_loop_info_objects.h:544
 
void initialize(ParameterHandler ¶m)
Initialize class parameters. 
Definition: response_water_sorption.h:123
 
virtual const std::type_info & get_base_type() const 
This member function return the name of the type of layer, i.e. 
Definition: base_layer.h:177
 
void compute_responses(const typename DoFApplication< dim >::CellInfo &info, FuelCellShop::Layer::BaseLayer< dim > *const layer, std::map< FuelCellShop::PostProcessing::ResponsesNames, double > &respMap) const 
This member function computes the water adsorbed/desorbed from the electrolyte in the catalyst layer...
Definition: response_water_sorption.h:170
 
virtual FuelCellShop::Material::PolymerElectrolyteBase * get_electrolyte() const 
Method to provide access to pointer of the electrolyte object of the catalyst layer. 
Definition: catalyst_layer.h:898
 
Definition: system_management.h:68
 
void compute_responses(std::vector< FuelCellShop::SolutionVariable > solution_variables, const typename DoFApplication< dim >::CellInfo &info, FuelCellShop::Layer::BaseLayer< dim > *const layer, std::map< FuelCellShop::PostProcessing::ResponsesNames, double > &resp) const 
Routine used in order to compute the response with a modified solution (not the one stored in info) ...
Definition: response_water_sorption.h:212
 
double time_k
Rate of sorption/desorption. 
Definition: response_water_sorption.h:230
 
const FuelCellShop::Equation::SorptionSourceTerms< dim > * sorption_source
Pointer to SorptionSourceTerms object. 
Definition: response_water_sorption.h:224
 
Definition: base_response.h:61
 
~WaterSorptionResponse()
Definition: response_water_sorption.h:118
 
IMPORTANT: Add all new solution variables and equations here ! 
Definition: system_management.h:300
 
This simple structure stores certain information regarding a particular variable for the equation (al...
Definition: equation_auxiliaries.h:51
 
FuelCellShop::Equation::VariableInfo lambda
VariableInfo structure corresponding to the "membrane_water_content". 
Definition: response_water_sorption.h:236
 
std::vector< std::vector< std::vector< double > > > values
The vector containing the values of finite element functions in the quadrature points. 
Definition: mesh_loop_info_objects.h:682
 
void set_temperature(const FuelCellShop::SolutionVariable &T_in)
Set the solution variable, temperature  [Kelvin]. 
Definition: polymer_electrolyte_material_base.h:506
 
Virtual class used to characterize a generic layer interface. 
Definition: base_layer.h:58
 
FuelCellShop::Equation::VariableInfo tRev
VariableInfo structure corresponding to the "temperature_of_REV". 
Definition: response_water_sorption.h:248
 
const FEVALUESBASE & fe() const 
Access to a single actual FEVALUES object. 
Definition: mesh_loop_info_objects.h:990
 
Virtual class used to provide the interface for all CatalystLayer children. 
Definition: catalyst_layer.h:124