**1. Introduction**

Equations of State (EoS) have been widely used in the chemical engineering industry for the calculation of process fluids phase properties. EoS models are algebraic expressions of the form *f p*ð Þ¼ , *T*, *vm* 0 which relate molar volume *vm* to pressure and temperature. Since the derivation of the ideal gas law and following the pioneering work of Van der Waals, dozens of EoS models of various complexity and thermodynamic considerations have been presented to accurately estimate thermophysical properties. Among them, basic and extended cubic equations of state, virial forms, EoS models with association terms and models based on statistical physics. Of them, the ones most widely used in the chemical engineering industry are the cubic ones [1] due to their simplicity and speed of calculations, thus minimizing the computing time required for flow simulations in processes, porous media and pipelines. Less simple but more accurate models incorporating associating theory are often used in midstream and downstream applications [2].

EoS models based on the application of statistical mechanics in conjunction to perturbation theory to describe the thermodynamic behavior of substances at a microscopic level are commonly used to estimate properties of liquids [3]. This approach is based on studying the microscopic behavior of a set of molecules by considering ensembles comprising of many instances of the set. Subsequently, the system energy and eventually all thermodynamic properties of interest are obtained by treating statistically the ensemble properties. However, as the derivation of a closed form of the energy function is usually intractable, perturbation theory greatly simplifies that task. A known closed form solution for a simple reference system is firstly adopted, and the additional energy terms required to improve the simple reference system to the complex one are considered as a perturbation of the original reference system. Perturbation theory utilizes linearization to lead to approximate closed form solutions of the combined complex system.

To obtain estimates of the thermophysical properties using EoS models, it is necessary that the composition of the fluid is known and that a reliable characterization of the mixture components, by means of specific components properties values, is available. Cubic EoS models though simple they are not predictive, and the reliability of their predictions can only be ensured by "tuning" the model, i.e. varying the components properties so that the model predictions match accurately the available experimental measurements.

Once a tuned EoS model is available, properties such as density, fugacity coefficient, enthalpy, heat capacity, Joule-Thomson coefficient and speed of sound can be easily computed by simple expressions. Calculations become more complex when the phase state of a mixture is not known a priori. As an example consider a control volume, i.e. a grid block, in a flow simulation model where the pressure and saturation change of each coexisting phase at current timestep need to be determined in order to get a description of the fluid state. The pressure change in the control volume is related to mass influx and outflux through fluids density and compressibility. When the control volume content is a single-phase fluid both properties can be easily computed by means of the EoS model. However, when the content is saturated, it will split into two or more phases, each one exhibiting its own properties, thus introducing the need to identify the number and composition of the equilibrating phases, hence their density and compressibility.

In such cases, a test to determine if the fluid appears in a single or two phases needs to be run, known as stability test [4]. If the test indicates the presence of two or more phases in equilibrium, the phase split problem further needs to be solved to compute the composition and the amount of the two coexisting properties [5]. By knowing their composition, all properties of the equilibrium phases can then be computed regularly.

In this chapter, the utilization of EoS models of the cubic form and those based on perturbation theory is discussed and their application to compute fluids thermophysical properties is presented. Algorithms to run phase stability and phase split in the classic context as well as in the reduced variables one are also discussed. Additionally, the chapter discusses the recent developmentsin the use of soft computing techniques to accelerate the solution of the stability and phase split problems in flow simulations.
