GRINS-0.6.0
antioch_mixture.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_mixture.h"
32 
33 // libMesh
34 #include "libmesh/getpot.h"
35 
36 // Antioch
37 #include "antioch/read_reaction_set_data_xml.h"
38 #include "antioch/cea_mixture_ascii_parsing.h"
39 #include "antioch/stat_mech_thermo.h"
40 
41 namespace GRINS
42 {
43  AntiochMixture::AntiochMixture( const GetPot& input )
44  : AntiochChemistry(input),
45  _reaction_set( new Antioch::ReactionSet<libMesh::Real>( (*_antioch_gas.get()) ) ),
46  _cea_mixture( new Antioch::CEAThermoMixture<libMesh::Real>( (*_antioch_gas.get()) ) )
47  {
48  if( !input.have_variable("Physics/Chemistry/chem_file") )
49  {
50  std::cerr << "Error: Must specify XML chemistry file to use Antioch." << std::endl;
51  libmesh_error();
52  }
53 
54  std::string xml_filename = input( "Physics/Chemistry/chem_file", "DIE!");
55  bool verbose_read = input("screen-options/verbose_kinetics_read", false );
56 
57  Antioch::read_reaction_set_data_xml<libMesh::Real>( xml_filename, verbose_read, *_reaction_set.get() );
58 
59  Antioch::read_cea_mixture_data_ascii_default( *_cea_mixture.get() );
60 
62 
63  return;
64  }
65 
67  {
68  return;
69  }
70 
72  {
73  Antioch::StatMechThermodynamics<libMesh::Real> thermo( *(this->_antioch_gas.get()) );
74 
75  _h_stat_mech_ref_correction.resize(this->n_species());
76 
77  for( unsigned int s = 0; s < this->n_species(); s++ )
78  {
79  _h_stat_mech_ref_correction[s] = -thermo.h_tot( s, 298.15 ) + thermo.e_0(s);
80  }
81 
82  return;
83  }
84 
85 }// end namespace GRINS
86 
87 #endif // GRINS_HAVE_ANTIOCH
unsigned int n_species() const
boost::scoped_ptr< Antioch::CEAThermoMixture< libMesh::Real > > _cea_mixture
Wrapper class for Antioch::ChemicalMixture.
boost::scoped_ptr< Antioch::ReactionSet< libMesh::Real > > _reaction_set
GRINS namespace.
void build_stat_mech_ref_correction()
std::vector< libMesh::Real > _h_stat_mech_ref_correction
boost::scoped_ptr< Antioch::ChemicalMixture< libMesh::Real > > _antioch_gas

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