OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
operating_conditions.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------
2 // $Id: operating_conditions.h 2605 2014-08-15 03:36:44Z secanell $
3 //
4 // Copyright (C) 2009 by Marc Secanell
5 //
6 // This file is subject to QPL and may not be distributed
7 // without copyright and license information. Please refer
8 // to the file deal.II/doc/license.html for the text and
9 // further information on this license.
10 //
11 //---------------------------------------------------------------------------
12 
13 #ifndef _FUELCELL_OPERATING_CONDITIONS__H
14 #define _FUELCELL_OPERATING_CONDITIONS__H
15 
16 // Include deal.II classes
17 #include <base/parameter_handler.h>
18 
19 
20 #include <boost/lexical_cast.hpp>
21 
22 #include <logging.h>
23 #include "fcst_constants.h"
25 #include <grid/geometry.h>
26 
27 using namespace dealii;
28 
29 namespace FuelCell
30 {
31 
111  {
112  public:
117 
122 
146  void declare_parameters (ParameterHandler &param) const;
147 
152  void initialize (ParameterHandler& param);
153 
154 
158  double saturation_pressure() const;
159 
165  double get_x_wv() const;
166 
170  double get_x_o2() const;
171 
175  double get_x_h2() const;
176 
181  double voltage_cell_th();
182 
186  void print_operating_conditions() const;
187 
191  void adjust_initial_solution(std::vector< component_materialID_value_map >& maps,
192  const boost::shared_ptr< FuelCellShop::Geometry::GridBase<dim> > grid) const;
212  void adjust_boundary_conditions(std::vector< component_boundaryID_value_map >& maps,
213  const boost::shared_ptr< FuelCellShop::Geometry::GridBase<dim> > grid) const;
219  inline double get_c_c() const
220  { return c_c; }
222  inline double get_T() const
223  { return T_cell; }
225  inline double get_V() const
226  { return V_cell; }
232  inline double get_dV_a() const
233  { return dV_a; }
235  inline double get_pc_Pa() const
236  { return p_c; }
238  inline double get_pc_atm() const
239  { return p_c/101325; }
241  inline double get_c_a() const
242  { return c_a; }
244  inline double get_pa_Pa() const
245  { return p_a; }
247  inline double get_pa_atm() const
248  { return p_a/101325; }
250  inline double get_RH_a() const
251  {return RH_a;}
253  inline double get_RH_c() const
254  {return RH_c;}
256  inline double get_OCV() const
257  {return OCV;}
258 
259  private:
260  //------------ BOUNDARY CONDITIONS -------------------------------
262  bool adjust_BC;
263  //------------ CONSTANTS -----------------------------------------
264  double R; //Gas constant 8.3144 J / (mol K)
265 
268 
269  //------------ CELL DATA -----------------------------------------
271  double T_cell;
273  double V_cell;
275  double dV_a;
277  double OCV;
279  double E_th;
280 
281  //------------- ANODE DATA -------------------------------------
283  double p_a;
285  double c_a;
287  double RH_a;
288 
289  //------------- CATHODE DATA -------------------------------------
291  double p_c;
293  double c_c;
295  double RH_c;
296 
297  };
298 
299 }
300 
301 #endif // _FUELCELL_OPERATING_CONDITIONS__H
double p_c
Pressure of the gas mixture in the cathode B.C.
Definition: operating_conditions.h:291
double get_V() const
Return cell voltage as input in Operating Conditions subsection.
Definition: operating_conditions.h:225
double T_cell
Operating temperature of the cell.
Definition: operating_conditions.h:271
double c_c
Concentration of the gas mixture in the cathode B.C.
Definition: operating_conditions.h:293
Class used to store, read from file and define the operating conditions for a fuel cell...
Definition: operating_conditions.h:110
double c_a
Concentration of the gas mixture in the anode B.C.
Definition: operating_conditions.h:285
double RH_a
Relative humidity of the gas mixture in the anode B.C.
Definition: operating_conditions.h:287
double E_th
Theoretical voltage for the cell.
Definition: operating_conditions.h:279
double channel_oxygen_mole_fraction
Initial amount of oxygen in channel prior to humidification.
Definition: operating_conditions.h:267
double get_pa_atm() const
Return anode pressure as input in Operating Conditions subsection.
Definition: operating_conditions.h:247
double get_pa_Pa() const
Return anode pressure as input in Operating Conditions subsection.
Definition: operating_conditions.h:244
double get_c_c() const
Get the total gas concentration in the cathode.
Definition: operating_conditions.h:219
bool adjust_BC
Bool set to true if you want to modify boundary conditions.
Definition: operating_conditions.h:262
double get_RH_a() const
Return anode relative humidity as input in Operating Conditions subsection.
Definition: operating_conditions.h:250
double dV_a
Voltage drop in the anode.
Definition: operating_conditions.h:275
double get_dV_a() const
Return the voltage drop in the anode.
Definition: operating_conditions.h:232
double RH_c
Relative humidity of the gas mixture in the anode B.C.
Definition: operating_conditions.h:295
double get_pc_atm() const
Return cathode pressure as input in Operating Conditions subsection.
Definition: operating_conditions.h:238
double get_T() const
Return cell temperture as input in Operating Conditions subsection.
Definition: operating_conditions.h:222
double R
Definition: operating_conditions.h:264
double V_cell
Operating voltage of the cell.
Definition: operating_conditions.h:273
double get_OCV() const
Get the open circuit voltage for the cell.
Definition: operating_conditions.h:256
double get_RH_c() const
Return cathode relative humidity as input in Operating Conditions subsection.
Definition: operating_conditions.h:253
double get_c_a() const
Get the total gas concentration in the anode.
Definition: operating_conditions.h:241
double OCV
Open circuit voltage for the cell.
Definition: operating_conditions.h:277
double get_pc_Pa() const
Return cathode pressure as input in Operating Conditions subsection.
Definition: operating_conditions.h:235
FuelCell Geometry information class.
Definition: geometry.h:91
double p_a
Pressure of the gas mixture in the anode B.C.
Definition: operating_conditions.h:283