Change all doublereal in ct_defs to double

This commit is contained in:
Bryan W. Weber 2019-06-14 10:02:56 -04:00 committed by Ray Speth
parent 3e4842be9e
commit 3e6e57edbf

View file

@ -10,7 +10,7 @@
*/
// This file is part of Cantera. See License.txt in the top-level directory or
// at http://www.cantera.org/license.txt for license and copyright information.
// at https://cantera.org/license.txt for license and copyright information.
#ifndef CT_DEFS_H
#define CT_DEFS_H
@ -50,7 +50,7 @@ using std::isnan; // workaround for bug in libstdc++ 4.8
*/
//! Pi
const doublereal Pi = 3.14159265358979323846;
const double Pi = 3.14159265358979323846;
/*!
* @name Variations of the Gas Constant
@ -60,38 +60,38 @@ const doublereal Pi = 3.14159265358979323846;
//@{
//! Avogadro's Number [number/kmol]
const doublereal Avogadro = 6.02214076e26;
const double Avogadro = 6.02214076e26;
//! Boltzmann's constant [J/K]
const doublereal Boltzmann = 1.380649e-23;
const double Boltzmann = 1.380649e-23;
/// Universal Gas Constant. [J/kmol/K]
const doublereal GasConstant = Avogadro * Boltzmann;
const double GasConstant = Avogadro * Boltzmann;
const doublereal logGasConstant = std::log(GasConstant);
const double logGasConstant = std::log(GasConstant);
//! One atmosphere [Pa]
const doublereal OneAtm = 1.01325e5;
const doublereal OneBar = 1.0E5;
const double OneAtm = 1.01325e5;
const double OneBar = 1.0E5;
//! Universal gas constant in cal/mol/K
const doublereal GasConst_cal_mol_K = GasConstant / 4184.0;
const double GasConst_cal_mol_K = GasConstant / 4184.0;
/// Planck's constant. [J-s]
const doublereal Planck = 6.62607015e-34; // J-s
const doublereal Planck_bar = Planck / (2 * Pi); // m2-kg/s
const double Planck = 6.62607015e-34; // J-s
const double Planck_bar = Planck / (2 * Pi); // m2-kg/s
/// log(k/h)
const doublereal logBoltz_Planck = std::log(Boltzmann / Planck); // ln(k_B/h)
const double logBoltz_Planck = std::log(Boltzmann / Planck); // ln(k_B/h)
/// Stefan-Boltzmann constant
const doublereal StefanBoltz = 5.670374419e-8;
const double StefanBoltz = 5.670374419e-8;
//@}
/// @name Electron Properties
//@{
const doublereal ElectronCharge = 1.602176634e-19; // C
const doublereal ElectronMass = 9.1093837015e-31; // kg
const doublereal Faraday = ElectronCharge * Avogadro;
const double ElectronCharge = 1.602176634e-19; // C
const double ElectronMass = 9.1093837015e-31; // kg
const double Faraday = ElectronCharge * Avogadro;
//@}
/// @name Electromagnetism
@ -99,16 +99,16 @@ const doublereal Faraday = ElectronCharge * Avogadro;
//@{
/// Speed of Light (m/s).
const doublereal lightSpeed = 299792458.0;
const double lightSpeed = 299792458.0;
//! Fine structure constant []
const doublereal fineStructureConstant = 7.2973525693e-3;
const double fineStructureConstant = 7.2973525693e-3;
/// Permeability of free space \f$ \mu_0 \f$ in N/A^2.
const doublereal permeability_0 = 2 * fineStructureConstant * Planck / (ElectronCharge * ElectronCharge * lightSpeed);
const double permeability_0 = 2 * fineStructureConstant * Planck / (ElectronCharge * ElectronCharge * lightSpeed);
/// Permittivity of free space \f$ \epsilon_0 \f$ in F/m.
const doublereal epsilon_0 = 1.0 / (lightSpeed * lightSpeed * permeability_0);
const double epsilon_0 = 1.0 / (lightSpeed * lightSpeed * permeability_0);
//@}
//@}
@ -128,15 +128,15 @@ const int VT = -100, PH = -101, PS = -102, VP = -103, PT = -104,
//@}
//! smallest number to compare to zero.
const doublereal SmallNumber = 1.e-300;
const double SmallNumber = 1.e-300;
//! largest number to compare to inf.
const doublereal BigNumber = 1.e300;
const double BigNumber = 1.e300;
//! largest x such that exp(x) is valid
const doublereal MaxExp = 690.775527898;
const double MaxExp = 690.775527898;
//! Fairly random number to be used to initialize variables against
//! to see if they are subsequently defined.
const doublereal Undef = -999.1234;
const double Undef = -999.1234;
//! Small number to compare differences of mole fractions against.
/*!
@ -145,17 +145,17 @@ const doublereal Undef = -999.1234;
* used for the matrix inversion of transport properties when mole fractions
* must be positive.
*/
const doublereal Tiny = 1.e-20;
const double Tiny = 1.e-20;
//! Map connecting a string name with a double.
/*!
* This is used mostly to assign concentrations and mole fractions to species.
*/
typedef std::map<std::string, doublereal> compositionMap;
typedef std::map<std::string, double> compositionMap;
//! Map from string names to doubles. Used for defining species mole/mass
//! fractions, elemental compositions, and reaction stoichiometries.
typedef std::map<std::string, doublereal> Composition;
typedef std::map<std::string, double> Composition;
//! Turn on the use of stl vectors for the basic array type within cantera
//! Vector of doubles.