LCOV - code coverage report
Current view: top level - src/materials - SodiumPropertiesMaterial.C (source / functions) Hit Total Coverage
Test: idaholab/moose fluid_properties: #31405 (292dce) with base fef103 Lines: 26 27 96.3 %
Date: 2025-09-04 07:53:14 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 "SodiumPropertiesMaterial.h"
      11             : 
      12             : registerMooseObject("FluidPropertiesApp", SodiumPropertiesMaterial);
      13             : 
      14             : InputParameters
      15         170 : SodiumPropertiesMaterial::validParams()
      16             : {
      17         170 :   InputParameters params = Material::validParams();
      18         170 :   params.addClassDescription(
      19             :       "Material properties for liquid sodium sampled from SodiumProperties.");
      20         340 :   params.addRequiredCoupledVar("temperature", "temperature (K)");
      21         340 :   params.addParam<UserObjectName>(
      22             :       "fp", "sodium", "The name of the user object with fluid properties");
      23         170 :   return params;
      24           0 : }
      25             : 
      26         132 : SodiumPropertiesMaterial::SodiumPropertiesMaterial(const InputParameters & parameters)
      27             :   : Material(parameters),
      28         132 :     _temperature(coupledValue("temperature")),
      29         132 :     _k(declareProperty<Real>("k")),
      30         132 :     _h(declareProperty<Real>("h")),
      31         132 :     _cp(declareProperty<Real>("cp")),
      32         132 :     _T_from_h(declareProperty<Real>("T_from_h")),
      33         132 :     _rho(declareProperty<Real>("rho")),
      34         132 :     _drho_dT(declareProperty<Real>("drho_dT")),
      35         132 :     _drho_dh(declareProperty<Real>("drho_dh")),
      36             : 
      37         264 :     _sodium(getUserObject<SodiumProperties>("fp"))
      38             : {
      39         132 : }
      40             : 
      41             : void
      42         126 : SodiumPropertiesMaterial::computeQpProperties()
      43             : {
      44         126 :   _k[_qp] = _sodium.k(_temperature[_qp]);
      45         126 :   _h[_qp] = _sodium.h(_temperature[_qp]);
      46         225 :   _cp[_qp] = _sodium.heatCapacity(_temperature[_qp]);
      47         126 :   _T_from_h[_qp] = _sodium.temperature(_h[_qp]);
      48         126 :   _rho[_qp] = _sodium.rho(_temperature[_qp]);
      49         126 :   _drho_dT[_qp] = _sodium.drho_dT(_temperature[_qp]);
      50         126 :   _drho_dh[_qp] = _sodium.drho_dh(_h[_qp]);
      51         126 : }

Generated by: LCOV version 1.14