CAPILLARY

Calculates the Capillary number to compare viscous forces to surface tension forces for a moving fluid.

Excel Usage

=CAPILLARY(V, mu, sigma)
  • V (float, required): Characteristic velocity in meters per second (m/s)
  • mu (float, required): Dynamic viscosity in Pascal-seconds (Pa·s)
  • sigma (float, required): Surface tension in Newtons per meter (N/m)

Returns (float): The Capillary number (dimensionless). str: An error message if the input is invalid.

Example 1: Capillary number for moderate velocity and viscosity

Inputs:

V mu sigma
1.2 0.01 0.1

Excel formula:

=CAPILLARY(1.2, 0.01, 0.1)

Expected output:

0.12

Example 2: More viscous fluid with lower velocity

Inputs:

V mu sigma
0.5 0.05 0.2

Excel formula:

=CAPILLARY(0.5, 0.05, 0.2)

Expected output:

0.125

Example 3: Fast flow with low viscosity and higher surface tension

Inputs:

V mu sigma
2 0.001 0.5

Excel formula:

=CAPILLARY(2, 0.001, 0.5)

Expected output:

0.004

Example 4: Slow flow with high viscosity and low surface tension

Inputs:

V mu sigma
0.1 0.2 0.05

Excel formula:

=CAPILLARY(0.1, 0.2, 0.05)

Expected output:

0.4

Python Code

Show Code
from fluids.core import Capillary as fluids_capillary

def capillary(V, mu, sigma):
    """
    Calculate the Capillary number (Ca) for a fluid system using fluids.core.Capillary.

    See: https://fluids.readthedocs.io/fluids.core.html

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

    Args:
        V (float): Characteristic velocity in meters per second (m/s)
        mu (float): Dynamic viscosity in Pascal-seconds (Pa·s)
        sigma (float): Surface tension in Newtons per meter (N/m)

    Returns:
        float: The Capillary number (dimensionless). str: An error message if the input is invalid.
    """
    try:
        V_ = float(V)
        mu_ = float(mu)
        sigma_ = float(sigma)
    except (TypeError, ValueError):
        return "Error: All parameters must be numeric values."

    try:
        result = fluids_capillary(V_, mu_, sigma_)
    except (ValueError, ZeroDivisionError) as e:
        return f"Error: Failed to calculate Capillary number: {str(e)}"
    except Exception as e:
        return f"Error: {str(e)}"

    return result

Online Calculator

Characteristic velocity in meters per second (m/s)
Dynamic viscosity in Pascal-seconds (Pa·s)
Surface tension in Newtons per meter (N/m)