https://mooseframework.inl.gov
Loading...
Searching...
No Matches
INSQCriterionAux.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#include "INSQCriterionAux.h"
11
13
16{
18
19 params.addClassDescription("This class computes the Q criterion, a scalar which"
20 "aids in vortex identification in turbulent flows");
21 params.addCoupledVar("velocity", "The velocity component");
22 return params;
23}
24
26 : AuxKernel(parameters), _grad_velocity(coupledVectorGradient("velocity"))
27{
28}
29
30Real
32{
33 const Real symm_part = 2.0 * Utility::pow<2>(_grad_velocity[_qp](0, 0)) +
34 2.0 * Utility::pow<2>(_grad_velocity[_qp](1, 1)) +
35 2.0 * Utility::pow<2>(_grad_velocity[_qp](2, 2)) +
36 Utility::pow<2>(_grad_velocity[_qp](0, 2) + _grad_velocity[_qp](2, 0)) +
37 Utility::pow<2>(_grad_velocity[_qp](0, 1) + _grad_velocity[_qp](1, 0)) +
38 Utility::pow<2>(_grad_velocity[_qp](1, 2) + _grad_velocity[_qp](2, 1));
39 const Real antisymm_part =
40 Utility::pow<2>(_grad_velocity[_qp](0, 2) - _grad_velocity[_qp](2, 0)) +
41 Utility::pow<2>(_grad_velocity[_qp](0, 1) - _grad_velocity[_qp](1, 0)) +
42 Utility::pow<2>(_grad_velocity[_qp](1, 2) - _grad_velocity[_qp](2, 1));
43 return 0.5 * (antisymm_part - symm_part);
44}
registerMooseObject("NavierStokesApp", INSQCriterionAux)
static InputParameters validParams()
Computes the Q criterion as defined by the paper.
const VectorVariableGradient & _grad_velocity
virtual Real computeValue() override
static InputParameters validParams()
INSQCriterionAux(const InputParameters &parameters)
void addClassDescription(const std::string &doc_string)
void addCoupledVar(const std::string &name, const std::string &doc_string)