https://mooseframework.inl.gov
ADWallFrictionChurchillMaterial.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 #include "WallFrictionModels.h"
12 #include "Numerics.h"
13 
15 
18 {
20  params.addClassDescription("Computes the Darcy friction factor using the Churchill correlation.");
21  params.addRequiredParam<MaterialPropertyName>("rho", "Density");
22  params.addRequiredParam<MaterialPropertyName>("vel", "x-component of the velocity");
23  params.addRequiredParam<MaterialPropertyName>("D_h", "hydraulic diameter");
24 
25  params.addRequiredParam<MaterialPropertyName>("f_D", "Darcy friction factor material property");
26  params.addRequiredParam<MaterialPropertyName>("mu", "Dynamic viscosity material property");
27 
28  params.addParam<Real>("roughness", 0, "Surface roughness");
29  params.declareControllable("roughness");
30  return params;
31 }
32 
34  : Material(parameters),
35  _f_D_name(getParam<MaterialPropertyName>("f_D")),
36  _f_D(declareADProperty<Real>(_f_D_name)),
37 
38  _mu(getADMaterialProperty<Real>("mu")),
39  _rho(getADMaterialProperty<Real>("rho")),
40  _vel(getADMaterialProperty<Real>("vel")),
41  _D_h(getADMaterialProperty<Real>("D_h")),
42  _roughness(getParam<Real>("roughness"))
43 {
44 }
45 
46 void
48 {
49  ADReal Re = THM::Reynolds(1, _rho[_qp], _vel[_qp], _D_h[_qp], _mu[_qp]);
50 
52 
54 }
registerMooseObject("ThermalHydraulicsApp", ADWallFrictionChurchillMaterial)
const Real & _roughness
Roughness of the surface.
ADWallFrictionChurchillMaterial(const InputParameters &parameters)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
const ADMaterialProperty< Real > & _vel
Velocity (x-component)
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
const ADMaterialProperty< Real > & _D_h
Hydraulic diameter.
void addRequiredParam(const std::string &name, const std::string &doc_string)
unsigned int _qp
Real DarcyFrictionFactor(const Real &f_F)
Computes Darcy friction factor from Fanning friction factor.
Real FanningFrictionFactorChurchill(Real Re, Real roughness, Real D_h)
Computes Fanning friction factor using Churchill correlation.
static InputParameters validParams()
const ADMaterialProperty< Real > & _mu
Dynamic viscosity.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Computes drag coefficient using the Churchill formula for Fanning friction factor.
const ADMaterialProperty< Real > & _rho
Density of the phase.
void addClassDescription(const std::string &doc_string)
void declareControllable(const std::string &name, std::set< ExecFlagType > execute_flags={})