LCOV - code coverage report
Current view: top level - src/postprocessors - PecletNumber.C (source / functions) Hit Total Coverage
Test: neams-th-coe/cardinal: be601f Lines: 9 11 81.8 %
Date: 2025-07-15 20:50:38 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /********************************************************************/
       2             : /*                  SOFTWARE COPYRIGHT NOTIFICATION                 */
       3             : /*                             Cardinal                             */
       4             : /*                                                                  */
       5             : /*                  (c) 2021 UChicago Argonne, LLC                  */
       6             : /*                        ALL RIGHTS RESERVED                       */
       7             : /*                                                                  */
       8             : /*                 Prepared by UChicago Argonne, LLC                */
       9             : /*               Under Contract No. DE-AC02-06CH11357               */
      10             : /*                With the U. S. Department of Energy               */
      11             : /*                                                                  */
      12             : /*             Prepared by Battelle Energy Alliance, LLC            */
      13             : /*               Under Contract No. DE-AC07-05ID14517               */
      14             : /*                With the U. S. Department of Energy               */
      15             : /*                                                                  */
      16             : /*                 See LICENSE for full restrictions                */
      17             : /********************************************************************/
      18             : 
      19             : #ifdef ENABLE_NEK_COUPLING
      20             : 
      21             : #include "PecletNumber.h"
      22             : #include "NekInterface.h"
      23             : 
      24             : registerMooseObject("CardinalApp", PecletNumber);
      25             : 
      26             : InputParameters
      27          90 : PecletNumber::validParams()
      28             : {
      29          90 :   InputParameters params = ReynoldsNumber::validParams();
      30          90 :   params.addClassDescription("Peclet number characteristic of the NekRS solution");
      31          90 :   return params;
      32           0 : }
      33             : 
      34          30 : PecletNumber::PecletNumber(const InputParameters & parameters) : ReynoldsNumber(parameters)
      35             : {
      36             :   // rhoCp and k don't get initialized if the temperature solve is turned off,
      37             :   // even if the temperature variable exists. Because the user could technically still
      38             :   // be setting these parameters manually in the .udf file (which we do ourselves
      39             :   // for testing), just throw an error if temperature doesn't exist at all
      40          30 :   if (!nekrs::hasTemperatureVariable())
      41           0 :     mooseError("This postprocessor cannot be used in NekRS problems "
      42             :                "without a temperature variable!");
      43          30 : }
      44             : 
      45             : Real
      46          92 : PecletNumber::getValue() const
      47             : {
      48          92 :   return ReynoldsNumber::getValue() * nekrs::Pr();
      49             : }
      50             : 
      51             : #endif

Generated by: LCOV version 1.14