GRINS-0.6.0
antioch_kinetics.C
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // GRINS - General Reacting Incompressible Navier-Stokes
5 //
6 // Copyright (C) 2014-2015 Paul T. Bauman, Roy H. Stogner
7 // Copyright (C) 2010-2013 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 
26 #include "grins_config.h"
27 
28 #ifdef GRINS_HAVE_ANTIOCH
29 
30 // This class
31 #include "grins/antioch_kinetics.h"
32 
33 // GRINS
34 #include "grins/antioch_mixture.h"
35 
36 // Antioch
37 #include "antioch/temp_cache.h"
38 #include "antioch/vector_utils.h"
39 
40 namespace GRINS
41 {
43  : _antioch_mixture( mixture ),
44  _antioch_kinetics( mixture.reaction_set(), 0 ),
45  _antioch_cea_thermo( mixture.cea_mixture() )
46  {
47  return;
48  }
49 
51  {
52  return;
53  }
54 
55  void AntiochKinetics::omega_dot( const Antioch::TempCache<libMesh::Real>& temp_cache,
56  const libMesh::Real rho,
57  const std::vector<libMesh::Real>& mass_fractions,
58  std::vector<libMesh::Real>& omega_dot )
59  {
60  const unsigned int n_species = _antioch_mixture.n_species();
61 
62  libmesh_assert_equal_to( mass_fractions.size(), n_species );
63  libmesh_assert_equal_to( omega_dot.size(), n_species );
64 
65  std::vector<libMesh::Real> h_RT_minus_s_R(n_species, 0.0);
66  std::vector<libMesh::Real> molar_densities(n_species, 0.0);
67 
68  _antioch_cea_thermo.h_RT_minus_s_R( temp_cache, h_RT_minus_s_R );
69 
70  _antioch_mixture.molar_densities( rho, mass_fractions, molar_densities );
71 
72  _antioch_kinetics.compute_mass_sources( temp_cache.T,
73  molar_densities,
74  h_RT_minus_s_R,
75  omega_dot );
76 
77  return;
78  }
79 
80 }// end namespace GRINS
81 
82 #endif // GRINS_HAVE_ANTIOCH
Antioch::KineticsEvaluator< libMesh::Real > _antioch_kinetics
unsigned int n_species() const
void omega_dot(const Antioch::TempCache< libMesh::Real > &temp_cache, const libMesh::Real rho, const std::vector< libMesh::Real > &mass_fractions, std::vector< libMesh::Real > &omega_dot)
void molar_densities(const libMesh::Real rho, const std::vector< libMesh::Real > &mass_fractions, std::vector< libMesh::Real > &molar_densities) const
Molar density for all species, [mol/m^3].
Antioch::CEAEvaluator< libMesh::Real > _antioch_cea_thermo
GRINS namespace.
Wrapper class for storing state for Antioch thermo and kinetics.
const AntiochMixture & _antioch_mixture

Generated on Mon Jun 22 2015 21:32:20 for GRINS-0.6.0 by  doxygen 1.8.9.1