+ Reply to Thread
Results 1 to 28 of 28

Depth of liquid in hemisphere

  1. #1
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Depth of liquid in hemisphere

    Hi,

    I have a hemisphere which is filled with a known volume of water. i.e. it's known to be a % of the volume of the whole hemisphere.

    I need to work out the depth from the bottom of the tank.

    I know it involves using the usual 2/3 * pi() * r^2 formula, but somewhere along the line the angle from the centre to the top of the liquid where it touches the tank is needed. i.e. the ACOS() or other trig. function is involved.

    Can someone come up with the general formula.

    i.e. depth = Volume * function

    See attached.

    Regards
    Attached Images Attached Images
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Depth of liquid in hemisphere

    The volume of a spherical cap is

    =PI() * h^2 * (3*radius - h) / 3

    ... for h=0 to 2*radius
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Depth of liquid in hemisphere

    That's not the whole answer -- I'll be back.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Depth of liquid in hemisphere

    Assuming you know the volume of the sphere.

    The formula for partial volume of a sphere is

    v = (pi/3)(d^2)(3r-d)

    (same equation as shg's)

    where d is the depth of the liquid

    The full volume of a sphere is

    V = 4pi(r^2)/3

    Where I get stuck is solving for d when you have a known fraction of the full volume (p).

    (pi/3)(d^2)(3r-d) = pV
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Depth of liquid in hemisphere

    Quote Originally Posted by Richard Buttrey View Post
    I know it involves using the usual 2/3 * pi() * r^2 formula....
    BTW, not sure what that is the formula for....it's not volume or surface area.

  6. #6
    Registered User
    Join Date
    09-28-2011
    Location
    Ligonier, IN
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Depth of liquid in hemisphere

    Should be
    let x = (r^3)-2(r^3)p
    then
    d = 3 + [x + ((x^2)-(r^6))^(1/2)]^(1/3) + [x - ((x^2)-(r^6))^(1/2)]^(1/3)

  7. #7
    Registered User
    Join Date
    09-28-2011
    Location
    Ligonier, IN
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Depth of liquid in hemisphere

    Oops no sorry
    Should be
    let x = (r^3) + 2(r^3)p
    then
    d = [x + ((x^2)+(r^6))^(1/2)]^(1/3) + [x - ((x^2)+(r^6))^(1/2)]^(1/3) + r
    but that doesn't look right either.
    Well, the cubic formula is (very sorry, easier to write with a pen than keyboard):
    If ax^3 + bx^2 + cx + d =0
    then
    x = {[(-b^3/27a^3) + (bc/6a^2) + (d/2a)] + [((-b^3/27a^3) + (bc/6a^2) - (d/2a))^2 + ((c/3a) - (b^2/9a^2))^3]^(1/2)}^(1/3)
    + {[(-b^3/27a^3) + (bc/6a^2) + (d/2a)] - [((-b^3/27a^3) + (bc/6a^2) - (d/2a))^2 + ((c/3a) - (b^2/9a^2))^3]^(1/2)}^(1/3)
    - (b/3a)
    I know, illegible. ):

  8. #8
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Depth of liquid in hemisphere

    Hi,

    Thanks to all so far for their input but I believe the solution is a non linear one and will involve the use of a trig function, most likely the ACOS() function, to work out the angle between the perpendicular from the centre of the top plane of the hemisphere to the bottom of the hemisphere, and the line from the centre of the top plane to the point on the edge where the top of the water meets the edge.

    It's non linear since the volume of liquid when the level rises from say empty to 1 foot, is less than the increase in volume when the liquid rises for the second foot. Similarly when the level rises for the third foot the volume increase is more than the volume increase from 1-2 feet (assuming of course that the hemisphere is not yet full).

    I know that the volume of the hemisphere is 2/3*pi()*r^3 but a level half way between the bottom and the top contains different volumes above and below halfway. I'm trying to establish the formula for the depth of the liquid when I know the the volume of liquid as a % of the maximum capacity. e.g. what's the height when the henisphere is say half full in terms of volume?

    Regards
    Last edited by Richard Buttrey; 10-26-2011 at 05:20 PM.

  9. #9
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Depth of liquid in hemisphere

    Hi,

    Yes thanks for pointing out the typo. It should of course have been r^3 not r^2

    Regards

  10. #10
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Depth of liquid in hemisphere

    http://keisan.casio.com/has10/SpecExec.cgi shows how to calculate it the other way ie with the round bit cut off but you should be able to subtract that from the whole maybe?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  11. #11
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Depth of liquid in hemisphere

    Thanks Martin,

    Was there a typo in that URL? It returns a page not found error message.

    Regards

  12. #12
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Depth of liquid in hemisphere

    try this one
    http://tiny.cc/08qgm
    Last edited by martindwilson; 10-26-2011 at 05:47 PM.

  13. #13
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Depth of liquid in hemisphere

    Please Login or Register  to view this content.
    Col B is an input, the ratio of the liquid depth to the sphere radius.

    Col C computes the volume relative to the volume of a full hemisphere. In B3 and down,

    =k^2 * (3 - k) / 2

    Col D recovers the value in col B. In D3 and down,

    =2 * COS(ACOS(1 - V) / 3 - 2*PI() / 3) + 1

    Derivation attached.

    EDIT: It occurs to me that you could get to the same answer a lot more directly by computing the area of the chord as a function of the height, integrating from 0 to pi to get the volume, and then solving for the height from the volume.
    Attached Files Attached Files
    Last edited by shg; 10-26-2011 at 11:55 PM.

  14. #14
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Depth of liquid in hemisphere

    Hello Shg,

    Thank you very much for that most detailed response. I'm really grateful.
    Funnily enough whilst taking a bath last night (shades of Archimedes ), I'd been pondering the subject and was coming round to the pragmatic solution of creating the table you have so kindly worked out and using it as a lookup table. I was going to see how much the maximum error might be which I may be able to live with.

    As you say the ultimate solution is some calculus which was going to be my final resort.

    Regards
    Last edited by Richard Buttrey; 10-27-2011 at 07:41 AM.

  15. #15
    Registered User
    Join Date
    09-28-2011
    Location
    Ligonier, IN
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Depth of liquid in hemisphere

    The angle is unnecessary. The volume of the partial sphere you have from shg and 6stringjazzer above, and you know the entire volume is 4/3 pi r^3. The partial volume equals p times the full volume., and solve for d. The solving is the hard part. The cubic formula is required, which is hard to type but http://www.math.vanderbilt.edu/~schectex/courses/cubic/

  16. #16
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Depth of liquid in hemisphere

    Not sure if I understand your follow-up Richard.

    My point about integrating to get the volume was just that you could probably get the the same formula I ended up with more quickly if you computed the volume swept by the area, and then solved for the height.

    The final formula to get normalized height from normalized volume is just simple trig -- no lookup table needed.

  17. #17
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Depth of liquid in hemisphere

    Thanks shg,

    Yes ignore my previous remark. To avoid what I saw as a complicated transposition I'd originally thought of building a small granularity table of known volume proportions and the resultant liquid depth proportions, and using that as a lookup. I realise as you say that that's not necessary.

    As an addendum how would the formula

    =2 * COS(ACOS(1 - V) / 3 - 2*PI() / 3) + 1

    vary if instead of a hemisphere, i.e. where depth = radius, the bottom shape of this tank is an ellipsoid where the depth is a smaller proportion of the radius. It's still a circular tank but the smaller radius (or depth) of the ellipsoid is say 10 and the radius 20, i.e. a squashed hemisphere?

    I've tried playing around with the formula but can't seem to get the right results.

  18. #18
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Depth of liquid in hemisphere

    the bottom shape of this tank is an ellipsoid where the depth is a smaller proportion of the radius.
    Do you mean an oblate spheroid (like the earth) or prolate ellipsoid (like a rugby ball),

    1. ... with the axis vertical? That sounds doable, the volume is swept by the segment of an ellipse.

    2. ... with the axis horizontal? That sounds hard.

    And while we're at it, what's this for?
    Last edited by shg; 10-27-2011 at 06:32 PM.

  19. #19
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Depth of liquid in hemisphere

    Hi,

    Like a horizontal rugby ball, or to be precise the lower half of it.

    Viewed from above looking straight down the plan view is a perfect circle. Looking at it from the side the height is less than the width.

    Would you believe it's a pub argument? - Yes I know I know, with the euro collapsing around us we should have better things to do, but it was getting late (and heated after a few pints) and I happened to bet someone that there would be a fairly easy trig function to calculate it but and importantly it would involve an arc sin or cos function.

    That will teach me......

  20. #20
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Depth of liquid in hemisphere

    Like a horizontal rugby ball, or to be precise the lower half of it.

    Viewed from above looking straight down the plan view is a perfect circle.
    A rugby ball would only look circular from above if it were standing on a pointy end, not lying on its side.


  21. #21
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Depth of liquid in hemisphere

    Sorry, I mixed up the descriptions. I should have said that the profile only looks like half a rugby ball from the side. The use of a rugby ball in hindsight was a bad one.

    This is essentially an ellipsoid (I think that's the name) constructed from a 2 dimensional circle, and a smaller third radii perpendicular to the circle
    I'm attaching a picture which hopefully helps. Looked at from above the plan view is a circle. We're looking from the side and slightly above the plane of the top.

    Regards
    Attached Images Attached Images

  22. #22
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Depth of liquid in hemisphere

    OK, definitely a volume of revolution.

    It may take me a few days to get back to this. Going to see Notre Dame vs Navy this weekend in South Bend.

  23. #23
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Depth of liquid in hemisphere

    Does this site shed any help?

    http://en.wikipedia.org/wiki/Spherical_cap
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  24. #24
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Depth of liquid in hemisphere

    Hi Marvin,

    Thanks for the input, however I don't think the Wiki item quite addresses the point. The volume of a hemisphere is the well known 2/3 * pi() * r^3 (and a squashed sphere is similar).

    The requirement however is to determine, for a known volume percentage of the whole volume, the proportional split of the radius. A hemisphere filled with liquid to 50% of it's volume does not mean that the level of the liquid is 50% of the radius. For this reason the arc COS function comes into play (or so my pub bet maintains!)

    Regards

  25. #25
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Depth of liquid in hemisphere

    You could always cheat and use SOLVER

    See this workbook (I haven't thoroughly tested it yet)
    Change the values in A2:B2
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  26. #26
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Depth of liquid in hemisphere

    @Richard:

    The result for an prolate or oblate ellipsoid, oriented so as to be a circle in plan view, is the same as for the sphere. I can't decide if that seems obvious or curious.

    I get half of your winnings.

  27. #27
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Depth of liquid in hemisphere

    shg.

    Thanks for that - and your other posts. I suppose in hindsight it perhaps is obvious and I should have seen it.

    You're very welcome to a pint or two and if I'm ever in your Texas location I'll be sure to let you know.

    pip, pip.

    Richard

  28. #28
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,837

    Re: Depth of liquid in hemisphere

    It looks to me like MarvinP's Wiki article is spot on for this problem:

    V=pi()*h/6*(3a^2+h^2) where h=depth of liquid and a is radius of the "surface" of the liquid.

    For a hemisphere, h=a=r, and the formula reduces to V=2*pi()*r^3/3.

    The "ah-ha" moment for me was figuring out the relationship between h, a, and r. While I'm sure the arccos() function could be used (I actually would have guessed arctan(), but that's neither here nor there), I found the easiest solution was to use the Pythagorean theorom. I won't rob you of the joy of getting to the solution yourself from there.

    Oh, and, as suggested, you will need Solver (or similar numerical algorithm) to solve for h, because you should end up with a cubic equation in h.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1