Spherical Cup Volume: red portion is filled volume, V = (pi/3)*(h^2)*[3r-h]

AMB33412

New member
Joined
Sep 18, 2017
Messages
7
I need to find the volume of spherical cup (partially filled).

The cup is vertical (see attachment)

Red means the filled volume. the total volume of spherical cup is
v = (pi/3)*(h^2)*[3r-h]

but this is in terms of circular radius. I don't have the circle, I just have the cup.

1. Full volume formula in terms of just 'a' and ' h '

2. Partial filled volume formula in terms of 'a' and 'h'.

This is a horizontal cylinder that I am struggling with, so, it is 'a' that changes and accordingly, h changes. As filled level changes, 'a' changes.
 

Attachments

  • S.jpg
    S.jpg
    8.8 KB · Views: 3
  • Wiki.jpg
    Wiki.jpg
    15.7 KB · Views: 49
I need to find the volume of spherical cup (partially filled).

The cup is vertical (see attachment)

Red means the filled volume. the total volume of spherical cup is
v = (pi/3)*(h^2)*[3r-h]

but this is in terms of circular radius. I don't have the circle, I just have the cup.

1. Full volume formula in terms of just 'a' and ' h '

2. Partial filled volume formula in terms of 'a' and 'h'.

This is a horizontal cylinder that I am struggling with, so, it is 'a' that changes and accordingly, h changes. As filled level changes, 'a' changes.

I don't think you've stated the problem fully. At the end you mention a cylinder, which hasn't been mentioned previously; and the first pair of pictures don't match the other picture and the formulas. Also, you say that the r in the formula is the "circular radius", but it is in fact the radius of the sphere.

I suspect you are really asking about a spherical cap on each end of a horizontal cylindrical tank, as if taking the sphere in your picture and cutting a slice from it vertically. Am I right? So for any given depth of liquid, you want the total volume of a part of a spherical cap (as in your second picture) and a partially filled cylinder (for which perhaps you already found the formula).

Please state clearly what you want.
 
I need to find the volume of spherical cup (partially filled).

The cup is vertical (see attachment)

Red means the filled volume. the total volume of spherical cup is
v = (pi/3)*(h^2)*[3r-h]

but this is in terms of circular radius. I don't have the circle, I just have the cup.

1. Full volume formula in terms of just 'a' and ' h '

2. Partial filled volume formula in terms of 'a' and 'h'.

This is a horizontal cylinder that I am struggling with, so, it is 'a' that changes and accordingly, h changes. As filled level changes, 'a' changes.

given the spherical cup volume formula in terms of r, h; and assuming this is correct;
to put the formula in terms of a,h, use r2=a2+h2
then for partial filled, the ht of fill is not h, but r-h,
[to put in terms of a, h, again use r2=a2+h2 ]

{i think this is what you were asking}
 
given the spherical cup volume formula in terms of r, h; and assuming this is correct;
to put the formula in terms of a,h, use r2=a2+h2
then for partial filled, the ht of fill is not h, but r-h,
[to put in terms of a, h, again use r2=a2+h2 ]

{i think this is what you were asking}

I think what he meant to ask about is a horizontal cylindrical tank with a spherical cap on each end, so that the first pair of pictures show a side view of one of the caps, partially filled (red). I've been waiting for the OP to confirm this.

To find this volume of part of a cap, you would need integration; I have seen this at least attempted, and the result was not a pretty formula. I'm not about to try doing it myself without being sure what is needed.
 
I think what he meant to ask about is a horizontal cylindrical tank with a spherical cap on each end, so that the first pair of pictures show a side view of one of the caps, partially filled (red). I've been waiting for the OP to confirm this.

To find this volume of part of a cap, you would need integration; I have seen this at least attempted, and the result was not a pretty formula. I'm not about to try doing it myself without being sure what is needed.

Yes

There is a horizontal cylinder
It has cylinder in center
Spherical caps on ends
The caps are only a part of the sphere
My job is to make a volume meter for it.

The known quantities are
Length of cylinder
Diameter of cylinder

And the radius of the spherical cap... (not the circle of which it is a part of but the cap's distance to center of the arc) which u can say is a part of the length of the tank... the one mentioned in pictures. I have added the real picture too.

I need to calculated the volume of tank as a function of height of tank. Like I would find the height of tank through an ultrasonic sensor and once I havee that along with the dimensions of the tank, I can calculate the total volume of diesel present inside the tank.

I hope I made it clear.
 

Attachments

  • Cup.jpg
    Cup.jpg
    4.8 KB · Views: 1
  • Cup.jpg
    Cup.jpg
    16.8 KB · Views: 2
Yes

There is a horizontal cylinder
It has cylinder in center
Spherical caps on ends
The caps are only a part of the sphere
My job is to make a volume meter for it.

The known quantities are
Length of cylinder
Diameter of cylinder

And the radius of the spherical cap... (not the circle of which it is a part of but the cap's distance to center of the arc) which u can say is a part of the length of the tank... the one mentioned in pictures. I have added the real picture too.

I need to calculate the volume of tank as a function of height of tank. Like I would find the height of tank through an ultrasonic sensor and once I have that along with the dimensions of the tank, I can calculate the total volume of diesel present inside the tank.

I hope I made it clear.

Good, it's just as I imagined. Unfortunately, it's just as I imagined -- I already know it's hard, because on my previous site (Ask Dr. Math) we got this question many times, and one of us wrote up an answer long ago, but said it was too complex to post -- he just provided a pdf file of his solution when asked. I will ask him for a copy, if he still has it ten years later. I will also see if I can work it out myself.

But there's another question that may be of use: what software do you have available to do the calculations, and do you need the solution in the form of a formula, or would numerical calculations for specific dimensions be enough (e.g. a one-time problem)? I ask this because it may turn out that using something like Mathematica to provide numerical solutions may be more reasonable than a closed-form solution.

Another of us at one point answered this question for the case where the radius of the end cap was equal to the diameter of the cylinder, and said the following:

Code:
Putting it all together, the volume of one cap, as a function of H, is

  V = Integral(dV)

    = Integral[A * dH]     0 < H < 2R

    = Integral [4*R^2 - (R-H)^2] arccos(R*sqrt(3)/(sqrt[4R^2 - (R-H)^2])
                         - R*sqrt(3) * sqrt[4R^2 - (R-H)^2 - 3R^2]

    = Integral [4*R^2 - (R-H)^2] arccos(R*sqrt(3)/(sqrt[4R^2 - (R-H)^2])
                         - R*sqrt(3) * sqrt[H*(2R-H)]

This is a messy integral, and although I was able to evaluate it using
Mathematica, the answer in terms of R and H is not very illuminating--
it involves a pageful of inverse trigonometric functions and square 
roots.

But it is fairly straightforward to evaluate the integral numerically,
so here is a table that might be helpful:

   H/R          V / R^3            V is liquid volume in ONE endcap
--------     --------------    --------------------------------------
   0.0              0              zero, if height is zero
   0.1          0.0013
   0.25         0.0116
   0.5          0.0554
   0.75         0.1276
   1.0          0.2155             equal to [16 - 9*sqrt(3)]*pi/6
   1.25         0.3034
   1.5          0.3755
   1.75         0.4194
   1.9          0.4297
   2.0          0.4310             equal to [16/3 - 3*sqrt(3)]*pi

As that illustrates, if the ratio of the radii of the endcap to the cylinder is known, we could make a table like this for you, or you could use math software to do it yourself. Note that this table only gives the volume of oil in one endcap; you would have to double this and add the volume in the cylinder.
 
Yes

There is a horizontal cylinder
It has cylinder in center
Spherical caps on ends
The caps are only a part of the sphere
My job is to make a volume meter for it.

The known quantities are
Length of cylinder
Diameter of cylinder

And the radius of the spherical cap... (not the circle of which it is a part of but the cap's distance to center of the arc) which u can say is a part of the length of the tank... the one mentioned in pictures. I have added the real picture too.

I need to calculated the volume of tank as a function of height of tank. Like I would find the height of tank through an ultrasonic sensor and once I havee that along with the dimensions of the tank, I can calculate the total volume of diesel present inside the tank.

I hope I made it clear.

for cap of spherical radius r, cap is 1/2 a sphere
V=pi/6d2(3r-d); where d=depth of liquid
for cylinder of length L and radius r, h is distance from midpt to surface of liquid, theta is the angle from vertical to edge of surface.
V=[r2(theta)-h(r2-h2)1/2]*L

total volume is the sum.
I think these are correct, [check].
 
To find this volume of part of a cap, you would need integration.

yes, integration is required.
the resulting eqn does satisfy 1/2 full and full.
pls double check.
cap is a hemisphere of radius r; d=depth of liquid
Volume=pi/6d2(3r-d)


 
yes, integration is required.
the resulting eqn does satisfy 1/2 full and full.
pls double check.
cap is a hemisphere of radius r; d=depth of liquid
Volume=pi/6d2(3r-d)

The cap in the question is not a hemisphere. And the formula given is for a whole cap, not the partially filled cap we need.
 
The cap in the question is not a hemisphere. And the formula given is for a whole cap, not the partially filled cap we need.

the eqn gives volume of a spherical cap filled to depth d.
 
Last edited:
the eqn gives volume of a hemispherical cap filled to depth d.

Yes; that's called a spherical cap; that is, the part of a sphere cut off by a plane at some distance from the center. "Hemispherical" in your description is irrelevant.

But the formula, which he already had, is not what he needs. What he wants is not an entire cap, but one oriented "sideways" and filled partially at the bottom. Look at the red part of his original picture, and think about how the tank will fill. (His second initial attachment was just a picture of a spherical cap, the source of the formula he already knew.)

I've requested the information whose existence I was aware of; I've never run across another source, though I found something similar here, with slightly different kinds of "heads" and approximate formulas. I'll start working it out myself, and see if I can get it to a form that can be easily calculated. It may turn out that the formulas on that page are good enough.
 
Yes; that's called a spherical cap; that is, the part of a sphere cut off by a plane at some distance from the center. "Hemispherical" in your description is irrelevant.
My mistake. I changed 'hemipsherical' to 'spherical' in my post.

But the formula, which he already had, is not what he needs.
I know. What he needs is a 3-d integration of a partially filled cup.
That is what i was trying for, but i see now my result matches the eqn given (except for a factor 2).
[At least my integration was correct.]

My mistake was not realizing radius starts to the right (in the picture with red volume).
 
Last edited:
Hi, I have been reading all the replies and I can't thank you enough for opening my head about this problem I am having.

Here I made a video of the tank (they painted it now)

https://www.youtube.com/watch?v=qIei51mOO9c

Also, one of the questions was about what would I be using?
I will be using a microcontroller and interfacing it with sensors etc for calculation of distance for unfilled tank. From there I will know the filled tank distance / height and I want to calculate its volume using that.

A few images I took (its a bit difficult while doing it on the tank with no rails to hold so sorry if they aren't upto the mark.

The thread reading is 1/2 the circumference.. so its about 337.5 cm, circumference is about 675 cm , radius would be 107.429586587 cm. Let me know if anything else is needed.
 

Attachments

  • 3.jpg
    3.jpg
    67.5 KB · Views: 1
  • 1.jpg
    1.jpg
    70.2 KB · Views: 1
  • 2.jpg
    2.jpg
    75.4 KB · Views: 1
  • 6.jpg
    6.jpg
    93.6 KB · Views: 1
  • 5.jpg
    5.jpg
    60.2 KB · Views: 1
  • 4.jpg
    4.jpg
    20.9 KB · Views: 1
  • 7.jpg
    7.jpg
    83.4 KB · Views: 1
  • 8.jpg
    8.jpg
    99.3 KB · Views: 1
  • 9.jpg
    9.jpg
    100.5 KB · Views: 1
Last edited:
Hi, I have been reading all the replies and I can't thank you enough for opening my head about this problem I am having.

Here I made a video of the tank (they painted it now)

https://www.youtube.com/watch?v=qIei51mOO9c

Also, one of the questions was about what would I be using?
I will be using a microcontroller and interfacing it with sensors etc for calculation of distance for unfilled tank. From there I will know the filled tank distance / height and I want to calculate its volume using that.

A few images I took (its a bit difficult while doing it on the tank with no rails to hold so sorry if they aren't upto the mark.

The thread reading is 1/2 the circumference.. so its about 337.5 cm, circumference is about 675 cm , radius would be 107.429586587 cm. Let me know if anything else is needed.

I will let you work out the measurements, rather than try to read them myself. But you should be aware that the measurements you need to use are inside dimensions. Outside isn't where the liquid is. So we'll want the inside diameter, length, and cap depth, as well as your measurement of the depth of liquid. If necessary, you can probably get these using the known thickness of metal.

Also, the video led to an interesting observation on this snip I took from it:

FMH112341 parabolic tank end.jpg

The tank end looks to me more parabolic than circular! I overlaid it here with a graph of a parabola, and it looks like a perfect fit.

It turns out that it is easier to work out this volume than for a spherical cap. So I now have a formula for it. I'll do a little more work with that, but I wanted to make these points now. Even if you tell me that the cap is specifically made as a sphere, the parabolic version should be a very good approximation; but can you tell me anything about the design of the tank, as far as what shape it is intended to be?
 
I will let you work out the measurements, rather than try to read them myself. But you should be aware that the measurements you need to use are inside dimensions. Outside isn't where the liquid is. So we'll want the inside diameter, length, and cap depth, as well as your measurement of the depth of liquid. If necessary, you can probably get these using the known thickness of metal.

Also, the video led to an interesting observation on this snip I took from it:

View attachment 10149

The tank end looks to me more parabolic than circular! I overlaid it here with a graph of a parabola, and it looks like a perfect fit.

It turns out that it is easier to work out this volume than for a spherical cap. So I now have a formula for it. I'll do a little more work with that, but I wanted to make these points now. Even if you tell me that the cap is specifically made as a sphere, the parabolic version should be a very good approximation; but can you tell me anything about the design of the tank, as far as what shape it is intended to be?

It does fit your thingy which is amazing...


About the measurements, I have struggling for them for quite some time now. Internal is impossible, tank is never empty, so I will write what I know or what I can guess...

Internal thickness: 3 mm
circumference: 675 cm (approx. equal to diameter I measured directly)
diameter: 214 cm (of the parabola)
length of cylindrical tank: 370 -372 cm *one of the exact readings 371.602* but the one matching your parabola figure could be about 372.11 cm so I guess that one is the right one.
Depth of parabola: 16 cm (According to your picture above I think it would go with that shape till 16 cms) or 18 cms max.

Anything of the tank, from the outside I can recheck. Let me know if i missed anything. Depth of liquid varies everyday, one of the past readings were 48 cm. distance from top to fluid level. so 48 cm of total diameter (height) was empty, rest was filled.
 
It does fit your thingy which is amazing...


About the measurements, I have struggling for them for quite some time now. Internal is impossible, tank is never empty, so I will write what I know or what I can guess...

Internal thickness: 3 mm
circumference: 675 cm (approx. equal to diameter I measured directly)
diameter: 214 cm (of the parabola)
length of cylindrical tank: 370 -372 cm *one of the exact readings 371.602* but the one matching your parabola figure could be about 372.11 cm so I guess that one is the right one.
Depth of parabola: 16 cm (According to your picture above I think it would go with that shape till 16 cms) or 18 cms max.

Anything of the tank, from the outside I can recheck. Let me know if i missed anything. Depth of liquid varies everyday, one of the past readings were 48 cm. distance from top to fluid level. so 48 cm of total diameter (height) was empty, rest was filled.

Having realized the value of assuming a parabolic "dish", I discovered the following old source: https://books.google.com/books?id=b5jNljW_8-8C&pg=PT400 . This says,

A much simpler method, however, which is due to the Bureau of Standards, is obtained by assuming that the end of the tank is in the form of a paraboloid of revolution instead of spherical. For ordinary curvatures, this is as close an approximation to the true form as a spherical form, and the difference between the parabolic and spherical forms is negligible. The mathematical work of deriving the formula is much simpler for the paraboloid, and the formula itself which follows, speaks for itself as to simplicity:
V=LD2At[1+BL(3hD2(hD)2)]\displaystyle V = LD^2A_t\left[1 + \frac{B}{L} \left(3\frac{h}{D} - 2\left(\frac{h}{D}\right)^2\right)\right].

See the page for definitions of variables. The formula is approximate, but I haven't tried to see how they might have modified it from an exact formula.

This formula (with some adjustment) gives close to the same result as my own, which (in Excel form) is

Volume in cylinder = L*(R^2*ACOS((R-D)/R) - (R-D)*SQRT(2*R*D-D^2))
Volume in one cap = B*R^2/2*(PI()/2-ATAN((R-D)/SQRT(R^2-(R-D)^2)))-((R-D)*B)/(6*R^2)*(5*R^2-2*(R-D)^2)*SQRT(R^2-(R-D)^2)
Volume = C_cyl + 2*V_cap

Here, L = internal length of cylinder, R = internal radius of cylinder, B = "bulge" in end cap (distance from end of cylinder), D = depth of liquid. If all measurements are in cm, then the volume is in cm^3.

I've continued playing with this (as it is an old puzzler I've seen too many times without solving), trying to check out the formula and also make it simpler. This is where I am so far.

To apply this (which will not be exact anyway), you'll have to estimate the internal dimensions by subtracting off known thickness as needed. It would be nice if you had some actual values for comparison, where you could actually know the amount of fuel in the tank and measure its depth, to check out the formula and the numbers you are using.
 
Having realized the value of assuming a parabolic "dish", I discovered the following old source: https://books.google.com/books?id=b5jNljW_8-8C&pg=PT400 . This says,
A much simpler method, however, which is due to the Bureau of Standards, is obtained by assuming that the end of the tank is in the form of a paraboloid of revolution instead of spherical. For ordinary curvatures, this is as close an approximation to the true form as a spherical form, and the difference between the parabolic and spherical forms is negligible. The mathematical work of deriving the formula is much simpler for the paraboloid, and the formula itself which follows, speaks for itself as to simplicity:
V=LD2At[1+BL(3hD2(hD)2)]\displaystyle V = LD^2A_t\left[1 + \frac{B}{L} \left(3\frac{h}{D} - 2\left(\frac{h}{D}\right)^2\right)\right].

See the page for definitions of variables. The formula is approximate, but I haven't tried to see how they might have modified it from an exact formula.

This formula (with some adjustment) gives close to the same result as my own, which (in Excel form) is

Volume in cylinder = L*(R^2*ACOS((R-D)/R) - (R-D)*SQRT(2*R*D-D^2))
Volume in one cap = B*R^2/2*(PI()/2-ATAN((R-D)/SQRT(R^2-(R-D)^2)))-((R-D)*B)/(6*R^2)*(5*R^2-2*(R-D)^2)*SQRT(R^2-(R-D)^2)
Volume = C_cyl + 2*V_cap

Here, L = internal length of cylinder, R = internal radius of cylinder, B = "bulge" in end cap (distance from end of cylinder), D = depth of liquid. If all measurements are in cm, then the volume is in cm^3.

I've continued playing with this (as it is an old puzzler I've seen too many times without solving), trying to check out the formula and also make it simpler. This is where I am so far.

To apply this (which will not be exact anyway), you'll have to estimate the internal dimensions by subtracting off known thickness as needed. It would be nice if you had some actual values for comparison, where you could actually know the amount of fuel in the tank and measure its depth, to check out the formula and the numbers you are using.
There is nothing available for that poor tank, it can only be approximated.

I also want to make a dipchart for it which I will somehow once I know the final function with height as variable. Which you have written above. I will apply it and then ofcourse, I will know if its accurate to even some extent or not. Doing all that might take a while but I hope to update in this topic so it might be helpful to someone in future as well.
 
There is nothing available for that poor tank, it can only be approximated.

I also want to make a dipchart for it which I will somehow once I know the final function with height as variable. Which you have written above. I will apply it and then of course, I will know if its accurate to even some extent or not. Doing all that might take a while but I hope to update in this topic so it might be helpful to someone in future as well.

Approximation is what we are doing. You use what you can get, knowing that most likely the numbers would be off anyway, because nothing real exactly follows the math (something will not be exactly the shape you think it is).

I did some more work on this, preparing for a blog post about tank volumes, and realized I could simplify my formula considerably. Here is the new formula for the volume of liquid in the tank (all in one):

L*R^2*((1+Y)*ACOS(1-X)+(1-X)*SQRT(X*(2-X))*((2*X^2-4*X-3)*Y/3-1))

Here X = H/R and Y = B/L, each of which appears more than once in the formula. If you skip those, the formula is:

L*R^2*((1+B/L)*ACOS(1-H/R)+(1-H/R)*SQRT(H/R*(2-H/R))*((2*(H/R)^2-4*H/R-3)*B/L/3-1))

Incidentally, in my experiments with the formula, using your numbers, the end caps add only about 1-2% to the volume (higher when it's fuller). So for many purposes you could probably get a good enough approximation ignoring them.
 
Top