GRINS-0.7.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-2016 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 Conductivity>
59  {
60  public:
61 
62  AntiochConstantTransportMixture( const GetPot& input, const std::string& material );
63 
65 
66  libMesh::Real mu() const;
67 
68  const Conductivity& conductivity() const;
69 
70  const Antioch::ConstantLewisDiffusivity<libMesh::Real>& diffusivity() const;
71 
73 
74  protected:
75 
77 
80  libMesh::UniquePtr<ConstantViscosity> _mu;
81 
83  libMesh::UniquePtr<Conductivity> _conductivity;
84 
85  libMesh::UniquePtr<Antioch::ConstantLewisDiffusivity<libMesh::Real> > _diffusivity;
86 
87  /* Below we will specialize the specialized_build_* functions to the appropriate type.
88  This way, we can control how the cached transport objects get constructed
89  based on the template type. This is achieved by the dummy types forcing operator
90  overloading for each of the specialized types. */
91  void build_conductivity( const GetPot& input, const std::string& material )
92  { specialized_build_conductivity( input, material, _conductivity, conductivity_type<Conductivity>() ); }
93 
94  private:
95 
97 
98  void specialized_build_conductivity( const GetPot& input, const std::string& material,
99  libMesh::UniquePtr<ConstantConductivity>& conductivity,
101  {
102  conductivity.reset( new ConstantConductivity(input,material) );
103  return;
104  }
105 
106  void specialized_build_conductivity( const GetPot& input, const std::string& material,
107  libMesh::UniquePtr<ConstantPrandtlConductivity>& conductivity,
109  {
110  conductivity.reset( new ConstantPrandtlConductivity(input,material) );
111  return;
112  }
113 
114  };
115 
116  /* ------------------------- Inline Functions -------------------------*/
117  template<typename Conductivity>
118  inline
120  {
121  return (*_mu)();
122  }
123 
124  template<typename Conductivity>
125  inline
127  {
128  return *_conductivity.get();
129  }
130 
131  template<typename Conductivity>
132  inline
133  const Antioch::ConstantLewisDiffusivity<libMesh::Real>& AntiochConstantTransportMixture<Conductivity>::diffusivity() const
134  {
135  return *_diffusivity.get();
136  }
137 
138 } // end namespace GRINS
139 
140 #endif // GRINS_HAVE_ANTIOCH
141 
142 #endif // GRINS_ANTIOCH_CONSTANT_TRANSPORT_MIXTURE_H
Wrapper class for Antioch::ChemicalMixture.
libMesh::UniquePtr< Antioch::ConstantLewisDiffusivity< libMesh::Real > > _diffusivity
libMesh::UniquePtr< ConstantViscosity > _mu
Viscosity.
GRINS namespace.
const Antioch::ConstantLewisDiffusivity< libMesh::Real > & diffusivity() const
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 specialized_build_conductivity(const GetPot &input, const std::string &material, libMesh::UniquePtr< ConstantPrandtlConductivity > &conductivity, conductivity_type< ConstantPrandtlConductivity >)
libMesh::UniquePtr< Conductivity > _conductivity
Thermal conductivity.
void build_conductivity(const GetPot &input, const std::string &material)
Wrapper class for storing state for constant transport properties, including Antioch::ConstantLewisDi...

Generated on Thu Jun 2 2016 21:52:28 for GRINS-0.7.0 by  doxygen 1.8.10