GRINS-0.6.0
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
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
 
PrimitiveFlowVariables _flow_vars
 

Private Member Functions

 SpalartAllmarasHelper ()
 

Detailed Description

Definition at line 38 of file spalart_allmaras_helper.h.

Constructor & Destructor Documentation

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

Definition at line 44 of file spalart_allmaras_helper.C.

45  : _flow_vars(input)
46  {}
virtual GRINS::SpalartAllmarasHelper::~SpalartAllmarasHelper ( )
inlinevirtual

Definition at line 44 of file spalart_allmaras_helper.h.

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

Member Function Documentation

void GRINS::SpalartAllmarasHelper::init_variables ( libMesh::FEMSystem *  system)

Definition at line 48 of file spalart_allmaras_helper.C.

References _dim, _flow_vars, and GRINS::PrimitiveFlowVariables::init().

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

49  {
50  this->_dim = system->get_mesh().mesh_dimension();
51 
52  this->_flow_vars.init(system);
53 
54  return;
55  }
virtual void init(libMesh::FEMSystem *system)
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::PrimitiveFlowVariables::u_var(), GRINS::PrimitiveFlowVariables::v_var(), and GRINS::PrimitiveFlowVariables::w_var().

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_var(), qp);
61  grad_v = context.interior_gradient(this->_flow_vars.v_var(), 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_var(), 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  }

Member Data Documentation

unsigned int GRINS::SpalartAllmarasHelper::_dim
protected

Definition at line 54 of file spalart_allmaras_helper.h.

Referenced by init_variables(), and vorticity().

PrimitiveFlowVariables GRINS::SpalartAllmarasHelper::_flow_vars
protected

Definition at line 57 of file spalart_allmaras_helper.h.

Referenced by init_variables(), and vorticity().


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

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