LCOV - code coverage report
Current view: top level - src/utils - RichardsSeffRSC.C (source / functions) Hit Total Coverage
Test: idaholab/moose richards: #31405 (292dce) with base fef103 Lines: 13 13 100.0 %
Date: 2025-09-04 07:56:35 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             : //  Rogers-Stallybrass-Clements version of effective saturation as a function of CAPILLARY pressure,
      11             : //  and derivs wrt that capillary pressure.
      12             : //  valid for residual saturations = 0, and viscosityOil = 2*viscosityWater.  (the "2" is important
      13             : //  here!).
      14             : // C Rogers, MP Stallybrass and DL Clements "On two phase filtration under gravity and with boundary
      15             : // infiltration: application of a Backlund transformation" Nonlinear Analysis Theory Methods and
      16             : // Applications 7 (1983) 785--799.
      17             : //
      18             : #include "RichardsSeffRSC.h"
      19             : 
      20             : Real
      21     2845894 : RichardsSeffRSC::seff(Real pc, Real shift, Real scale)
      22             : {
      23     2845894 :   Real x = (pc - shift) / scale;
      24     2845894 :   Real ex = std::exp(x);
      25     2845894 :   return std::pow(1 + ex, -0.5);
      26             : }
      27             : 
      28             : Real
      29     1598470 : RichardsSeffRSC::dseff(Real pc, Real shift, Real scale)
      30             : {
      31     1598470 :   Real x = (pc - shift) / scale;
      32     1598470 :   Real ex = std::exp(x);
      33     1598470 :   return -0.5 * ex * std::pow(1 + ex, -1.5) / scale;
      34             : }
      35             : 
      36             : Real
      37      934470 : RichardsSeffRSC::d2seff(Real pc, Real shift, Real scale)
      38             : {
      39      934470 :   Real x = (pc - shift) / scale;
      40      934470 :   Real ex = std::exp(x);
      41      934470 :   return (0.75 * ex * ex * std::pow(1 + ex, -2.5) - 0.5 * ex * std::pow(1 + ex, -1.5)) / scale /
      42      934470 :          scale;
      43             : }

Generated by: LCOV version 1.14