def liquidEnthalpy(T, hCP, TRef=298.15):
    """
    liquidEnthalpy(T, hCP, TRef=298.15)

    liquidEnthalpy (J/mol) = A*(T-TRef) + 1/2*B*(T^2-TRef^2) + 
                             1/3*C*(T^3-TRef^3) + 1/4*D*(T^4-TRef^4)
    
    Parameters
      T, temperature
      TRef, reference temperature
      hCP, A=hCP[0], B=hCP[1], C=hCP[2], D=hCP[3]
      A, B, C, and D are regression coefficients  

    Returns
      liquid enthalpy change in J/mol between T and TRef
    """
    return hCP[0]*(T-TRef) + 1.0/2.0*hCP[1]*(T**2-TRef**2) + 1.0/3.0*hCP[2]*(T**3-TRef**3) + 1.0/4.0*hCP[3]*(T**4-TRef**4)