def headloss_fric_rect(FlowRate, Width, DistCenter, Length, Nu, PipeRough, openchannel):
    """Return the major head loss due to wall shear in a rectangular channel.

    This equation applies to both laminar and turbulent flows.
    """
    #Checking input validity - inputs not checked here are checked by
    #functions this function calls.
    ut.check_range([Length, ">0", "Length"])
    return (fric_rect(FlowRate, Width, DistCenter, Nu,
                      PipeRough, openchannel)
            * Length
            / (4 * radius_hydraulic(Width, DistCenter, openchannel).magnitude)
            * FlowRate**2
            / (2 * gravity.magnitude * (Width*DistCenter)**2)
            )
def headloss_fric_rect ( FlowRate , Width , DistCenter , Length , Nu , PipeRough , openchannel ) : ut . check_range ( [ Length , ">0" , "Length" ] ) return ( fric_rect ( FlowRate , Width , DistCenter , Nu , PipeRough , openchannel ) * Length / ( 4 * radius_hydraulic ( Width , DistCenter , openchannel ) . magnitude ) * FlowRate ** 2 / ( 2 * gravity . magnitude * ( Width * DistCenter ) ** 2 ) )
Return the major head loss due to wall shear in a rectangular channel.

    This equation applies to both laminar and turbulent flows.