LCOV - code coverage report
Current view: top level - src/materials - ADTemperatureWall3EqnMaterial.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 17 19 89.5 %
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 "ADTemperatureWall3EqnMaterial.h"
      11             : 
      12             : registerMooseObject("ThermalHydraulicsApp", ADTemperatureWall3EqnMaterial);
      13             : 
      14             : InputParameters
      15         162 : ADTemperatureWall3EqnMaterial::validParams()
      16             : {
      17         162 :   InputParameters params = Material::validParams();
      18         162 :   params.addClassDescription("Computes the wall temperature from the fluid temperature, "
      19             :                              "the heat flux and the heat transfer coefficient");
      20         324 :   params.addRequiredParam<MaterialPropertyName>("T", "Fluid temperature");
      21         324 :   params.addRequiredParam<MaterialPropertyName>("Hw", "Heat transfer coefficient");
      22         324 :   params.addRequiredParam<MaterialPropertyName>("q_wall", "Wall heat flux");
      23             : 
      24         162 :   return params;
      25           0 : }
      26             : 
      27         126 : ADTemperatureWall3EqnMaterial::ADTemperatureWall3EqnMaterial(const InputParameters & parameters)
      28             :   : Material(parameters),
      29         126 :     _T_wall(declareADProperty<Real>("T_wall")),
      30         252 :     _q_wall(getADMaterialProperty<Real>("q_wall")),
      31         252 :     _Hw(getADMaterialProperty<Real>("Hw")),
      32         378 :     _T(getADMaterialProperty<Real>("T"))
      33             : {
      34         126 : }
      35             : 
      36             : void
      37         240 : ADTemperatureWall3EqnMaterial::computeQpProperties()
      38             : {
      39         240 :   if (_q_wall[_qp] == 0)
      40           0 :     _T_wall[_qp] = _T[_qp];
      41             :   else
      42             :   {
      43             :     mooseAssert(_Hw[_qp] != 0,
      44             :                 "The wall heat transfer coefficient is zero, yet the wall heat flux is nonzero.");
      45         480 :     _T_wall[_qp] = _q_wall[_qp] / _Hw[_qp] + _T[_qp];
      46             :   }
      47         240 : }

Generated by: LCOV version 1.14