GRINS-0.6.0
antioch_wilke_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 Viscosity, typename Conductivity, typename Diffusivity>
40  : AntiochEvaluator<Thermo>( mixture ),
41  _wilke_evaluator( new Antioch::WilkeEvaluator<Viscosity,Conductivity>( mixture.wilke_mixture(), mixture.viscosity(), mixture.conductivity() ) ),
42  _diffusivity( mixture.diffusivity() )
43  {
44  return;
45  }
46 
47  template<typename T, typename V, typename C, typename D>
49  {
50  return;
51  }
52 
53  template<typename Th, typename V, typename C, typename D>
54  libMesh::Real AntiochWilkeTransportEvaluator<Th,V,C,D>::mu( const CachedValues& cache, unsigned int qp )
55  {
56  const libMesh::Real T = cache.get_cached_values(Cache::TEMPERATURE)[qp];
57  const std::vector<libMesh::Real>& Y = cache.get_cached_vector_values(Cache::MASS_FRACTIONS)[qp];
58 
59  return this->mu( T, Y );
60  }
61 
62  template<typename Th, typename V, typename C, typename D>
63  libMesh::Real AntiochWilkeTransportEvaluator<Th,V,C,D>::k( const CachedValues& cache, unsigned int qp )
64  {
65  const libMesh::Real T = cache.get_cached_values(Cache::TEMPERATURE)[qp];
66  const std::vector<libMesh::Real>& Y = cache.get_cached_vector_values(Cache::MASS_FRACTIONS)[qp];
67 
68  return this->k( T, Y );
69  }
70 
71  template<typename Th, typename V, typename C, typename D>
73  libMesh::Real& mu, libMesh::Real& k )
74  {
75  const libMesh::Real T = cache.get_cached_values(Cache::TEMPERATURE)[qp];
76  const std::vector<libMesh::Real>& Y = cache.get_cached_vector_values(Cache::MASS_FRACTIONS)[qp];
77 
78  _wilke_evaluator->mu_and_k( T, Y, mu, k );
79  return;
80  }
81 
82  template<typename Th, typename V, typename C, typename D>
83  void AntiochWilkeTransportEvaluator<Th,V,C,D>::D( const CachedValues& cache, unsigned int qp,
84  std::vector<libMesh::Real>& D )
85  {
86  const libMesh::Real rho = cache.get_cached_values(Cache::MIXTURE_DENSITY)[qp];
87 
89  const libMesh::Real cp = this->cp(cache,qp);
90  const libMesh::Real k = this->k(cache,qp);
91 
92  this->D(rho,cp,k,D);
93 
94  return;
95  }
96 
97  template<typename Th, typename V, typename C, typename D>
98  libMesh::Real AntiochWilkeTransportEvaluator<Th,V,C,D>::mu( const libMesh::Real T,
99  const std::vector<libMesh::Real>& Y )
100  {
101  return _wilke_evaluator->mu( T, Y );
102  }
103 
104  template<typename Th, typename V, typename C, typename D>
105  libMesh::Real AntiochWilkeTransportEvaluator<Th,V,C,D>::k( const libMesh::Real T,
106  const std::vector<libMesh::Real>& Y )
107  {
108  return _wilke_evaluator->k( T, Y );
109  }
110 
111  template<typename Th, typename V, typename C, typename D>
112  void AntiochWilkeTransportEvaluator<Th,V,C,D>::D( const libMesh::Real rho, const libMesh::Real cp,
113  const libMesh::Real k,
114  std::vector<libMesh::Real>& D )
115  {
116  std::fill( D.begin(), D.end(), _diffusivity.D(rho,cp,k) );
117 
118  return;
119  }
120 
121 } // end namespace GRINS
122 
123 #endif // GRINS_HAVE_ANTIOCH
Wrapper class for evaluating chemistry and thermo properties using Antioch.
libMesh::Real mu(const CachedValues &cache, unsigned int qp)
void D(const CachedValues &cache, unsigned int qp, std::vector< libMesh::Real > &D)
GRINS namespace.
const std::vector< std::vector< libMesh::Number > > & get_cached_vector_values(unsigned int quantity) const
void mu_and_k(const CachedValues &cache, unsigned int qp, libMesh::Real &mu, libMesh::Real &k)
libMesh::Real k(const CachedValues &cache, unsigned int qp)
Wrapper class for storing state for computing Wilke transport properties using Antioch.
const std::vector< libMesh::Number > & get_cached_values(unsigned int quantity) const
Definition: cached_values.C:99

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