www.mooseframework.org
NSVelocityAux.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
16 template <>
17 InputParameters
19 {
20  InputParameters params = validParams<AuxKernel>();
21  params.addClassDescription("Velocity auxiliary value.");
22  params.addRequiredCoupledVar(NS::density, "Density (conserved form)");
23  params.addRequiredCoupledVar("momentum", "Momentum (conserved form)");
24  params.addParam<UserObjectName>(
25  "fluid_properties", "", "The name of the user object for fluid properties");
26  return params;
27 }
28 
29 NSVelocityAux::NSVelocityAux(const InputParameters & parameters)
30  : AuxKernel(parameters), _rho(coupledValue(NS::density)), _momentum(coupledValue("momentum"))
31 {
32 }
33 
34 Real
36 {
37  return _momentum[_qp] / _rho[_qp];
38 }
validParams< NSVelocityAux >
InputParameters validParams< NSVelocityAux >()
Definition: NSVelocityAux.C:18
registerMooseObject
registerMooseObject("NavierStokesApp", NSVelocityAux)
NSVelocityAux::_momentum
const VariableValue & _momentum
Definition: NSVelocityAux.h:38
NSVelocityAux::_rho
const VariableValue & _rho
Definition: NSVelocityAux.h:37
NSVelocityAux
Velocity auxiliary value.
Definition: NSVelocityAux.h:23
NS
Definition: NS.h:14
NS::density
const std::string density
Definition: NS.h:16
NSVelocityAux::NSVelocityAux
NSVelocityAux(const InputParameters &parameters)
Factory constructor, takes parameters so that all derived classes can be built using the same constru...
Definition: NSVelocityAux.C:29
NSVelocityAux::computeValue
virtual Real computeValue()
Definition: NSVelocityAux.C:35
NS.h
NSVelocityAux.h