  Following a cell-method due to van Kampen for the calculation of a
coarse-grained free energy functional for the van der Waals gas, we compute a
corresponding entropy functional from microscopic principles. This entropy
functional is one of the building blocks of the recently developed GENERIC
framework. This framework allows to obtain in a thermodynamically consistent
way the continuum hydrodynamic equations for a fluid able to display
liquid-vapor coexistence. Surface tension appears naturally and the resulting
model describes interfaces as diffuse regions, much in the same spirit as the
gradient theory for equilibrium situations. We suggest that using interfacial
forces in the integral form obtained in the microscopic derivation instead of
third order derivatives of the density field might represent an advantage from
a computational point of view.
