.Simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Functions | Variables
MDSimulation::Constants Namespace Reference

Constants for the program corresponding to atomic/molecular properties of the various particle types in the simulation. More...

Functions

const IntVector X (1, 0, 0)
 Unit Vectors for each direction. More...
 
const IntVector Y (0, 1, 0)
 
const IntVector Z (0, 0, 1)
 
template<typename source >
std::map< source, int > invert_array_mapping (source const *const arr, const int len)
 Function to invert an array mapping. More...
 

Variables

const int ELEMENT_TYPES = 8
 The number of different particle types in the simulation. More...
 
const int IONIZATION_LEVELS = 9
 The number of ionization levels tracked. More...
 
const std::string ELEMENT_NAMES [ELEMENT_TYPES]
 The names of the elements. More...
 
const std::map< std::string, int > TYPE_FROM_NAME = invert_array_mapping<std::string>(ELEMENT_NAMES, ELEMENT_TYPES)
 
const std::string LIQUID_NAME = "H20"
 The name of the liquid. More...
 
const bool FUSABLE [ELEMENT_TYPES]
 Flag controlling whether or not an element can fuse. More...
 
const bool DISSOCIATES [ELEMENT_TYPES]
 
const double DISSOCIATION_ENERGY [ELEMENT_TYPES]
 
const std::string DISSOCIATES_TO_NAME [ELEMENT_TYPES]
 
const double IONIZATION_ENERGY_INI [ELEMENT_TYPES][IONIZATION_LEVELS]
 The entry (i,j) gives the energy reqiured to extract the jth electron from element i. More...
 
const double LIQUID_ATOMIC_MASS_INI = 18.02
 The atomic mass of particles of the liquid.
 
const double LIQUID_ATOMIC_DIAMETER_INI = 2 * 2.82e-10
 The atomic radius of the particles of the liquid.
 
const double ATOMIC_MASS_INI [ELEMENT_TYPES]
 The "initial" atomic mass of each element. More...
 
const double ATOMIC_DIAMETER_INI [ELEMENT_TYPES]
 The diameter of each element in meters. More...
 
const double BIRD_OMEGA_INI [ELEMENT_TYPES]
 The constant ω (omega) corresponding to each particle type. More...
 
const double BIRD_ALPHA_INI [ELEMENT_TYPES]
 The constant α (alpha) corresponding to each particle type. More...
 
const double BIRD_MU_INI [ELEMENT_TYPES]
 The constant μ (mu) corresponding to each particle type. More...
 
const double BIRD_D_INI [ELEMENT_TYPES]
 The constant "D" corresponding to each particle type. More...
 
const double BIRD_T_REF = 273.0
 The initial reference temperature.
 
const double PHI = 1.6180339887
 Golden Ratio.
 
const double AVOGADRO = 6.02214129e23
 Avogadro's Number.
 
const double GAS_CONSTANT = 8.3144621
 Gas Constant.
 
const double BOLTZMANN_CONSTANT = 1.3806488e-23
 Boltzmann Constant.
 
const int DIMENSIONS = 3
 The number of dimensions in the simulation. More...
 
const double NEVER = std::numeric_limits<double>::infinity()
 Time value for an event that will never occur. More...
 
const double PI = boost::math::constants::pi<double>()
 The mathematical constant π. More...
 
const int NULL_PARTICLE = -1
 A particle index representing an invalid particle. More...
 
const double P0 = 1.0e5
 Atmospheric pressure.
 
const double KB = 1.380662e-23
 Boltzmann's constant.
 
const double GAMMA = 5.0 / 3.0
 ???
 
const double ExcludedVolume = 0.00005105
 Van Der Waal's constant.
 
const double FusionBarrier = 4.5e7 * KB * 3.0 / 2.0
 Energy required to initiate fusion in Joules.
 
const double Plank = 6.626068e-34
 Plank's constant in m^2 kg / s.
 
const IntVector STD_BASIS [3]
 Standard basis vectors in R^3. More...
 
const IntVector NEG_STD_BASIS [3]
 Negates standard basis vectors in R^3. More...
 
const int LIQUID_TYPES = 5
 
const std::string LIQUID_NAMES [LIQUID_TYPES]
 Names of the possible liquids in the simulation. More...
 
const std::map< std::string, int > LIQUID_FROM_NAME = invert_array_mapping<std::string>(LIQUID_NAMES, LIQUID_TYPES)
 
const double Viscosity [LIQUID_TYPES]
 Kinematic viscosity of the fluids in m^2/s. More...
 
const double SurfaceTension [LIQUID_TYPES]
 Surface tension of the liquids in N/m. More...
 
const double Density [LIQUID_TYPES]
 Density of the liquids in kg/m^3. More...
 
const double SpeedOfSound [LIQUID_TYPES]
 Speed of sound of the liquids in m/s. More...
 

Detailed Description

Constants for the program corresponding to atomic/molecular properties of the various particle types in the simulation.

Constants referenced in the molecular dynamics simulation.

All values correspond to real world units unless otherwise stated.

Force constants were obtained from "Molecular theory of gases and liquids" by Hirscfelder, Joseph.

Function Documentation

template<typename source >
std::map<source, int> MDSimulation::Constants::invert_array_mapping ( source const *const  arr,
const int  len 
)
inline

Function to invert an array mapping.

Given an array and its length, this function will produce a map that takes the values in the array and returns the corresponding index. This assumes that each element of the array is unique.

Parameters
sourceThe array to convert.
lenThe number of elements in the array.
const IntVector MDSimulation::Constants::X ( ,
,
 
)

Unit Vectors for each direction.

Variable Documentation

const double MDSimulation::Constants::ATOMIC_DIAMETER_INI[ELEMENT_TYPES]
Initial value:
=
{
2 * 1.09e-10,
2 * 1.09e-10,
2 * 1.09e-10,
2 * 1.09e-10,
2 * 1.09e-10,
2 * 1.30e-10,
2 * 1.83e-10,
2 * 2.46e-10
}

The diameter of each element in meters.

These values are used only in the hard sphere model

const double MDSimulation::Constants::ATOMIC_MASS_INI[ELEMENT_TYPES]
Initial value:
=
{
1.008,
2.013,
2.016,
4.028,
4.003,
20.18,
39.95,
131.3
}

The "initial" atomic mass of each element.

This gives the mass of each element in atomic mass units, before they are g to simulation units.

const double MDSimulation::Constants::BIRD_ALPHA_INI[ELEMENT_TYPES]
Initial value:
=
{
1.396,
1.420,
1.396,
1.420,
1.431,
1.336,
1.425,
1.651
}

The constant α (alpha) corresponding to each particle type.

const double MDSimulation::Constants::BIRD_D_INI[ELEMENT_TYPES]
Initial value:
=
{
2.30e-10,
2.30e-10,
2.30e-10,
2.30e-10,
2.30e-10,
2.72e-10,
4.11e-10,
5.65e-10
}

The constant "D" corresponding to each particle type.

This corresponds to the diameter of the particle, but is used for the VSS model whereas the other diameter value above is used for the hard sphere model.

Technically, this is the expected (i.e. mean) diameter of a particular gas species at the reference temperature.

These can be computed by simulating an equilibriated bubble at the reference temperature and taking the mean of the distances between colliding particles of that gas species.

These values are only useful for certain logistics involving the cell partitioning. In fact, only the largest gas is truely relevant, so the rest can be nonsense, because they are not really used.

const double MDSimulation::Constants::BIRD_MU_INI[ELEMENT_TYPES]
Initial value:
=
{
0.832,
1.185,
0.832,
1.185,
1.865,
2.975,
2.117,
2.107
}

The constant μ (mu) corresponding to each particle type.

const double MDSimulation::Constants::BIRD_OMEGA_INI[ELEMENT_TYPES]
Initial value:
=
{
0.188,
0.199,
0.188,
0.199,
0.204,
0.160,
0.201,
0.302
}

The constant ω (omega) corresponding to each particle type.

const double MDSimulation::Constants::Density[LIQUID_TYPES]
Initial value:
=
{
516,
5430,
999.07,
832.00,
863.0
}

Density of the liquids in kg/m^3.

const int MDSimulation::Constants::DIMENSIONS = 3

The number of dimensions in the simulation.

const bool MDSimulation::Constants::DISSOCIATES[ELEMENT_TYPES]
Initial value:
=
{
false ,
false ,
true ,
true ,
false ,
false ,
false ,
false
}
const std::string MDSimulation::Constants::DISSOCIATES_TO_NAME[ELEMENT_TYPES]
Initial value:
=
{
"",
"",
"H",
"D",
"" ,
"" ,
"" ,
"" ,
}
const double MDSimulation::Constants::DISSOCIATION_ENERGY[ELEMENT_TYPES]
Initial value:
=
{
1.0e100 ,
1.0e100 ,
436.0 ,
443.6 ,
1.0e100 ,
1.0e100 ,
1.0e100 ,
1.0e100
}
const std::string MDSimulation::Constants::ELEMENT_NAMES[ELEMENT_TYPES]
Initial value:
=
{
"H" ,
"D" ,
"H2" ,
"D2" ,
"He" ,
"Ne" ,
"Ar" ,
"Xe"
}

The names of the elements.

const int MDSimulation::Constants::ELEMENT_TYPES = 8

The number of different particle types in the simulation.

const bool MDSimulation::Constants::FUSABLE[ELEMENT_TYPES]
Initial value:
=
{
true ,
true ,
false ,
false ,
false ,
false ,
false ,
false
}

Flag controlling whether or not an element can fuse.

const double MDSimulation::Constants::IONIZATION_ENERGY_INI[ELEMENT_TYPES][IONIZATION_LEVELS]
Initial value:
=
{
{1312.0 , 1.0e100 , 1.0e100 , 1.0e100 , 1.0e100 , 1.0e100 , 1.0e100 , 1.0e100 , 1.0e100} ,
{1312.0 , 1.0e100 , 1.0e100 , 1.0e100 , 1.0e100 , 1.0e100 , 1.0e100 , 1.0e100 , 1.0e100} ,
{1488.0 , 1.0e100 , 1.0e100 , 1.0e100 , 1.0e100 , 1.0e100 , 1.0e100 , 1.0e100 , 1.0e100} ,
{1488.0 , 1.0e100 , 1.0e100 , 1.0e100 , 1.0e100 , 1.0e100 , 1.0e100 , 1.0e100 , 1.0e100} ,
{2372.3 , 5250.5 , 1.0e100 , 1.0e100 , 1.0e100 , 1.0e100 , 1.0e100 , 1.0e100 , 1.0e100} ,
{2080.7 , 3952.3 , 6122.0 , 9371.0 , 12177.0 , 1.0e100 , 1.0e100 , 1.0e100 , 1.0e100} ,
{1520.6 , 2665.8 , 3931.0 , 5771.0 , 7238.0 , 8781.0 , 11995.0 , 13842.0 , 1.0e100} ,
{1170.4 , 2046.4 , 3099.4 , 4600.0 , 5760.0 , 6930.0 , 9460.0 , 10800.0 , 1.0e100}
}

The entry (i,j) gives the energy reqiured to extract the jth electron from element i.

These do not need to be converted into simulation units. They are in kJ/mol, which has a 1-1 conversion to energy units in the simulation. Not sure why that is, off the top of my head, but that is how the numbers work out.

const int MDSimulation::Constants::IONIZATION_LEVELS = 9

The number of ionization levels tracked.

const std::string MDSimulation::Constants::LIQUID_NAME = "H20"

The name of the liquid.

const std::string MDSimulation::Constants::LIQUID_NAMES[LIQUID_TYPES]
Initial value:
=
{
"lithium",
"mercury",
"water",
"diesel",
"ig-4"
}

Names of the possible liquids in the simulation.

const IntVector MDSimulation::Constants::NEG_STD_BASIS[3]
Initial value:
=
{
IntVector(-X),
IntVector(-Y),
}
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

Negates standard basis vectors in R^3.

const double MDSimulation::Constants::NEVER = std::numeric_limits<double>::infinity()

Time value for an event that will never occur.

const int MDSimulation::Constants::NULL_PARTICLE = -1

A particle index representing an invalid particle.

const double MDSimulation::Constants::PI = boost::math::constants::pi<double>()

The mathematical constant π.

const double MDSimulation::Constants::SpeedOfSound[LIQUID_TYPES]
Initial value:
=
{
4490,
1450,
1497,
1250,
1300
}

Speed of sound of the liquids in m/s.

const IntVector MDSimulation::Constants::STD_BASIS[3]
Initial value:
=
{
X,
Y,
Z
}
const IntVector X(1, 0, 0)
Unit Vectors for each direction.

Standard basis vectors in R^3.

const double MDSimulation::Constants::SurfaceTension[LIQUID_TYPES]
Initial value:
=
{
0.396,
0.485,
0.0728,
23.8e-3,
23.8e-3
}

Surface tension of the liquids in N/m.

const double MDSimulation::Constants::Viscosity[LIQUID_TYPES]
Initial value:
=
{
1.245e-6,
0.114e-6,
1.004e-6,
2.000e-6,
118.0e-6
}

Kinematic viscosity of the fluids in m^2/s.