예제 #1
0
def alt2dynamic_viscosity(H, alt_units=default_alt_units,
    dynamic_viscosity_units=default_dynamic_viscosity_units):
    """
    Return dynamic viscosity given the altitude.
    """
    T = alt2temp(H, alt_units=alt_units)
    u = temp2dynamic_viscosity(T)
    
    # add unit conversion for result
    u = U.dynamic_viscosity_conv(u, 'Pa s', dynamic_viscosity_units) 
       
    return u
예제 #2
0
def temp2dynamic_viscosity(T, temp_units=default_temp_units, 
    dynamic_viscosity_units=default_dynamic_viscosity_units):
    """
    Return dynamic viscosity given the air temperature.
    
    Formula from US Standard Atmosphere, 1976 section 1.3.11 on page 19.
    """
    T = U.temp_conv(T, temp_units, 'K')
    u = 1.458e-6 * T**1.5 / (T + 110.4)
    
    u = U.dynamic_viscosity_conv(u, 'Pa s', dynamic_viscosity_units)
    
    return u
예제 #3
0
def alt2dynamic_viscosity(
        H,
        alt_units=default_alt_units,
        dynamic_viscosity_units=default_dynamic_viscosity_units):
    """
    Return dynamic viscosity given the altitude.
    """
    T = alt2temp(H, alt_units=alt_units)
    u = temp2dynamic_viscosity(T)

    # add unit conversion for result
    u = U.dynamic_viscosity_conv(u, 'Pa s', dynamic_viscosity_units)

    return u
예제 #4
0
def kinematic_viscosity(density, dynamic_viscosity, 
    kinematic_viscosity_units=default_kinematic_viscosity_units, 
    density_units=default_density_units, 
    dynamic_viscosity_units=default_dynamic_viscosity_units):
    """
    Return kinematic viscosity given density and dynamic viscosity.
    """
    density = U.density_conv(density, density_units, 'kg/m**3')
    dynamic_viscosity = U.dynamic_viscosity_conv(dynamic_viscosity, dynamic_viscosity_units, 'Pa s')
    kinematic_viscosity = dynamic_viscosity / density
    
    kinematic_viscosity = U.kinematic_viscosity_conv(kinematic_viscosity, 'm**2/s', kinematic_viscosity_units)
    
    return kinematic_viscosity
예제 #5
0
def temp2dynamic_viscosity(
        T,
        temp_units=default_temp_units,
        dynamic_viscosity_units=default_dynamic_viscosity_units):
    """
    Return dynamic viscosity given the air temperature.
    
    Formula from US Standard Atmosphere, 1976 section 1.3.11 on page 19.
    """
    T = U.temp_conv(T, temp_units, 'K')
    u = 1.458e-6 * T**1.5 / (T + 110.4)

    u = U.dynamic_viscosity_conv(u, 'Pa s', dynamic_viscosity_units)

    return u
예제 #6
0
def kinematic_viscosity(
        density,
        dynamic_viscosity,
        kinematic_viscosity_units=default_kinematic_viscosity_units,
        density_units=default_density_units,
        dynamic_viscosity_units=default_dynamic_viscosity_units):
    """
    Return kinematic viscosity given density and dynamic viscosity.
    """
    density = U.density_conv(density, density_units, 'kg/m**3')
    dynamic_viscosity = U.dynamic_viscosity_conv(dynamic_viscosity,
                                                 dynamic_viscosity_units,
                                                 'Pa s')
    kinematic_viscosity = dynamic_viscosity / density

    kinematic_viscosity = U.kinematic_viscosity_conv(
        kinematic_viscosity, 'm**2/s', kinematic_viscosity_units)

    return kinematic_viscosity