OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
FuelCellShop::PostProcessing::WaterSorptionResponse< dim > Class Template Reference

Class used to calculate the amount of water sorbed inside the catalyst layer. More...

#include <response_water_sorption.h>

Inheritance diagram for FuelCellShop::PostProcessing::WaterSorptionResponse< dim >:
Inheritance graph
[legend]
Collaboration diagram for FuelCellShop::PostProcessing::WaterSorptionResponse< dim >:
Collaboration graph
[legend]

Public Member Functions

Constructor, declaration and initialization
 WaterSorptionResponse (const FuelCell::SystemManagement &sm, const FuelCellShop::Equation::SorptionSourceTerms< dim > *sst)
 
 ~WaterSorptionResponse ()
 
void initialize (ParameterHandler &param)
 Initialize class parameters. More...
 

Compute functional

const
FuelCellShop::Equation::SorptionSourceTerms
< dim > * 
sorption_source
 Pointer to SorptionSourceTerms object. More...
 
double time_k
 Rate of sorption/desorption. More...
 
FuelCellShop::Equation::VariableInfo lambda
 VariableInfo structure corresponding to the "membrane_water_content". More...
 
FuelCellShop::Equation::VariableInfo x_w
 VariableInfo structure corresponding to the "water_molar_fraction". More...
 
FuelCellShop::Equation::VariableInfo tRev
 VariableInfo structure corresponding to the "temperature_of_REV". More...
 
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. More...
 
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) More...
 

Additional Inherited Members

- Protected Member Functions inherited from FuelCellShop::PostProcessing::BaseResponse< dim >
 BaseResponse (const FuelCell::SystemManagement &sm)
 Constructor. More...
 
virtual ~BaseResponse ()
 Destructor. More...
 
virtual void declare_parameters (ParameterHandler &param) const
 Declare any necessary parameters to compute the functional. More...
 
- Protected Attributes inherited from FuelCellShop::PostProcessing::BaseResponse< dim >
const FuelCell::SystemManagementsystem_management
 Pointer to system management. More...
 

Detailed Description

template<int dim>
class FuelCellShop::PostProcessing::WaterSorptionResponse< dim >

Class used to calculate the amount of water sorbed inside the catalyst layer.

The amount is reported in mol H2O/(s). Most applications then divide by the cell active area based on the given geometry, so if not stated, the value should be assumed to be in mol H2O/(s cm2).

This class returns the total water amount sorbed inside the layer, i.e.

\[ \int_{\Omega} k \frac{\rho_{dry}}{EW} (\lambda_{eq} - \lambda) d\Omega \]

If the response value is negative, it implies that water is desorbed from the catalyst layer. Applications can divide the obtained total quantity by surface area, volume etc. of the layer, in order to determine surface density, volumetric density etc.

Remarks

Usage

In order to use this classes, first add them to your application as an object.

* #include "postprocessing/response_water_sorption.h"
*
* (...)
*
*

In the class constructor, construct the class passing SystemManagement and SorptionSourceTerms object. These objects are used in order to find the solution variables as appropriate, and flag parameters.

* //---------------------------------------------------------------------------
* template <int dim>
* NAME::AppPemfcNIThermal<dim>::AppPemfcNIThermal(boost::shared_ptr<FuelCell::ApplicationCore::ApplicationData> data)
* :
* OptimizationBlockMatrixApplication<dim>(data),
* system_management(this->block_info, this->cell_couplings, this->flux_couplings),
* sorption_source_terms(system_management)
* waterSorption(system_management, &sorption_source_terms)
* {}
*

Note that unlike some response classes, this class is not required to declare parameters, as it is already deriving flag parameters from SorptionSourceTerms object.

Next, the object has to be initialized once SystemManagement and SorptionSourceTerms objects have already been initialized:

* // Initialize parameters in system management:
* sorption_source_terms.initialize(param);
* //Initialize post-processing routines:
* waterSorption.initialize(param);
*

Finally, the object is ready for use in cell_responses in your application:

* // Compute Total amount of water sorbed in the CCL
* std::map<FuelCellShop::PostProcessing::ResponsesNames, double> respMap;
* if (CCL->belongs_to_material(material_id)) //the material is the cathode catalyst layer
* waterSorption.compute_responses(cellInfo, CCL.get(), respMap);
*
Author
M. Secanell, 2014
Madhur Bhaiya, 2014

Constructor & Destructor Documentation

Member Function Documentation

template<int dim>
void FuelCellShop::PostProcessing::WaterSorptionResponse< dim >::compute_responses ( const typename DoFApplication< dim >::CellInfo &  info,
FuelCellShop::Layer::BaseLayer< dim > *const  layer,
std::map< FuelCellShop::PostProcessing::ResponsesNames, double > &  respMap 
) const
inlinevirtual
template<int dim>
void FuelCellShop::PostProcessing::WaterSorptionResponse< dim >::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
inlinevirtual

Routine used in order to compute the response with a modified solution (not the one stored in info)

Implements FuelCellShop::PostProcessing::BaseResponse< dim >.

template<int dim>
void FuelCellShop::PostProcessing::WaterSorptionResponse< dim >::initialize ( ParameterHandler &  param)
inlinevirtual

Initialize class parameters.

Reimplemented from FuelCellShop::PostProcessing::BaseResponse< dim >.

Member Data Documentation

VariableInfo structure corresponding to the "membrane_water_content".

Pointer to SorptionSourceTerms object.

template<int dim>
double FuelCellShop::PostProcessing::WaterSorptionResponse< dim >::time_k
private

Rate of sorption/desorption.

Specified by SorptionSourceTerms in parameter file section Sorption Source Terms >> Water soption time constant [1/s]

VariableInfo structure corresponding to the "temperature_of_REV".

VariableInfo structure corresponding to the "water_molar_fraction".


The documentation for this class was generated from the following file: