www.mooseframework.org
NSVelocityAux.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 // Navier-Stokes includes
9 #include "NSVelocityAux.h"
10 #include "NS.h"
11 
12 template <>
13 InputParameters
15 {
16  InputParameters params = validParams<AuxKernel>();
17  params.addClassDescription("Velocity auxiliary value.");
18  params.addRequiredCoupledVar(NS::density, "Density (conserved form)");
19  params.addRequiredCoupledVar("momentum", "Momentum (conserved form)");
20  return params;
21 }
22 
23 NSVelocityAux::NSVelocityAux(const InputParameters & parameters)
24  : AuxKernel(parameters), _rho(coupledValue(NS::density)), _momentum(coupledValue("momentum"))
25 {
26 }
27 
28 Real
30 {
31  return _momentum[_qp] / _rho[_qp];
32 }
Definition: NS.h:13
InputParameters validParams< NSVelocityAux >()
Definition: NSVelocityAux.C:14
const std::string density
Definition: NS.h:15
const VariableValue & _momentum
Definition: NSVelocityAux.h:36
const VariableValue & _rho
Definition: NSVelocityAux.h:35
NSVelocityAux(const InputParameters &parameters)
Factory constructor, takes parameters so that all derived classes can be built using the same constru...
Definition: NSVelocityAux.C:23
virtual Real computeValue()
Definition: NSVelocityAux.C:29