1. Problem Statement: Volume of a Cylinder¶
This example follows the video tutorial on YouTube: Uncertainty Propagation Example: Volume of a Cylinder by Dr. Joshua Paul Steimel.
A tube of circular cross-section has a nominal length () of and a radius () of . Determine the total uncertainty in the volume.
1.1 Given Nominal Values (Mean Values)¶
The nominal values (mean values, denoted and in standard notation, or and in the equations) are:
1.2 Given Uncertainties ( or )¶
The stated ± values are the Bias Uncertainties (or standard uncertainty if a coverage factor is not explicitly used, as is often the case in this type of problem, represented as and ):
1.3 Total Uncertainty Equation¶
The total uncertainty () is the root sum of the squares of the Bias Uncertainty () and the Precision Uncertainty ():
As explained in the video (0:09, 2:35), since there is no information given about the number of samples or standard deviation, the Precision Uncertainty () is zero.
Therefore, the Total Uncertainty () is equal to the Bias Uncertainty ():
2. Methodology: Uncertainty Propagation (Bias Error )¶
The Volume () of the cylinder is a function of two independent variables, radius () and length ().
The Bias Uncertainty () is calculated using the standard method for uncorrelated variables:
2.1 Calculate Partial Derivatives (Sensitivity Coefficients)¶
We first calculate the partial derivatives of the volume equation with respect to each independent variable. These are the sensitivity coefficients ():
Sensitivity with respect to Radius ():
Sensitivity with respect to Length ():
2.2 Numerical Calculations for Total Uncertainty ()¶
Now, we plug the nominal/mean values (, ) into the partial derivatives to find the numerical sensitivity coefficients, and then calculate the total uncertainty .
import numpy as np
# Nominal (Mean) Values
r = 15.0 # meters
l = 50.0 # meters
# Uncertainties (u_i or mu_i)
u_r = 0.1 # meters
u_l = 0.5 # meters
pi = np.pi
# 1. Calculate Nominal Volume (V)
V = pi * r**2 * l
print(f"Nominal Volume (V): {V:.3f} m^3")
# 2. Calculate Sensitivity Coefficients (c_r, c_l)
c_r = 2 * pi * r * l
c_l = pi * r**2
# 3. Calculate Squared Uncertainty Contributions (c_i * u_i)^2
term_r_squared = (c_r * u_r)**2
term_l_squared = (c_l * u_l)**2
# 4. Calculate Bias Uncertainty (B_V)
B_V = np.sqrt(term_r_squared + term_l_squared)
print(f"\nSensitivity Coefficient for Radius (c_r = 2πrl): {c_r:.3f}")
print(f"Sensitivity Coefficient for Length (c_l = πr²): {c_l:.3f}")
print(f"\nBias Uncertainty (B_V) in Volume: {B_V:.3f} m^3")The calculated Bias Uncertainty () is approximately , which is the Total Uncertainty () for this problem.
3. Alternative Method: Fractional (Relative) Uncertainty¶
The video also suggests calculating the fractional uncertainty () first, as it helps with units consistency (7:11). The result is a unitless fraction (or percentage).
The fractional uncertainty equation is:
3.1 Simplified Fractional Terms¶
By dividing the partial derivatives by the volume formula , the terms simplify significantly:
Fractional Sensitivity for Radius:
Fractional Sensitivity for Length:
3.2 Numerical Calculation of Fractional Uncertainty¶
The new unitless formula is:
# 1. Calculate Fractional Uncertainty (Unitless)
frac_r_squared = (2 * u_r / r)**2
frac_l_squared = (u_l / l)**2
frac_B_V = np.sqrt(frac_r_squared + frac_l_squared)
print(f"Fractional Uncertainty (B_V/V): {frac_B_V:.6f}")
# 2. Check: Reconvert to absolute uncertainty (B_V = V * (B_V/V))
B_V_check = V * frac_B_V
print(f"Absolute Uncertainty Check (V * (B_V/V)): {B_V_check:.3f} m^3")The fractional uncertainty is approximately 0.016667, or . Multiplying this by the Nominal Volume () yields , confirming the result from the direct calculation method.
4. Final Uncertainty Budget Summary¶
| Quantity | Nominal Value | Uncertainty ( or ) | Sensitivity Coeff. () | Uncertainty Contrib. () | Squared Contrib. ()^2 |
|---|---|---|---|---|---|
| Radius () | |||||
| Length () | |||||
| Volume () | - | - |
The total uncertainty in the volume of the cylinder is:
or in fractional terms: