https://mooseframework.inl.gov
Loading...
Searching...
No Matches
INSStressComponentAux.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
11#include "MooseMesh.h"
12#include "NS.h"
13
15
18{
20
21 params.addClassDescription("This class computes the stress component based on "
22 "pressure and velocity for incompressible Navier-Stokes");
23 params.addCoupledVar("velocity", "The velocity component");
24 params.addCoupledVar(NS::pressure, 0, "The pressure");
25 params.addRangeCheckedParam<unsigned int>("comp", 0, "0<=comp<=2", "The component");
26 params.addParam<MaterialPropertyName>("mu_name", "mu", "The viscosity");
27
28 return params;
29}
30
32 : AuxKernel(parameters),
33 _grad_velocity(isCoupled("velocity") ? coupledGradient("velocity") : _grad_zero),
34 _pressure(coupledValue(NS::pressure)),
35 _comp(getParam<unsigned>("comp")),
36 _mu(getMaterialProperty<Real>("mu_name"))
37{
38}
39
40Real
registerMooseObject("NavierStokesApp", INSStressComponentAux)
static InputParameters validParams()
Computes h_min / |u|.
const MaterialProperty< Real > & _mu
static InputParameters validParams()
const VariableValue & _pressure
const VariableGradient & _grad_velocity
INSStressComponentAux(const InputParameters &parameters)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void addCoupledVar(const std::string &name, const std::string &doc_string)
void addRangeCheckedParam(const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)
static const std::string pressure
Definition NS.h:57