LCOV - code coverage report
Current view: top level - src/kernels - ADOneDEnergyWallHeating.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 16 17 94.1 %
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 "ADOneDEnergyWallHeating.h"
      11             : 
      12             : registerMooseObject("ThermalHydraulicsApp", ADOneDEnergyWallHeating);
      13             : 
      14             : InputParameters
      15        1203 : ADOneDEnergyWallHeating::validParams()
      16             : {
      17        1203 :   InputParameters params = ADKernel::validParams();
      18        2406 :   params.addRequiredCoupledVar("P_hf", "heat flux perimeter");
      19        2406 :   params.addCoupledVar("T_wall", "Wall temperature as a variable");
      20        2406 :   params.addRequiredParam<MaterialPropertyName>("Hw",
      21             :                                                 "Convective heat transfer coefficient, W/m^2-K");
      22        2406 :   params.addRequiredParam<MaterialPropertyName>("T", "Temperature material property");
      23        1203 :   params.addClassDescription(
      24             :       "Computes a convective heat flux term for the energy equation for 1-phase flow");
      25             : 
      26        1203 :   return params;
      27           0 : }
      28             : 
      29         649 : ADOneDEnergyWallHeating::ADOneDEnergyWallHeating(const InputParameters & parameters)
      30             :   : ADKernel(parameters),
      31         649 :     _temperature(getADMaterialProperty<Real>("T")),
      32        1298 :     _Hw(getADMaterialProperty<Real>("Hw")),
      33         649 :     _T_wall(adCoupledValue("T_wall")),
      34        1298 :     _P_hf(adCoupledValue("P_hf"))
      35             : {
      36         649 : }
      37             : 
      38             : ADReal
      39      271636 : ADOneDEnergyWallHeating::computeQpResidual()
      40             : {
      41      543272 :   return _Hw[_qp] * _P_hf[_qp] * (_temperature[_qp] - _T_wall[_qp]) * _test[_i][_qp];
      42             : }

Generated by: LCOV version 1.14