RND_EDGE_MESH

Overview

Calculate the loss coefficient for a round edged open net or screen mesh.

Excel Usage

=RND_EDGE_MESH(alpha, mesh_type, angle)
  • alpha (float, required): Fraction of net/screen open to flow, [-]
  • mesh_type (str, optional, default: “diamond pattern wire”): Type of mesh pattern
  • 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: Diamond pattern wire (alpha=0.96)

Inputs:

alpha
0.96

Excel formula:

=RND_EDGE_MESH(0.96)

Expected output:

Result
0.0289

Example 2: With angle (alpha=0.96, angle=33)

Inputs:

alpha angle
0.96 33

Excel formula:

=RND_EDGE_MESH(0.96, 33)

Expected output:

Result
0.0203

Example 3: Round bar screen (alpha=0.9)

Inputs:

alpha mesh_type
0.9 round bar screen

Excel formula:

=RND_EDGE_MESH(0.9, "round bar screen")

Expected output:

Result
0.097

Example 4: Knotted net (alpha=0.95)

Inputs:

alpha mesh_type
0.95 knotted net

Excel formula:

=RND_EDGE_MESH(0.95, "knotted net")

Expected output:

Result
0.0473

Python Code

import micropip
await micropip.install(["fluids"])
from fluids.filters import round_edge_open_mesh as fluids_round_edge_open_mesh

def rnd_edge_mesh(alpha, mesh_type='diamond pattern wire', angle=0):
    """
    Calculate the loss coefficient for a round edged open net or screen mesh.

    See: https://fluids.readthedocs.io/fluids.filters.html#fluids.filters.round_edge_open_mesh

    This example function is provided as-is without any representation of accuracy.

    Args:
        alpha (float): Fraction of net/screen open to flow, [-]
        mesh_type (str, optional): Type of mesh pattern Valid options: Diamond Pattern Wire, Round Bar Screen, Knotted Net, Knotless Net. Default is 'diamond pattern wire'.
        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 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 angle < 0 or angle > 90:
        return "Error: Angle must be between 0 and 90 degrees."

    # Validate mesh_type
    valid_types = ['round bar screen', 'diamond pattern wire', 'knotted net', 'knotless net']
    if mesh_type not in valid_types:
        return f"Error: mesh_type must be one of {valid_types}."

    try:
        result = fluids_round_edge_open_mesh(alpha=alpha, subtype=mesh_type, 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_open_mesh: {str(e)}"

Online Calculator