LCOV - code coverage report
Current view: top level - src/auxkernels - SoundSpeedAux.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #32971 (54bef8) with base c6cf66 Lines: 14 15 93.3 %
Date: 2026-05-29 20:41:18 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 "SoundSpeedAux.h"
      11             : #include "SinglePhaseFluidProperties.h"
      12             : 
      13             : registerMooseObject("ThermalHydraulicsApp", SoundSpeedAux);
      14             : 
      15             : InputParameters
      16          19 : SoundSpeedAux::validParams()
      17             : {
      18          19 :   InputParameters params = AuxKernel::validParams();
      19          38 :   params.addRequiredCoupledVar("v", "specific volume");
      20          38 :   params.addRequiredCoupledVar("e", "specific internal energy");
      21          38 :   params.addRequiredParam<UserObjectName>("fp", "The name of fluid properties object to use.");
      22          19 :   params.addClassDescription("Computes the speed of sound.");
      23             : 
      24          19 :   return params;
      25           0 : }
      26             : 
      27          10 : SoundSpeedAux::SoundSpeedAux(const InputParameters & parameters)
      28             :   : AuxKernel(parameters),
      29          10 :     _v(coupledValue("v")),
      30          10 :     _e(coupledValue("e")),
      31          20 :     _fp(getUserObject<SinglePhaseFluidProperties>("fp"))
      32             : {
      33          10 : }
      34             : 
      35             : Real
      36           6 : SoundSpeedAux::computeValue()
      37             : {
      38           6 :   return _fp.c_from_v_e(_v[_qp], _e[_qp]);
      39             : }

Generated by: LCOV version 1.14