OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GasMixture.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 //
3 // FCST: Fuel Cell Simulation Toolbox
4 //
5 // Copyright (C) 2006-2013 by Energy Systems Design Laboratory, University of Alberta
6 //
7 // This software is distributed under the MIT License
8 // For more information, see the README file in /doc/LICENSE
9 //
10 // - Class: GasMixture.h
11 // - Description: This class describes properties of gas mixtures
12 // - Developers: Valentin N. Zingan, University of Alberta
13 // - Id: $Id: GasMixture.h 2605 2014-08-15 03:36:44Z secanell $
14 //
15 // ----------------------------------------------------------------------------
16 
17 #ifndef _FCST_FUELCELLSHOP_MATERIAL_GASMIXTURE_H_
18 #define _FCST_FUELCELLSHOP_MATERIAL_GASMIXTURE_H_
19 
20 #define _DUMMY_ 1.e300
21 
22 #include "PureGas.h"
23 
24 namespace FuelCellShop
25 {
26 namespace Material
27 {
28 
115 class GasMixture : public BaseMaterial
116 {
117 public:
118 
120 
121 
125  GasMixture(const std::string& name);
126 
130  virtual ~GasMixture();
131 
135  virtual void declare_parameters(ParameterHandler& param) const;
136 
140  virtual void initialize(ParameterHandler& param);
141 
146  void set_gases(const std::vector< PureGas* >& rgases)
147  {
148  gases = rgases;
149  }
150 
155  void set_total_pressure(const double& rtotal_pressure)
156  {
157  total_pressure = rtotal_pressure;
158  }
159 
164  void set_temperature(const double& rtemperature)
165  {
166  temperature = rtemperature;
167  }
168 
170 
172 
173 
178  const std::vector< PureGas* >& get_gases() const
179  {
180  return gases;
181  }
182 
187  const double& get_total_pressure() const
188  {
189  return total_pressure;
190  }
191 
196  const double& get_temperature() const
197  {
198  return temperature;
199  }
200 
205  virtual void print_material_properties() const;
206 
208 
210 
211 
218 
228  void get_ChapmanEnskog_isobaric_diffusion_coefficient(std::vector<double>& diffusion_coefficient) const;
229 
237  const double get_ChapmanEnskog_isobaric_diffusion_coefficient(const double& temperature) const;
238 
249  void get_ChapmanEnskog_isobaric_diffusion_coefficient(const std::vector<double>& temperature,
250  std::vector<double>& diffusion_coefficient) const;
251 
253 
255 
256 
266 
279  std::vector<double>& dst) const;
280 
282 
284 
285 
291  const double get_ChapmanEnskog_diffusion_coefficient() const;
292 
302  void get_ChapmanEnskog_diffusion_coefficient(std::vector<double>& diffusion_coefficient) const;
303 
312 
324  std::vector<double>& diffusion_coefficient) const;
325 
334 
346  std::vector<double>& diffusion_coefficient) const;
347 
356  const double get_ChapmanEnskog_diffusion_coefficient(const double& total_pressure,
357  const double& temperature) const;
358 
370  void get_ChapmanEnskog_diffusion_coefficient(const std::vector<double>& total_pressure,
371  const std::vector<double>& temperature,
372  std::vector<double>& diffusion_coefficient) const;
373 
375 
377 
378 
387  const double get_DChapmanEnskog_diffusion_coefficient_Dpressure(const double& total_pressure) const;
388 
401  std::vector<double>& dst) const;
402 
413  const double& temperature) const;
414 
428  const std::vector<double>& temperature,
429  std::vector<double>& dst) const;
430 
439  const double get_DChapmanEnskog_diffusion_coefficient_Dtemperature(const double& temperature) const;
440 
453  std::vector<double>& dst) const;
454 
465  const double& temperature) const;
466 
480  const std::vector<double>& temperature,
481  std::vector<double>& dst) const;
482 
484 
486 
487 
493  const Table< 2, double > get_ChapmanEnskog_isobaric_diffusion_coefficients() const;
494 
504  void get_ChapmanEnskog_isobaric_diffusion_coefficients(std::vector< Table< 2, double > >& diffusion_coefficients) const;
505 
513  const Table< 2, double > get_ChapmanEnskog_isobaric_diffusion_coefficients(const double& temperature) const;
514 
525  void get_ChapmanEnskog_isobaric_diffusion_coefficients(const std::vector<double>& temperature,
526  std::vector< Table< 2, double > >& diffusion_coefficients) const;
527 
529 
531 
532 
541  const Table< 2, double > get_DChapmanEnskog_isobaric_diffusion_coefficients_Dtemperature(const double& temperature) const;
542 
555  std::vector< Table< 2, double > >& dst) const;
556 
558 
560 
561 
567  const Table< 2, double > get_ChapmanEnskog_diffusion_coefficients() const;
568 
578  void get_ChapmanEnskog_diffusion_coefficients(std::vector< Table< 2, double > >& diffusion_coefficients) const;
579 
587  const Table< 2, double > get_ChapmanEnskog_diffusion_coefficients_at_constant_pressure(const double& temperature) const;
588 
600  std::vector< Table< 2, double > >& diffusion_coefficients) const;
601 
609  const Table< 2, double > get_ChapmanEnskog_diffusion_coefficients_at_constant_temperature(const double& total_pressure) const;
610 
622  std::vector< Table< 2, double > >& diffusion_coefficients) const;
623 
632  const Table< 2, double > get_ChapmanEnskog_diffusion_coefficients(const double& total_pressure,
633  const double& temperature) const;
634 
646  void get_ChapmanEnskog_diffusion_coefficients(const std::vector<double>& total_pressure,
647  const std::vector<double>& temperature,
648  std::vector< Table< 2, double > >& diffusion_coefficients) const;
649 
651 
653 
654 
663  const Table< 2, double > get_DChapmanEnskog_diffusion_coefficients_Dpressure(const double& total_pressure) const;
664 
677  std::vector< Table< 2, double > >& dst) const;
678 
688  const Table< 2, double > get_DChapmanEnskog_diffusion_coefficients_Dpressure(const double& total_pressure,
689  const double& temperature) const;
690 
704  const std::vector<double>& temperature,
705  std::vector< Table< 2, double > >& dst) const;
706 
715  const Table< 2, double > get_DChapmanEnskog_diffusion_coefficients_Dtemperature(const double& temperature) const;
716 
729  std::vector< Table< 2, double > >& dst) const;
730 
740  const Table< 2, double > get_DChapmanEnskog_diffusion_coefficients_Dtemperature(const double& total_pressure,
741  const double& temperature) const;
742 
756  const std::vector<double>& temperature,
757  std::vector< Table< 2, double > >& dst) const;
758 
760 
762 
763 
772  const double get_binary_collision_integral(const unsigned int& N1 = 0,
773  const unsigned int& N2 = 1) const;
774 
786  void get_binary_collision_integral(std::vector<double>& binary_collision_integral,
787  const unsigned int& N1 = 0,
788  const unsigned int& N2 = 1) const;
789 
799  const double get_binary_collision_integral(const double& temperature,
800  const unsigned int& N1 = 0,
801  const unsigned int& N2 = 1) const;
802 
815  void get_binary_collision_integral(const std::vector<double>& temperature,
816  std::vector<double>& binary_collision_integral,
817  const unsigned int& N1 = 0,
818  const unsigned int& N2 = 1) const;
819 
830  const double get_Dbinary_collision_integral_Dtemperature(const double& temperature,
831  const unsigned int& N1 = 0,
832  const unsigned int& N2 = 1) const;
833 
847  void get_Dbinary_collision_integral_Dtemperature(const std::vector<double>& temperature,
848  std::vector<double>& dst,
849  const unsigned int& N1 = 0,
850  const unsigned int& N2 = 1) const;
851 
853 
854 protected:
855 
857  // DATA //
859 
861 
862 
868  std::vector< PureGas* > gases;
869 
878 
886  double temperature;
887 
889 
890 };
891 
892 } // Material
893 
894 } // FuelCellShop
895 
896 #endif
const double & get_temperature() const
This function returns temperature.
Definition: GasMixture.h:196
double temperature
Temperature of the whole gas mixture, .
Definition: GasMixture.h:886
const double get_DChapmanEnskog_isobaric_diffusion_coefficient_Dtemperature(const double &temperature) const
This function returns the first derivative of the Maxwell-Stefan isobaric diffusion coefficient of g...
virtual void print_material_properties() const
This function prints out the material properties.
const double get_binary_collision_integral(const unsigned int &N1=0, const unsigned int &N2=1) const
This function returns binary collision integral at a constant temperature.
const std::string name
Name of the layer.
Definition: base_material.h:155
const std::vector< PureGas * > & get_gases() const
This function returns gases.
Definition: GasMixture.h:178
const double get_DChapmanEnskog_diffusion_coefficient_Dpressure(const double &total_pressure) const
This function returns the first derivative of the Maxwell-Stefan diffusion coefficient of gas in ga...
const Table< 2, double > get_DChapmanEnskog_diffusion_coefficients_Dtemperature(const double &temperature) const
This function returns the first derivative of the Maxwell-Stefan diffusion coefficients of gas in g...
const double get_DChapmanEnskog_diffusion_coefficient_Dtemperature(const double &temperature) const
This function returns the first derivative of the Maxwell-Stefan diffusion coefficient of gas in ga...
virtual void initialize(ParameterHandler &param)
Initialize parameters.
const Table< 2, double > get_ChapmanEnskog_diffusion_coefficients_at_constant_temperature(const double &total_pressure) const
This function returns Maxwell-Stefan diffusion coefficients of gas in gas written in the Chapman En...
std::vector< PureGas * > gases
This std::vector contains all pure gases which form the whole gas mixture of a problem at hand...
Definition: GasMixture.h:868
double total_pressure
Total pressure of the whole gas mixture, .
Definition: GasMixture.h:877
const Table< 2, double > get_ChapmanEnskog_diffusion_coefficients() const
This function returns Maxwell-Stefan diffusion coefficients of gas in gas written in the Chapman En...
virtual void declare_parameters(ParameterHandler &param) const
Declare parameters.
const double get_ChapmanEnskog_diffusion_coefficient_at_constant_temperature(const double &total_pressure) const
This function returns Maxwell-Stefan diffusion coefficient of gas in gas (or vice-versa) written in...
const Table< 2, double > get_DChapmanEnskog_isobaric_diffusion_coefficients_Dtemperature(const double &temperature) const
This function returns the first derivative of the Maxwell-Stefan isobaric diffusion coefficients of ...
const double get_ChapmanEnskog_isobaric_diffusion_coefficient() const
This function returns Maxwell-Stefan isobaric diffusion coefficient of gas in gas (or vice-versa) w...
virtual ~GasMixture()
Destructor.
const double get_ChapmanEnskog_diffusion_coefficient() const
This function returns Maxwell-Stefan diffusion coefficient of gas in gas (or vice-versa) written in...
const Table< 2, double > get_DChapmanEnskog_diffusion_coefficients_Dpressure(const double &total_pressure) const
This function returns the first derivative of the Maxwell-Stefan diffusion coefficients of gas in g...
void set_total_pressure(const double &rtotal_pressure)
This function sets total_pressure.
Definition: GasMixture.h:155
This class describes properties of gas mixtures.
Definition: GasMixture.h:115
const double & get_total_pressure() const
This function returns total_pressure.
Definition: GasMixture.h:187
const double get_ChapmanEnskog_diffusion_coefficient_at_constant_pressure(const double &temperature) const
This function returns Maxwell-Stefan diffusion coefficient of gas in gas (or vice-versa) written in...
const Table< 2, double > get_ChapmanEnskog_isobaric_diffusion_coefficients() const
This function returns Maxwell-Stefan isobaric diffusion coefficients of gas in gas written in the C...
const double get_Dbinary_collision_integral_Dtemperature(const double &temperature, const unsigned int &N1=0, const unsigned int &N2=1) const
This function returns the first derivative of the binary collision integral at a variable temperatur...
void set_gases(const std::vector< PureGas * > &rgases)
This function sets gases.
Definition: GasMixture.h:146
void set_temperature(const double &rtemperature)
This function sets temperature.
Definition: GasMixture.h:164
GasMixture(const std::string &name)
Constructor.
Virtual class used to provide the interface for all material classes.
Definition: base_material.h:54
const Table< 2, double > get_ChapmanEnskog_diffusion_coefficients_at_constant_pressure(const double &temperature) const
This function returns Maxwell-Stefan diffusion coefficients of gas in gas written in the Chapman En...