https://mooseframework.inl.gov
NSVelocityAux.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 // Navier-Stokes includes
11 #include "NSVelocityAux.h"
12 #include "NS.h"
13 
14 registerMooseObject("NavierStokesApp", NSVelocityAux);
15 
18 {
20  params.addClassDescription("Velocity auxiliary value.");
21  params.addRequiredCoupledVar(NS::density, "Density (conserved form)");
22  params.addRequiredCoupledVar("momentum", "Momentum (conserved form)");
23  params.addParam<UserObjectName>(
24  "fluid_properties", "", "The name of the user object for fluid properties");
25  return params;
26 }
27 
29  : AuxKernel(parameters), _rho(coupledValue(NS::density)), _momentum(coupledValue("momentum"))
30 {
31 }
32 
33 Real
35 {
36  return _momentum[_qp] / _rho[_qp];
37 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
static InputParameters validParams()
Factory constructor, takes parameters so that all derived classes can be built using the same constru...
Definition: NSVelocityAux.C:17
registerMooseObject("NavierStokesApp", NSVelocityAux)
static const std::string density
Definition: NS.h:33
Velocity auxiliary value.
Definition: NSVelocityAux.h:19
const VariableValue & _momentum
Definition: NSVelocityAux.h:36
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableValue & _rho
Definition: NSVelocityAux.h:35
NSVelocityAux(const InputParameters &parameters)
Definition: NSVelocityAux.C:28
virtual Real computeValue()
Definition: NSVelocityAux.C:34
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()