PyResis/propulsion_power.py
def residual_resistance_coef(slenderness, prismatic_coef, froude_number):
    """
    Residual resistance coefficient estimation from slenderness function, prismatic coefficient and Froude number.

    :param slenderness: Slenderness coefficient dimensionless :math:`L/(∇^{1/3})` where L is length of ship, ∇ is displacement
    :param prismatic_coef: Prismatic coefficient dimensionless :math:`∇/(L\cdot A_m)` where L is length of ship, ∇ is displacement Am is midsection area of the ship
    :param froude_number: Froude number of the ship dimensionless 
    :return: Residual resistance of the ship
    """
    Cr = cr(slenderness, prismatic_coef, froude_number)
    if math.isnan(Cr):
        Cr = cr_nearest(slenderness, prismatic_coef, froude_number)

    # if Froude number is out of interpolation range, nearest extrapolation is used
    return Cr
def residual_resistance_coef(slenderness, prismatic_coef, froude_number):
    """
    Residual resistance coefficient estimation from slenderness function, prismatic coefficient and Froude number.

    :param slenderness: Slenderness coefficient dimensionless :math:`L/(∇^{1/3})` where L is length of ship, ∇ is displacement
    :param prismatic_coef: Prismatic coefficient dimensionless :math:`∇/(L\cdot A_m)` where L is length of ship, ∇ is displacement Am is midsection area of the ship
    :param froude_number: Froude number of the ship dimensionless 
    :return: Residual resistance of the ship
    """
    Cr = cr(slenderness, prismatic_coef, froude_number)
    if math.isnan(Cr):
        Cr = cr_nearest(slenderness, prismatic_coef, froude_number)

    # if Froude number is out of interpolation range, nearest extrapolation is used
    return Cr
def residual_resistance_coef ( slenderness , prismatic_coef , froude_number ) : Cr = cr ( slenderness , prismatic_coef , froude_number ) if math . isnan ( Cr ) : Cr = cr_nearest ( slenderness , prismatic_coef , froude_number ) # if Froude number is out of interpolation range, nearest extrapolation is used return Cr
Residual resistance coefficient estimation from slenderness function, prismatic coefficient and Froude number.

    :param slenderness: Slenderness coefficient dimensionless :math:`L/(∇^{1/3})` where L is length of ship, ∇ is displacement
    :param prismatic_coef: Prismatic coefficient dimensionless :math:`∇/(L\cdot A_m)` where L is length of ship, ∇ is displacement Am is midsection area of the ship
    :param froude_number: Froude number of the ship dimensionless 
    :return: Residual resistance of the ship
Residual resistance coefficient estimation from slenderness function prismatic coefficient and Froude number .