RND_EDGE_SCREEN
Overview
Calculate the loss coefficient for a round edged wire screen or bar screen.
Excel Usage
=RND_EDGE_SCREEN(alpha, Re, angle)
alpha(float, required): Fraction of screen open to flow, [-]Re(float, required): Reynolds number of flow through screen (D = space between rods), [-]angle(float, optional, default: 0): Angle of inclination (0 = straight, 90 = parallel to flow), [degrees]
Returns (float): Loss coefficient K, [-], or error message (str) if input is invalid.
Examples
Example 1: Basic case (alpha=0.5, Re=100)
Inputs:
| alpha | Re |
|---|---|
| 0.5 | 100 |
Excel formula:
=RND_EDGE_SCREEN(0.5, 100)
Expected output:
| Result |
|---|
| 2.1 |
Example 2: With angle (alpha=0.5, Re=100, angle=45)
Inputs:
| alpha | Re | angle |
|---|---|---|
| 0.5 | 100 | 45 |
Excel formula:
=RND_EDGE_SCREEN(0.5, 100, 45)
Expected output:
| Result |
|---|
| 1.05 |
Example 3: Low Reynolds number (Re=20)
Inputs:
| alpha | Re |
|---|---|
| 0.3 | 20 |
Excel formula:
=RND_EDGE_SCREEN(0.3, 20)
Expected output:
| Result |
|---|
| 13.1444 |
Example 4: High Reynolds number (Re=400)
Inputs:
| alpha | Re |
|---|---|
| 0.7 | 400 |
Excel formula:
=RND_EDGE_SCREEN(0.7, 400)
Expected output:
| Result |
|---|
| 0.5412 |
Python Code
import micropip
await micropip.install(["fluids"])
from fluids.filters import round_edge_screen as fluids_round_edge_screen
def rnd_edge_screen(alpha, Re, angle=0):
"""
Calculate the loss coefficient for a round edged wire screen or bar screen.
See: https://fluids.readthedocs.io/fluids.filters.html#fluids.filters.round_edge_screen
This example function is provided as-is without any representation of accuracy.
Args:
alpha (float): Fraction of screen open to flow, [-]
Re (float): Reynolds number of flow through screen (D = space between rods), [-]
angle (float, optional): Angle of inclination (0 = straight, 90 = parallel to flow), [degrees] Default is 0.
Returns:
float: Loss coefficient K, [-], or error message (str) if input is invalid.
"""
# Validate and convert alpha
try:
alpha = float(alpha)
except (ValueError, TypeError):
return "Error: Alpha must be a number."
# Validate and convert Re
try:
Re = float(Re)
except (ValueError, TypeError):
return "Error: Re must be a number."
# Validate and convert angle
try:
angle = float(angle)
except (ValueError, TypeError):
return "Error: Angle must be a number."
# Validate ranges
if alpha <= 0 or alpha > 1:
return "Error: Alpha must be between 0 and 1."
if Re <= 0:
return "Error: Re must be positive."
if angle < 0 or angle > 90:
return "Error: Angle must be between 0 and 90 degrees."
try:
result = fluids_round_edge_screen(alpha=alpha, Re=Re, angle=angle)
if result != result: # NaN check
return "nan"
if result == float('inf'):
return "inf"
if result == float('-inf'):
return "-inf"
return float(result)
except Exception as e:
return f"Error computing round_edge_screen: {str(e)}"