LCOV - code coverage report
Current view: top level - src/materials - FluidPropertiesMaterialVE.C (source / functions) Hit Total Coverage
Test: idaholab/moose fluid_properties: #31405 (292dce) with base fef103 Lines: 33 34 97.1 %
Date: 2025-09-04 07:53:14 Functions: 5 5 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 "FluidPropertiesMaterialVE.h"
      11             : #include "SinglePhaseFluidProperties.h"
      12             : 
      13             : registerMooseObject("FluidPropertiesApp", FluidPropertiesMaterialVE);
      14             : registerMooseObjectRenamed("FluidPropertiesApp",
      15             :                            FluidPropertiesMaterial,
      16             :                            "01/01/2023 00:00",
      17             :                            FluidPropertiesMaterialVE);
      18             : 
      19             : InputParameters
      20         619 : FluidPropertiesMaterialVE::validParams()
      21             : {
      22         619 :   InputParameters params = Material::validParams();
      23        1238 :   params.addRequiredCoupledVar("e", "Specific internal energy");
      24        1238 :   params.addRequiredCoupledVar("v", "Specific volume");
      25        1238 :   params.addRequiredParam<UserObjectName>("fp", "The name of the user object for fluid properties");
      26         619 :   params.addClassDescription(
      27             :       "Computes fluid properties using (specific internal energy, specific volume) formulation");
      28         619 :   return params;
      29           0 : }
      30             : 
      31         474 : FluidPropertiesMaterialVE::FluidPropertiesMaterialVE(const InputParameters & parameters)
      32             :   : Material(parameters),
      33         474 :     _e(coupledValue("e")),
      34         474 :     _v(coupledValue("v")),
      35             : 
      36         474 :     _p(declareProperty<Real>("pressure")),
      37         474 :     _T(declareProperty<Real>("temperature")),
      38         474 :     _c(declareProperty<Real>("c")),
      39         474 :     _cp(declareProperty<Real>("cp")),
      40         474 :     _cv(declareProperty<Real>("cv")),
      41         474 :     _mu(declareProperty<Real>("mu")),
      42         474 :     _k(declareProperty<Real>("k")),
      43         474 :     _s(declareProperty<Real>("s")),
      44         474 :     _g(declareProperty<Real>("g")),
      45             : 
      46         948 :     _fp(getUserObject<SinglePhaseFluidProperties>("fp"))
      47             : {
      48         474 : }
      49             : 
      50         948 : FluidPropertiesMaterialVE::~FluidPropertiesMaterialVE() {}
      51             : 
      52             : void
      53        1365 : FluidPropertiesMaterialVE::computeQpProperties()
      54             : {
      55        1365 :   _p[_qp] = _fp.p_from_v_e(_v[_qp], _e[_qp]);
      56        1365 :   _T[_qp] = _fp.T_from_v_e(_v[_qp], _e[_qp]);
      57        1365 :   _c[_qp] = _fp.c_from_v_e(_v[_qp], _e[_qp]);
      58        1365 :   _cp[_qp] = _fp.cp_from_v_e(_v[_qp], _e[_qp]);
      59        1365 :   _cv[_qp] = _fp.cv_from_v_e(_v[_qp], _e[_qp]);
      60        1365 :   _mu[_qp] = _fp.mu_from_v_e(_v[_qp], _e[_qp]);
      61        1365 :   _k[_qp] = _fp.k_from_v_e(_v[_qp], _e[_qp]);
      62        1365 :   _s[_qp] = _fp.s_from_v_e(_v[_qp], _e[_qp]);
      63        1365 :   _g[_qp] = _fp.g_from_v_e(_v[_qp], _e[_qp]);
      64        1365 : }

Generated by: LCOV version 1.14