# How are thermodynamics properties of gases and liquids calculated numerically?

I was wondering how the values of thermodynamic properties as enthalpy, entropy, internal energy, specific heat, specific volumes ... etc, of gases and liquids are calculated using programming libraries such as cantera and thermopy as an example.

How are steam tables made for instance? How do we get all these values of properties if not experimentally?

• Interesting question. If no one here has the expertise to answer, you might find the right person on physics.SE. If that is a route you want to take, then you can flag your question and ask a moderator to migrate it for you. Jun 11, 2015 at 21:39
• Chris, nice suggestion, but I will die before I let this question be migrated. It's too perfect for our site. Jun 12, 2015 at 3:22
• Would you have a specific problem with experimentally generated data? Jun 12, 2015 at 22:00
• @rul30 Actually no one has. But say if you were engineering a water boiler would you consider a measurement set-up for every property you need in your design?
– Algo
Jun 13, 2015 at 2:19

## 2 Answers

The answer is using a thermodynamic equation of state (EOS). An EOS is one that relates the free energy of a substance to its physical properties (temperature and density for example). Once such an equation is developed all other thermodynamic properties can be derived from them (via thermodynamic relationships). To see an example for water, checkout the The International Association for the Properties of Water and Steam website (http://www.iapws.org/). Here they have their latest release on water properties: http://www.iapws.org/relguide/IAPWS-95.html

Now water is the most common and most used substance so the model is very detailed with a lot of parameters so as to match experimental conditions almost perfectly. Other substances are typically correlated with more general EOSs. A thermodynamics textbook would be a good place to learn more.

By the way, you are probably familiar with the most famous of these equations. The ideal gas equation of state is useful for the prediction of the thermodynamic properties for gases at low pressures.

If you assume the gas you are dealing with is a semi-perfect gas (e.g. the heat capacity is not a function of pressure, and the gas follows ideal gas law), then you can calculate all properties (in the order of enthalpy, internal energy, entropy and gibbs free energy) if you can measure the specific heat capacity at constant pressure (cp, sometimes, a fitted polynomial) base on the basic relations. E.g. $dh=cpdT$, $u=h-RT$, $ds=(dh-vdp)/T$, etc

The steam table I believe is calculate from EOS as suggested by @sturgman. The vapor liquid saturation line can be deduced (though not very accurately) using equal area rule if the EOS is cubic.