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

Nonsensical low permeability check in JFunctionCapillaryPressure.cpp #3499

Open
chameleon20 opened this issue Dec 19, 2024 · 0 comments · May be fixed by #3500
Open

Nonsensical low permeability check in JFunctionCapillaryPressure.cpp #3499

chameleon20 opened this issue Dec 19, 2024 · 0 comments · May be fixed by #3500
Labels
type: bug Something isn't working type: new A new issue has been created and requires attention

Comments

@chameleon20
Copy link

Describe the bug
Line 253 in JFunctionCapillaryPressure.cpp

GEOS_ERROR_IF( permeability < LvArray::NumericLimits< real64 >::epsilon, "Zero permeability in J-function capillary pressure" );

checks whether permeability is below 64-bit machine precision (~1e-16), but there can be valid permeability values in SI units that may be lower than that. E.g., 0.1 mDarcy = 9.86923e-17 m^2 in Si units. Also, the permeability is not used directly in this function. Instead, sqrt(permeability) is used in the JFunction multiplier. So there is no overflow and this comparison is not necessary.

To Reproduce
Steps to reproduce the behavior:

  1. Run a case where some permeability values are of order 0.1 mDarcy = 9.86923e-17 m^2.
  2. This will trigger an error "Zero permeability in J-function capillary pressure".

Expected behavior
Permeabilities like those on the order of 0.1 mDarcy are valid and should not trigger an error.

Platform (please complete the following information):

  • Machine: Ubuntu 24.04.1 LTS
  • Compiler: gcc 14.2.0
  • GEOS Version: 1.2.0
@chameleon20 chameleon20 added type: bug Something isn't working type: new A new issue has been created and requires attention labels Dec 19, 2024
@paveltomin paveltomin linked a pull request Dec 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working type: new A new issue has been created and requires attention
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant