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 1354 2013-08-17 00:01:22Z 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 #include <base/logstream.h>
19 
20 #include "fcst_constants.h"
21 
22 using namespace dealii;
23 
24 namespace FuelCell
25 {
26 
121  {
122  public:
127 
132 
155  void declare_parameters (ParameterHandler &param) const;
166  void set_parameters(const std::vector<std::string>& name_dvar,
167  const std::vector<double>& value_dvar,
168  ParameterHandler& param) const;
173  void initialize (ParameterHandler& param);
174 
175 
179  double saturation_pressure();
180 
186  double get_x_wv();
187 
191  double get_x_o2();
192 
196  double get_x_h2();
197 
202  double voltage_cell_th();
203 
204  void print_operating_conditions();
205 
211  inline double get_c_c()
212  { return c_c; }
214  inline double get_T()
215  { return T_cell; }
217  inline double get_V()
218  { return V_cell; }
224  inline double get_dV_a()
225  { return dV_a; }
227  inline double get_pc_Pa()
228  { return p_c; }
230  inline double get_pc_atm()
231  { return p_c/101325; }
233  inline double get_c_a()
234  { return c_a; }
236  inline double get_pa_Pa()
237  { return p_a; }
239  inline double get_pa_atm()
240  { return p_a/101325; }
242  inline double get_RH_a()
243  {return RH_a;}
245  inline double get_RH_c()
246  {return RH_c;}
248  inline double get_OCV()
249  {return OCV;}
250 
251  private:
252  //------------ CONSTANTS -----------------------------------------
253  double R; //Gas constant 8.3144 J / (mol K)
254 
257 
258  //------------ CELL DATA -----------------------------------------
260  double T_cell;
262  double V_cell;
264  double dV_a;
266  double OCV;
268  double E_th;
269 
270  //------------- ANODE DATA -------------------------------------
272  double p_a;
274  double c_a;
276  double RH_a;
277 
278  //------------- CATHODE DATA -------------------------------------
280  double p_c;
282  double c_c;
284  double RH_c;
285 
286  };
287 
288 }
289 
290 #endif // _FUELCELL_OPERATING_CONDITIONS__H