LCOV - code coverage report
Current view: top level - src/ics - ViscosityIC.C (source / functions) Hit Total Coverage
Test: idaholab/moose subchannel: #31405 (292dce) with base fef103 Lines: 15 16 93.8 %
Date: 2025-09-04 07:58:06 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 "ViscosityIC.h"
      11             : #include "SinglePhaseFluidProperties.h"
      12             : 
      13             : registerMooseObject("SubChannelApp", ViscosityIC);
      14             : 
      15             : InputParameters
      16         674 : ViscosityIC::validParams()
      17             : {
      18         674 :   InputParameters params = InitialCondition::validParams();
      19         674 :   params.addClassDescription(
      20             :       "Computes viscosity of coolant based on initial conditions of pressure and temperature");
      21        1348 :   params.addRequiredCoupledVar("T", "Temperature [K]");
      22        1348 :   params.addRequiredParam<Real>("p", "Pressure [Pa]");
      23        1348 :   params.addRequiredParam<UserObjectName>("fp", "Fluid properties user object name");
      24         674 :   params.addClassDescription("Computes viscosity from specified pressure and temperature");
      25         674 :   return params;
      26           0 : }
      27             : 
      28         361 : ViscosityIC::ViscosityIC(const InputParameters & parameters)
      29             :   : InitialCondition(parameters),
      30         361 :     _T(coupledValue("T")),
      31         722 :     _P(getParam<Real>("p")),
      32         722 :     _fp(getUserObject<SinglePhaseFluidProperties>("fp"))
      33             : {
      34         361 : }
      35             : 
      36             : Real
      37      516104 : ViscosityIC::value(const Point & /*p*/)
      38             : {
      39      516104 :   return _fp.mu_from_p_T(_P, _T[_qp]);
      40             : }

Generated by: LCOV version 1.14