LCOV - code coverage report
Current view: top level - src/auxkernels - PrandtlNumberAux.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 17 18 94.4 %
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 "PrandtlNumberAux.h"
      11             : #include "SinglePhaseFluidProperties.h"
      12             : #include "Numerics.h"
      13             : 
      14             : registerMooseObject("ThermalHydraulicsApp", PrandtlNumberAux);
      15             : 
      16             : InputParameters
      17          41 : PrandtlNumberAux::validParams()
      18             : {
      19          41 :   InputParameters params = AuxKernel::validParams();
      20          41 :   params.addClassDescription("Computes the Prandtl number for the fluid in the simulation domain");
      21          82 :   params.addRequiredCoupledVar("v", "Specific volume");
      22          82 :   params.addRequiredCoupledVar("e", "Specific internal energy");
      23          82 :   params.addRequiredParam<UserObjectName>("fp",
      24             :                                           "The name of the user object with fluid properties");
      25          41 :   return params;
      26           0 : }
      27             : 
      28          22 : PrandtlNumberAux::PrandtlNumberAux(const InputParameters & parameters)
      29             :   : AuxKernel(parameters),
      30          22 :     _v(coupledValue("v")),
      31          22 :     _e(coupledValue("e")),
      32          44 :     _fp(getUserObject<SinglePhaseFluidProperties>("fp"))
      33             : {
      34          22 : }
      35             : 
      36             : Real
      37           9 : PrandtlNumberAux::computeValue()
      38             : {
      39           9 :   Real cp = _fp.cp_from_v_e(_v[_qp], _e[_qp]);
      40           9 :   Real mu = _fp.mu_from_v_e(_v[_qp], _e[_qp]);
      41           9 :   Real k = _fp.k_from_v_e(_v[_qp], _e[_qp]);
      42           9 :   return THM::Prandtl(cp, mu, k);
      43             : }

Generated by: LCOV version 1.14