GRINS-0.6.0
antioch_constant_transport_evaluator.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
32 
33 // GRINS
34 #include "grins/cached_values.h"
35 
36 namespace GRINS
37 {
38  template<typename Thermo, typename Conductivity>
40  : AntiochEvaluator<Thermo>( mixture ),
41  _mu( mixture.mu() ),
42  _conductivity( mixture.conductivity() ),
43  _diffusivity( mixture.diffusivity() )
44  {
45  return;
46  }
47 
48  template<typename Thermo, typename Conductivity>
50  {
51  return;
52  }
53 
54  template<typename Thermo, typename Conductivity>
56  unsigned int /*qp*/ )
57  {
58  return this->_mu;
59  }
60 
61  template<typename Thermo, typename Conductivity>
63  unsigned int qp )
64  {
65  libMesh::Real cp = this->cp( cache, qp );
66 
67  return _conductivity( _mu, cp );
68  }
69 
70  template<typename Thermo, typename Conductivity>
72  unsigned int qp,
73  libMesh::Real& mu,
74  libMesh::Real& k )
75  {
76  mu = _mu;
77 
78  libMesh::Real cp = this->cp( cache, qp );
79 
80  k = _conductivity( _mu, cp );
81  return;
82  }
83 
84  template<typename Thermo, typename Conductivity>
86  unsigned int qp,
87  std::vector<libMesh::Real>& D )
88  {
89  const libMesh::Real rho = cache.get_cached_values(Cache::MIXTURE_DENSITY)[qp];
90 
92  const libMesh::Real cp = this->cp(cache,qp);
93 
94  const libMesh::Real k = _conductivity( _mu, cp );
95 
96  this->D(rho,cp,k,D);
97 
98  return;
99  }
100 
101  template<typename Thermo, typename Conductivity>
102  libMesh::Real AntiochConstantTransportEvaluator<Thermo,Conductivity>::mu( const libMesh::Real /*T*/,
103  const std::vector<libMesh::Real>& /*Y*/ )
104  {
105  return _mu;
106  }
107 
108  template<typename Thermo, typename Conductivity>
109  libMesh::Real AntiochConstantTransportEvaluator<Thermo,Conductivity>::k( const libMesh::Real T,
110  const std::vector<libMesh::Real>& Y )
111  {
112  const libMesh::Real cp = this->cp( T, Y );
113 
114  return _conductivity( _mu, cp );
115  }
116 
117  template<typename Thermo, typename Conductivity>
118  void AntiochConstantTransportEvaluator<Thermo,Conductivity>::D( const libMesh::Real rho, const libMesh::Real cp,
119  const libMesh::Real k,
120  std::vector<libMesh::Real>& D )
121  {
122  std::fill( D.begin(), D.end(), _diffusivity.D(rho,cp,k) );
123 
124  return;
125  }
126 
127 } // end namespace GRINS
128 
129 #endif // GRINS_HAVE_ANTIOCH
Wrapper class for evaluating chemistry and thermo properties using Antioch.
void mu_and_k(const CachedValues &cache, unsigned int qp, libMesh::Real &mu, libMesh::Real &k)
GRINS namespace.
libMesh::Real k(const CachedValues &cache, unsigned int qp)
Wrapper class for storing state for constant transport properties, including Antioch::ConstantLewisDi...
libMesh::Real mu(const CachedValues &cache, unsigned int qp)
const std::vector< libMesh::Number > & get_cached_values(unsigned int quantity) const
Definition: cached_values.C:99
void D(const CachedValues &cache, unsigned int qp, std::vector< libMesh::Real > &D)

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