https://mooseframework.inl.gov
Loading...
Searching...
No Matches
WallFrictionChurchillMaterial.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.addRequiredCoupledVar("rhoA", "Mass equation variable: rho*A");
22 params.addRequiredCoupledVar("rhouA", "Momentum equation variable: rho*u*A");
23 params.addRequiredCoupledVar("rhoEA", "Total energy equation variable: rho*E*A");
24 params.addRequiredParam<MaterialPropertyName>("rho", "Density");
25 params.addRequiredParam<MaterialPropertyName>("vel", "x-component of the velocity");
26 params.addRequiredParam<MaterialPropertyName>("D_h", "hydraulic diameter");
27
28 params.addRequiredParam<MaterialPropertyName>("f_D", "Darcy friction factor material property");
29 params.addRequiredParam<MaterialPropertyName>("mu", "Dynamic viscosity material property");
30
31 params.addRequiredParam<Real>("roughness", "Surface roughness");
32 params.declareControllable("roughness");
33 return params;
34}
35
38 _f_D_name(getParam<MaterialPropertyName>("f_D")),
39 _f_D(declareProperty<Real>(_f_D_name)),
40 _df_D_drhoA(declarePropertyDerivativeTHM<Real>(_f_D_name, "rhoA")),
41 _df_D_drhouA(declarePropertyDerivativeTHM<Real>(_f_D_name, "rhouA")),
42 _df_D_drhoEA(declarePropertyDerivativeTHM<Real>(_f_D_name, "rhoEA")),
43
44 _mu(getMaterialProperty<Real>("mu")),
45 _rho(getMaterialProperty<Real>("rho")),
46 _vel(getMaterialProperty<Real>("vel")),
47 _D_h(getMaterialProperty<Real>("D_h")),
48 _roughness(getParam<Real>("roughness"))
49{
50}
51
52void
54{
55 Real Re = THM::Reynolds(1., _rho[_qp], _vel[_qp], _D_h[_qp], _mu[_qp]);
56
58
60 _df_D_drhoA[_qp] = 0;
61 _df_D_drhouA[_qp] = 0;
62 _df_D_drhoEA[_qp] = 0;
63}
const double Re
registerMooseObject("ThermalHydraulicsApp", WallFrictionChurchillMaterial)
void declareControllable(const std::string &name, std::set< ExecFlagType > execute_flags={})
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)
static InputParameters validParams()
Computes drag coefficient using the Churchill formula for Fanning friction factor.
const Real & _roughness
Roughness of the surface.
const MaterialProperty< Real > & _D_h
Hydraulic diameter.
const MaterialProperty< Real > & _vel
Velocity (x-component)
WallFrictionChurchillMaterial(const InputParameters &parameters)
const MaterialProperty< Real > & _mu
Dynamic viscosity.
const MaterialProperty< Real > & _rho
Density of the phase.
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.