OpenFCST: The open-source Fuel Cell Simulation Toolbox
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
fcst
include
materials
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
25
enum
enDynamicViscosityModelID
{
vmChapmanEnskog
=1,
vmNone
};
26
27
namespace
FuelCellShop
28
{
29
namespace
Mixture
30
{
31
35
class
MixtureDynamicViscosity
36
{
37
protected
:
38
FuelCellShop::Material::PureGas
*
species1
, *
species2
;
39
public
:
40
41
//class constructors
42
MixtureDynamicViscosity
();
43
MixtureDynamicViscosity
(
FuelCellShop::Material::PureGas
&
species1
,
44
FuelCellShop::Material::PureGas
&
species2
);
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
);
61
void
set_species
(
FuelCellShop::Material::PureGas
&
species1
,
62
FuelCellShop::Material::PureGas
&
species2
);
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
*/
77
class
VaporMixtureDynamicViscosity
:
public
MixtureDynamicViscosity
78
{
79
public
:
80
81
//class constructors
82
VaporMixtureDynamicViscosity
();
83
VaporMixtureDynamicViscosity
(
FuelCellShop::Material::PureGas
&
species1
,
84
FuelCellShop::Material::PureGas
&
species2
);
85
86
//class distructor
87
virtual
~VaporMixtureDynamicViscosity
();
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
*/
98
class
ChapmanEnskogViscosityModel
:
public
VaporMixtureDynamicViscosity
99
{
100
public
:
101
102
//class constructors
103
ChapmanEnskogViscosityModel
();
104
ChapmanEnskogViscosityModel
(
FuelCellShop::Material::PureGas
&
species1
,
105
FuelCellShop::Material::PureGas
&
species2
);
106
107
//class distructor
108
virtual
~ChapmanEnskogViscosityModel
();
109
110
virtual
char
*
get_name
();
111
virtual
char
*
get_description
();
112
virtual
enDynamicViscosityModelID
get_ID
();
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
Generated on Fri Aug 30 2013 17:15:54 for OpenFCST: The open-source Fuel Cell Simulation Toolbox by
1.8.2