eos.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:pyqha 作者: mauropalumbo75 项目源码 文件源码
def compute_Cv(T,Vmin,V,Cvib):
    """
    This function computes the isocoric heat capacity as a function of temperature.
    From *Cvib*, which is a matrix with *Cvib(T,V)* as from the harmonic calculations
    determines the *Cv* at each temperature by linear interpolation between the values
    at the two volumes closest to Vmin(T). Vmin(T) is from the minimization of F(V,T)
    and *V* is the array of volumes used for it.
    Returns *Cv(T)*.

    Work in progress... for now it uses all volumes in the interpolation.

    """
    Cv = np.zeros(len(T))
    for iT in range(0,len(T)):
        Cv_interpolated = np.interp(Vmin[iT], V, Cvib[iT,:])
        Cv[iT] = Cv_interpolated

    return Cv
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号