Line data Source code
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 : 10 : #include "ADWallFrictionFunctionMaterial.h" 11 : #include "Function.h" 12 : 13 : registerMooseObject("ThermalHydraulicsApp", ADWallFrictionFunctionMaterial); 14 : 15 : InputParameters 16 15945 : ADWallFrictionFunctionMaterial::validParams() 17 : { 18 15945 : InputParameters params = Material::validParams(); 19 15945 : params.addClassDescription("Defines a Darcy friction factor equal to the value of the function " 20 : "at the local coordinates and time"); 21 : 22 31890 : params.addRequiredParam<MaterialPropertyName>("f_D", "Darcy friction factor material property"); 23 : 24 31890 : params.addRequiredParam<FunctionName>("function", "Darcy friction factor function"); 25 : 26 15945 : return params; 27 0 : } 28 : 29 12483 : ADWallFrictionFunctionMaterial::ADWallFrictionFunctionMaterial(const InputParameters & parameters) 30 : : Material(parameters), 31 : 32 12483 : _function(getFunction("function")), 33 : 34 12483 : _f_D_name(getParam<MaterialPropertyName>("f_D")), 35 24966 : _f_D(declareADProperty<Real>(_f_D_name)) 36 : { 37 12483 : } 38 : 39 : void 40 21472410 : ADWallFrictionFunctionMaterial::computeQpProperties() 41 : { 42 21472410 : _f_D[_qp] = _function.value(_t, _q_point[_qp]); 43 21472410 : }