.Simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Constants.h
1 #ifndef __CONSTANTS_CONSTANTS_H__
2 #define __CONSTANTS_CONSTANTS_H__
3 
4 #include <boost/math/constants/constants.hpp>
5 #include <cmath>
6 #include <limits>
7 #include <map>
8 
9 #include "../Vector/Vector.hpp"
10 #include "./Helper.h"
11 
12 namespace MDSimulation
13 {
17  namespace Constants
18  {
20  const double PHI = 1.6180339887;
21 
23  const double AVOGADRO = 6.02214129e23;
24 
26  const double GAS_CONSTANT = 8.3144621;
27 
29  const double BOLTZMANN_CONSTANT = 1.3806488e-23;
30 
32  const int DIMENSIONS = 3;
33 
35  const double NEVER = std::numeric_limits<double>::infinity();
36 
38  const double PI = boost::math::constants::pi<double>();
39 
41  const int NULL_PARTICLE = -1;
42 
44  const double P0 = 1.0e5; // atmospheric pressure
45 
47  const double KB = 1.380662e-23; // Boltzmann's const
48 
50  const double GAMMA = 5.0 / 3.0;
51 
53  const double ExcludedVolume = 0.00005105; // Van Der Waal's constant
54 
56  const double FusionBarrier = 4.5e7 * KB * 3.0 / 2.0;
58  const double Plank = 6.626068e-34;
59 
61  const IntVector X(1, 0, 0);
62  const IntVector Y(0, 1, 0);
63  const IntVector Z(0, 0, 1);
64 
66  const IntVector STD_BASIS[3] =
67  {
68  X,
69  Y,
70  Z
71  };
72 
75  {
76  IntVector(-X),
77  IntVector(-Y),
78  IntVector(-Z)
79  };
80 
81  const int LIQUID_TYPES = 5;
82 
84  const std::string LIQUID_NAMES[LIQUID_TYPES] =
85  {
86  "lithium",
87  "mercury",
88  "water",
89  "diesel",
90  "ig-4"
91  };
92 
93  const std::map<std::string, int> LIQUID_FROM_NAME
94  = invert_array_mapping<std::string>(LIQUID_NAMES, LIQUID_TYPES);
95 
99  const double Viscosity[LIQUID_TYPES] =
100  {
101  1.245e-6, // Lithium
102  0.114e-6, // Mercury
103  1.004e-6, // Water
104  2.000e-6, // Diesel
105  118.0e-6 // IG-4 from MultiTherm
106  };
107 
111  const double SurfaceTension[LIQUID_TYPES] =
112  {
113  0.396, // Lithium
114  0.485, // Mercury
115  0.0728, // Water
116  23.8e-3, // Diesel
117  23.8e-3 // IG-4 from MultiTherm (estimated from diesel)
118  };
119 
123  const double Density[LIQUID_TYPES] =
124  {
125  516, // Lithium
126  5430, // Mercury
127  999.07, // Water
128  832.00, // Diesel
129  863.0 // IG-4 from MultiTherm
130  };
131 
135  const double SpeedOfSound[LIQUID_TYPES] =
136  {
137  4490, // Lithium
138  1450, // Mercury
139  1497, // Water
140  1250, // Diesel
141  1300 // IG-4 from MultiTherm (estimate)
142  };
143  }
144 }
145 
146 #endif /* __CONSTANTS_H__ */
const std::string LIQUID_NAMES[LIQUID_TYPES]
Names of the possible liquids in the simulation.
Definition: Constants.h:84
const double Plank
Plank&#39;s constant in m^2 kg / s.
Definition: Constants.h:58
const double GAS_CONSTANT
Gas Constant.
Definition: Constants.h:26
const double Viscosity[LIQUID_TYPES]
Kinematic viscosity of the fluids in m^2/s.
Definition: Constants.h:99
const double FusionBarrier
Energy required to initiate fusion in Joules.
Definition: Constants.h:56
const double SpeedOfSound[LIQUID_TYPES]
Speed of sound of the liquids in m/s.
Definition: Constants.h:135
const double ExcludedVolume
Van Der Waal&#39;s constant.
Definition: Constants.h:53
const IntVector STD_BASIS[3]
Standard basis vectors in R^3.
Definition: Constants.h:66
const double KB
Boltzmann&#39;s constant.
Definition: Constants.h:47
const double BOLTZMANN_CONSTANT
Boltzmann Constant.
Definition: Constants.h:29
const double PHI
Golden Ratio.
Definition: Constants.h:20
const int NULL_PARTICLE
A particle index representing an invalid particle.
Definition: Constants.h:41
const double NEVER
Time value for an event that will never occur.
Definition: Constants.h:35
const double P0
Atmospheric pressure.
Definition: Constants.h:44
const double PI
The mathematical constant π.
Definition: Constants.h:38
const double SurfaceTension[LIQUID_TYPES]
Surface tension of the liquids in N/m.
Definition: Constants.h:111
const int DIMENSIONS
The number of dimensions in the simulation.
Definition: Constants.h:32
tvmet::Vector< int, 3UL > IntVector
A vector of integer values to hold a particle&#39;s position in the grid of cells.
Definition: Vector.hpp:29
const double Density[LIQUID_TYPES]
Density of the liquids in kg/m^3.
Definition: Constants.h:123
const double GAMMA
???
Definition: Constants.h:50
const IntVector X(1, 0, 0)
Unit Vectors for each direction.
const IntVector NEG_STD_BASIS[3]
Negates standard basis vectors in R^3.
Definition: Constants.h:74
const double AVOGADRO
Avogadro&#39;s Number.
Definition: Constants.h:23