-
Notifications
You must be signed in to change notification settings - Fork 30
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
Pipe Diameter Unit error #92
Pipe Diameter Unit error #92
Comments
GEOPHIRES-X/tests/examples/example1.txt Lines 20 to 21 in 3d5d754
GEOPHIRES-X/tests/examples/example1.out Lines 48 to 49 in 3d5d754
|
This issue is fixed in the HIP-RA-X branch and committed. As @kfbeckers pointed out, it was NOT impacting the internal calculations, only the reporting. As suggested by @softwareengineerprogrammer, the bug was in the Parameters object.ConvertUnitsBack function. The impact of this fix will be somewhat annoying; - some of the unit tests will fail because the "correct" examples are, in fact, not correct but rather have the wrong units due to this bug. A simple update of the "correct" files will fix the unit tests. |
Re-opening because fix is still pending integration into repository, tentatively planning to include in softwareengineerprogrammer#3; but impact to unit tests may merit doing as a separate PR to limit complexity. |
Looking at this now; the suggested fix does not resolve. Rather, the issue appears to be in special casing logic in WellBores.py: GEOPHIRES-X/src/geophires_x/WellBores.py Lines 931 to 940 in 0a84d0c
(Will continue investigating fix, just wanted to make a note of this) |
The code identified (lines 931-940 in Wellbores.py seems correct. It does get called in the case of Example 1, because Example 1 sets the pipe diameters to 7 inches. Since 7> 2, the code gets called and converts the units to meters. It also marks these parameters as not having their default units, so the function Parameters.ConvertUnitsBack eventually gets called, and that was what was failing to correctly switch it back to the units that the user asked for.
The underlying problem here is that the documentation calls for the pipe diameters to be specified in inches, but the underlying code assumes meters. Hence the need for a hardcoded switch. The alternative is to change the underlying definition and documentation, but I don’t think we want to go there.
From: Jonathan Pezzino ***@***.***>
Sent: Wednesday, January 24, 2024 2:54 PM
To: NREL/GEOPHIRES-X ***@***.***>
Cc: Malcolm Ross ***@***.***>; State change ***@***.***>
Subject: Re: [NREL/GEOPHIRES-X] Pipe Diameter Unit error (Issue #92)
Looking at this now; the suggested fix does not resolve. Rather, the issue appears to be in special casing logic in WellBores.py: https://github.com/NREL/GEOPHIRES-X/blob/0a84d0c27399dbb5596c7973896119c2e310cc82/src/geophires_x/WellBores.py#L931-L940
(Will continue investigating fix, just wanted to make a note of this)
—
Reply to this email directly, view it on GitHub <#92 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AWGVYT2LHQ6WJUNV5P2V2C3YQFYF3AVCNFSM6AAAAABCHQ2QDCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBYHA4TONZVGI> .
You are receiving this because you modified the open/close state. <https://github.com/notifications/beacon/AWGVYTZOE5FDNEYXZPRZQ4LYQFYF3A5CNFSM6AAAAABCHQ2QDCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTRY535Q.gif> Message ID: ***@***.*** ***@***.***> >
|
…and need to be updated
…on-fix-3 Output conversion fix - addresses NREL#92
Addressed in #99 |
…and need to be updated
There seems to be a problem with pipe diameters, reproducible with Example 1.
Example one says:
Production Well Diameter,7, ---[inch]
Injection Well Diameter,7, ---[inch]
But reports them as:
0.005 is 0.19685039 Inches!
Debugging indicates that this is not just a conversion error in reporting - the value of 0.005 is being passed into the Output object.
It sounds like a double conversion or some confusion about when conversion is need... I will track it down.
The text was updated successfully, but these errors were encountered: