LCOV - code coverage report
Current view: top level - src/userobjects - ADHeatFluxFromHeatStructure3EqnUserObject.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 18 19 94.7 %
Date: 2025-07-30 13:02:48 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          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 "ADHeatFluxFromHeatStructure3EqnUserObject.h"
      11             : 
      12             : registerMooseObject("ThermalHydraulicsApp", ADHeatFluxFromHeatStructure3EqnUserObject);
      13             : 
      14             : InputParameters
      15         662 : ADHeatFluxFromHeatStructure3EqnUserObject::validParams()
      16             : {
      17         662 :   InputParameters params = ADHeatFluxFromHeatStructureBaseUserObject::validParams();
      18        1324 :   params.addRequiredParam<MaterialPropertyName>("T_wall", "Wall temperature");
      19        1324 :   params.addRequiredParam<MaterialPropertyName>("T", "Fluid temperature");
      20        1324 :   params.addRequiredParam<MaterialPropertyName>("Hw", "Convective heat transfer coefficient");
      21        1324 :   params.addParam<MooseFunctorName>("scale", 1.0, "Functor by which to scale the heat flux");
      22         662 :   params.addClassDescription(
      23             :       "Cache the heat flux between a single phase flow channel and a heat structure");
      24         662 :   return params;
      25           0 : }
      26             : 
      27         374 : ADHeatFluxFromHeatStructure3EqnUserObject::ADHeatFluxFromHeatStructure3EqnUserObject(
      28         374 :     const InputParameters & parameters)
      29             :   : ADHeatFluxFromHeatStructureBaseUserObject(parameters),
      30         374 :     _T_wall(getADMaterialProperty<Real>("T_wall")),
      31         748 :     _Hw(getADMaterialProperty<Real>("Hw")),
      32         748 :     _T(getADMaterialProperty<Real>("T")),
      33        1122 :     _scale(getFunctor<ADReal>("scale"))
      34             : {
      35         374 : }
      36             : 
      37             : ADReal
      38      323990 : ADHeatFluxFromHeatStructure3EqnUserObject::computeQpHeatFlux()
      39             : {
      40      323990 :   const Moose::ElemQpArg space_arg = {_current_elem, _qp, _qrule, _q_point[_qp]};
      41      647980 :   return _Hw[_qp] * (_T_wall[_qp] - _T[_qp]) * _scale(space_arg, Moose::currentState());
      42             : }

Generated by: LCOV version 1.14