SQ_EDGE_SCREEN
Overview
Calculate the loss coefficient for a square edged wire screen, bar screen, or perforated plate.
Excel Usage
=SQ_EDGE_SCREEN(alpha)
alpha(float, required): Fraction of screen open to flow, [-]
Returns (float): Loss coefficient K, [-], or error message (str) if input is invalid.
Examples
Example 1: High open area (alpha=0.99)
Inputs:
| alpha |
|---|
| 0.99 |
Excel formula:
=SQ_EDGE_SCREEN(0.99)
Expected output:
0.008
Example 2: Medium open area (alpha=0.5)
Inputs:
| alpha |
|---|
| 0.5 |
Excel formula:
=SQ_EDGE_SCREEN(0.5)
Expected output:
3.8
Example 3: Low open area (alpha=0.2)
Inputs:
| alpha |
|---|
| 0.2 |
Excel formula:
=SQ_EDGE_SCREEN(0.2)
Expected output:
52
Example 4: Typical screen (alpha=0.7)
Inputs:
| alpha |
|---|
| 0.7 |
Excel formula:
=SQ_EDGE_SCREEN(0.7)
Expected output:
1.1
Python Code
from fluids.filters import square_edge_screen as fluids_square_edge_screen
def sq_edge_screen(alpha):
"""
Calculate the loss coefficient for a square edged wire screen, bar screen, or perforated plate.
See: https://fluids.readthedocs.io/fluids.filters.html#fluids.filters.square_edge_screen
This example function is provided as-is without any representation of accuracy.
Args:
alpha (float): Fraction of screen open to flow, [-]
Returns:
float: Loss coefficient K, [-], or error message (str) if input is invalid.
"""
try:
# Validate and convert alpha
try:
alpha = float(alpha)
except (ValueError, TypeError):
return "Error: alpha must be a number."
# Validate alpha range
if alpha <= 0 or alpha > 1:
return "Error: alpha must be between 0 and 1."
result = fluids_square_edge_screen(alpha=alpha)
if result != result or result in (float('inf'), float('-inf')):
return "Error: Result is not finite."
return float(result)
except Exception as e:
return f"Error: {str(e)}"