33 #include "libmesh/getpot.h"
39 _kappa(input(
"Physics/"+
PhysicsNaming::spalart_allmaras()+
"/Parameters/kappa",0.41)),
40 _cv1(input(
"Physics/"+
PhysicsNaming::spalart_allmaras()+
"/Parameters/cv1",7.1)),
41 _cv2(input(
"Physics/"+
PhysicsNaming::spalart_allmaras()+
"/Parameters/cv2",0.7)),
42 _cv3(input(
"Physics/"+
PhysicsNaming::spalart_allmaras()+
"/Parameters/cv3",0.9)),
43 _cb1(input(
"Physics/"+
PhysicsNaming::spalart_allmaras()+
"/Parameters/cb1",0.1355)),
44 _sigma(input(
"Physics/"+
PhysicsNaming::spalart_allmaras()+
"/Parameters/sigma",2./3.)),
45 _cb2(input(
"Physics/"+
PhysicsNaming::spalart_allmaras()+
"/Parameters/cb2",0.622)),
47 _r_lin(input(
"Physics/"+
PhysicsNaming::spalart_allmaras()+
"/Parameters/r_lin",10.0)),
48 _c_w2(input(
"Physics/"+
PhysicsNaming::spalart_allmaras()+
"/Parameters/c_w2",0.3)),
49 _c_w3(input(
"Physics/"+
PhysicsNaming::spalart_allmaras()+
"/Parameters/c_w3",2.0)),
50 _c_t3(input(
"Physics/"+
PhysicsNaming::spalart_allmaras()+
"/Parameters/c_t3",1.2)),
51 _c_t4(input(
"Physics/"+
PhysicsNaming::spalart_allmaras()+
"/Parameters/c_t4",0.5)),
52 _c_n1(input(
"Physics/"+
PhysicsNaming::spalart_allmaras()+
"/Parameters/c_n1",16.0))
70 libMesh::Real wall_distance, libMesh::Real vorticity_value,
bool infinite_distance)
const
73 libMesh::Real chi = nu/mu;
76 libMesh::Real
fv1 = this->
fv1(chi);
79 libMesh::Real fv2 = 1 - (chi/(1 + chi*
fv1));
81 libMesh::Real S_bar = 0.0;
89 S_bar = nu/(pow(
_kappa, 2.0) * pow(wall_distance, 2.0))*(fv2) ;
93 libMesh::Real S = vorticity_value;
96 libMesh::Real S_tilde = 0.0;
97 if(S_bar >= -this->
_cv2*S)
103 S_tilde = S + (S*(pow(this->
_cv2,2.0)*S + this->
_cv3*S_bar))/((this->
_cv3 - (2*this->
_cv2))*S - S_bar);
110 libMesh::Real S_tilde,
bool infinite_distance)
const
113 libMesh::Real r = 0.0;
114 if(infinite_distance)
120 r = std::min(nu/(S_tilde*pow(this->
_kappa,2.0)*pow(wall_distance,2.0)), this->
_r_lin);
124 libMesh::Real g = r + this->
_c_w2*(pow(r,6.0) - r);
127 libMesh::Real fw = g*pow(((1 + pow(this->
_c_w3,6.0))/(pow(g,6.0) + pow(this->
_c_w3,6.0))), 1.0/6.0);
virtual void set_parameter(libMesh::Number ¶m_variable, const GetPot &input, const std::string ¶m_name, libMesh::Number param_default)
Each subclass can simultaneously read a parameter value from.
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.
static PhysicsName spalart_allmaras()
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
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
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.
SpalartAllmarasParameters()