示例#1
0
def Rac_Nusselt_Rayleigh(H, L, W, insulated=True):
    r'''Calculates the critical Rayleigh number for free convection to begin
    in the Nusselt-Rayleigh parallel horizontal plate scenario. There are
    actually two cases - one for the top plate to be insulated (adiabatic) and
    the other where it has infinite thermal conductivity/is infinitely thin or
    not present (perfectly conducting). All real cases will lie between the
    two.
    
    Parameters
    ----------
    H : float
        Distance between the two plates, [m]
    L : float
        Length of the plates, [m]
    W : float
        Width of the plates, [m]
    insulated : bool, optional
        Whether the top plate is insulated or uninsulated, [-]

    Returns
    -------
    Rac : float
        Critical Rayleigh number, [-]

    Examples
    --------
    >>> Rac_Nusselt_Rayleigh(1, .5, 2, False)
    2530.500000000005
    >>> Rac_Nusselt_Rayleigh(1, .5, 2, True)
    2071.0089443385655

    Notes
    -----
    Splines have been fit to data in [1]_ for the uninsulated case and [2]_
    for the insulated case. The data is presented in the original papers and 
    in [3]_.

    References
    ----------
    .. [1] Catton, Ivan. "Effect of Wall Conduction on the Stability of a Fluid
       in a Rectangular Region Heated from Below." Journal of Heat Transfer 94, 
       no. 4 (November 1, 1972): 446-52. https://doi.org/10.1115/1.3449966.
    .. [2] Catton, Ivan. "Convection in a Closed Rectangular Region: The Onset 
       of Motion." Journal of Heat Transfer 92, no. 1 (February 1, 1970): 
       186-88. https://doi.org/10.1115/1.3449626.
    .. [3] Rohsenow, Warren and James Hartnett and Young Cho. Handbook of Heat
       Transfer, 3E. New York: McGraw-Hill, 1998.
    '''
    H_L_ratio = min(max(H / L, 0.125), 12.0)
    W_L_ratio = min(max(W / L, 0.125), 12.0)

    if insulated:
        Rac = exp(bisplev(W_L_ratio, H_L_ratio, tck_insulated_Catton))
    else:
        Rac = exp(bisplev(W_L_ratio, H_L_ratio, tck_uninstulated_Catton))
    return Rac
示例#2
0
def API520_SH(T1, P1):
    r'''Calculates correction due to steam superheat for steam flow for use in
    API 520 relief valve sizing. 2D interpolation among a table with 28
    pressures and 10 temperatures is performed.


    Parameters
    ----------
    T1 : float
        Temperature of the fluid entering the valve [K]
    P1 : float
        Upstream relieving pressure; the set pressure plus the allowable
        overpressure, plus atmospheric pressure, [Pa]

    Returns
    -------
    KSH : float
        Correction due to steam superheat [-]

    Notes
    -----
    For P above 20679 kPag, use the critical flow model.
    Superheat cannot be above 649 degrees Celsius.
    If T1 is above 149 degrees Celsius, returns 1.

    Examples
    --------
    Custom example from table 9:

    >>> API520_SH(593+273.15, 1066.325E3)
    0.7201800000000002

    References
    ----------
    .. [1] API Standard 520, Part 1 - Sizing and Selection.
    '''
    if P1 > 20780325.0:  # 20679E3+atm
        raise Exception('For P above 20679 kPag, use the critical flow model')
    if T1 > 922.15:
        raise Exception('Superheat cannot be above 649 degrees Celcius')
    if T1 < 422.15:
        return 1.  # No superheat under 15 psig
    return float(bisplev(T1, P1, API520_KSH_tck))
示例#3
0
def API520_SH(T1, P1):
    r'''Calculates correction due to steam superheat for steam flow for use in
    API 520 relief valve sizing. 2D interpolation among a table with 28
    pressures and 10 temperatures is performed.


    Parameters
    ----------
    T1 : float
        Temperature of the fluid entering the valve [K]
    P1 : float
        Upstream relieving pressure; the set pressure plus the allowable
        overpressure, plus atmospheric pressure, [Pa]

    Returns
    -------
    KSH : float
        Correction due to steam superheat [-]

    Notes
    -----
    For P above 20679 kPag, use the critical flow model.
    Superheat cannot be above 649 degrees Celsius.
    If T1 is above 149 degrees Celsius, returns 1.

    Examples
    --------
    Custom example from table 9:

    >>> API520_SH(593+273.15, 1066.325E3)
    0.7201800000000002

    References
    ----------
    .. [1] API Standard 520, Part 1 - Sizing and Selection.
    '''
    if P1 > 20780325.0: # 20679E3+atm
        raise Exception('For P above 20679 kPag, use the critical flow model')
    if T1 > 922.15:
        raise Exception('Superheat cannot be above 649 degrees Celcius')
    if T1 < 422.15:
        return 1. # No superheat under 15 psig
    return float(bisplev(T1, P1, API520_KSH_tck))