Diffuse-interface modeling of liquid-vapor phase separation in a van der Waals fluid