CD_MORRISON
Overview
Calculate drag coefficient of a sphere using the Morrison correlation.
Excel Usage
=CD_MORRISON(Re)
Re(float, required): Particle Reynolds number [-]
Returns (float): Drag coefficient [-], or error message (str) if input is invalid.
Examples
Example 1: Reynolds number of 200
Inputs:
| Re |
|---|
| 200 |
Excel formula:
=CD_MORRISON(200)
Expected output:
0.7677
Example 2: Reynolds number of 1000
Inputs:
| Re |
|---|
| 1000 |
Excel formula:
=CD_MORRISON(1000)
Expected output:
0.4841
Example 3: Reynolds number of 100000
Inputs:
| Re |
|---|
| 100000 |
Excel formula:
=CD_MORRISON(100000)
Expected output:
0.4247
Example 4: High Reynolds number (500000)
Inputs:
| Re |
|---|
| 500000 |
Excel formula:
=CD_MORRISON(500000)
Expected output:
0.0877
Python Code
from fluids.drag import Morrison as fluids_Morrison
def cd_morrison(Re):
"""
Calculate drag coefficient of a sphere using the Morrison correlation.
See: https://fluids.readthedocs.io/fluids.drag.html#fluids.drag.Morrison
This example function is provided as-is without any representation of accuracy.
Args:
Re (float): Particle Reynolds number [-]
Returns:
float: Drag coefficient [-], or error message (str) if input is invalid.
"""
try:
Re = float(Re)
if Re <= 0:
return "Error: Re must be positive."
result = fluids_Morrison(Re=Re)
if result != result: # NaN check
return "Error: Calculation resulted in NaN."
return float(result)
except (ValueError, TypeError):
return "Error: Re must be a number."
except Exception as e:
return f"Error: {str(e)}"