def compute_beta(TT, minT):
"""
This function computes the volumetric thermal expansion as a numerical
derivative of the volume as a function of temperature V(T) given in the
input array *minT*. This array can obtained
from the free energy minimization which should be done before.
"""
grad=np.gradient(np.array(minT)) # numerical derivatives with numpy
betaT = np.array(grad) # grad contains the derivatives with respect to T
# also convert to np.array format
return betaT/minT
评论列表
文章目录