OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MixtureDynamicViscosity.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------
2 // $Id: MixtureDynamicViscosity.h 1354 2013-08-17 00:01:22Z secanell $
3 //
4 // Copyright (C) 2010 by Ali MalekpourKoupaei
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 _FUELCELLSHOP__MixtureDynamicViscosity__H
14 #define _FUELCELLSHOP__MixtureDynamicViscosity__H
15 
16 #define __Del(p) {if(p) delete p; p=__null;}
17 #define __printf __builtin_printf
18 #define __scanf __builtin_scanf
19 #define __exp __builtin_exp
20 #define __pow __builtin_pow
21 #define __DUMMY -9999
22 
23 #include<PureGas.h>
24 
26 
27 namespace FuelCellShop
28 {
29  namespace Mixture
30  {
31 
36  {
37  protected:
39  public:
40 
41  //class constructors
45 
46  //class distructor
47  virtual ~MixtureDynamicViscosity();
48 
49  // the method's specs.
50  virtual char* get_name() =0;
51  virtual char* get_description() =0;
52  virtual enDynamicViscosityModelID get_ID() =0;
53 
54  virtual void get_Mu (double& Mu) =0;
55  virtual void get_Mu (double& Mu, const double& T, const std::vector<double>& xi) =0;
56 
57  virtual void get_dMu_dxi (double& dMu, const double& T, const std::vector<double>& xi) =0;
58  virtual void get_dMu_dT (double& dMu, const double& T, const std::vector<double>& xi) =0;
59 
60  void set_T_n_xi(const double& T, const std::vector<double>& xi);
63 
64  virtual void scan();
65  virtual void report() ;
66  virtual void report2file(char* filename);
67 
68  protected:
69  double T;
70  std::vector<double> xi;
71  };
72  //---------------------------------------------------------------------------
73 
74  /*
75  VaporMixtureDynamicViscosity as a publicly derived class of MixtureDynamicViscosity
76  */
78  {
79  public:
80 
81  //class constructors
85 
86  //class distructor
88 
89  virtual void scan();
90  virtual void report() ;
91  virtual void report2file(char* filename);
92  };
93  //---------------------------------------------------------------------------
94 
95  /*
96  ChapmanEnskogViscosityModel as a publicly derived class of VaporMixtureDynamicViscosity
97  */
99  {
100  public:
101 
102  //class constructors
106 
107  //class distructor
109 
110  virtual char* get_name();
111  virtual char* get_description();
113 
114  virtual void get_Mu (double& Mu);
115  virtual void get_Mu (double& Mu, const double& T, const std::vector<double>& xi);
116 
117  virtual void get_dMu_dxi (double& dMu, const double& T, const std::vector<double>& xi);
118  virtual void get_dMu_dT (double& dMu, const double& T, const std::vector<double>& xi);
119 
120  void get_exi(std::vector< std::vector<double> >& exi, const double& T);
121 
122  virtual void scan();
123  virtual void report() ;
124  virtual void report2file(char* filename);
125  };
126  //---------------------------------------------------------------------------
127  }
128 }
129 
130 #endif