LCOV - code coverage report
Current view: top level - include/base - NS.h (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: 9fc4b0 Lines: 2 2 100.0 %
Date: 2025-08-14 10:14:56 Functions: 0 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             : #pragma once
      11             : 
      12             : #include <string>
      13             : #include "MathUtils.h"
      14             : #include "MooseTypes.h"
      15             : #include "libmesh/vector_value.h"
      16             : #include "HeatConductionNames.h"
      17             : 
      18             : namespace NS
      19             : {
      20             : using namespace HeatConduction;
      21             : 
      22             : static const std::string directions[3] = {"x", "y", "z"};
      23             : 
      24             : // geometric quantities
      25             : static const std::string pebble_diameter = "pebble_diameter";
      26             : static const std::string infinite_porosity = "infinite_porosity";
      27             : static const std::string axis = "axis";
      28             : static const std::string center = "center";
      29             : static const std::string wall_porosity = "wall_porosity";
      30             : static const std::string wall_distance = "wall_distance";
      31             : 
      32             : // Names defined in Navier-Stokes
      33             : static const std::string density = "rho";
      34             : static const std::string superficial_density = "superficial_rho";
      35             : static const std::string momentum_x = "rhou";
      36             : static const std::string momentum_y = "rhov";
      37             : static const std::string momentum_z = "rhow";
      38             : static const std::string momentum_vector[3] = {momentum_x, momentum_y, momentum_z};
      39             : static const std::string superficial_momentum_x = "superficial_rhou";
      40             : static const std::string superficial_momentum_y = "superficial_rhov";
      41             : static const std::string superficial_momentum_z = "superficial_rhow";
      42             : static const std::string superficial_momentum_vector[3] = {
      43             :     superficial_momentum_x, superficial_momentum_y, superficial_momentum_z};
      44             : 
      45             : static const std::string velocity = "velocity";
      46             : static const std::string velocity_x = "vel_x";
      47             : static const std::string velocity_y = "vel_y";
      48             : static const std::string velocity_z = "vel_z";
      49             : const std::string velocity_vector[3] = {velocity_x, velocity_y, velocity_z};
      50             : static const std::string superficial_velocity_x = "superficial_vel_x";
      51             : static const std::string superficial_velocity_y = "superficial_vel_y";
      52             : static const std::string superficial_velocity_z = "superficial_vel_z";
      53             : static const std::string superficial_velocity = "superficial_velocity";
      54             : static const std::string superficial_velocity_vector[3] = {
      55             :     superficial_velocity_x, superficial_velocity_y, superficial_velocity_z};
      56             : static const std::string pressure = "pressure";
      57             : // Starting variable name with pressure so it is displayed next to pressure in outputs
      58             : static const std::string total_pressure = "pressure_total";
      59             : static const std::string temperature = "temperature";
      60             : 
      61             : static const std::string internal_energy = "internal_energy";
      62             : static const std::string specific_internal_energy = "e";
      63             : static const std::string specific_total_energy = "et";
      64             : static const std::string internal_energy_density = "rho_e";
      65             : static const std::string total_energy_density = "rho_et";
      66             : static const std::string superficial_total_energy_density = "superficial_rho_et";
      67             : 
      68             : static const std::string specific_enthalpy = "h";
      69             : static const std::string specific_total_enthalpy = "ht";
      70             : static const std::string enthalpy_density = "rho_h";
      71             : static const std::string total_enthalpy_density = "rho_ht";
      72             : static const std::string superficial_total_enthalpy_density = "superficial_rho_ht";
      73             : 
      74             : static const std::string mixing_length = "mixing_length";
      75             : static const std::string wall_shear_stress = "wall_shear_stress";
      76             : static const std::string wall_yplus = "wall_yplus";
      77             : static const std::string eddy_viscosity = "eddy_viscosity";
      78             : static const std::string total_viscosity = "total_viscosity";
      79             : 
      80             : static const std::string mach_number = "Mach";
      81             : static const std::string specific_volume = "specific_volume";
      82             : 
      83             : static const std::string momentum = "momentum";
      84             : static const std::string v = "v";
      85             : static const std::string acceleration = "acceleration";
      86             : 
      87             : static const std::string fluid = "fp";
      88             : 
      89             : // for Navier-Stokes material props representing gradients of nonlin+aux vars
      90             : inline std::string
      91             : grad(const std::string & var)
      92             : {
      93       68820 :   return MathUtils::gradName(var);
      94             : }
      95             : // for Navier-Stokes material props representing time derivatives of nonlin+aux vars
      96             : inline std::string
      97             : time_deriv(const std::string & var)
      98             : {
      99       20060 :   return MathUtils::timeDerivName(var);
     100             : }
     101             : 
     102             : // Navier-Stokes Variables
     103             : // Relating to porous media
     104             : static const std::string porosity = "porosity";
     105             : static const std::string smoothed_porosity = "smoothed_porosity";
     106             : static const std::string T_fluid = "T_fluid";
     107             : static const std::string T_solid = "T_solid";
     108             : static const std::string heat_source = "heat_source";
     109             : 
     110             : // Navier-Stokes Materials
     111             : static const std::string cL = "Darcy_coefficient";
     112             : static const std::string cQ = "Forchheimer_coefficient";
     113             : static const std::string alpha_boussinesq = "alpha_b";
     114             : static const std::string drhos_dTs = "drhos_dTs";
     115             : static const std::string dks_dTs = "dks_dTs";
     116             : static const std::string kappa = "kappa";
     117             : static const std::string kappa_s = "kappa_s";
     118             : static const std::string rho_s = "rho_s";
     119             : static const std::string cp_s = "cp_s";
     120             : static const std::string k_s = "k_s";
     121             : static const std::string cp = "cp";
     122             : static const std::string cv = "cv";
     123             : static const std::string mu = "mu";
     124             : // Turbulent dynamic viscosity
     125             : static const std::string mu_t = "mu_t";
     126             : // Turbulent dynamic scalar viscosity
     127             : static const std::string mu_t_passive_scalar = "mu_t_passive_scalar";
     128             : // Effective viscosity = sum of viscosities
     129             : static const std::string mu_eff = "mu_eff";
     130             : static const std::string k = "k";
     131             : // Turbulence 'conductivity'
     132             : static const std::string k_t = "k_t";
     133             : static const std::string thermal_diffusivity = "thermal_diffusivity";
     134             : static const std::string alpha = "alpha";
     135             : static const std::string alpha_wall = "alpha_wall";
     136             : static const std::string solid = "solid";
     137             : static const std::string Prandtl = "Pr";
     138             : static const std::string turbulent_Prandtl = "Pr_t";
     139             : static const std::string Reynolds = "Re";
     140             : static const std::string Reynolds_hydraulic = "Re_h";
     141             : static const std::string Reynolds_interstitial = "Re_i";
     142             : static const std::string c = "c";
     143             : static const std::string speed = "speed";
     144             : static const std::string sound_speed = "sound_speed";
     145             : 
     146             : // Two phase mixture materials
     147             : static const std::string latent_heat = "latent_heat";
     148             : static const std::string T_liquidus = "T_liquidus";
     149             : static const std::string T_solidus = "T_solidus";
     150             : static const std::string alpha_exchange = "alpha_exchange";
     151             : 
     152             : // other Navier-Stokes terms
     153             : static const std::string component = "component";
     154             : static const std::string source_scaling = "source_scaling";
     155             : 
     156             : // SUPG terms
     157             : static const std::string matrix_tau = "matrix_tau";
     158             : static const std::string vector_tau = "vector_tau";
     159             : static const std::string scalar_tau = "scalar_tau";
     160             : static const std::string diagonal_tau = "diagonal_tau";
     161             : static const std::string A = "A";
     162             : static const std::string R = "R";
     163             : static const std::string S = "S";
     164             : static const std::string dS_dTs = "dS_dTs";
     165             : static const std::string F = "F";
     166             : static const std::string G = "G";
     167             : static const std::string dUdt = "dUdt";
     168             : static const std::string C = "C";
     169             : static const std::string Z = "Z";
     170             : static const std::string K = "K";
     171             : static const std::string mass_flux = "mass_flux";
     172             : 
     173             : // Turbulence
     174             : 
     175             : // Turbulence variables
     176             : static const std::string TKE = "tke";
     177             : static const std::string TKED = "epsilon";
     178             : 
     179             : /**
     180             :  * Wall treatment options
     181             :  */
     182             : enum class WallTreatmentEnum
     183             : {
     184             :   EQ_NEWTON = 0,
     185             :   EQ_INCREMENTAL = 1,
     186             :   EQ_LINEARIZED = 2,
     187             :   NEQ = 3
     188             : };
     189             : 
     190             : // Turbulence constants
     191             : static constexpr Real von_karman_constant = 0.4187;
     192             : static constexpr Real E_turb_constant = 9.793;
     193             : // Lower limit for mu_t
     194             : static constexpr Real mu_t_low_limit = 1.0e-8;
     195             : // Lower limit for epsilon in the k-epsilon
     196             : static constexpr Real epsilon_low_limit = 1.0e-8;
     197             : // Lower limit for y_plus
     198             : static constexpr Real min_y_plus = 1e-10;
     199             : }
     200             : 
     201             : namespace NS_DEFAULT_VALUES
     202             : {
     203             : static const Real infinite_porosity = 0.4;
     204             : static const int bed_axis = 2;
     205             : static const Real wall_porosity = 1.0;
     206             : 
     207             : static const Real k_epsilon = 1e-6;
     208             : static const Real vel_epsilon = 1e-8;
     209             : 
     210             : static const RealVectorValue center(0.0, 0.0, 0.0);
     211             : static const RealVectorValue acceleration(0.0, 0.0, 0.0);
     212             : 
     213             : // assumed that the RZ geometry is not annular unless otherwise specified
     214             : static const Real inner_radius = 0.0;
     215             : }
     216             : 
     217             : namespace NS_CONSTANTS
     218             : {
     219             : using namespace HeatConduction::Constants;
     220             : }

Generated by: LCOV version 1.14