ENTRANCE_ROUNDED
Overview
Calculate the loss coefficient (K) for a rounded entrance to a pipe flush with a reservoir wall.
Excel Usage
=ENTRANCE_ROUNDED(Di, rc, ent_rnd_method)
Di(float, required): Inside diameter of pipe [m]rc(float, required): Radius of curvature of the entrance [m]ent_rnd_method(str, optional, default: “Rennels”): Calculation method
Returns (float): Loss coefficient K for the rounded entrance [-]
Examples
Example 1: Basic rounded entrance with Rennels method
Inputs:
| Di | rc |
|---|---|
| 0.1 | 0.0235 |
Excel formula:
=ENTRANCE_ROUNDED(0.1, 0.0235)
Expected output:
| Result |
|---|
| 0.0984 |
Example 2: Large radius of curvature (generous rounding)
Inputs:
| Di | rc |
|---|---|
| 0.1 | 0.1 |
Excel formula:
=ENTRANCE_ROUNDED(0.1, 0.1)
Expected output:
| Result |
|---|
| 0.03 |
Example 3: Small radius of curvature
Inputs:
| Di | rc |
|---|---|
| 0.1 | 0.005 |
Excel formula:
=ENTRANCE_ROUNDED(0.1, 0.005)
Expected output:
| Result |
|---|
| 0.2968 |
Example 4: Swamee method calculation
Inputs:
| Di | rc | ent_rnd_method |
|---|---|---|
| 0.1 | 0.0235 | Swamee |
Excel formula:
=ENTRANCE_ROUNDED(0.1, 0.0235, "Swamee")
Expected output:
| Result |
|---|
| 0.0682 |
Python Code
import micropip
await micropip.install(["fluids"])
from fluids.fittings import entrance_rounded as fluids_entrance_rounded
def entrance_rounded(Di, rc, ent_rnd_method='Rennels'):
"""
Calculate the loss coefficient (K) for a rounded entrance to a pipe flush with a reservoir wall.
See: https://fluids.readthedocs.io/fluids.fittings.html#fluids.fittings.entrance_rounded
This example function is provided as-is without any representation of accuracy.
Args:
Di (float): Inside diameter of pipe [m]
rc (float): Radius of curvature of the entrance [m]
ent_rnd_method (str, optional): Calculation method Valid options: Rennels, Swamee, Miller, Idelchik, Harris, Crane. Default is 'Rennels'.
Returns:
float: Loss coefficient K for the rounded entrance [-]
"""
try:
Di = float(Di)
rc = float(rc)
except (ValueError, TypeError):
return "Error: Di and rc must be numbers."
if Di <= 0:
return "Error: Di must be positive."
if rc < 0:
return "Error: Rc must be non-negative."
try:
result = fluids_entrance_rounded(Di=Di, rc=rc, method=ent_rnd_method)
return float(result)
except Exception as e:
return f"Error: {str(e)}"