https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
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
34void
36{
37 using std::sqrt;
38 _D_h[_qp] = sqrt(4. * _area[_qp] / libMesh::pi);
39}
registerMooseObject("ThermalHydraulicsApp", ADHydraulicDiameterCircularMaterial)
Computes hydraulic diameter for a circular flow channel.
ADHydraulicDiameterCircularMaterial(const InputParameters &parameters)
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)
unsigned int _qp
static InputParameters validParams()
const Real pi