GRINS-0.7.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-2016 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"
37 
38 //Utils
40 
41 //libMesh
42 #include "libmesh/mesh.h"
43 #include "libmesh/boundary_info.h"
44 #include "libmesh/serial_mesh.h"
45 #include "libmesh/boundary_mesh.h"
46 
47 namespace GRINS
48 {
49 
51 
57  template<class Viscosity>
58  class SpalartAllmaras : public TurbulenceModelsBase<Viscosity>
59  {
60  public:
61 
62  SpalartAllmaras(const std::string& physics_name, const GetPot& input);
63 
65 
66  virtual void init_variables( libMesh::FEMSystem* system );
67 
69  virtual void set_time_evolving_vars( libMesh::FEMSystem* system );
70 
71  // Context initialization
72  virtual void init_context( AssemblyContext& context );
73 
74  // Element time derivative
75  virtual void element_time_derivative(bool compute_jacobian, AssemblyContext& context, CachedValues& /*cache*/);
76 
77  // Mass matrix part(s)
78  virtual void mass_residual( bool compute_jacobian,
79  AssemblyContext& context,
80  CachedValues& cache );
81 
82  // A distance function to get distances from boundaries to qps
83  libMesh::UniquePtr<DistanceFunction> distance_function;
84 
85  // Boundary mesh objected that will be updated using the wall ids
86  libMesh::UniquePtr<libMesh::SerialMesh> boundary_mesh;
87 
88  // Registers all parameters in this physics and in its property
89  // classes
90  virtual void register_parameter
91  ( const std::string & param_name,
93  const;
94 
95  protected:
96 
97  // The flow variables
100  // These are defined for each physics
102 
103  // Spalart Allmaras Helper object
105 
108 
109  // Wall ids set, to be read in, tells us which bc_id's correspond to walls
110  std::set<libMesh::boundary_id_type> _wall_ids;
111 
112  // No of walls
113  unsigned int _no_of_walls;
114 
115  // Infinite distance case
117 
118  private:
119  SpalartAllmaras();
120 
121  void register_variables();
122 
123  };
124 
125 } //End namespace block
126 
127 #endif // GRINS_SPALART_ALLMARAS_H
virtual void init_context(AssemblyContext &context)
Initialize context for added physics variables.
libMesh::UniquePtr< DistanceFunction > distance_function
PressureFEVariable _press_var
Physics class for Turbulence Models.
virtual void element_time_derivative(bool compute_jacobian, AssemblyContext &context, CachedValues &)
Time dependent part(s) of physics for element interiors.
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 mass_residual(bool compute_jacobian, AssemblyContext &context, CachedValues &cache)
Mass matrix part(s) for element interiors. All boundary terms lie within the time_derivative part...
TurbulenceFEVariables _turbulence_vars
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.
VelocityFEVariables _flow_vars
libMesh::UniquePtr< libMesh::SerialMesh > boundary_mesh
Encapsulate Spalart-Allmaras model parameters.
virtual void set_time_evolving_vars(libMesh::FEMSystem *system)
Sets velocity variables to be time-evolving.

Generated on Thu Jun 2 2016 21:52:27 for GRINS-0.7.0 by  doxygen 1.8.10