-
Notifications
You must be signed in to change notification settings - Fork 178
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
volume at arbitrary height for most above spherical section heights #16311
Conversation
93560c0
to
06cdf39
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥇
def height_from_frustum_formula(area_1: float, area_2: float, volume: float) -> float: | ||
"""Get the volume within a section with differently shaped boundary cross-sections.""" | ||
area_term = area_1 + area_2 + sqrt(area_1 * area_2) | ||
return 3 * volume / area_term | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
This doesn't look like it's currently used for anything. It sounds like that's intentional, just making sure.
-
Is this docstring right? The function and variable names make it sound like it's supposed to return a height, not a volume.
-
Assuming that this is supposed to return a height, given a volume and top and bottom areas:
I don't think this is mathematically correct for the kinds of frusta that we have. Experimentally, it looks correct for pyramidal frusta but not for non-pyramidal frusta. I can prepare a CAD demo in a sec.
This might be the same thing that we (@caila-marashaj+@ryanthecoder+me) talked about a few weeks ago in the office. There are "frustum formulas", but if you look at their precise definitions and conditions of use, they only describe pyramidal frusta, and well shapes are frequently not pyramidal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recap from call:
- Yeah, we think the math is inapplicable, and we'll delete this for now.
- The plan was for this to help with EXEC-712. We'll make sure the pyramidal assumption hasn't leaked into the rest of the math there.
- I haven't reviewed the rest of this, but LGTM given @ryanthecoder's approval.
ec37de5
to
7f13592
Compare
Overview
Here are the protocol engine functions to find the volume or height at any arbitrary height/volume within a well.
Changelog
geometry.py
SphericalSegment.radius_of_curvature
should have beenradiusOfCurvature
TODO
I'm going to add tests in a follow-up pr if that's alright. I want to get these functions merged first though so I can unblock Peter's pr