Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: issue 3499 #3500

Merged
merged 11 commits into from
Feb 4, 2025
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;
Comment on lines +33 to +34
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR looks good to me. Just a small thing, you could move this constant into PhysicsConstant.hpp if you think it fits better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR looks good to me. Just a small thing, you could move this constant into PhysicsConstant.hpp if you think it fits better.

thank
will keep it in units


/**
* @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
Loading