Skip to content

Commit

Permalink
fix: issue 3499 (#3500)
Browse files Browse the repository at this point in the history
  • Loading branch information
paveltomin authored Feb 4, 2025
1 parent bd70903 commit 9cfb92a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/coreComponents/common/Units.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ namespace geos
namespace units
{

/// Darcy to m^2 conversion factor
static constexpr double DarcyToSqM = 9.869233e-13;

/**
* @return the input Kelvin degrees converted in Celsius
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "constitutive/capillaryPressure/CapillaryPressureFields.hpp"
#include "constitutive/capillaryPressure/TableCapillaryPressureHelpers.hpp"
#include "functions/FunctionManager.hpp"
#include "common/Units.hpp"

namespace geos
{
Expand Down Expand Up @@ -250,7 +251,8 @@ void JFunctionCapillaryPressure::saveConvergedRockState( arrayView2d< real64 con
{
permeability = convergedPermeability[ei][0][2];
}
GEOS_ERROR_IF( permeability < LvArray::NumericLimits< real64 >::epsilon, "Zero permeability in J-function capillary pressure" );
// multiply epsilon by Darcy to sq m factor
GEOS_ERROR_IF( permeability < LvArray::NumericLimits< real64 >::epsilon * units::DarcyToSqM, "Zero permeability in J-function capillary pressure" );

// here we compute an average of the porosity over quadrature points
// this average is exact for tets, regular pyramids/wedges/hexes, or for VEM
Expand Down

0 comments on commit 9cfb92a

Please sign in to comment.