LCOV - code coverage report
Current view: top level - src/userobjects - ADHeatFluxFromHeatStructure3EqnUserObject.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #32971 (54bef8) with base c6cf66 Lines: 18 19 94.7 %
Date: 2026-05-29 20:41:18 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         320 : ADHeatFluxFromHeatStructure3EqnUserObject::validParams()
      16             : {
      17         320 :   InputParameters params = ADHeatFluxFromHeatStructureBaseUserObject::validParams();
      18         640 :   params.addRequiredParam<MaterialPropertyName>("T_wall", "Wall temperature");
      19         640 :   params.addRequiredParam<MaterialPropertyName>("T", "Fluid temperature");
      20         640 :   params.addRequiredParam<MaterialPropertyName>("Hw", "Convective heat transfer coefficient");
      21         640 :   params.addParam<MooseFunctorName>("scale", 1.0, "Functor by which to scale the heat flux");
      22         320 :   params.addClassDescription(
      23             :       "Cache the heat flux between a single phase flow channel and a heat structure");
      24         320 :   return params;
      25           0 : }
      26             : 
      27         173 : ADHeatFluxFromHeatStructure3EqnUserObject::ADHeatFluxFromHeatStructure3EqnUserObject(
      28         173 :     const InputParameters & parameters)
      29             :   : ADHeatFluxFromHeatStructureBaseUserObject(parameters),
      30         173 :     _T_wall(getADMaterialProperty<Real>("T_wall")),
      31         346 :     _Hw(getADMaterialProperty<Real>("Hw")),
      32         346 :     _T(getADMaterialProperty<Real>("T")),
      33         519 :     _scale(getFunctor<ADReal>("scale"))
      34             : {
      35         173 : }
      36             : 
      37             : ADReal
      38      113006 : ADHeatFluxFromHeatStructure3EqnUserObject::computeQpHeatFlux()
      39             : {
      40      113006 :   const Moose::ElemQpArg space_arg = {_current_elem, _qp, _qrule, _q_point[_qp]};
      41      226012 :   return _Hw[_qp] * (_T_wall[_qp] - _T[_qp]) * _scale(space_arg, Moose::currentState());
      42             : }

Generated by: LCOV version 1.14