LCOV - code coverage report
Current view: top level - src/materials - ADSaturationTemperatureMaterial.C (source / functions) Hit Total Coverage
Test: idaholab/moose fluid_properties: #32971 (54bef8) with base c6cf66 Lines: 16 17 94.1 %
Date: 2026-05-29 20:36:28 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 "ADSaturationTemperatureMaterial.h"
      11             : #include "TwoPhaseFluidProperties.h"
      12             : 
      13             : registerMooseObject("FluidPropertiesApp", ADSaturationTemperatureMaterial);
      14             : 
      15             : InputParameters
      16          31 : ADSaturationTemperatureMaterial::validParams()
      17             : {
      18          31 :   InputParameters params = Material::validParams();
      19             : 
      20          62 :   params.addRequiredParam<MaterialPropertyName>("p", "Pressure material property");
      21          62 :   params.addRequiredParam<MaterialPropertyName>(
      22             :       "T_sat", "Name to give saturation temperature material property");
      23             : 
      24          62 :   params.addRequiredParam<UserObjectName>("fp_2phase",
      25             :                                           "Two-phase fluid properties user object name");
      26             : 
      27          31 :   params.addClassDescription("Computes saturation temperature at some pressure");
      28             : 
      29          31 :   return params;
      30           0 : }
      31             : 
      32          24 : ADSaturationTemperatureMaterial::ADSaturationTemperatureMaterial(const InputParameters & parameters)
      33             :   : Material(parameters),
      34             : 
      35          24 :     _p(getADMaterialProperty<Real>("p")),
      36          48 :     _T_sat_name(getParam<MaterialPropertyName>("T_sat")),
      37          24 :     _T_sat(declareADProperty<Real>(_T_sat_name)),
      38             : 
      39          48 :     _fp_2phase(getUserObject<TwoPhaseFluidProperties>("fp_2phase"))
      40             : {
      41          24 : }
      42             : 
      43             : void
      44           5 : ADSaturationTemperatureMaterial::computeQpProperties()
      45             : {
      46           5 :   _T_sat[_qp] = _fp_2phase.T_sat(_p[_qp]);
      47           5 : }

Generated by: LCOV version 1.14