Topic Relating to Staistics

  • In mechanical engineering, the study of fluid mechanics and heat transfer is important when designing any product or system.
  • In terms of statistics, linear and non-linear regression models are used to create practical equations from data based on the theoretical equation.
  • This presentation will explore how experimental data often contains variations from equations based on intsrument accuracy, turbulence, and environmental conditions

Velocity Flow in Pipe

  • Study the velocity profile of airflow in a pipe
  • Want to estimate the mean velocity, find the variability, and find a regression model fit

Mathematical Model of Velocity Flow

  • relationship between velocity (v) and radial distance (r) in developed laminar flow \[ v(r) = v_{max} \left( 1 - \left( \frac{r}{R} \right)^2 \right) \]
  • v_max: maximum velocity at the center
  • R: pipe radius
  • r: distance from the center

Statistical Estimation

  • Assuming measurement ϵ are normally distributed: \[ v_i = v_{max} \left( 1 - \left( \frac{r_i}{R} \right)^2 \right) + \epsilon_i, \quad \epsilon_i \sim N(0, \sigma^2) \]
  • The parameters v_max and sigma^2 can be estimated using least squares or maximum likelihood methods.

Data Visualization

3D Flow Surface Visualization

Linear Regression Model (code)

# Fit a simple linear regression model to velocity data
model <- lm(v_act ~ r, data = df)
# View regression summary
print(summary(model))
## 
## Call:
## lm(formula = v_act ~ r, data = df)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.40124 -0.08717  0.00803  0.15187  0.29187 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  2.34519    0.09053   25.91 1.06e-15 ***
## r           -2.03048    0.15477  -13.12 1.19e-10 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.2101 on 18 degrees of freedom
## Multiple R-squared:  0.9053, Adjusted R-squared:  0.9001 
## F-statistic: 172.1 on 1 and 18 DF,  p-value: 1.186e-10

Linear Regression Model (graph)

## `geom_smooth()` using formula = 'y ~ x'