LCOV - code coverage report
Current view: top level - src/materials - FluidPropertiesMaterialVE.C (source / functions) Hit Total Coverage
Test: idaholab/moose fluid_properties: #32971 (54bef8) with base c6cf66 Lines: 33 34 97.1 %
Date: 2026-05-29 20:36:28 Functions: 4 5 80.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         325 : FluidPropertiesMaterialVE::validParams()
      21             : {
      22         325 :   InputParameters params = Material::validParams();
      23         650 :   params.addRequiredCoupledVar("e", "Specific internal energy");
      24         650 :   params.addRequiredCoupledVar("v", "Specific volume");
      25         650 :   params.addRequiredParam<UserObjectName>("fp", "The name of the user object for fluid properties");
      26         325 :   params.addClassDescription(
      27             :       "Computes fluid properties using (specific internal energy, specific volume) formulation");
      28         325 :   return params;
      29           0 : }
      30             : 
      31         240 : FluidPropertiesMaterialVE::FluidPropertiesMaterialVE(const InputParameters & parameters)
      32             :   : Material(parameters),
      33         240 :     _e(coupledValue("e")),
      34         240 :     _v(coupledValue("v")),
      35             : 
      36         240 :     _p(declareProperty<Real>("pressure")),
      37         240 :     _T(declareProperty<Real>("temperature")),
      38         240 :     _c(declareProperty<Real>("c")),
      39         240 :     _cp(declareProperty<Real>("cp")),
      40         240 :     _cv(declareProperty<Real>("cv")),
      41         240 :     _mu(declareProperty<Real>("mu")),
      42         240 :     _k(declareProperty<Real>("k")),
      43         240 :     _s(declareProperty<Real>("s")),
      44         240 :     _g(declareProperty<Real>("g")),
      45             : 
      46         480 :     _fp(getUserObject<SinglePhaseFluidProperties>("fp"))
      47             : {
      48         240 : }
      49             : 
      50         240 : FluidPropertiesMaterialVE::~FluidPropertiesMaterialVE() {}
      51             : 
      52             : void
      53         913 : FluidPropertiesMaterialVE::computeQpProperties()
      54             : {
      55         913 :   _p[_qp] = _fp.p_from_v_e(_v[_qp], _e[_qp]);
      56         913 :   _T[_qp] = _fp.T_from_v_e(_v[_qp], _e[_qp]);
      57         913 :   _c[_qp] = _fp.c_from_v_e(_v[_qp], _e[_qp]);
      58         913 :   _cp[_qp] = _fp.cp_from_v_e(_v[_qp], _e[_qp]);
      59         913 :   _cv[_qp] = _fp.cv_from_v_e(_v[_qp], _e[_qp]);
      60         913 :   _mu[_qp] = _fp.mu_from_v_e(_v[_qp], _e[_qp]);
      61         913 :   _k[_qp] = _fp.k_from_v_e(_v[_qp], _e[_qp]);
      62         913 :   _s[_qp] = _fp.s_from_v_e(_v[_qp], _e[_qp]);
      63         913 :   _g[_qp] = _fp.g_from_v_e(_v[_qp], _e[_qp]);
      64         913 : }

Generated by: LCOV version 1.14