https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ADOneD3EqnMomentumGravity.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("A", "Cross-sectional area");
19 params.addRequiredParam<MaterialPropertyName>(
20 "direction", "The direction of the flow channel material property");
21 params.addRequiredParam<MaterialPropertyName>("rho", "Density property");
22 params.addRequiredParam<RealVectorValue>("gravity_vector", "Gravitational acceleration vector");
23 params.addClassDescription("Computes gravity term for the momentum equation for 1-phase flow");
24 return params;
25}
26
28 : ADKernel(parameters),
29 _A(adCoupledValue("A")),
30 _rho(getADMaterialProperty<Real>("rho")),
31 _dir(getMaterialProperty<RealVectorValue>("direction")),
32 _gravity_vector(getParam<RealVectorValue>("gravity_vector"))
33{
34}
35
registerMooseObject("ThermalHydraulicsApp", ADOneD3EqnMomentumGravity)
DualNumber< Real, DNDerivativeType, true > ADReal
const ADTemplateVariableTestValue< T > & _test
static InputParameters validParams()
Computes gravity term for the momentum equation for 1-phase flow.
const RealVectorValue & _gravity_vector
Gravitational acceleration vector.
static InputParameters validParams()
const ADMaterialProperty< Real > & _rho
const MaterialProperty< RealVectorValue > & _dir
The direction of the flow channel.
ADOneD3EqnMomentumGravity(const InputParameters &parameters)
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)
unsigned int _qp
unsigned int _i