GRINS-0.8.0
antioch_mixture.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // GRINS - General Reacting Incompressible Navier-Stokes
5 //
6 // Copyright (C) 2014-2017 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 #ifndef GRINS_ANTIOCH_MIXTURE_H
27 #define GRINS_ANTIOCH_MIXTURE_H
28 
29 #include "grins_config.h"
30 
31 #ifdef GRINS_HAVE_ANTIOCH
32 
33 // GRINS
35 #include "grins/property_types.h"
36 
37 // libMesh
38 #include "libmesh/libmesh_common.h"
39 
40 // Antioch
41 #include "antioch/vector_utils_decl.h"
42 #include "antioch/vector_utils.h"
43 #include "antioch/chemical_mixture.h"
44 #include "antioch/nasa_mixture.h"
45 #include "antioch/cea_curve_fit.h"
46 #include "antioch/reaction_set.h"
47 
48 // libMesh forward declarations
49 class GetPot;
50 
51 namespace GRINS
52 {
54 
65  template <typename KineticsThermoCurveFit>
66  class AntiochMixture : public AntiochChemistry
67  {
68  public:
69 
71  AntiochMixture( const GetPot& input, const std::string& material );
72 
73 
75 
77  AntiochMixture( libMesh::UniquePtr<Antioch::ChemicalMixture<libMesh::Real> > & chem_mixture,
78  libMesh::UniquePtr<Antioch::ReactionSet<libMesh::Real> > & reaction_set,
79  libMesh::UniquePtr<Antioch::NASAThermoMixture<libMesh::Real,KineticsThermoCurveFit> > & nasa_mixture,
80  libMesh::Real min_T = -std::numeric_limits<libMesh::Real>::max(),
81  bool clip_negative_rho = false );
82 
83  virtual ~AntiochMixture(){};
84 
85  // Registers all parameters in this physics and in its property
86  // classes
87  virtual void register_parameter
88  ( const std::string & param_name,
90  const;
91 
92  const Antioch::ReactionSet<libMesh::Real>& reaction_set() const;
93 
94  const Antioch::NASAThermoMixture<libMesh::Real,KineticsThermoCurveFit> & nasa_mixture() const;
95 
96  libMesh::Real h_stat_mech_ref_correction( unsigned int species ) const;
97 
98  // Returns the minimum temperature at which reactions will be
99  // evaluated, in Kelvin
100  libMesh::Real minimum_T() const;
101 
102  // Returns true iff negative species densities are clipped to zero
103  // when calculating reaction rates.
104  bool clip_negative_rho() const;
105 
106  protected:
107 
108  libMesh::UniquePtr<Antioch::ReactionSet<libMesh::Real> > _reaction_set;
109 
110  libMesh::UniquePtr<Antioch::NASAThermoMixture<libMesh::Real,KineticsThermoCurveFit> > _nasa_mixture;
111 
112  std::vector<libMesh::Real> _h_stat_mech_ref_correction;
113 
115 
116  // Users can specify a minimum temperature at which to evaluate
117  // reaction rates. Some reaction equations give us NaNs at 0
118  // Kelvin or less, and solution "ringing" can result in those
119  // unphysical temperatures for some formulations near strong
120  // fronts.
121  //
122  // By default, temperatures are not clipped to any minimum.
123  libMesh::Real _minimum_T;
124 
125  // Users can request that negative densities be clipped to zero
126  // when evaluating reaction rates. Some reaction equations fail
127  // badly with negative densities input, and solution "ringing" can
128  // result in those unphysical densities for some formulations near
129  // strong fronts.
130  //
131  // By default, negative densities are not clipped to zero.
133 
134  private:
135 
136  AntiochMixture();
137 
138  };
139 
140  /* ------------------------- Inline Functions -------------------------*/
141  template <typename KineticsThermoCurveFit>
142  inline
143  const Antioch::ReactionSet<libMesh::Real>&
145  {
146  return *_reaction_set.get();
147  }
148 
149  template <typename KineticsThermoCurveFit>
150  inline
151  const Antioch::NASAThermoMixture<libMesh::Real,KineticsThermoCurveFit> &
153  {
154  return *_nasa_mixture.get();
155  }
156 
157  template <typename KineticsThermoCurveFit>
158  inline
159  libMesh::Real
161  {
162  return _h_stat_mech_ref_correction[species];
163  }
164 
165  template <typename KineticsThermoCurveFit>
166  inline
168  {
169  return _minimum_T;
170  }
171 
172  template <typename KineticsThermoCurveFit>
173  inline
175  {
176  return _clip_negative_rho;
177  }
178 
179 } // end namespace GRINS
180 
181 #endif // GRINS_HAVE_ANTIOCH
182 
183 #endif // GRINS_ANTIOCH_MIXTURE_H
libMesh::UniquePtr< Antioch::ReactionSet< libMesh::Real > > _reaction_set
bool clip_negative_rho() const
libMesh::Real minimum_T() const
std::vector< libMesh::Real > _h_stat_mech_ref_correction
libMesh::Real h_stat_mech_ref_correction(unsigned int species) const
GRINS namespace.
const Antioch::NASAThermoMixture< libMesh::Real, KineticsThermoCurveFit > & nasa_mixture() const
const Antioch::ReactionSet< libMesh::Real > & reaction_set() const
libMesh::UniquePtr< Antioch::NASAThermoMixture< libMesh::Real, KineticsThermoCurveFit > > _nasa_mixture
libMesh::Real _minimum_T
virtual void register_parameter(const std::string &param_name, libMesh::ParameterMultiAccessor< libMesh::Number > &param_pointer) const
Each subclass will register its copy of an independent.

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