https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ADReynoldsNumberMaterial.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
12#include "Numerics.h"
14#include "MathUtils.h"
15
17
20{
22
23 params.addParam<MaterialPropertyName>(
24 "Re", FlowModelSinglePhase::REYNOLDS_NUMBER, "Reynolds number property name");
25 params.addParam<MaterialPropertyName>(
26 "rho", FlowModelSinglePhase::DENSITY, "Density of the phase");
27 params.addParam<MaterialPropertyName>(
28 "vel", FlowModelSinglePhase::VELOCITY, "Velocity of the phase");
29 params.addParam<MaterialPropertyName>(
30 "D_h", FlowModelSinglePhase::HYDRAULIC_DIAMETER, "Hydraulic diameter");
31 params.addParam<MaterialPropertyName>(
32 "mu", FlowModelSinglePhase::DYNAMIC_VISCOSITY, "Dynamic viscosity of the phase");
33
34 params.addClassDescription("Computes Reynolds number as a material property");
35
36 return params;
37}
38
40 : Material(parameters),
41
42 _Re_name(getParam<MaterialPropertyName>("Re")),
43
44 _rho(getADMaterialProperty<Real>("rho")),
45
46 _vel(getADMaterialProperty<Real>("vel")),
47
48 _D_h(getADMaterialProperty<Real>("D_h")),
49
50 _mu(getADMaterialProperty<Real>("mu")),
51
52 _Re(declareADProperty<Real>(_Re_name))
53
54{
55}
56
57void
registerMooseObject("ThermalHydraulicsApp", ADReynoldsNumberMaterial)
Computes Reynolds number as a material property.
ADReynoldsNumberMaterial(const InputParameters &parameters)
static InputParameters validParams()
const ADMaterialProperty< Real > & _mu
Dynamic viscosity of the phase.
const ADMaterialProperty< Real > & _rho
Density of the phase.
const ADMaterialProperty< Real > & _vel
Velocity of the phase.
ADMaterialProperty< Real > & _Re
Reynolds.
const ADMaterialProperty< Real > & _D_h
Hydraulic diameter.
static const std::string DENSITY
static const std::string HYDRAULIC_DIAMETER
static const std::string VELOCITY
static const std::string REYNOLDS_NUMBER
static const std::string DYNAMIC_VISCOSITY
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
unsigned int _qp
static InputParameters validParams()
auto Reynolds(const T1 &volume_fraction, const T2 &rho, const T3 &vel, const T4 &D_h, const T5 &mu)
Compute Reynolds number.
Definition Numerics.h:118