LCOV - code coverage report
Current view: top level - src/Model/Gas - Gas.cpp (source / functions) Coverage Total Hit
Test: coverage_merged.info Lines: 60.0 % 20 12
Test Date: 2026-06-29 14:20:01 Functions: 60.0 % 10 6

            Line data    Source code
       1              : #include <vector>
       2              : #include <cmath>
       3              : #include <memory>
       4              : #include "Util/Util.H"
       5              : #include "Set/Base.H"
       6              : #include "Set/Set.H"
       7              : #include "Model/Gas/Gas.H"
       8              : #include "Model/Gas/Thermo/Thermo.H"
       9              : #include "Model/Gas/Transport/Transport.H"
      10              : #include "Model/Gas/EOS/EOS.H"
      11              : 
      12              : namespace Model {
      13              : namespace Gas {
      14              : 
      15              : // Methods that need to be defined by inherited class
      16              : 
      17              : // Thermodynamic quantities
      18    463376096 : double Gas::cp_mol(double T, Set::Patch<const Set::Scalar>& X, int i, int j, int k) const {
      19              :     // Specific heat (constant pressure), J/(kmol-K)
      20    926752192 :     return thermo.cp_mol(T, X, i , j, k);
      21              : }
      22            0 : double Gas::enthalpy_mol(double T, Set::Patch<const Set::Scalar>& X, int i, int j, int k) const {
      23              :     // Specific enthalpy, J/kmol)
      24            0 :     return thermo.enthalpy_mol(T, X, i , j, k);
      25              : }
      26            0 : double Gas::entropy_mol(double T, Set::Patch<const Set::Scalar>& X, int i, int j, int k) const {
      27              :     // specific entropy, J/(kmol-K)
      28            0 :     return thermo.entropy_mol(T, X, i , j, k);
      29              : }
      30              : 
      31              : // Transport quantities
      32     13235200 : double Gas::dynamic_viscosity(double T, Set::Patch<const Set::Scalar>& X, int i, int j, int k) const {
      33              :     // Dynamic viscosity, Pa-s
      34     26470400 :     return transport.dynamic_viscosity(T, X, i , j, k);
      35              : }
      36            0 : double Gas::thermal_conductivity(double T, Set::Patch<const Set::Scalar>& X, int i, int j, int k) const {
      37              :     // Thermal conductivity coefficient, W/(m-K)
      38            0 :     return transport.thermal_conductivity(T, X, i , j, k);
      39              : }
      40            0 : void Gas::diffusion_coeffs(Set::Patch<Set::Scalar>& DKM, double T, double P, Set::Patch<const Set::Scalar>& X, int i, int j, int k) {
      41              :     // Species diffusion coefficients, m^2/s
      42            0 :     return transport.diffusion_coeffs(DKM, T, P, X, i , j, k);
      43              : }
      44              : 
      45              : // EOS
      46    125784200 : double Gas::ComputeT(
      47              :         double density, double momentumx, double momentumy, double E, double Tguess,
      48              :         Set::Patch<const Set::Scalar>& X, int i, int j, int k, double rtol) const 
      49              : {
      50              :     // Temperature, K
      51    251568400 :     return eos.ComputeT(*this, density, momentumx, momentumy, E, Tguess, X, i, j, k, rtol);
      52              : }
      53        22248 : double Gas::ComputeT(
      54              :         double pressure, double density,
      55              :         Set::Patch<const Set::Scalar>& X, int i, int j, int k) const 
      56              : {
      57              :     // Temperature, K
      58        44496 :     return eos.ComputeT(pressure, density, R(X,i,j,k));
      59              : }
      60    125784200 : double Gas::ComputeP(double density, double T, Set::Patch<const Set::Scalar>& X, int i, int j, int k) const 
      61              : {
      62              :     // Pressure, Pa
      63    251568400 :     return eos.ComputeP(density, T, R(X,i,j,k));
      64              : }
      65        22248 : double Gas::ComputeE(    
      66              :         double density, double momentumx, double momentumy, double T,
      67              :         Set::Patch<const Set::Scalar>& X, int i, int j, int k) const 
      68              : {
      69              :     // Energy, J/m^3
      70        44496 :     return eos.ComputeE(density, momentumx, momentumy, T, R(X,i,j,k), gamma(T,X,i,j,k));
      71              : }
      72              : 
      73              : } // namespace Gas
      74              : } // namespace Model
        

Generated by: LCOV version 2.0-1