# Plot the Planck Thermodynamic Potential of Water

Obtain entropy, internal energy, and specific volume of water at various temperatures and pressures.

 In[1]:= Xtemperature = UnitConvert[ Quantity[Table[x, {x, 20., 400, 20}], "DegreesCelsius"], "Kelvins"]; pressure = Quantity[Table[10^x, {x, 3, 6, 0.2}], "Pascals"]; opt = {"Temperature" -> temperature, "Pressure" -> pressure}; s = ThermodynamicData["Water", "Entropy", opt]; u = ThermodynamicData["Water", "InternalEnergy", opt]; v = ThermodynamicData["Water", "SpecificVolume", opt];

Use the relation to generate discrete values and perform 3D interpolation for the Planck potential or Gibbs free entropy.

 In[2]:= Xifun = Interpolation[Flatten[Table[{{temperature[[j]], pressure[[i]]}, s[[i, j]] - pressure[[i]]*(v[[i, j]]/temperature[[j]]) - u[[i, j]]/temperature[[j]]}, {i, Length[pressure]}, {j, Length[temperature]}], 1]];

Plot the interpolated function as a function of temperature and pressure.

 Out[3]=

## Mathematica + Mathematica Online

Questions? Comments? Contact a Wolfram expert »