PARTIAL DIFFERENTIAL EQUATIONS AND THERMODYNAMICS 04 04 06

ORIGIN AND UTILITY OF PARTIAL DIFFERENTIAL EQUATIONS IN THERMODYNAMICS

Partial differential equations arise in thermodynamics when studying changes among three variables, for instance, when establishing changes in pressure when either temperature or mass volume, or both, are varied. Thermodynamics is the study of relationships in equilibrium states. Although partial differential equations, in general, apply to more than three variables, in thermodynamic equilibrium states of fixed composition, they are limited to only three. There can be more than three when multicomponent mixtures are studied.


For instance, for a fixed mass or number of moles of a given gas in a single state, the relationships may be depicted as in Figure 1. This figure attempts to show a fixed mass of gas and the changes in total pressure when the temperature and the volume of the fixed mass are varied. The gas does not change state. Any change in one or both independent variables, T and v, will change the total dependent variable, P, but the change will be constrained to follow the (imaginary) surface shown in the figure.


The coordinates chosen for the figure are P, T and v, but they could have been any three thermodynamic variables. By cutting planes parallel to the Pv plane we can describe constant temperature curves on the depicted surface. Since changes along the equilibrium surface are governed by equation [1], we can reduce the equation so that only one partial derivative is implicated. If the temperature is fixed, this means that we are constrained to compute along a curve of constant temperature, but it allows us to drop down to a pressure where the ideal gas approximation holds. We can then fix v by holding it constant and we can integrate between the two temperatures using the partial derivative of pressure with temperature of the ideal gas and then integrate back up the new temperature curve to the final equilibrium state using the partial derivatives of pressure with volume.


[1]

A similar approach can be taken with enthalpy or entropy between equilibrium states. Each equilibrium state for a single component or a fixed mixture of different components may be defined by pressure and temperature, h = h(P,T) or s = s(P,T). The changes in the dependent variables are mathematically described in [2].


[2]

When multiple components are involved, more differentials are added, each involving the product of a partial derivative and the differential that served in the denominator of the partial derivative.



The integrated forms of equation [2] are found in [3].


[3]

In the case of enthalpy, the partial differential coefficient with temperature, (cP0), is available only at low pressures The slope, (ïh/ïT)P0, is constant at low pressures, meaning h will change along T at low pressure, but only as a function of temperature.


A SEEMING ARBITRARINESS IN THERMODYNAMICS

Thermodynamics makes heavy use of equations such as those of the set [3] to describe changes between equilibrium states. Thermodynamics, by convention, fixes the values of the variables in a reference state so that numbers may be compared. The equations of the set [3] are of help in creating these so-called absolute values only if a reference state is agreed to.


Sometimes the fixed, 'absolute' variable conforms with our vision of reality, sometimes it does not. For instance, common sense tells us that zero pressure could be achieved in a perfect vacuum and that zero mass or molar volume could be achieved if we reduced the dimensions of a container to zero in a perfect vacuum. Obtaining zero absolute temperature requires a stretch of the imagination. It can be visualized as that temperature that is associated with the complete cessation of molecular motion. No one has ever achieved such a low temperature.


To overcome the above mentioned problems, arbitrary reproducible reference points are chosen and 'standard states' are fixed that, if well defined, permit comparison of computations. The 'triple point' for water substance is such a convenient reference point. It is the state at which three phases coexist: solid ice, liquid water and gaseous vapour. It occurs at a fixed temperature and pressure. It is called a point because it can be depicted as the point of confluence of three interface lines on a phase diagram.




CALCULATION (COMPUTATION) PATHS

States of equilibrium are an essential concept of thermodynamics. These are reproducible, time-invariant states to which all substances naturally tend. Equilibrium states are found to have a fixed number of variables necessary to describe them. In the case of a single component, fixed mass or of an fixed mixture of components, the number of variables is only three.


A computation or calculation path is a convenient, constrained method of estimating changes between equilibrium states. For instance, in Figure 1, temperature is fixed along the two vertical curves and volume is fixed along the horizontal curve. For the enthalpy function, a calculation path between two equilibrium states (P1T1,P2T2) is one whereby we proceed down the surface along a line of constant temperature, T1, integrating (ïh/ïP)T1 dP to a value of P0, where the coefficient (ïh/ïT)P0 is constant at cp0 or where it can be defined by a known polynomial, then using cP0 dT to estimate the change in h from T1 to T2, then reversing direction to estimate the values of (ïh/ïP)T2 dP. The final answer will be the difference between h2 and h1. This difference is the difference in the projections of the end and start points to the vertical h co-ordinate.


DEPARTURE FUNCTIONS AND CONVENIENCE FUNCTIONS

DEPARTURE FUNCTIONS

The calculation path for enthalpy change may be represented mathematically by [4]. Lower case h is enthalpy on a molar basis.


[4]

The terms in brackets of the last equation of [4] are called the departure functions. Departure functions represent the change at constant temperature between the values of the functions in the ideal gas and the real gas states (enthalpy in [4]). Note the two different subscripts, T1 and T2, reflecting two different constant temperatures. Note, also, that there is some confusion in terminology between departure functions and residual functions. To the author, residual functions represent the same idea, but the change is to an hypothetical, ideal state at the same pressure and temperature as the real system. Also, note that the same name (departure function) is given by some to the opposite difference (hhP 0) ; however, the signs preceding the function are changed.


The word 'departure' signifies a departure from the ideal gas state, so P0v0 = RT represents the 'standard state' whereby the ideal gas pressure-volume relationship is fixed at the present equilibrium temperature of the system. Given the above relationship between standard pressure and volume, we have four choices to define a standard state, i.e.: P0 is a constant; v0 is a constant; P0 is the system pressure; or, v0 is the system mass or molar volume. The last two choices mean the standard state varies with the system pressure and volume. Actually, only one variable can be fixed, the second variable is calculated from the ideal gas relationship at the system temperature. Regardless of the choice, the standard state is the ideal gas state, because in obeys the 'law', Pv = RT. Since the temperature is not fixed, there are as many 'standard' states as there are system temperatures.



The concept of 'standard state' requires explanation. It is yet another example of a term that is thrown around to create the impression of universal comprehension. The 'standard' state is a relatively easily estimated state that serves as a basis for further estimates of equilibrium conditions. For gases, the standard state is usually that of a pure gas (single component) at a reaction temperature or at the temperature of the system and at a pressure such that its fugacity is one atmosphere. 'Fugacity' comes from the Latin meaning 'fleeing tendency'. It is a corrected pressure. For liquids and solids, the standard state is that of a pure component at a reaction temperature or system temperature and at a pressure of one atmosphere. Most thermochemical data is tabulated at 25 C, leading to the erroneous conclusion that this is the only temperature for the standard state. The state that is considered 'standard' is symbolised here with a zero superscript. In [6], v0 must be evaluated at the temperature of the integration, T1 or T2. Note that the standard state for gases is also an ideal gas state. Its purpose is to serve as a starting point for computations.


To estimate the values of departure functions we usually use equations-of-state. If the EOS chosen is explicit in pressure, it means that volume and temperature are the independent variables and pressure is the dependent variable – pressure depends upon temperature and volume. We will limit our consideration to an EOS explicit in pressure, the original Redlich-Kwong (R-K) equation.


CONVENIENCE FUNCTIONS

The 'convenience' functions are synthetic functions created in the hope that they will make for simpler relationships. In this paper, they are enthalpy, entropy, Helmholtz function and Gibbs function.


The convenience functions are derived from the relations given in [5]. These relations are derived from the so-called fundamental equation, that in turn was derived by inserting the Clausius inequality into the first law statement and then constraining the system to be at equilibrium with its surroundings. The fundamental equation is the first equation given in [5]. See any good thermodynamics textbook for a standard derivation of these equations.


[5]

We will establish the basic relationships for the departure functions before becoming more specific. The starting point is the isothermal Helmholtz function, a convenience function. The convenience functions are those synthetic (made up of simpler functions) functions such as the Helmholtz and Gibbs functions, enthalpy and entropy. Note that the x, y co-ordinates are now temperature and volume instead of temperature and pressure.


[6]


The last equation of set [6] serves to establish the change in the new vertical coordinate, a, for a change in the new horizontal coordinate, v, while keeping a constant T as an horizontal co-ordinate. The variables, -s and -P, are the partial derivatives of the Helmholtz function with respect to temperature and volume.


In order to facilitate evaluation of the integral in [6], it is necessary to manipulate the limits as in [7] because one limit, v, refers to a real gas and the other limit, v0, refers to an ideal gas in the 'standard state'.


[7]

The first line in [7] splits the integral in [6] into two and adds plus and minus the integral between limits of (RT/v)dv. The addition of plus and minus the same integral changes nothing but it facilitates future manipulations (it permits elimination of the infinity limit in second pair of integrals in the second line). The variables P and v have been left under the integral because they are real quantities. The last term includes the ratio of the real molar volume to the ideal, standard-state molar volume.


Note that the constraint, T, was associated with the path of integration, in other words with dv. The symbols a and ao are representative of equilibrium states. Once in an equilibrium state, the path is of no consequence – the path followed between equilibrium states makes no difference.


The 'fundamental equation' of the thermodynamic network is du = Tds Pdv. This 'fundamental equation' is an idealisation of the first law of thermodynamics whereby ideal heat energy and ideal work energy are substituted for the real quantities (there are no irreversibilities). The 'fundamental equation' permits integration between equilibrium states (by a choice of the route), even when the real path passes through non equilibrium states. The Helmholtz function is a convenience function consisting of the internal energy minus the product of the temperature and the entropy. The Helmholtz function may be manipulated using the definition of ideal changes in internal energy as in [8]. We can change two of the three co-ordinates of the figure on page 1 (one dependent variable and one independent) as follows in [8] (h, T, P to a, T, v).


[8]


Restricting the last equation of the set [8] to isometric changes gives the constant volume change in the Helmholtz function. Zero superscripts are used in [9] to represent the standard state from which the property is evaluated. Neither the entropy nor the temperature were constrained.


[9]

In [9], difference in entropy between the standard state and any other equilibrium state has been related to the constant volume difference in the Helmholtz function. The constant volume difference in the Helmholtz function was then replaced by its equivalent equation-of-state relationship from [7]. This relationship was restricted to a constant temperature path.


The second equation in the set [9] relates differential changes in the Helmholtz function to the product of the instantaneous value of entropy with differential changes in temperature (the product is a differential) along a line of constant volume. The third equation is similar, but is restricted to differential changes around the standard state. The fourth equation is an algebraic sum (a subtraction) of the previous two. The last two equations involve mathematical manipulation and substitution of the last equation of the set [7].


Now that we have the Helmholtz and the entropy departure functions, the remaining, general, departure functions may be derived from their corresponding convenience functions.



[10]

We now have the Helmholtz departure function from [7], and the entropy departure function from [9]. The internal energy, enthalpy and Gibbs departure functions are given in the relationships in [10]. All these departure functions are constrained to a single temperature. There will be a different value of the function for each different temperature.



DEPARTURE FUNCTIONS FROM THE ORIGINAL R-K EOS

We can develop the above departure functions in terms of the original Redlich-Kwong equation-of-state using [7], [9] and [10]. The original R-K EOS is given on the first line of [11].


[11]

It is to be noted that Reid, Prausnitz and Poling include T0.5 in the coefficient, a. We do not. Our coefficient is the original R-K coefficient. We include T0.5 in the R-K equation. Also note that the departure functions for internal energy and enthalpy do not depend on the reference state but those for the Helmholtz function and the entropy do. The two most common reference states are 1) one unit of pressure with pressure in bars and P0v0 equal to RT (R has units of bar-m3/kg-mol-K) or 2) system pressure and v/v0 equal to Z. Note that the reference state is at the temperature, T, and that in using departure functions, we can have two separate reference states, one at T1 the other at T2. So much for the 'standard state'!


CHANGE IN ENTHALPY AND ENTROPY AT LOW PRESSURE

The problem of estimating the change in enthalpy and entropy with temperature at the reference pressure will now be addressed. The path to follow was given in [3] for the enthalpy calculations. The enthalpy change across the low pressure branch can be estimated from the integral of cP0 dT across the temperature interval. The entropy change can be estimated from the integral of (cP0/T)dT across the same interval. It is assumed that there is no change in phase. If there is a phase change, other steps are necessary. If the ideal gas heat capacity is reasonably constant, the integral for entropy change resolves to cp0 ln (T2/T1). Both of these changes (enthalpy and entropy ) are at constant pressure. Both changes may be expressed as functions of pressure and temperature as in [12].


[12]


The substitution for the partial derivative of enthalpy with pressure in [12] comes from the thermodynamic network whereby dh = Tds +vdP and (ïh/ïP)T = v + T(ïs/ïP)T . The partial derivative of entropy with pressure at constant temperature is exchanged with its Maxwell equivalent -(ïv/ïT)P. See the set [14].


The differential equations of [12] must be integrated under suitable constraints before being of use. Even when integrated they only tell one part of the picture. It can be seen that both variables are functions of T and P. Integrating the differential equations with suitable equations-of-state allows estimations of the differences in values between two equilibrium states, not estimations of absolute values of the variables.


MAXWELL FUNCTIONS

The Maxwell functions are used in thermodynamics in order to change a partial differential coefficient written in terms of non-measurable properties into one written in terms of measurable properties.


The partial derivative is the increment in the variable, h, due only to an increment in the variable P or T. We could generalise by using z, x and y. The partial derivative is the slope (tangent) or tangent line to the point h(P) or h(T) referred to the P or T axes. It is to be noted that P and T (or x and y), are at ninety degrees to one another and that h (or z) is perpendicular to the plane of P and T (or x and y).


The question arises: How does h increment with increments in P and T? The symbol ï signifies a restricted or constrained differential. Most frequently, a subscript is added to the partial derivative function to show which variables are constrained, but this is not always necessary and may lead to confusion. It only should be used when more than three variables are involved and it is necessary to specify what is being constrained. In thermodynamics, we are normally only dealing with the relationships among three variables, therefore, the subscript is not necessary. Given the preceding explanation, ïP and ïT equal dP and dT but dh is not equal to ïh; it is the sum of the increment due to the increment in T and the increment in P.


Maxwell's Cross Coefficients

James Clerk Maxwell established the relationship between the partial derivative coefficients that permitted changing non-measurable quantities into quantities that could be experimentally established from measurements. He noticed that the two coefficients were functions of P and T (or x and y). What follows is what the author imagines to be Maxwell's thought process.


If one wishes to find out how the partial derivatives change with P and T, one differentiates them.

[13]

Note there can be confusion with the differentiation because of the use of the symbols for the constraints. The symbols are not really required because the partial derivative symbols include them inherently in thermodynamics since we are only considering relations among three variables. The change in slope of the surface at a point perpendicular to the co-ordinates is what is inferred. Furthermore, the slope is not really that of the surface; it is the horizontal projection of that slope to the h-T or the h-P planes. A second derivative gives the slope of the first derivative at the same point in space or how the value of the first derivative changes when second co-ordinate changes. Since there is a value of the first derivative associated with each point on the surface, it should be seen that there is also a value of the second derivative associated with the same point, even though that point is projected to a plane at 90 degrees.

If we remove the subscript, we might remove some of the potential confusion. Then, we can see that it makes no difference to the outcome if we differentiate first with P or with T.


[14]

The names in the last term of [14] have been changed to give greater generality to the expression. Another way of looking at [14] is to call the partial differential coefficient of h with P by the general term, N, and to call that of h with T by the general term, M. We then have the commonly cited form in [15].


[15]

The expression in [15] is what makes Maxwell transformations so useful in thermodynamics when properties that are not measurable must be evaluated. Some examples are given in [16]. They are derived from the fundamental equation of thermodynamics and its related convenience functions.


[16]

A CONCRETE EXAMPLE OF THE USE OF DEPARTURE COEFFICIENTS

It is now time to give a concrete example of the use of departure functions to estimate changes in properties between equilibrium states. We choose the entropy function, use the original R-K equation and compare the results with the steam tables. The comparison is found in Table 1. We normally require two departure functions at two different temperatures and an equation for the change in entropy between the temperatures. The equations involved are found in [17].

[17]


The two departure functions come from the first two equations of the set [17] at the two different temperatures, T1 and T2, and at two different volumes, v1 and v2. The ideal gas state molar volume is estimated from the ideal gas law at an arbitrary low pressure and at T1 and T2 . The gas constant R has to have molar units consistent with a, b, T and v (through b). The molar ideal heat capacity at low pressure is left under the integral sign because one may wish to use a polynomial in its evaluation. If it is reasonably constant, it may be removed from the integral and treated as a constant. Dividing the first three equations of the set [17] by the molar mass completes the conversions to mass units.


The steam tables in the 50th edition of Perry for saturated steam, Table 3-302, have units of temperature, K, pressure, bar, volume, m3/kg, and entropy, kJ/kg-K. For water, Reid, Prausnitz and Poling give the ideal heat capacity polynomial coefficients as 3.194E+1, 1.436E-3, 2.432E-5 and -1.176E-8 on a molar basis. The units of cP0 used are J/g-mol-K (or kJ/kg-mol-K). The polynomial is cP0 = a + bT + cT2 + dT3 with the coefficients represented by a to d. The result of the polynomial calculation must be multiplied by 1/(molar mass of water) to obtain the units used by Perry. The molar mass of water is 18.015 g/g-mole or lbm/lb-mol or kg/kg-mol.


The R-K coefficients are a = 0.42748 Rmol2TC2.5/PC and b = 0.08664 RmolTC/PC.. The numerical constants are dimensionless. The coefficients a and b have dimensions associated with the choice of Tc and Pc. The molar gas constant, Rmol, has units that depend on not only T and P, but v. If we have a gas constant of 0.083 144 bar-litres/g-mole-K, this is the same as bar-m3/kg-mol-K.


The critical properties of water required to estimate the values of a and b are TC, 647.3 K and PC, 221.2 bar.


The values of a and b are obtained from [18].


[18]

In addition, we must establish values of vi/vi0. The variable vi is the molar volume at the temperature and pressure of the system. The variable v i0 is calculated from P0v0i = RmolTi where the reference pressure is the vapour pressure at the triple point, in our case; it is one bar, commonly. The temperature is the system temperature during the isothermal process.


Reid, Prausnitz and Poling give the value of the ideal gas heat capacity as in [19].


[19]

The units of the ideal gas heat capacity are J/g-mol-K or kJ/kg-mol-K. For water, the coefficients are a = 3.224E+1, b = 1.924E-3, c = 1.055E-5 and d = -3.596E-9.


For the low pressure, isobaric, integration of the entropy function, we have the formula given in [20].



[20]

The last equation of the set [20] is the integrated version of the entropy change for water over the low pressure path between temperatures T1 and T2. It is necessary to multiply the equation by 100 and divide by the molar mass of water, 18.015, to obtain the entropy change in mass units of bar-m3/kg-K.


QUICK CHECK OF FORMULAE

It is possible to use the ideal gas relationship as a check on the simulation results and on the conversion factors. Steam at low pressures and high temperatures acts as an ideal gas, so we can check both the ideal gas and the R-K formulae against the real gas tabulation in Perry.


A formula from Reid, Prausnitz and Poling gave the ideal heat capacity in J/g-mol-K; yet, we were using an ideal gas law constant, R, in b-m3/kg-mol-K. They both appear in the same formula for ideal gas entropy change [21]. The constants, R and cP0, must have the same units and the change in entropy must be converted to kJ/kg-K.


[21]

Equation [21] gives an opportunity to test the ideal gas predictions versus the steam tables and allows checking of assumptions and of conversions. The gas constant, R, equals 0.083 144 bar-litres/g-mole-K; the ideal gas heat capacity at the triple point, cP0, equals 1.854 kJ/kg-K = 33.4 kJ/kg-mol-K (Pa-m3/kg-mol-K) = 0.334 b-m3/kg-mol-K.


PHASE DIAGRAM

Below is a phase diagram for water substance that helps establish our methodology for the simulation.




























The phase diagram is labelled for the phases: solid and liquid. The gas phase is represented by the area below the two convex lines. The triple point is a convenient reference point at which the three phases co-exist. It is found at the intersection of the co-ordinates marked Ptr and Ttr. It is also the point at which most steam tables arbitrarily set enthalpy and entropy at zero in the liquid phase. There will be enthalpies and entropies of vaporisation. For water at 0.006 11 bar, these are 2 502 kJ/kg and 9.158 kJ/kg-K respectively. These give the starting points for any calculations on the vapour phase. For water, the triple point pressure is 0.00611 bar. This is a sufficiently low pressure that the ideal gas laws should prevail, so we will start our comparison with the steam table data at the triple point pressure and temperature.

For purposes of reducing the computations, we will make a two step calculation. The first step is an isobaric step at the triple point pressure between the temperatures of interest. The second step is an isothermal step from the triple point pressure up to the pressure at the liquid vapour equilibrium line. The entropy of vaporisation must be added.



SIMULATION RESULTS

The major inputs to the ideal gas simulation are P0, T0 and Pi, Ti for each step. This gives the change in entropy that must be converted to the same units as used by Perry for comparison. The entropy of vaporisation must be added to the zero reference point. The major inputs for the R-K simulation are T0, v0 and Ti, vi . The table below permits comparison of both the ideal gas simulation and the R-K simulation with published results. The simulations were stopped when the error became too great.


STEP


Pi (bar)

Ti (K)

Ds

(b-m3/

kg-mol-K)

s

kJ/kg-K

IDEAL

s (Perry)

kJ/kg-K

REAL

s

kJ/kg-K

R-K

% Error

IDEAL

%

Error

R-K

0

0.00611

273.15

0.000

9.158

9.158

9.158

0.000

0.000

1

1.03300

373.15

-0.322

7.371

7.356

7.379

0.204

0.313

2

17.90000

480.00

-0.475

6.519

6.377

6.484

2.227

1.678

3

94.51000

580.00

-0.550

6.102

5.654

5.942

7.927

5.094


TABLE 1


It seems obvious that the percent error is increasing with increased pressure and temperature. If we establish an arbitrary cut-off percent error of 2.2, then we see that the ideal gas approximation for entropy estimates occurs at an absolute pressure of about 17.9 bar or 260 psia (245 psig). This is a good comparison point for the R-K equations.


The R-K departure functions improve the results for steam over the ideal gas results. Further improvement could be had using a three parameter equation-of-state such as the Redlich-Kwong-Soave equation. Because steam behaves almost as an ideal gas for the pressures and temperatures involved in the example, the comparison gives results that are close. Greater improvement may be expected when using the R-K equation on gases that deviate more from ideality than does steam. The R-K EOS is particularly good for mixtures of gases.


Because the original R-K equation gives very good results for gas mixtures at low pressures, the author has used it extensively for vent header simulations.



SUMMARY AND CONCLUSIONS

This paper described briefly the utility and origin of partial differential equations in thermodynamics. It went on to give some examples of their use. The paper was not intended to be a complete treatise on thermodynamics nor on partial differential equations.


A simulation was performed using published data and the steam tables. This simulation was intended to allow comparison of the ideal gas law and the R-K EOS. The results using the ideal gas law were surprisingly good. However, it must be remembered that low pressure steam fulfils the requirements of an almost ideal gas (low pressure and high temperature). The results using the R-K EOS were a little better and it may be fairly asked, why bother with more complexity for such a small improvement in results? The answer is that the R-K EOS gives good results within plus of minus 5 % of reality for a wide variety of gases, including mixtures of gases and that, unlike steam, most gases are far from ideal.

PARTIAL Page 14