GRINS-0.6.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-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 #ifndef GRINS_SPALART_ALLMARAS_H
27 #define GRINS_SPALART_ALLMARAS_H
28 
29 //GRINS
30 #include "grins/physics.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, AssemblyContext& context, CachedValues& /*cache*/);
75 
76  // Mass matrix part(s)
77  virtual void mass_residual( bool compute_jacobian,
78  AssemblyContext& context,
79  CachedValues& cache );
80 
81  // A distance function to get distances from boundaries to qps
82  libMesh::AutoPtr<DistanceFunction> distance_function;
83 
84  // Boundary mesh objected that will be updated using the wall ids
85  libMesh::AutoPtr<libMesh::SerialMesh> boundary_mesh;
86 
87  protected:
88 
89  // The flow variables
91 
92  // These are defined for each physics
94 
95  // Spalart Allmaras Helper object
97 
100 
101  // Wall ids set, to be read in, tells us which bc_id's correspond to walls
102  std::set<libMesh::boundary_id_type> _wall_ids;
103 
104  // No of walls
105  unsigned int _no_of_walls;
106 
107  private:
108  SpalartAllmaras();
109 
110  };
111 
112 } //End namespace block
113 
114 #endif // GRINS_SPALART_ALLMARAS_H
virtual void init_context(AssemblyContext &context)
Initialize context for added physics variables.
libMesh::AutoPtr< DistanceFunction > distance_function
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.
libMesh::AutoPtr< libMesh::SerialMesh > boundary_mesh
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
Encapsulate Spalart-Allmaras model parameters.
PrimitiveFlowFEVariables _flow_vars
virtual void set_time_evolving_vars(libMesh::FEMSystem *system)
Sets velocity variables to be time-evolving.

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