2
$\begingroup$

I'm trying to write a very simple simulation of volume/water displacement. Every timestep a sphere gets lowered a bit further into a cylindrical container filled with water. While the physics behind this should be quite clear, I just can't wrap my head around how I would go about calculating the change in water height per timestep.

If the sphere is lowered by $y$ below the initial water level, then the water level will rise by $h$, resulting in the sphere being submerged by $y + h$, which would in turn mean it would displace more water, making the water level rise some more and so on and so on... This of course is wrong somewhere, but I fail to come up with a better idea. So, where do I err?

Assume $r_{C}$to be the radius of the cylindrical container, $h_{0}$the original water level without a sphere in it, $h_{n}$ the water level after the nth step $r_{S}$the radius of the sphere and $y_{n}$ how high the spherical cap of the submerged part (below the original water level) of the sphere is after step $n$.

From the balance of volumes before and after insertion for step 1 we get $V_{o}=V_{1}-V_{S}$ with $V_{0}$ being the original water volume, $V_{1}$ the volume after inserting part of the sphere in the first step, and $V_{S}$ the volume of the inserted spherical cap.

$$V_{0}=r_{C}^{2}\pi h_{0}\\ V_{1}=r_{C}^{2} \pi h_{1}\\ V_{S}=\frac{\pi}{3}h_{1}^{2}(3h_{1}-h_{1})$$

this is fine on its own and can be solved by solving a cubic equation, but nowhere in this does $y_{n}$ appear, and that's the part where I get hung up. How to transform these equations into something dependent on $y_{n}$, e. g. how to transform them into something dependent on how much of the sphere is below the original water level?

New contributor
Johann Gruber is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
$\endgroup$
3
  • $\begingroup$ You'll need to solve a cubic equation to find the water level in terms of the sphere position. $\endgroup$ May 25 at 14:30
  • $\begingroup$ Welcome to Scicomp. Start with the math you have. What are the equations for the water body volume without the sphere? define your radii and your coordinate system etc. Sketch a plot what you'd expect the water level to look like depending on the depth of insertion. Give us something to work with:-) $\endgroup$
    – MPIchael
    May 26 at 12:44
  • $\begingroup$ @MPIchael, thank you for your answer, I edited my post, I hope this clarifies things? $\endgroup$ May 27 at 13:29

0

Your Answer

Johann Gruber is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.