GRINS-0.8.0
List of all members | Public Member Functions | Protected Attributes | Private Member Functions
GRINS::SpalartAllmarasHelper Class Reference

#include <spalart_allmaras_helper.h>

Collaboration diagram for GRINS::SpalartAllmarasHelper:
Collaboration graph
[legend]

Public Member Functions

 SpalartAllmarasHelper (const GetPot &input)
 
virtual ~SpalartAllmarasHelper ()
 
void init_variables (libMesh::FEMSystem *system)
 
libMesh::Real vorticity (AssemblyContext &context, unsigned int qp) const
 

Protected Attributes

const VelocityVariable_flow_vars
 
const PressureFEVariable_press_var
 

Private Member Functions

 SpalartAllmarasHelper ()
 

Detailed Description

Definition at line 41 of file spalart_allmaras_helper.h.

Constructor & Destructor Documentation

GRINS::SpalartAllmarasHelper::SpalartAllmarasHelper ( const GetPot &  input)

Definition at line 47 of file spalart_allmaras_helper.C.

48  : _flow_vars(GRINSPrivate::VariableWarehouse::get_variable_subclass<VelocityVariable>(VariablesParsing::velocity_variable_name(input,PhysicsNaming::spalart_allmaras(),VariablesParsing::PHYSICS))),
49  _press_var(GRINSPrivate::VariableWarehouse::get_variable_subclass<PressureFEVariable>(VariablesParsing::press_variable_name(input,PhysicsNaming::spalart_allmaras(),VariablesParsing::PHYSICS)))
50  {}
static PhysicsName spalart_allmaras()
static std::string velocity_variable_name(const GetPot &input, const std::string &subsection_name, const SECTION_TYPE section_type)
const PressureFEVariable & _press_var
static std::string press_variable_name(const GetPot &input, const std::string &subsection_name, const SECTION_TYPE section_type)
const VelocityVariable & _flow_vars
virtual GRINS::SpalartAllmarasHelper::~SpalartAllmarasHelper ( )
inlinevirtual

Definition at line 47 of file spalart_allmaras_helper.h.

47 {};
GRINS::SpalartAllmarasHelper::SpalartAllmarasHelper ( )
private

Member Function Documentation

void GRINS::SpalartAllmarasHelper::init_variables ( libMesh::FEMSystem *  system)
libMesh::Real GRINS::SpalartAllmarasHelper::vorticity ( AssemblyContext context,
unsigned int  qp 
) const

Definition at line 52 of file spalart_allmaras_helper.C.

References _flow_vars, GRINS::MultcomponentVectorVariable::u(), GRINS::MultcomponentVectorVariable::v(), and GRINS::MultcomponentVectorVariable::w().

Referenced by GRINS::SpalartAllmarasStabilizationHelper::compute_res_spalart_steady().

53  {
54  libMesh::Gradient grad_u, grad_v;
55  grad_u = context.interior_gradient(this->_flow_vars.u(), qp);
56  grad_v = context.interior_gradient(this->_flow_vars.v(), qp);
57 
58  libMesh::Real vorticity_value;
59  vorticity_value = fabs(grad_v(0) - grad_u(1));
60 
61  if(context.get_system().get_mesh().mesh_dimension() == 3)
62  {
63  libMesh::Gradient grad_w;
64  grad_w = context.interior_gradient(this->_flow_vars.w(), qp);
65 
66  libMesh::Real vorticity_component_0 = grad_w(1) - grad_v(2);
67  libMesh::Real vorticity_component_1 = grad_u(2) - grad_v(0);
68 
69  libMesh::Real term = vorticity_component_0*vorticity_component_0
70  + vorticity_component_1*vorticity_component_1
71  + vorticity_value*vorticity_value;
72 
73  vorticity_value += std::sqrt(term);
74  }
75 
76  return vorticity_value;
77  }
const VelocityVariable & _flow_vars

Member Data Documentation

const VelocityVariable& GRINS::SpalartAllmarasHelper::_flow_vars
protected

Definition at line 57 of file spalart_allmaras_helper.h.

Referenced by vorticity().

const PressureFEVariable& GRINS::SpalartAllmarasHelper::_press_var
protected

Definition at line 58 of file spalart_allmaras_helper.h.


The documentation for this class was generated from the following files:

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