https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ADVectorVelocityComponentAux.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
13
16{
18 params.addRequiredCoupledVar("arhoA", "alpha*rho*A");
19 params.addRequiredCoupledVar("arhouA", "alpha*rho*u*A");
20 params.addRequiredParam<MaterialPropertyName>("direction",
21 "Directional vector of 1D elements in 3D space");
22 params.addRequiredParam<unsigned int>("component", "The vector component of interest");
23 params.addClassDescription("Computes the velocity from the 1D phase-fraction and area weighted "
24 "momentum and density variables.");
25 return params;
26}
27
29 : AuxKernel(parameters),
30 _arhoA(coupledValue("arhoA")),
31 _arhouA(coupledValue("arhouA")),
32 _dir(getMaterialProperty<RealVectorValue>("direction")),
33 _component(getParam<unsigned int>("component"))
34{
35 if (isNodal())
36 mooseError(name(), ": Does not support nodal variables.");
37}
38
39Real
registerMooseObject("ThermalHydraulicsApp", ADVectorVelocityComponentAux)
void ErrorVector unsigned int
Computes the component of a vector (given by its magnitude and direction)
const MaterialProperty< RealVectorValue > & _dir
Direction.
const unsigned int _component
Vector component to use.
const VariableValue & _arhoA
Solution variable arhoA.
const VariableValue & _arhouA
Solution variable arhouA.
ADVectorVelocityComponentAux(const InputParameters &parameters)
static InputParameters validParams()
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
const std::string & name() const
void mooseError(Args &&... args) const