GRINS-0.8.0
antioch_constant_transport_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_CONSTANT_TRANSPORT_MIXTURE_H
27 #define GRINS_ANTIOCH_CONSTANT_TRANSPORT_MIXTURE_H
28 
29 #include "grins_config.h"
30 
31 #ifdef GRINS_HAVE_ANTIOCH
32 
33 // Antioch
34 #include "antioch/constant_lewis_diffusivity.h"
35 
36 // GRINS
37 #include "grins/antioch_mixture.h"
38 #include "grins/property_types.h"
42 
43 // libMesh
44 #include "libmesh/libmesh_common.h"
45 #include "libmesh/getpot.h"
46 
47 namespace GRINS
48 {
50 
57  template<typename KineticsThermoCurveFit,typename Conductivity>
58  class AntiochConstantTransportMixture : public AntiochMixture<KineticsThermoCurveFit>
59  {
60  public:
61 
63  AntiochConstantTransportMixture( const GetPot & input, const std::string & material );
64 
66  AntiochConstantTransportMixture( libMesh::UniquePtr<Antioch::ChemicalMixture<libMesh::Real> > & chem_mixture,
67  libMesh::UniquePtr<Antioch::ReactionSet<libMesh::Real> > & reaction_set,
68  libMesh::UniquePtr<Antioch::NASAThermoMixture<libMesh::Real,KineticsThermoCurveFit> > & nasa_mixture,
69  libMesh::UniquePtr<ConstantViscosity> & visc,
70  libMesh::UniquePtr<Conductivity> & cond,
71  libMesh::UniquePtr<Antioch::ConstantLewisDiffusivity<libMesh::Real> > & diff,
72  libMesh::Real min_T = -std::numeric_limits<libMesh::Real>::max(),
73  bool clip_negative_rho = false );
74 
76 
77  libMesh::Real mu() const;
78 
79  const Conductivity& conductivity() const;
80 
81  const Antioch::ConstantLewisDiffusivity<libMesh::Real>& diffusivity() const;
82 
84 
85  protected:
86 
88 
91  libMesh::UniquePtr<ConstantViscosity> _mu;
92 
94  libMesh::UniquePtr<Conductivity> _conductivity;
95 
96  libMesh::UniquePtr<Antioch::ConstantLewisDiffusivity<libMesh::Real> > _diffusivity;
97 
98  /* Below we will specialize the specialized_build_* functions to the appropriate type.
99  This way, we can control how the cached transport objects get constructed
100  based on the template type. This is achieved by the dummy types forcing operator
101  overloading for each of the specialized types. */
102  void build_conductivity( const GetPot & input, const std::string & material )
103  { specialized_build_conductivity( input, material, _conductivity, conductivity_type<Conductivity>() ); }
104 
105  private:
106 
108 
109  void specialized_build_conductivity( const GetPot & input, const std::string & material,
110  libMesh::UniquePtr<ConstantConductivity> & conductivity,
112  {
113  conductivity.reset( new ConstantConductivity(input,material) );
114  }
115 
116  void specialized_build_conductivity( const GetPot & input, const std::string & material,
117  libMesh::UniquePtr<ConstantPrandtlConductivity> & conductivity,
119  {
120  conductivity.reset( new ConstantPrandtlConductivity(input,material) );
121  }
122 
123  };
124 
125  /* ------------------------- Inline Functions -------------------------*/
126  template<typename KineticsThermoCurveFit, typename Conductivity>
127  inline
128  libMesh::Real
130  {
131  return (*_mu)();
132  }
133 
134  template<typename KineticsThermoCurveFit, typename Conductivity>
135  inline
136  const Conductivity&
138  {
139  return *_conductivity.get();
140  }
141 
142  template<typename KineticsThermoCurveFit, typename Conductivity>
143  inline
144  const Antioch::ConstantLewisDiffusivity<libMesh::Real>&
146  {
147  return *_diffusivity.get();
148  }
149 
150 } // end namespace GRINS
151 
152 #endif // GRINS_HAVE_ANTIOCH
153 
154 #endif // GRINS_ANTIOCH_CONSTANT_TRANSPORT_MIXTURE_H
bool clip_negative_rho() const
Wrapper class for Antioch::ChemicalMixture.
libMesh::UniquePtr< Conductivity > _conductivity
Thermal conductivity.
GRINS namespace.
const Antioch::NASAThermoMixture< libMesh::Real, KineticsThermoCurveFit > & nasa_mixture() const
const Antioch::ReactionSet< libMesh::Real > & reaction_set() const
libMesh::UniquePtr< Antioch::ConstantLewisDiffusivity< libMesh::Real > > _diffusivity
void specialized_build_conductivity(const GetPot &input, const std::string &material, libMesh::UniquePtr< ConstantConductivity > &conductivity, conductivity_type< ConstantConductivity >)
Wrapper class for storing state for Antioch thermo and kinetics.
void build_conductivity(const GetPot &input, const std::string &material)
const Antioch::ConstantLewisDiffusivity< libMesh::Real > & diffusivity() const
void specialized_build_conductivity(const GetPot &input, const std::string &material, libMesh::UniquePtr< ConstantPrandtlConductivity > &conductivity, conductivity_type< ConstantPrandtlConductivity >)
Wrapper class for storing state for constant transport properties, including Antioch::ConstantLewisDi...
libMesh::UniquePtr< ConstantViscosity > _mu
Viscosity.

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