1
2
3
4
5
6
7
8
9
10
11
|
#ifndef KINEMATICVISCOSITY_HH
#define KINEMATICVISCOSITY_HH
#include <math.h> // pow
#include <string>
inline double
kerosenekinematicviscosity(const double T)
/*
* B.S.Massey
* Mechanics of fluids
|
|
|
1
2
3
4
5
6
7
8
9
10
11
|
#ifndef KINEMATICVISCOSITY_HH
#define KINEMATICVISCOSITY_HH
#include <cmath> // pow
#include <string>
inline double
kerosenekinematicviscosity(const double T)
/*
* B.S.Massey
* Mechanics of fluids
|
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
* nu = 1.78598097e6 * T^(-4.781567507)
*/
{
return 1.79e6 * pow(T, -4.78);
}
inline double
kinematicviscosity(const string fluid,
const double T)
{
if ("kerosene" == fluid) {
return kerosenekinematicviscosity(T);
} else {
cerr << __FILE__ << ": fluid \"" << fluid << "\" unknown" << endl;
exit(-1);
}
}
#endif // KINEMATICVISCOSITY_HH
|
|
|
|
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
* nu = 1.78598097e6 * T^(-4.781567507)
*/
{
return 1.79e6 * pow(T, -4.78);
}
inline double
kinematicviscosity(const std::string fluid,
const double T)
{
if ("kerosene" == fluid) {
return kerosenekinematicviscosity(T);
} else {
std::cerr << __FILE__ << ": fluid \"" << fluid << "\" unknown" << std::endl;
exit(-1);
}
}
#endif // KINEMATICVISCOSITY_HH
|