https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
46void
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("ThermalHydraulicsApp", ADWallFrictionChurchillMaterial)
const double Re
Computes drag coefficient using the Churchill formula for Fanning friction factor.
ADWallFrictionChurchillMaterial(const InputParameters &parameters)
const Real & _roughness
Roughness of the surface.
const ADMaterialProperty< Real > & _mu
Dynamic viscosity.
const ADMaterialProperty< Real > & _rho
Density of the phase.
const ADMaterialProperty< Real > & _vel
Velocity (x-component)
const ADMaterialProperty< Real > & _D_h
Hydraulic diameter.
void declareControllable(const std::string &name, std::set< ExecFlagType > execute_flags={})
void addRequiredParam(const std::string &name, const std::string &doc_string)
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
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.