GRINS-0.8.0
spalart_allmaras_parameters.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 #ifndef GRINS_SPALART_ALLMARAS_PARAMETERS_H
26 #define GRINS_SPALART_ALLMARAS_PARAMETERS_H
27 
28 // GRINS
29 #include "grins/parameter_user.h"
30 
31 // libMesh
32 #include "libmesh/libmesh.h"
33 class GetPot;
34 
35 namespace GRINS
36 {
38 
41  {
42  public:
43 
44  SpalartAllmarasParameters(const GetPot& input);
45 
47 
48  // The source function \f$ \tilde{S} \f$
49  libMesh::Real source_fn( libMesh::Number nu, libMesh::Real mu,
50  libMesh::Real wall_distance, libMesh::Real vorticity_value, bool infinite_distance) const;
51 
52  // The destruction function \f$ f_w(\nu) \f$
53  libMesh::Real destruction_fn( libMesh::Number nu, libMesh::Real wall_distance,
54  libMesh::Real S_tilde, bool infinite_distance) const;
55 
57 
58  libMesh::Real fv1( libMesh::Real chi ) const;
59 
60  libMesh::Real get_kappa() const
61  { return _kappa;}
62 
63  libMesh::Real get_cv1() const
64  { return _cv1;}
65 
66  libMesh::Real get_cv2() const
67  { return _cv2;}
68 
69  libMesh::Real get_cv3() const
70  { return _cv3;}
71 
72  libMesh::Real get_cb1() const
73  { return _cb1;}
74 
75  libMesh::Real get_cb2() const
76  { return _cb2;}
77 
78  libMesh::Real get_sigma() const
79  { return _sigma;}
80 
81  libMesh::Real get_c_w2() const
82  { return _c_w2;}
83 
84  libMesh::Real get_c_w3() const
85  { return _c_w3;}
86 
87  libMesh::Real get_r_lin() const
88  { return _r_lin;}
89 
90  libMesh::Real get_c_t3() const
91  { return _c_t3;}
92 
93  libMesh::Real get_c_t4() const
94  { return _c_t4;}
95 
96  libMesh::Real get_c_n1() const
97  { return _c_n1;}
98 
99  protected:
100 
102  libMesh::Real _kappa, _cv1, _cv2, _cv3;
103 
105  libMesh::Real _cb1, _sigma, _cb2;
106 
108  libMesh::Real _r_lin, _c_w2, _c_w3;
109 
111  // the source and destruction term)
112  libMesh::Real _c_t3, _c_t4;
113 
115  libMesh::Real _c_n1;
116 
117  private:
118 
120 
121  };
122 
123  inline
124  libMesh::Real SpalartAllmarasParameters::fv1( libMesh::Real chi ) const
125  {
126  libMesh::Real chi3 = chi*chi*chi;
127  libMesh::Real cv1 = this->get_cv1();
128  libMesh::Real cv13 = cv1*cv1*cv1;
129 
130  return chi3/(chi3 + cv13);
131  }
132 
133 } // end namespace GRINS
134 
135 #endif // GRINS_SPALART_ALLMARAS_PARAMETERS_H
libMesh::Real _r_lin
Constants specific to the calculation of the destruction function.
libMesh::Real _kappa
Constants specific to the calculation of the source function.
libMesh::Real _cb1
Spalart Allmaras model constants, the constant _cw1 are calculated, not cached.
libMesh::Real source_fn(libMesh::Number nu, libMesh::Real mu, libMesh::Real wall_distance, libMesh::Real vorticity_value, bool infinite_distance) const
GRINS namespace.
libMesh::Real _c_n1
Constants specific to the calculation of the negative S-A model.
ParameterUser base class. Utility methods for subclasses.
libMesh::Real destruction_fn(libMesh::Number nu, libMesh::Real wall_distance, libMesh::Real S_tilde, bool infinite_distance) const
Encapsulate Spalart-Allmaras model parameters.
libMesh::Real fv1(libMesh::Real chi) const
Helper function.
libMesh::Real _c_t3
Constants specific to the calculation of the trip function (but used in.

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