GRINS-0.7.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

unsigned int _dim
 
const VelocityFEVariables_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<VelocityFEVariables>(VariablesParsing::velocity_section())),
49  _press_var(GRINSPrivate::VariableWarehouse::get_variable_subclass<PressureFEVariable>(VariablesParsing::pressure_section()))
50  {}
const PressureFEVariable & _press_var
const VelocityFEVariables & _flow_vars
static std::string velocity_section()
static std::string pressure_section()
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)

Definition at line 52 of file spalart_allmaras_helper.C.

References _dim.

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

53  {
54  this->_dim = system->get_mesh().mesh_dimension();
55  }
libMesh::Real GRINS::SpalartAllmarasHelper::vorticity ( AssemblyContext context,
unsigned int  qp 
) const

Definition at line 57 of file spalart_allmaras_helper.C.

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

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

58  {
59  libMesh::Gradient grad_u, grad_v;
60  grad_u = context.interior_gradient(this->_flow_vars.u(), qp);
61  grad_v = context.interior_gradient(this->_flow_vars.v(), qp);
62 
63  libMesh::Real vorticity_value;
64  vorticity_value = fabs(grad_v(0) - grad_u(1));
65 
66  if(this->_dim == 3)
67  {
68  libMesh::Gradient grad_w;
69  grad_w = context.interior_gradient(this->_flow_vars.w(), qp);
70 
71  libMesh::Real vorticity_component_0 = grad_w(1) - grad_v(2);
72  libMesh::Real vorticity_component_1 = grad_u(2) - grad_v(0);
73 
74  libMesh::Real term = vorticity_component_0*vorticity_component_0
75  + vorticity_component_1*vorticity_component_1
76  + vorticity_value*vorticity_value;
77 
78  vorticity_value += std::sqrt(term);
79  }
80 
81  return vorticity_value;
82  }
const VelocityFEVariables & _flow_vars

Member Data Documentation

unsigned int GRINS::SpalartAllmarasHelper::_dim
protected

Definition at line 57 of file spalart_allmaras_helper.h.

Referenced by init_variables(), and vorticity().

const VelocityFEVariables& GRINS::SpalartAllmarasHelper::_flow_vars
protected

Definition at line 60 of file spalart_allmaras_helper.h.

Referenced by vorticity().

const PressureFEVariable& GRINS::SpalartAllmarasHelper::_press_var
protected

Definition at line 61 of file spalart_allmaras_helper.h.


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

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