OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
FuelCell::OperatingConditions Class Reference

Class used to store, read from file and define the operating conditions for a fuel cell. More...

#include <operating_conditions.h>

Public Member Functions

 OperatingConditions ()
 Constructor. More...
 
 ~OperatingConditions ()
 Destructor. More...
 
void declare_parameters (ParameterHandler &param) const
 Declare all necessary parameters in order to compute the coefficients. More...
 
void initialize (ParameterHandler &param)
 Class used to read in data and initialize the necessary data to compute the coefficients. More...
 
double saturation_pressure () const
 Get the water vapour saturation pressure in atmospheres (atm) using cell temperature. More...
 
double get_x_wv () const
 Get the mole fraction of water at the cathode channel from pressure, temperature, and relative humidity note that the anode mole fraction of water is not required, as there are only two species so x_wv_a = 1 - x_h2. More...
 
double get_x_o2 () const
 Get the mole fraction of oxygen at the cathode channel from pressure, temperature, and relative humidity. More...
 
double get_x_h2 () const
 Get the mole fraction of hydrogen at the anode channel from pressure, temperature, and relative humidity. More...
 
double voltage_cell_th ()
 NOTE: This function is redefined in base_kinetics class, considering variable temperature and gas pressures. More...
 
void print_operating_conditions () const
 Output operating conditions to screen. More...
 
void adjust_initial_solution (std::vector< component_materialID_value_map > &maps, const boost::shared_ptr< FuelCellShop::Geometry::GridBase< dim > > grid) const
 
void adjust_boundary_conditions (std::vector< component_boundaryID_value_map > &maps, const boost::shared_ptr< FuelCellShop::Geometry::GridBase< dim > > grid) const
 Routine used in order to adjust boundary conditions for O2 and cell voltage. More...
 
double get_c_c () const
 Get the total gas concentration in the cathode. More...
 
double get_T () const
 Return cell temperture as input in Operating Conditions subsection. More...
 
double get_V () const
 Return cell voltage as input in Operating Conditions subsection. More...
 
double get_dV_a () const
 Return the voltage drop in the anode. More...
 
double get_pc_Pa () const
 Return cathode pressure as input in Operating Conditions subsection. More...
 
double get_pc_atm () const
 Return cathode pressure as input in Operating Conditions subsection. More...
 
double get_c_a () const
 Get the total gas concentration in the anode. More...
 
double get_pa_Pa () const
 Return anode pressure as input in Operating Conditions subsection. More...
 
double get_pa_atm () const
 Return anode pressure as input in Operating Conditions subsection. More...
 
double get_RH_a () const
 Return anode relative humidity as input in Operating Conditions subsection. More...
 
double get_RH_c () const
 Return cathode relative humidity as input in Operating Conditions subsection. More...
 
double get_OCV () const
 Get the open circuit voltage for the cell. More...
 

Private Attributes

bool adjust_BC
 Bool set to true if you want to modify boundary conditions. More...
 
double R
 
double channel_oxygen_mole_fraction
 Initial amount of oxygen in channel prior to humidification. More...
 
double T_cell
 Operating temperature of the cell. More...
 
double V_cell
 Operating voltage of the cell. More...
 
double dV_a
 Voltage drop in the anode. More...
 
double OCV
 Open circuit voltage for the cell. More...
 
double E_th
 Theoretical voltage for the cell. More...
 
double p_a
 Pressure of the gas mixture in the anode B.C. More...
 
double c_a
 Concentration of the gas mixture in the anode B.C. More...
 
double RH_a
 Relative humidity of the gas mixture in the anode B.C. More...
 
double p_c
 Pressure of the gas mixture in the cathode B.C. More...
 
double c_c
 Concentration of the gas mixture in the cathode B.C. More...
 
double RH_c
 Relative humidity of the gas mixture in the anode B.C. More...
 

Detailed Description

Class used to store, read from file and define the operating conditions for a fuel cell.

It stores the following:

This information, in conjunction with the water saturation equation is used to compute the mole fractions for each component in the mixture.

If the inlet is humidified air, please set the oxygen mole fraction to 0.21 (default).

In the input file, the following parameters can be specified (see declare_parameters ):

* subsection Fuel cell data
* (...)
* subsection Operating conditions
* set Adjust initial solution and boundary conditions = false
* set Temperature cell = 353
* set Cathode pressure = 101325
* set Cathode initial oxygen mole fraction (prior to humidification) = 0.21
* set Cathode relative humidity = 0.7
* set Anode pressure = 101325
* set Anode relative humidity = 0.7
* set Voltage cell = 0.6
* set Voltage drop in the anode = 0.015
* set Open circuit voltage = 1.23
* end
* end
*

Usage Details:

In order to use this class, first an object of the class needs to be created. Usually, one such objects exists in every application. To create the object, include the .h file in the include application file and in the application data member section add the object. For example:

* #include "operating_conditions.h"
*
* // Then in the data member declaration (usually a private member)
*

Once the object is created, the section where the input data will be specified in the input file needs to be delcared. To do so, in the declare_parameters section of your application call the following:

* //--------- IN DECLARE_PARAMETERS ------------------------------------------------------
* template <int dim>
* void
* NAME::AppCathode<dim>::declare_parameters(ParameterHandler& param)
* {
* (...)
* OC.declare_parameters(param);
* (...)
* }
*

Finally, once the input file has been read by our application, your class needs to be initialized. This is achieved using the function initialize()

* //--------- IN INITIALIZE ------------------------------------------------------
* template <int dim>
* void
* NAME::AppCathode<dim>::_initialize(ParameterHandler& param)
* {
* (...)
* OC.initialize(param);
* }
*

You are now ready to use your OperatingConditions object!.

Author
M. Secanell, 2009-2013

Constructor & Destructor Documentation

FuelCell::OperatingConditions::OperatingConditions ( )

Constructor.

FuelCell::OperatingConditions::~OperatingConditions ( )

Destructor.

Member Function Documentation

void FuelCell::OperatingConditions::adjust_boundary_conditions ( std::vector< component_boundaryID_value_map > &  maps,
const boost::shared_ptr< FuelCellShop::Geometry::GridBase< dim > >  grid 
) const

Routine used in order to adjust boundary conditions for O2 and cell voltage.

This routine should be called after the component_boundaryID_value_map has been initialized.

In order for the application to work well, the boundary IDs for the channel/GDL and land/GDL interfaces need to be properly identified in the grid section of the input file, i.e.

* subsection Grid generation
* subsection Internal mesh generator parameters
* subsection Boundary ID
* set c_Ch/GDL = 100
* set c_BPP/GDL = 200
* set a_Ch/GDL = 100
* set a_BPP/GDL = 200
* end
* end
* end
*
void FuelCell::OperatingConditions::adjust_initial_solution ( std::vector< component_materialID_value_map > &  maps,
const boost::shared_ptr< FuelCellShop::Geometry::GridBase< dim > >  grid 
) const
void FuelCell::OperatingConditions::declare_parameters ( ParameterHandler &  param) const

Declare all necessary parameters in order to compute the coefficients.

The parameters that can be specified in the input file are as follows:

* subsection Fuel cell data
* (...)
* subsection Operating conditions
* set Adjust initial solution and boundary conditions = false
* set Temperature cell = 353
* set Cathode pressure = 101325
* set Cathode initial oxygen mole fraction (prior to humidification) = 0.21
* set Cathode relative humidity = 0.7
* set Anode pressure = 101325
* set Anode relative humidity = 0.7
* set Voltage cell = 0.6
* set Voltage drop in the anode = 0.015
* set Open circuit voltage = 1.23
* end
* end
*
double FuelCell::OperatingConditions::get_c_a ( ) const
inline

Get the total gas concentration in the anode.

double FuelCell::OperatingConditions::get_c_c ( ) const
inline

Get the total gas concentration in the cathode.

NOTE: This is a constant value. Use only if the total gas concentration is assumed to be constant

double FuelCell::OperatingConditions::get_dV_a ( ) const
inline

Return the voltage drop in the anode.

Note
Can be used as boundary condition for anode model or initial condition in a full MEA model
double FuelCell::OperatingConditions::get_OCV ( ) const
inline

Get the open circuit voltage for the cell.

double FuelCell::OperatingConditions::get_pa_atm ( ) const
inline

Return anode pressure as input in Operating Conditions subsection.

double FuelCell::OperatingConditions::get_pa_Pa ( ) const
inline

Return anode pressure as input in Operating Conditions subsection.

double FuelCell::OperatingConditions::get_pc_atm ( ) const
inline

Return cathode pressure as input in Operating Conditions subsection.

double FuelCell::OperatingConditions::get_pc_Pa ( ) const
inline

Return cathode pressure as input in Operating Conditions subsection.

double FuelCell::OperatingConditions::get_RH_a ( ) const
inline

Return anode relative humidity as input in Operating Conditions subsection.

double FuelCell::OperatingConditions::get_RH_c ( ) const
inline

Return cathode relative humidity as input in Operating Conditions subsection.

double FuelCell::OperatingConditions::get_T ( ) const
inline

Return cell temperture as input in Operating Conditions subsection.

double FuelCell::OperatingConditions::get_V ( ) const
inline

Return cell voltage as input in Operating Conditions subsection.

double FuelCell::OperatingConditions::get_x_h2 ( ) const

Get the mole fraction of hydrogen at the anode channel from pressure, temperature, and relative humidity.

double FuelCell::OperatingConditions::get_x_o2 ( ) const

Get the mole fraction of oxygen at the cathode channel from pressure, temperature, and relative humidity.

double FuelCell::OperatingConditions::get_x_wv ( ) const

Get the mole fraction of water at the cathode channel from pressure, temperature, and relative humidity note that the anode mole fraction of water is not required, as there are only two species so x_wv_a = 1 - x_h2.

void FuelCell::OperatingConditions::initialize ( ParameterHandler &  param)

Class used to read in data and initialize the necessary data to compute the coefficients.

void FuelCell::OperatingConditions::print_operating_conditions ( ) const

Output operating conditions to screen.

double FuelCell::OperatingConditions::saturation_pressure ( ) const

Get the water vapour saturation pressure in atmospheres (atm) using cell temperature.

double FuelCell::OperatingConditions::voltage_cell_th ( )

NOTE: This function is redefined in base_kinetics class, considering variable temperature and gas pressures.

The function here should only be used for defining Initial condition values. Get the theoretical cell voltage using the cell temperature, and the reactant gas pressures

Member Data Documentation

bool FuelCell::OperatingConditions::adjust_BC
private

Bool set to true if you want to modify boundary conditions.

double FuelCell::OperatingConditions::c_a
private

Concentration of the gas mixture in the anode B.C.

double FuelCell::OperatingConditions::c_c
private

Concentration of the gas mixture in the cathode B.C.

double FuelCell::OperatingConditions::channel_oxygen_mole_fraction
private

Initial amount of oxygen in channel prior to humidification.

double FuelCell::OperatingConditions::dV_a
private

Voltage drop in the anode.

double FuelCell::OperatingConditions::E_th
private

Theoretical voltage for the cell.

double FuelCell::OperatingConditions::OCV
private

Open circuit voltage for the cell.

double FuelCell::OperatingConditions::p_a
private

Pressure of the gas mixture in the anode B.C.

double FuelCell::OperatingConditions::p_c
private

Pressure of the gas mixture in the cathode B.C.

double FuelCell::OperatingConditions::R
private
double FuelCell::OperatingConditions::RH_a
private

Relative humidity of the gas mixture in the anode B.C.

double FuelCell::OperatingConditions::RH_c
private

Relative humidity of the gas mixture in the anode B.C.

double FuelCell::OperatingConditions::T_cell
private

Operating temperature of the cell.

double FuelCell::OperatingConditions::V_cell
private

Operating voltage of the cell.


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