https://mooseframework.inl.gov
ADHydraulicDiameterCircularMaterial.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.addClassDescription(
19  "Defines a circular-equivalent hydraulic diameter from the local area");
20  params.addRequiredParam<MaterialPropertyName>("D_h_name",
21  "Hydraulic diameter material property name");
22  params.addRequiredCoupledVar("A", "Cross-sectional area");
23  return params;
24 }
25 
27  const InputParameters & parameters)
28  : Material(parameters),
29  _D_h(declareADProperty<Real>(getParam<MaterialPropertyName>("D_h_name"))),
30  _area(adCoupledValue("A"))
31 {
32 }
33 
34 void
36 {
37  _D_h[_qp] = std::sqrt(4. * _area[_qp] / libMesh::pi);
38 }
void addRequiredParam(const std::string &name, const std::string &doc_string)
Computes hydraulic diameter for a circular flow channel.
unsigned int _qp
static InputParameters validParams()
ADHydraulicDiameterCircularMaterial(const InputParameters &parameters)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
registerMooseObject("ThermalHydraulicsApp", ADHydraulicDiameterCircularMaterial)
const Real pi