GRINS-0.8.0
List of all members | Static Public Member Functions
GRINSTesting::ThermochemTestCommon Class Reference

#include <thermochem_test_common.h>

Static Public Member Functions

static libMesh::Real compute_mass_frac_mixture_prop (const std::vector< libMesh::Real > &properties, const std::vector< libMesh::Real > &mass_fracs)
 
static libMesh::Real arrhenius_rate (libMesh::Real A, libMesh::Real b, libMesh::Real Ea, libMesh::Real T)
 
static libMesh::Real compute_third_body_molar_density (const std::vector< libMesh::Real > &molar_densities, const std::vector< libMesh::Real > &three_body_efficiencies)
 
static libMesh::Real nasa7_cp_R_exact (libMesh::Real T, libMesh::Real a0, libMesh::Real a1, libMesh::Real a2, libMesh::Real a3, libMesh::Real a4)
 
static libMesh::Real nasa7_h_RT_exact (libMesh::Real T, libMesh::Real a0, libMesh::Real a1, libMesh::Real a2, libMesh::Real a3, libMesh::Real a4, libMesh::Real a5)
 
static libMesh::Real nasa7_s_R_exact (libMesh::Real T, libMesh::Real a0, libMesh::Real a1, libMesh::Real a2, libMesh::Real a3, libMesh::Real a4, libMesh::Real a6)
 
static libMesh::Real nasa9_cp_R_exact (libMesh::Real T, libMesh::Real a0, libMesh::Real a1, libMesh::Real a2, libMesh::Real a3, libMesh::Real a4, libMesh::Real a5, libMesh::Real a6)
 
static libMesh::Real nasa9_h_RT_exact (libMesh::Real T, libMesh::Real a0, libMesh::Real a1, libMesh::Real a2, libMesh::Real a3, libMesh::Real a4, libMesh::Real a5, libMesh::Real a6, libMesh::Real a7)
 
static libMesh::Real nasa9_s_R_exact (libMesh::Real T, libMesh::Real a0, libMesh::Real a1, libMesh::Real a2, libMesh::Real a3, libMesh::Real a4, libMesh::Real a5, libMesh::Real a6, libMesh::Real a8)
 

Detailed Description

Definition at line 40 of file thermochem_test_common.h.

Member Function Documentation

static libMesh::Real GRINSTesting::ThermochemTestCommon::arrhenius_rate ( libMesh::Real  A,
libMesh::Real  b,
libMesh::Real  Ea,
libMesh::Real  T 
)
inlinestatic

Definition at line 58 of file thermochem_test_common.h.

References GRINS::Constants::R_universal.

Referenced by GRINSTesting::KineticsTestBase::compute_reaction_rates().

62  {
63  libMesh::Real RT = GRINS::Constants::R_universal*T;
64 
65  return A*std::pow(T,b)*std::exp(-Ea/RT);
66  }
const libMesh::Real R_universal
Universal Gas Constant, R, [J/(kmol-K)].
static libMesh::Real GRINSTesting::ThermochemTestCommon::compute_mass_frac_mixture_prop ( const std::vector< libMesh::Real > &  properties,
const std::vector< libMesh::Real > &  mass_fracs 
)
inlinestatic

Definition at line 44 of file thermochem_test_common.h.

Referenced by GRINSTesting::NASAThermoTestBase::test_cp_common().

46  {
47  CPPUNIT_ASSERT_EQUAL( properties.size(), mass_fracs.size() );
48 
49  unsigned int size = properties.size();
50 
51  libMesh::Real mixed_value = 0.0;
52  for( unsigned int s = 0; s < size; s++ )
53  mixed_value += mass_fracs[s]*properties[s];
54 
55  return mixed_value;
56  }
static libMesh::Real GRINSTesting::ThermochemTestCommon::compute_third_body_molar_density ( const std::vector< libMesh::Real > &  molar_densities,
const std::vector< libMesh::Real > &  three_body_efficiencies 
)
inlinestatic

Definition at line 68 of file thermochem_test_common.h.

Referenced by GRINSTesting::KineticsTestBase::compute_reaction_rates().

70  {
71  CPPUNIT_ASSERT_EQUAL( molar_densities.size(), three_body_efficiencies.size() );
72 
73  libMesh::Real M = 0.0;
74 
75  for(unsigned int s = 0; s < molar_densities.size(); s++ )
76  M += molar_densities[s]*three_body_efficiencies[s];
77 
78  return M;
79  }
static libMesh::Real GRINSTesting::ThermochemTestCommon::nasa7_cp_R_exact ( libMesh::Real  T,
libMesh::Real  a0,
libMesh::Real  a1,
libMesh::Real  a2,
libMesh::Real  a3,
libMesh::Real  a4 
)
inlinestatic

Definition at line 81 of file thermochem_test_common.h.

Referenced by GRINSTesting::NASA7ThermoTestBase::cp_exact().

84  {
85  return a0 + a1*T + a2*T*T + a3*T*T*T + a4*(T*T*T*T);
86  }
static libMesh::Real GRINSTesting::ThermochemTestCommon::nasa7_h_RT_exact ( libMesh::Real  T,
libMesh::Real  a0,
libMesh::Real  a1,
libMesh::Real  a2,
libMesh::Real  a3,
libMesh::Real  a4,
libMesh::Real  a5 
)
inlinestatic

Definition at line 88 of file thermochem_test_common.h.

Referenced by GRINSTesting::NASA7ThermoTestBase::h_exact(), and GRINSTesting::NASA7ThermoTestBase::h_RT_exact().

91  {
92  return a0 + a1/2.0*T + a2/3.0*T*T + a3/4.0*T*T*T + a4/5.0*(T*T*T*T) + a5/T;
93  }
static libMesh::Real GRINSTesting::ThermochemTestCommon::nasa7_s_R_exact ( libMesh::Real  T,
libMesh::Real  a0,
libMesh::Real  a1,
libMesh::Real  a2,
libMesh::Real  a3,
libMesh::Real  a4,
libMesh::Real  a6 
)
inlinestatic

Definition at line 95 of file thermochem_test_common.h.

Referenced by GRINSTesting::NASA7ThermoTestBase::s_R_exact().

98  {
99  return a0*std::log(T) + a1*T + a2/2.0*T*T + a3/3.0*T*T*T + a4/4.0*(T*T*T*T) + a6;
100  }
static libMesh::Real GRINSTesting::ThermochemTestCommon::nasa9_cp_R_exact ( libMesh::Real  T,
libMesh::Real  a0,
libMesh::Real  a1,
libMesh::Real  a2,
libMesh::Real  a3,
libMesh::Real  a4,
libMesh::Real  a5,
libMesh::Real  a6 
)
inlinestatic

Definition at line 102 of file thermochem_test_common.h.

Referenced by GRINSTesting::NASA9ThermoTestBase::cp_exact().

105  {
106  return a0/(T*T) + a1/T + a2 + a3*T + a4*(T*T) + a5*(T*T*T) + a6*(T*T*T*T);
107  }
static libMesh::Real GRINSTesting::ThermochemTestCommon::nasa9_h_RT_exact ( libMesh::Real  T,
libMesh::Real  a0,
libMesh::Real  a1,
libMesh::Real  a2,
libMesh::Real  a3,
libMesh::Real  a4,
libMesh::Real  a5,
libMesh::Real  a6,
libMesh::Real  a7 
)
inlinestatic

Definition at line 109 of file thermochem_test_common.h.

Referenced by GRINSTesting::NASA9ThermoTestBase::h_exact(), and GRINSTesting::NASA9ThermoTestBase::h_RT_exact().

112  {
113  return -a0/(T*T) + a1*std::log(T)/T + a2 + a3*T/2.0 + a4*(T*T)/3.0
114  + a5*(T*T*T)/4.0 + a6*(T*T*T*T)/5.0 + a7/T;
115  }
static libMesh::Real GRINSTesting::ThermochemTestCommon::nasa9_s_R_exact ( libMesh::Real  T,
libMesh::Real  a0,
libMesh::Real  a1,
libMesh::Real  a2,
libMesh::Real  a3,
libMesh::Real  a4,
libMesh::Real  a5,
libMesh::Real  a6,
libMesh::Real  a8 
)
inlinestatic

Definition at line 117 of file thermochem_test_common.h.

Referenced by GRINSTesting::NASA9ThermoTestBase::s_R_exact().

120  {
121  return -a0/(2.*T*T) - a1/T + a2*std::log(T) + a3*T + a4*(T*T)/2.0
122  + a5*(T*T*T)/3.0 + a6*(T*T*T*T)/4.0 + a8;
123  }

The documentation for this class was generated from the following file:

Generated on Tue Dec 19 2017 12:47:33 for GRINS-0.8.0 by  doxygen 1.8.9.1