Chapter 10
18 min read
Section 97 of 353

Hydrostatic Force and Pressure

Applications of Integration

Learning Objectives

By the end of this section, you will be able to:

  1. Understand how pressure in a static fluid increases linearly with depth
  2. Calculate hydrostatic force on horizontal submerged surfaces
  3. Derive and apply the integral formula for force on vertical surfaces
  4. Extend these methods to surfaces of variable width and inclined surfaces
  5. Connect hydrostatic force to real engineering applications: dams, submarines, and fluid tanks
  6. Recognize how integration transforms a varying pressure into a total force

The Big Picture: Forces from Fluids

"When a fluid at rest presses against a surface, the total force depends on how pressure varies with depth — and that's where integration becomes essential."

Every day, you encounter structures holding back fluids: dams retaining lakes, aquarium walls containing water, submarine hulls resisting ocean pressure, and storage tanks holding liquids. Engineers must calculate the total force these structures experience to design them safely.

The challenge is that pressure in a fluid varies with depth. At the surface, pressure is relatively low; at greater depths, it increases. To find the total force, we can't simply multiply a single pressure by the area — we need to integrate the pressure over the entire surface.

Why Integration is Essential

For a horizontal surface submerged at a fixed depth, pressure is uniform and we can use simple multiplication: F=PcdotAF = P \\cdot A. But for a vertical or inclined surface, pressure changes continuously with depth. We must divide the surface into infinitesimal strips, calculate the force on each, and integrate to find the total force.


Historical Context: From Archimedes to Modern Engineering

The study of fluids at rest — hydrostatics — has ancient roots. Archimedes (287–212 BCE) discovered his famous principle about buoyancy while investigating the purity of King Hiero's crown. Legend says he shouted "Eureka!" upon realizing that submerged objects displace fluid equal to their volume.

The modern understanding of pressure came much later. In 1653, Blaise Pascal formulated the principle that pressure applied to a confined fluid is transmitted equally in all directions. This led to the realization that pressure increases with depth according to a simple formula.

The Role of Calculus

Newton and Leibniz's development of calculus in the late 17th century provided the mathematical tools to handle continuously varying quantities like pressure. The integral — summing infinitely many infinitesimal contributions — became the natural way to calculate total force from varying pressure.

Archimedes
~250 BCE: Buoyancy principle
💧
Pascal
1653: Pressure transmission
Newton/Leibniz
1680s: Calculus for integration

Pressure Fundamentals

What is Pressure?

Pressure is force per unit area. When a fluid pushes on a surface, the pressure tells us how much force is exerted on each square meter:

P=fracFAquadtext(Forceperunitarea)P = \\frac{F}{A} \\quad \\text{(Force per unit area)}

Pressure is measured in Pascals (Pa), where 1textPa=1textN/m21 \\text{ Pa} = 1 \\text{ N/m}^2. Atmospheric pressure at sea level is approximately 101,325 Pa (about 101 kPa or 1 atm).

Hydrostatic Pressure in a Fluid

In a fluid at rest, pressure increases with depth due to the weight of the fluid above. At depth hh below the surface, the gauge pressure (pressure above atmospheric) is:

Hydrostatic Pressure Formula

P=rhoghP = \\rho g h
where rho\\rho = fluid density, gg = gravitational acceleration, hh = depth below surface
SymbolMeaningTypical Values
ρFluid density1000 kg/m³ (water), 1025 kg/m³ (seawater)
gGravitational acceleration9.81 m/s²
hDepth below surfaceVariable (meters)
PGauge pressurePa (Pascals), kPa, atm

Linear Relationship

The pressure-depth relationship is linear: doubling the depth doubles the pressure. This linearity is key — it's what makes the integral of pressure tractable. The pressure varies from 0 at the surface to rhogH\\rho g H at depth HH.

Interactive: Pressure Explorer

Explore how hydrostatic pressure changes with depth and fluid type. Notice that pressure increases linearly, and the red arrows show how pressure forces act equally in all directions at each depth:

Hydrostatic Pressure Explorer

Explore how pressure increases linearly with depth in a fluid at rest. The pressure formula is P = ρgh.

Surface (P = P₀)0m2m4m6m8m10mP = 49.05 kPaDepth (h)

Pressure Calculation

P = ρ × g × h
P = 1000 × 9.81 × 5.0
P = 49050.0 Pa
P = 49.05 kPa
P ≈ 0.484 atm

Key Insight

Pressure increases linearly with depth. At any point in a static fluid, pressure acts equally in all directions (Pascal's principle). The red arrows show how pressure forces push inward against the container walls.


Force on Horizontal Surfaces

The simplest case is a horizontal surface submerged at a constant depth hh. Every point on this surface is at the same depth, so the pressure is uniform:

P=rhoghP = \\rho g h

Since pressure is constant, the total force is simply pressure times area:

Force on a Horizontal Surface

F=PcdotA=rhoghAF = P \\cdot A = \\rho g h A
No integration needed when pressure is uniform!

Example: Aquarium Bottom

Problem: An aquarium tank has a rectangular bottom measuring 2m × 1m. If the water depth is 0.8m, find the force on the bottom.

Solution:

Area: A=2times1=2textm2A = 2 \\times 1 = 2 \\text{ m}^2

Pressure at bottom: P=1000times9.81times0.8=7848textPaP = 1000 \\times 9.81 \\times 0.8 = 7848 \\text{ Pa}

Force: F=7848times2=15696textNapprox15.7textkNF = 7848 \\times 2 = 15696 \\text{ N} \\approx 15.7 \\text{ kN}


Force on Vertical Surfaces

Now consider a vertical surface, like a dam wall or the side of a tank. Here, pressure is not constant — it increases with depth. We cannot use simple multiplication; we must integrate.

Setting Up the Integral

Consider a vertical rectangular surface of width ww extending from the water surface (depth 0) to depth HH. To find the total force:

  1. Divide the surface into thin horizontal strips of thickness dydy at depth yy
  2. Calculate the pressure on each strip: P(y)=rhogyP(y) = \\rho g y
  3. Find the area of each strip: dA=w,dydA = w \\, dy
  4. Compute the force on each strip: dF=P(y)cdotdA=rhogycdotw,dydF = P(y) \\cdot dA = \\rho g y \\cdot w \\, dy
  5. Integrate from 0 to HH

Force on a Vertical Rectangular Surface

F=int0Hrhogycdotw,dyF = \\int_0^H \\rho g y \\cdot w \\, dy
F=rhogwint0Hy,dy=rhogwleft[fracy22right]0HF = \\rho g w \\int_0^H y \\, dy = \\rho g w \\left[ \\frac{y^2}{2} \\right]_0^H
F=frac12rhogwH2F = \\frac{1}{2} \\rho g w H^2

Understanding the Result

The factor frac12\\frac{1}{2} in the formula has important meaning:

  • Mathematical origin: It comes from integrating inty,dy=fracy22\\int y \\, dy = \\frac{y^2}{2}
  • Physical interpretation: The average pressure on the surface is barP=fracrhogH2\\bar{P} = \\frac{\\rho g H}{2} — half the maximum pressure at the bottom
  • Alternative formula: F=barPcdotA=fracrhogH2cdot(wH)=frac12rhogwH2F = \\bar{P} \\cdot A = \\frac{\\rho g H}{2} \\cdot (w H) = \\frac{1}{2} \\rho g w H^2

Quadratic Dependence on Depth

Notice that force depends on H2H^2, not HH. Doubling the water depth quadruples the force! This is why dam failures can be catastrophic — a small increase in water level creates a much larger increase in force.

Interactive: Dam Force Calculator

See how the Riemann sum approximation converges to the integral as you increase the number of strips. Watch the pressure arrows grow with depth:

Hydrostatic Force on a Dam

Calculate the total force on a vertical dam face by integrating pressure over depth. The key insight: F = ∫₀ᴴ ρgy · w dy

Dam Cross-Section (Front View)DAM0.0m2.5m5.0m7.5m10.0mDepth (y)Water Surface (y = 0)Bottom (y = H = 10m)Pressure vs Depth0HP = ρgH0Area = F/w

Force Calculation

Riemann Sum (8 strips):
F ≈ 9.8100 MN
Exact (Integral):
F = ½ρgwH² = 9.8100 MN
Error: 0.00%

Integration Formula

F = ∫₀ᴴ P(y) · w dy
F = ∫₀ᴴ ρgy · w dy
F = ρgw[y²/2]₀ᴴ
F = ½ρgwH²

Force on General Submerged Surfaces

Real submerged surfaces are not always simple rectangles. The general formula for hydrostatic force accounts for surfaces where width varies with depth:

General Hydrostatic Force Formula

F=inth1h2rhogycdotw(y),dyF = \\int_{h_1}^{h_2} \\rho g y \\cdot w(y) \\, dy
where w(y)w(y) = width of surface at depth yy

The Centroid Shortcut

For many standard shapes, there's a shortcut using the centroid. If bary\\bar{y} is the depth of the centroid (geometric center) and AA is the total area:

F=rhogbarycdotAF = \\rho g \\bar{y} \\cdot A

This works because the integral of ycdotdAy \\cdot dA over the surface equals barycdotA\\bar{y} \\cdot A by the definition of centroid.

ShapeCentroid DepthAreaForce Formula
Rectangle (top at y₁, bottom at y₂)ȳ = (y₁ + y₂)/2A = w(y₂ - y₁)F = ρg·ȳ·A
Triangle (base at top, vertex at bottom)ȳ = y₁ + H/3A = bH/2F = ρg(y₁ + H/3)·(bH/2)
Circle (center at depth d)ȳ = dA = πr²F = ρgd·πr²
Semicircle (diameter at surface)ȳ = 4r/(3π)A = πr²/2F = ρg·4r/(3π)·πr²/2

Interactive: Submerged Shapes

Calculate hydrostatic force on different submerged shapes. Watch how the Riemann sum strips adapt to variable-width surfaces:

Submerged Shape Force Calculator

Calculate hydrostatic force on different submerged shapes. The general formula is F = ∫ P(y) · w(y) dy = ∫ ρgy · w(y) dy

Water Surface0m3m7mh₁ = 2m

Rectangular plate submerged vertically

n =

Results

Exact Force:
F = 412.02 kN
Riemann Approx:
F ≈ 412.02 kN
Error: 0.00%

Formula

F = ρgw(h₂² - h₁²)/2

Worked Examples

Example 1: Trapezoidal Dam Gate

Problem: A dam has a trapezoidal gate that is 6m wide at the water surface and 4m wide at the bottom, which is 5m below the surface. Find the hydrostatic force on the gate.

Solution:

Step 1: Express width as a function of depth:

w(y)=6+frac465cdoty=60.4yw(y) = 6 + \\frac{4 - 6}{5} \\cdot y = 6 - 0.4y

Step 2: Set up the integral:

F=int05rhogy(60.4y),dy=rhogint05(6y0.4y2),dyF = \\int_0^5 \\rho g y (6 - 0.4y) \\, dy = \\rho g \\int_0^5 (6y - 0.4y^2) \\, dy

Step 3: Evaluate:

F=rhogleft[3y2frac0.4y33right]05=rhogleft(75frac503right)=rhogcdotfrac1753F = \\rho g \\left[ 3y^2 - \\frac{0.4y^3}{3} \\right]_0^5 = \\rho g \\left( 75 - \\frac{50}{3} \\right) = \\rho g \\cdot \\frac{175}{3}

Step 4: Calculate:

F=1000times9.81timesfrac1753approx572,250textNapprox572textkNF = 1000 \\times 9.81 \\times \\frac{175}{3} \\approx 572{,}250 \\text{ N} \\approx 572 \\text{ kN}

Example 2: Circular Submarine Porthole

Problem: A circular viewing port on a submarine has radius 0.3m. Its center is 50m below the surface. Find the force on the port.

Solution:

For a circular surface, use the centroid approach:

F=rhogbarycdotA=rhogcdotdcdotpir2F = \\rho g \\bar{y} \\cdot A = \\rho g \\cdot d \\cdot \\pi r^2

Substituting values:

F=1000times9.81times50timespitimes(0.3)2F = 1000 \\times 9.81 \\times 50 \\times \\pi \\times (0.3)^2
F=1000times9.81times50times0.283approx138,700textNapprox139textkNF = 1000 \\times 9.81 \\times 50 \\times 0.283 \\approx 138{,}700 \\text{ N} \\approx 139 \\text{ kN}

Note: At this depth, the pressure is about 5 atmospheres! The port must be incredibly strong.

Example 3: Force Comparison

Problem: Compare the force on a square gate (2m × 2m) when it is (a) horizontal at 3m depth, vs (b) vertical with its top at the surface.

Solution:

(a) Horizontal: Uniform pressure

Fh=rhoghA=1000times9.81times3times4=117,720textNF_h = \\rho g h A = 1000 \\times 9.81 \\times 3 \\times 4 = 117{,}720 \\text{ N}

(b) Vertical: Varying pressure, top at surface

Fv=frac12rhogwH2=frac12times1000times9.81times2times4=39,240textNF_v = \\frac{1}{2} \\rho g w H^2 = \\frac{1}{2} \\times 1000 \\times 9.81 \\times 2 \\times 4 = 39{,}240 \\text{ N}
Ratio: Fh/Fv=117720/39240=3F_h / F_v = 117720 / 39240 = 3

The horizontal gate experiences 3× more force because every point is at the maximum depth of 3m, while the vertical gate's average depth is only 1m.


Engineering Applications

Dam Design

The H2H^2 dependence of hydrostatic force explains why dams are designed with a triangular profile — thicker at the base where pressure is greatest. Engineers must account for:

  • Total force on the dam face (our formula)
  • Center of pressure — where the resultant force acts (always below the centroid)
  • Overturning moment — the tendency to tip the dam
  • Safety factors for floods exceeding normal levels

Submarines and Pressure Vessels

At ocean depths, pressure becomes extreme. At 100m depth, pressure is about 1000times9.81times100=981,0001000 \\times 9.81 \\times 100 = 981{,}000 Pa ≈ 10 atmospheres. Submarine hulls must withstand these pressures, which is why they are typically cylindrical — a shape that distributes stress evenly.

At 100m (Recreational SCUBA limit)

~10 atm
~1 MPa gauge pressure

At 1000m (Research submarines)

~100 atm
~10 MPa gauge pressure

Aquarium and Tank Design

Large aquariums use thick acrylic panels that must withstand enormous forces. The Okinawa Churaumi Aquarium has a panel 8.2m tall — using our formula with width 22.5m:

F=frac12times1000times9.81times22.5times8.22approx7.4textMNF = \\frac{1}{2} \\times 1000 \\times 9.81 \\times 22.5 \\times 8.2^2 \\approx 7.4 \\text{ MN}

That's about 750 tonnes of force pushing on the window!


Python Implementation

Basic Force Calculations

The following code demonstrates hydrostatic force calculations using both analytical formulas and numerical integration:

Hydrostatic Force Calculations
🐍hydrostatic_force.py
9Pressure Formula

The fundamental hydrostatic pressure equation P = ρgh relates pressure to depth. This linear relationship is key to understanding why we need integration for force.

24Dam Force Formula

The integral ∫₀ᴴ ρgy·w dy evaluates to ½ρgwH². The factor ½ comes from the integral of y, reflecting that average pressure is half the maximum.

42Variable Width Function

For non-rectangular shapes, width varies with depth. We pass a function w(y) and integrate ρgy·w(y) to get the total force.

78Riemann Sum Approach

This demonstrates the fundamental idea: divide the surface into horizontal strips, calculate force on each, and sum. As n→∞, this approaches the integral.

138 lines without explanation
1import numpy as np
2from scipy import integrate
3import matplotlib.pyplot as plt
4
5# Physical constants
6rho_water = 1000  # kg/m³
7g = 9.81          # m/s²
8
9def hydrostatic_pressure(depth: float, rho: float = rho_water) -> float:
10    """
11    Calculate hydrostatic pressure at a given depth.
12
13    P = ρgh (Pascal's law)
14
15    Parameters:
16    -----------
17    depth : float - Depth below surface (meters)
18    rho : float - Fluid density (kg/m³)
19
20    Returns:
21    --------
22    float : Pressure in Pascals (Pa)
23    """
24    return rho * g * depth
25
26def force_on_dam(width: float, height: float, rho: float = rho_water) -> float:
27    """
28    Calculate total hydrostatic force on a vertical rectangular dam.
29
30    F = ∫₀ᴴ ρgy · w dy = ½ρgwH²
31
32    Parameters:
33    -----------
34    width : float - Width of dam (meters)
35    height : float - Depth of water (meters)
36    rho : float - Fluid density (kg/m³)
37
38    Returns:
39    --------
40    float : Total force in Newtons (N)
41    """
42    return 0.5 * rho * g * width * height**2
43
44def force_on_vertical_surface(
45    width_func,
46    depth_top: float,
47    depth_bottom: float,
48    rho: float = rho_water
49) -> tuple[float, float]:
50    """
51    Calculate hydrostatic force on a vertical surface with variable width.
52
53    F = ∫ ρgy · w(y) dy
54
55    Parameters:
56    -----------
57    width_func : callable - Width as function of depth w(y)
58    depth_top : float - Top of surface (meters from surface)
59    depth_bottom : float - Bottom of surface
60    rho : float - Fluid density
61
62    Returns:
63    --------
64    tuple : (force, error) from numerical integration
65    """
66    def integrand(y):
67        return rho * g * y * width_func(y)
68
69    force, error = integrate.quad(integrand, depth_top, depth_bottom)
70    return force, error
71
72def visualize_pressure_distribution():
73    """
74    Visualize how pressure increases linearly with depth.
75    """
76    depths = np.linspace(0, 10, 100)
77    pressures = hydrostatic_pressure(depths) / 1000  # Convert to kPa
78
79    fig, ax = plt.subplots(figsize=(8, 6))
80
81    # Plot pressure vs depth
82    ax.plot(pressures, depths, 'b-', linewidth=2)
83    ax.fill_betweenx(depths, 0, pressures, alpha=0.3)
84
85    ax.set_xlabel('Pressure (kPa)', fontsize=12)
86    ax.set_ylabel('Depth (m)', fontsize=12)
87    ax.set_title('Hydrostatic Pressure Distribution', fontsize=14)
88    ax.invert_yaxis()  # Depth increases downward
89    ax.grid(True, alpha=0.3)
90
91    # Add annotations
92    ax.annotate('P = ρgh', xy=(50, 5), fontsize=12, color='blue')
93
94    plt.tight_layout()
95    plt.savefig('pressure_distribution.png', dpi=150)
96    plt.show()
97
98def calculate_dam_force_riemann(
99    width: float,
100    height: float,
101    n_strips: int = 100
102) -> float:
103    """
104    Approximate dam force using Riemann sum (numerical integration).
105
106    This demonstrates how integration works:
107    F ≈ Σᵢ P(yᵢ) · w · Δy
108    """
109    dy = height / n_strips
110    total_force = 0
111
112    for i in range(n_strips):
113        y_mid = (i + 0.5) * dy  # Midpoint of strip
114        pressure = rho_water * g * y_mid
115        strip_force = pressure * width * dy
116        total_force += strip_force
117
118    return total_force
119
120# Demonstration
121if __name__ == "__main__":
122    # Example: Dam 20m wide, 10m deep
123    width, height = 20, 10
124
125    # Exact solution using formula
126    F_exact = force_on_dam(width, height)
127    print(f"Dam Force (exact): {F_exact/1e6:.2f} MN")
128
129    # Numerical integration for verification
130    width_func = lambda y: width  # Constant width
131    F_numerical, err = force_on_vertical_surface(
132        width_func, 0, height
133    )
134    print(f"Dam Force (numerical): {F_numerical/1e6:.2f} MN")
135
136    # Riemann sum approximation
137    for n in [10, 50, 100, 1000]:
138        F_riemann = calculate_dam_force_riemann(width, height, n)
139        error_pct = abs(F_riemann - F_exact) / F_exact * 100
140        print(f"Riemann (n={n}): {F_riemann/1e6:.4f} MN, error: {error_pct:.4f}%")
141
142    visualize_pressure_distribution()

Engineering Applications

More advanced examples showing inverse design problems and real engineering scenarios:

Engineering Applications
🐍hydrostatic_engineering.py
10Inverse Problem

Engineering often requires solving inverse problems: given a force requirement, find the necessary dimensions. Here we invert F = ½ρgwH² to find H.

26Centroid Method

For symmetric shapes, F = ρg·yc·A where yc is the centroid depth. This shortcut avoids integration when the shape's centroid is known.

46Center of Pressure

The resultant force doesn't act at the centroid but below it. The center of pressure formula accounts for the non-uniform pressure distribution.

62Inclined Surface

For inclined surfaces, depth varies as y(s) = top_depth + s·sin(θ). We integrate along the surface length, not vertical depth.

80Submarine Safety

Real engineering includes safety factors. Submarines must withstand pressure at depth with margin for safety. This shows how hydrostatics applies to pressure vessel design.

152 lines without explanation
1import numpy as np
2from scipy import integrate, optimize
3import matplotlib.pyplot as plt
4
5# Physical constants
6rho = 1000  # water density (kg/m³)
7g = 9.81    # gravitational acceleration (m/s²)
8
9def design_dam_for_force(target_force: float, width: float) -> float:
10    """
11    Determine required dam height for a target force capacity.
12
13    Given F = ½ρgwH², solve for H:
14    H = √(2F / (ρgw))
15
16    Parameters:
17    -----------
18    target_force : float - Design force capacity (N)
19    width : float - Dam width (m)
20
21    Returns:
22    --------
23    float : Required height (m)
24    """
25    return np.sqrt(2 * target_force / (rho * g * width))
26
27def force_on_circular_porthole(
28    radius: float,
29    center_depth: float
30) -> tuple[float, float, float]:
31    """
32    Calculate force on a circular viewing window.
33
34    For a circle, F = ρg·y_c·A where y_c is the centroid depth.
35    The centroid of a circle is at its center.
36
37    Returns:
38    --------
39    tuple : (total_force, average_pressure, pressure_at_center)
40    """
41    area = np.pi * radius**2
42    pressure_center = rho * g * center_depth
43    total_force = pressure_center * area
44    average_pressure = total_force / area
45
46    return total_force, average_pressure, pressure_center
47
48def center_of_pressure(
49    centroid_depth: float,
50    second_moment: float,
51    area: float
52) -> float:
53    """
54    Calculate the center of pressure for a submerged surface.
55
56    The center of pressure is where the resultant force acts.
57    y_cp = y_c + I_c / (y_c · A)
58
59    where I_c is the second moment of area about the centroid.
60    """
61    return centroid_depth + second_moment / (centroid_depth * area)
62
63def force_on_inclined_surface(
64    length: float,
65    width: float,
66    top_depth: float,
67    angle_deg: float
68) -> float:
69    """
70    Force on a rectangular surface inclined at angle θ from horizontal.
71
72    The effective depth varies along the surface:
73    y(s) = top_depth + s·sin(θ)
74
75    where s is distance along the inclined surface.
76    """
77    angle_rad = np.radians(angle_deg)
78
79    def integrand(s):
80        y = top_depth + s * np.sin(angle_rad)
81        return rho * g * y * width
82
83    force, _ = integrate.quad(integrand, 0, length)
84    return force
85
86def submarine_depth_analysis(
87    hull_radius: float,
88    max_pressure: float,
89    safety_factor: float = 2.0
90) -> dict:
91    """
92    Calculate maximum safe depth for a submarine hull.
93
94    The pressure at depth h is P = ρgh.
95    With safety factor, safe_depth = max_pressure / (ρg · SF)
96
97    Parameters:
98    -----------
99    hull_radius : float - Submarine hull radius (m)
100    max_pressure : float - Maximum allowable pressure (Pa)
101    safety_factor : float - Safety factor (default 2.0)
102
103    Returns:
104    --------
105    dict : Analysis results including max depth and forces
106    """
107    max_safe_depth = max_pressure / (rho * g * safety_factor)
108
109    # Force per unit length on the hull at max depth
110    # For a circular cross-section, integrate pressure around circumference
111    pressure_at_depth = rho * g * max_safe_depth
112
113    # Hoop stress consideration (simplified)
114    cross_section_area = np.pi * hull_radius**2
115    force_on_circular_end = pressure_at_depth * cross_section_area
116
117    return {
118        "max_safe_depth_m": max_safe_depth,
119        "pressure_at_max_Pa": pressure_at_depth / safety_factor,
120        "force_on_end_cap_N": force_on_circular_end,
121        "pressure_atm": pressure_at_depth / 101325,
122    }
123
124# Demonstration
125if __name__ == "__main__":
126    print("=" * 60)
127    print("HYDROSTATIC FORCE ENGINEERING EXAMPLES")
128    print("=" * 60)
129
130    # 1. Dam design
131    print("\n1. DAM DESIGN")
132    target_force = 5e6  # 5 MN
133    dam_width = 30  # meters
134    required_height = design_dam_for_force(target_force, dam_width)
135    print(f"   Target force: {target_force/1e6:.1f} MN")
136    print(f"   Dam width: {dam_width} m")
137    print(f"   Required height: {required_height:.2f} m")
138
139    # 2. Aquarium viewing window
140    print("\n2. AQUARIUM VIEWING WINDOW")
141    radius = 1.5  # 1.5m radius window
142    center_depth = 5  # 5m deep
143    force, avg_p, p_center = force_on_circular_porthole(radius, center_depth)
144    print(f"   Window radius: {radius} m")
145    print(f"   Center depth: {center_depth} m")
146    print(f"   Total force: {force/1000:.1f} kN")
147    print(f"   Pressure at center: {p_center/1000:.1f} kPa")
148
149    # 3. Submarine depth analysis
150    print("\n3. SUBMARINE DEPTH ANALYSIS")
151    hull_r = 5  # 5m radius
152    max_p = 30e6  # 30 MPa hull strength
153    results = submarine_depth_analysis(hull_r, max_p, safety_factor=2.0)
154    print(f"   Hull radius: {hull_r} m")
155    print(f"   Hull strength: {max_p/1e6} MPa")
156    print(f"   Max safe depth: {results['max_safe_depth_m']:.0f} m")
157    print(f"   Pressure at depth: {results['pressure_atm']:.0f} atm")

Machine Learning Connection

While hydrostatic force may seem distant from machine learning, the underlying concepts appear in several areas:

1. Numerical Integration in ML

Many ML computations involve integrals that must be evaluated numerically. The Riemann sum approach we used for hydrostatic force appears in:

  • Expected value calculations: mathbbE[f(x)]=intf(x)p(x)dx\\mathbb{E}[f(x)] = \\int f(x) p(x) dx
  • Monte Carlo integration for approximating intractable integrals
  • Gaussian processes which integrate over function spaces

2. Physics-Informed Neural Networks (PINNs)

PINNs learn to satisfy physical laws like pressure-depth relationships. The hydrostatic pressure equation P=rhoghP = \\rho g h can be used as a constraint in neural network training for fluid simulation.

3. Fluid Dynamics Simulations

Deep learning models are increasingly used to accelerate computational fluid dynamics (CFD). Understanding the fundamental physics — like hydrostatic equilibrium — helps in designing and validating these models.

The Common Thread

Whether calculating hydrostatic force or expected loss, the pattern is the same: sum up contributions over a continuous domain. For force, it's intP(y),dA\\int P(y) \\, dA. For expected value, it's intxcdotp(x),dx\\int x \\cdot p(x) \\, dx. Integration is the universal tool for aggregating continuous quantities.


Common Mistakes to Avoid

Mistake 1: Using constant pressure for vertical surfaces

Wrong: Using F=rhogHcdotAF = \\rho g H \\cdot A for a vertical surface (maximum pressure × area)

Correct: Integrate, or use the average pressure barP=rhogH/2\\bar{P} = \\rho g H / 2 for rectangular surfaces starting at the surface.

Mistake 2: Forgetting that force depends on H²

For vertical rectangular surfaces starting at the water surface, F=frac12rhogwH2F = \\frac{1}{2} \\rho g w H^2. The quadratic dependence on HH is often overlooked.

Mistake 3: Confusing depth with distance

Depth is measured vertically from the surface. For inclined surfaces, you must use the vertical depth at each point, not the distance along the surface.

Mistake 4: Not accounting for surface orientation

Pressure acts perpendicular to any surface. For a vertical dam, the force is horizontal. For an inclined surface, the force has components in multiple directions.

Mistake 5: Using wrong limits of integration

If a surface extends from depth h1h_1 to h2h_2, integrate from h1h_1 to h2h_2, not from 0. The formula frac12rhogwH2\\frac{1}{2} \\rho g w H^2 only applies when the surface starts at the water surface.


Test Your Understanding

Test Your Understanding

Question 1 of 8

A rectangular dam holds back water 8m deep. If the water density is 1000 kg/m³ and g = 10 m/s², what is the hydrostatic pressure at the bottom of the dam?


Summary

Hydrostatic force demonstrates the power of integration to convert a continuously varying quantity (pressure) into a total force. The key formulas are:

Hydrostatic Pressure

P=rhoghP = \\rho g h

Pressure increases linearly with depth

Force on a Horizontal Surface

F=rhoghAF = \\rho g h A

Uniform pressure — no integration needed

Force on a Vertical Surface

F=intrhogycdotw(y),dyF = \\int \\rho g y \\cdot w(y) \\, dy

For rectangles from surface to depth H: F=frac12rhogwH2F = \\frac{1}{2} \\rho g w H^2

Key Takeaways

  1. Pressure increases linearly with depth: P=rhoghP = \\rho g h
  2. Horizontal surfaces experience uniform pressure — simple F=PAF = PA
  3. Vertical surfaces require integration because pressure varies with depth
  4. The force on a vertical rectangle is proportional to H2H^2, not HH
  5. For general shapes, either integrate or use the centroid shortcut: F=rhogbaryAF = \\rho g \\bar{y} A
  6. Engineering applications include dams, submarines, aquariums, and any structure holding fluid
The Core Insight:
"When pressure varies continuously across a surface, integration is how we calculate the total force — summing infinitely many infinitesimal contributions."
Coming Next: In the next section, we'll explore Moments and Center of Mass — using integration to find the balance point of continuous distributions of mass.
Loading comments...