Canoe
Comprehensive Atmosphere N' Ocean Engine
helium_thermo.cpp
Go to the documentation of this file.
1 
9 #include <sstream>
10 #include <stdexcept>
11 
12 #include "molecules.hpp"
13 
14 double Helium::nist_shomate_[7] = {20.78603, 4.850638E-10, -1.582916E-10,
15  1.525102E-11, 3.196347E-11, -6.197341,
16  151.3064};
17 
18 double Helium::cp_nist(double T) {
19  std::stringstream msg;
20  T = std::min(std::max(298., T), 600.);
21  // if (T < 298. || T > 600.) {
22  // msg << "ERROR: Temperature out of range in Helium::cp_nist" << std::endl;
23  // throw std::runtime_error(msg.str().c_str());
24  // }
25 
26  double *pdata = nist_shomate_;
27  double result;
28  T /= 1.E3;
29  result = pdata[0] + pdata[1] * T + pdata[2] * T * T + pdata[3] * T * T * T +
30  pdata[4] / (T * T);
31  return result;
32 }
33 
static double cp_nist(double T)
static double nist_shomate_[7]
Definition: molecules.hpp:148
double min(double x1, double x2, double x3)
Definition: core.h:16
double max(double x1, double x2, double x3)
Definition: core.h:19
Helium aHe