LCOV - code coverage report
Current view: top level - src/materials - ADWallHeatTransferCoefficientLyonMaterial.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #32971 (54bef8) with base c6cf66 Lines: 30 31 96.8 %
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 "ADWallHeatTransferCoefficientLyonMaterial.h"
      11             : #include "SinglePhaseFluidProperties.h"
      12             : #include "FlowModelSinglePhase.h"
      13             : #include "Numerics.h"
      14             : 
      15             : registerMooseObject("ThermalHydraulicsApp", ADWallHeatTransferCoefficientLyonMaterial);
      16             : 
      17             : InputParameters
      18          78 : ADWallHeatTransferCoefficientLyonMaterial::validParams()
      19             : {
      20          78 :   InputParameters params = Material::validParams();
      21         156 :   params.addParam<MaterialPropertyName>("Hw",
      22             :                                         FlowModelSinglePhase::HEAT_TRANSFER_COEFFICIENT_WALL,
      23             :                                         "Heat transfer coefficient material property");
      24         156 :   params.addParam<MaterialPropertyName>(
      25             :       "rho", FlowModelSinglePhase::DENSITY, "Density of the fluid");
      26         156 :   params.addParam<MaterialPropertyName>("vel", FlowModelSinglePhase::VELOCITY, "Fluid velocity");
      27         156 :   params.addParam<MaterialPropertyName>(
      28             :       "D_h", FlowModelSinglePhase::HYDRAULIC_DIAMETER, "Hydraulic diameter");
      29         156 :   params.addParam<MaterialPropertyName>(
      30             :       "cp", FlowModelSinglePhase::SPECIFIC_HEAT_CONSTANT_PRESSURE, "Specific heat of the fluid");
      31         156 :   params.addParam<MaterialPropertyName>(
      32             :       "mu", FlowModelSinglePhase::DYNAMIC_VISCOSITY, "Dynamic viscosity of the fluid");
      33         156 :   params.addParam<MaterialPropertyName>(
      34             :       "k", FlowModelSinglePhase::THERMAL_CONDUCTIVITY, "Heat conductivity of the fluid");
      35         156 :   params.addParam<MaterialPropertyName>(
      36             :       "T", FlowModelSinglePhase::TEMPERATURE, "Fluid temperature");
      37         156 :   params.addParam<MaterialPropertyName>("T_wall", FlowModel::TEMPERATURE_WALL, "Wall temperature");
      38          78 :   params.addClassDescription(
      39             :       "Computes wall heat transfer coefficient for liquid sodium using Lyon correlation");
      40          78 :   return params;
      41           0 : }
      42             : 
      43          60 : ADWallHeatTransferCoefficientLyonMaterial::ADWallHeatTransferCoefficientLyonMaterial(
      44          60 :     const InputParameters & parameters)
      45             :   : Material(parameters),
      46          60 :     _Hw(declareADProperty<Real>("Hw")),
      47         120 :     _rho(getADMaterialProperty<Real>("rho")),
      48         120 :     _vel(getADMaterialProperty<Real>("vel")),
      49         120 :     _D_h(getADMaterialProperty<Real>("D_h")),
      50         120 :     _k(getADMaterialProperty<Real>("k")),
      51         120 :     _mu(getADMaterialProperty<Real>("mu")),
      52         120 :     _cp(getADMaterialProperty<Real>("cp")),
      53         120 :     _T(getADMaterialProperty<Real>("T")),
      54         180 :     _T_wall(getADMaterialProperty<Real>("T_wall"))
      55             : {
      56          60 : }
      57             : 
      58             : void
      59        3086 : ADWallHeatTransferCoefficientLyonMaterial::computeQpProperties()
      60             : {
      61             :   using std::max, std::pow;
      62        3086 :   ADReal Pe = max(1.0, THM::Peclet(1., _cp[_qp], _rho[_qp], _vel[_qp], _D_h[_qp], _k[_qp]));
      63        9258 :   ADReal Nu = 7 + 0.025 * pow(Pe, 0.8);
      64        3086 :   _Hw[_qp] = THM::wallHeatTransferCoefficient(Nu, _k[_qp], _D_h[_qp]);
      65        3086 : }

Generated by: LCOV version 1.14