LCOV - code coverage report
Current view: top level - src/materials - SaturationPressureMaterial.C (source / functions) Hit Total Coverage
Test: idaholab/moose fluid_properties: #31405 (292dce) with base fef103 Lines: 16 17 94.1 %
Date: 2025-09-04 07:53:14 Functions: 6 6 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 "SaturationPressureMaterial.h"
      11             : #include "TwoPhaseFluidProperties.h"
      12             : 
      13             : registerMooseObject("FluidPropertiesApp", SaturationPressureMaterial);
      14             : registerMooseObject("FluidPropertiesApp", ADSaturationPressureMaterial);
      15             : 
      16             : template <bool is_ad>
      17             : InputParameters
      18          90 : SaturationPressureMaterialTempl<is_ad>::validParams()
      19             : {
      20          90 :   InputParameters params = Material::validParams();
      21             : 
      22          90 :   params.addClassDescription("Computes saturation pressure at some temperature.");
      23             : 
      24         180 :   params.addRequiredParam<MaterialPropertyName>("T", "Temperature material property");
      25         180 :   params.addRequiredParam<MaterialPropertyName>(
      26             :       "p_sat", "Name to give saturation pressure material property");
      27             : 
      28         180 :   params.addRequiredParam<UserObjectName>("fp_2phase",
      29             :                                           "Two-phase fluid properties user object name");
      30             : 
      31          90 :   return params;
      32           0 : }
      33             : 
      34             : template <bool is_ad>
      35          72 : SaturationPressureMaterialTempl<is_ad>::SaturationPressureMaterialTempl(
      36             :     const InputParameters & parameters)
      37             :   : Material(parameters),
      38             : 
      39          72 :     _T(getGenericMaterialProperty<Real, is_ad>("T")),
      40         144 :     _p_sat_name(getParam<MaterialPropertyName>("p_sat")),
      41          72 :     _p_sat(declareGenericProperty<Real, is_ad>(_p_sat_name)),
      42             : 
      43         144 :     _fp_2phase(getUserObject<TwoPhaseFluidProperties>("fp_2phase"))
      44             : {
      45          72 : }
      46             : 
      47             : template <bool is_ad>
      48             : void
      49          12 : SaturationPressureMaterialTempl<is_ad>::computeQpProperties()
      50             : {
      51          12 :   _p_sat[_qp] = _fp_2phase.p_sat(_T[_qp]);
      52          12 : }

Generated by: LCOV version 1.14