GRINS-0.8.0
spalart_allmaras.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 
26 #ifndef GRINS_SPALART_ALLMARAS_H
27 #define GRINS_SPALART_ALLMARAS_H
28 
29 //GRINS
30 #include "grins/physics.h"
32 #include "grins/single_variable.h"
36 
37 //Utils
39 
40 //libMesh
41 #include "libmesh/mesh.h"
42 #include "libmesh/boundary_info.h"
43 #include "libmesh/serial_mesh.h"
44 #include "libmesh/boundary_mesh.h"
45 
46 namespace GRINS
47 {
48 
50 
56  template<class Viscosity>
57  class SpalartAllmaras : public TurbulenceModelsBase<Viscosity>
58  {
59  public:
60 
61  SpalartAllmaras(const std::string& physics_name, const GetPot& input);
62 
64 
65  virtual void init_variables( libMesh::FEMSystem* system );
66 
68  virtual void set_time_evolving_vars( libMesh::FEMSystem* system );
69 
70  // Context initialization
71  virtual void init_context( AssemblyContext& context );
72 
73  // Element time derivative
74  virtual void element_time_derivative( bool compute_jacobian,
75  AssemblyContext & context );
76 
77  // Mass matrix part(s)
78  virtual void mass_residual( bool compute_jacobian,
79  AssemblyContext & context );
80 
81  // A distance function to get distances from boundaries to qps
82  libMesh::UniquePtr<DistanceFunction> distance_function;
83 
84  // Boundary mesh objected that will be updated using the wall ids
85  libMesh::UniquePtr<libMesh::SerialMesh> boundary_mesh;
86 
87  // Registers all parameters in this physics and in its property
88  // classes
89  virtual void register_parameter
90  ( const std::string & param_name,
92  const;
93 
94  protected:
95 
96  // The flow variables
99  // These are defined for each physics
101 
102  // Spalart Allmaras Helper object
104 
107 
108  // Wall ids set, to be read in, tells us which bc_id's correspond to walls
109  std::set<libMesh::boundary_id_type> _wall_ids;
110 
111  // No of walls
112  unsigned int _no_of_walls;
113 
114  // Infinite distance case
116 
117  private:
118  SpalartAllmaras();
119  };
120 
121 } //End namespace block
122 
123 #endif // GRINS_SPALART_ALLMARAS_H
virtual void init_context(AssemblyContext &context)
Initialize context for added physics variables.
TurbulenceFEVariables & _turbulence_vars
libMesh::UniquePtr< DistanceFunction > distance_function
PressureFEVariable & _press_var
Physics class for Turbulence Models.
GRINS namespace.
SpalartAllmarasParameters _sa_params
Object handling the plethora of parameters.
virtual void init_variables(libMesh::FEMSystem *system)
Initialize variables for this physics.
SpalartAllmarasHelper _spalart_allmaras_helper
Physics class for Incompressible Navier-Stokes.
virtual void element_time_derivative(bool compute_jacobian, AssemblyContext &context)
Time dependent part(s) of physics for element interiors.
std::set< libMesh::boundary_id_type > _wall_ids
virtual void register_parameter(const std::string &param_name, libMesh::ParameterMultiAccessor< libMesh::Number > &param_pointer) const
Each subclass will register its copy of an independent.
VelocityVariable & _flow_vars
libMesh::UniquePtr< libMesh::SerialMesh > boundary_mesh
virtual void mass_residual(bool compute_jacobian, AssemblyContext &context)
Mass matrix part(s) for element interiors. All boundary terms lie within the time_derivative part...
Encapsulate Spalart-Allmaras model parameters.
virtual void set_time_evolving_vars(libMesh::FEMSystem *system)
Sets velocity variables to be time-evolving.

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