Fundamentals 5 min read

How to Model Water Flow in a Hemisphere Using Differential Equations

This article explains the three-step process for constructing differential-equation models, introduces the micro-element analysis method, and demonstrates its application to a hemispherical water-outflow problem, including derivation of the governing equation, solution via separation of variables, and a Python implementation using SymPy.

Model Perspective
Model Perspective
Model Perspective
How to Model Water Flow in a Hemisphere Using Differential Equations

Establishing a differential‑equation model generally involves three steps:

(1) Identify the quantities to be studied (independent variable, unknown function, necessary parameters, etc.) and set up a coordinate system.

(2) Determine the fundamental laws that these quantities satisfy.

(3) Use these laws to write the governing equations and the associated initial or boundary conditions. The following example illustrates the commonly used micro‑element analysis method.

1 Micro‑element Analysis Method

The basic idea of this method is to analyze the variation of relevant variables over a very short time interval, seeking relationships among the micro‑elements.

1.1 Problem

A hemispherical container 1 m high has water flowing out through a small hole at its bottom. The hole’s cross‑sectional area is 1 cm². Initially the container is full of water. Determine how the water‑surface height (the distance from the water surface to the hole’s center) changes with time as water drains.

1.2 Modeling

As shown in the figure, we set the origin at the bottom center of the container and take the upward vertical direction as the positive axis.

From fluid mechanics, the outflow rate Q through the hole equals the volume of water crossing the hole per unit time, which can be expressed as

Q = C * A * sqrt(2 g h)

where C is the discharge coefficient, g is the gravitational acceleration (≈9.8 m/s²), A is the hole area, and h is the instantaneous water‑surface height.

The volume of water in the hemispherical container at height h is V = (2/3)πR³ (1 – (1 – h/R)^{3/2}) (or a simplified expression). Differentiating V with respect to time and equating to –Q yields the governing differential equation.

1.3 Solution

After substituting the expressions for V and Q and simplifying, we obtain a separable differential equation of the form

dh/dt = -k * sqrt(h)

where k = (C A sqrt(2g)) / (π R²). Integrating with the initial condition h(0)=R gives

h(t) = (sqrt(R) - (k/2) t)²

Using separation of variables, the explicit solution can be derived, and the time when the water level reaches zero can be computed.

Code

<code>import sympy as sp
sp.var('h')
sp.var('t', cls=sp.Function)
g = 9.8

eq = t(h).diff(h) - 10000*sp.pi/0.62/sp.sqrt(2*g)*(h**(3/2) - 2*h**(1/2))  # define equation
t = sp.dsolve(eq, ics={t(1): 0})  # solve the differential equation symbolically
t = sp.simplify(t)
print(t.args[1].n(9))
</code>

References

司守奎,孙玺菁 Python数学实验与建模

Pythonmodelingdifferential equationsfluid dynamicsSymPymicro-element analysis
Model Perspective
Written by

Model Perspective

Insights, knowledge, and enjoyment from a mathematical modeling researcher and educator. Hosted by Haihua Wang, a modeling instructor and author of "Clever Use of Chat for Mathematical Modeling", "Modeling: The Mathematics of Thinking", "Mathematical Modeling Practice: A Hands‑On Guide to Competitions", and co‑author of "Mathematical Modeling: Teaching Design and Cases".

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.