r'''Returns heat capacity of a refractory material from a table in
    [1]_. Here, heat capacity is a function of temperature between
    673.15 K and 1473.15 K according to linear interpolation among 5
    equally-spaced points. Here, heat capacity is not a function of
    porosity, affects it. If T is outside the acceptable range, it is
    rounded to the nearest limit. If T is not provided, the lowest temperature's
    value is provided.

    Parameters
    ----------
    ID : str
        ID corresponding to a material in the dictionary `refractories`
    T : float, optional
        Temperature of the refractory material, [K]

    Returns
    -------
    Cp : float
        Heat capacity of the refractory material, [W/m/K]

    Examples
    --------
    >>> [refractory_VDI_Cp('Fused silica', i) for i in [None, 200, 1000, 1500]]
    [917.0, 917.0, 956.78225, 982.0]

    References
    ----------
    .. [1] Gesellschaft, V. D. I., ed. VDI Heat Atlas. 2nd edition.
       Berlin; New York:: Springer, 2010.

def refractory_VDI_Cp(ID, T=None):
    r'''Returns heat capacity of a refractory material from a table in
    [1]_. Here, heat capacity is a function of temperature between
    673.15 K and 1473.15 K according to linear interpolation among 5
    equally-spaced points. Here, heat capacity is not a function of
    porosity, affects it. If T is outside the acceptable range, it is
    rounded to the nearest limit. If T is not provided, the lowest temperature's
    value is provided.

    Parameters
    ----------
    ID : str
        ID corresponding to a material in the dictionary `refractories`
    T : float, optional
        Temperature of the refractory material, [K]

    Returns
    -------
    Cp : float
        Heat capacity of the refractory material, [W/m/K]

    Examples
    --------
    >>> [refractory_VDI_Cp('Fused silica', i) for i in [None, 200, 1000, 1500]]
    [917.0, 917.0, 956.78225, 982.0]

    References
    ----------
    .. [1] Gesellschaft, V. D. I., ed. VDI Heat Atlas. 2nd edition.
       Berlin; New York:: Springer, 2010.
    '''
    if T is None:
        return float(refractories[ID][2][0])
    else:
        Cps = refractories[ID][2]
        if T < _refractory_Ts[0]:
            T = _refractory_Ts[0]
        elif T > _refractory_Ts[-1]:
            T = _refractory_Ts[-1]
        return float(np.interp(T, _refractory_Ts, Cps))