On thermodynamical work and heat definitions and their consistency regarding the Second Law

Departamento de F́ısica, Escola de Ciências e Tecnologia, Universidade de Trás-os-Montes e Alto Douro, Vila Real, Portugal Instituto de Nanociência e Nanotecnologia, Faculdade de Ciências, Universidade do Porto, Porto, Portugal Centre for Research and Technology of Agro-Environment and Biological Sciences, Universidade de Trás-os-Montes e Alto Douro, Vila Real, Portugal Centro de F́ısica, Universidade do Minho, Braga, Portugal Recebido em 10/10/2009; Aceito em 22/12/2009; Publicado em 17/1/2011


Introduction
Usually, thermodynamics is viewed as the science of energy and entropy.In this perspective, the concepts of heat and work are fundamental not only because they represent different ways of transferring energy between a system and its surroundings, but also because they are crucial to establish the concept of entropy.Therefore, it is not surprising that such concepts appear explicitly in the mathematical formulation of the First and Second Laws of Thermodynamics.
The First Law expresses the conservation of energy and relates the variation of the total energy of a closed system, ∆E with heat, Q, and work, W , exchanged with its surroundings Heat and work represent the transfer of energy across the system-surroundings boundary.Thus, a system may possess, accumulate or loose energy but not heat or work.The total energy of the system, E, is given by where E kin and E pot are, respectively, the macroscopic kinetic and potential energy components of the system and U its internal energy, which corresponds to the sum of all microscopic modes of energy in the system.However, in typical thermodynamical applications, ∆E kin = ∆E pot = 0, so that the First Law is written as For an infinitesimal process the First Law is expressed by dU = δQ + δW (4) where dU represents the internal energy exact differential, since this quantity is a system thermodynamical property, while δQ and δW are the inexact differential of heat and work, respectively, since they are not state functions but process functions.
On the other hand, the Second Law can be stated mathematically by the Clausius relation δQ T e ≤ 0 (5) where T e is the temperature of the heat reservoir that exchanges the heat δQ with the system (the subscript e denotes a variable external to the system, i.e. a surroundings property).Moreover, in the above relation, the equality holds for reversible cycles and the inequality holds for irreversible ones.
In mechanics, infinitesimal work is the dot product between a force F by its infinitesimal displacement dr, i.e. δW = F • dr.The work for a finite displacement is the integration of δW between the initial and final positions, In thermodynamics textbooks, work is usually introduced considering a gas contained in a cylinder-piston apparatus (see Fig. 1) with a moving boundary, undergoing a quasi-static process.If P is the pressure of the gas and A the area of the piston, the net force that the gas exerts on the piston is P A. If the gas experiences an expansion, both the force and displacement have the same direction and, when the piston moves dr, the infinitesimal work done by the gas is δW = F dr = P Adr = P dV .From Eq. (3), it is clear that the sign convention used is that energy is positive when enters into the system; so, we need to introduce a minus sign in the work definition where V i and V f are the system volume in the initial and final states, respectively.On the other hand, heat is usually defined as the transfer of energy caused by a temperature difference.If ∆T is the system temperature change, we have where m and c are the mass and specific heat of the system, respectively.It is important to note that c depends on the process carried out.Some authors provide an explanation for what is meant by work or heat.A transfer of energy is classified as work if the sole effect on the surroundings could be equivalent to the raising of a weight [1][2][3] while heat is the energy that is transferred from a system at higher temperature to a system at lower temperature and, as a consequence, only occurs due to that temperature difference [1][2][3].It is possible to find different heat and work definitions in the literature [4-6 and references therein], based or not in Eqs.(7) and ( 8) which may constitute an additional pedagogical difficulty.However, if such definitions are shown to be equivalent (which means that these definitions are able to, unequivocally, classify any transfer of energy into heat or work) or even if different definitions, being not equivalent, they do not conflict with any thermodynamical law, such difficulty may represent instead an instructive and valuable academic exercise.
In particular, it is possible to apply Eqs. ( 7) and ( 8) to evaluate work and heat using system and/or surroundings variables, depending on the process.Gislason and Craig [4], hereafter GC2005, have provided a detailed comparison between the system-based and surrounding-based definitions of work and heat.In the first case, heat and work are computed using values of the thermodynamical variables of the system, which are measured before, during and after the process.In the second case, the measurements should be performed on surroundings.
The aim of the present work is to contribute to clarify this dilemma and to discuss the consistency of the heat and work definitions, in particular, in what concerns to the use of system-or surroundings-based definitions.As will be shown, this issue is of fundamental importance not only from conceptual point of view but it also has a pedagogical value for graduated and undergraduate levels of physics teaching.In section 2, we start by presenting the system-based and surroundingsbased definitions of heat and work.Section 3 is devoted to describe the methodology followed in section 4, where examples of irreversible processes are analyzed with purpose to assess the consistency of the heat and work definitions given previously.Finally, in our conclusions, we argue that it is not sufficient to assure that such definitions do not violate the First Law, but they also have to be consistent with the other thermodynamical laws, in particular, with the Second Law.This requirement leads to a unique thermodynamical definition of such concepts.

Common heat and work definitions
Taking into consideration the central role that heat and work play in Thermodynamics, it would be expected that their definitions should be unambiguous, unique and clearly stated.However, as previously mentioned, there are different definitions of Q and W that are currently subject of debate [e.g.[4][5][6][7][8][9][10][11][12][13][14][15][16][17], in particular when irreversible processes are under study.
GC2005 provides an extensive list of references supporting the system-based and surroundings-based definitions of heat and work.These two alternative formulations are compared by applying them to several examples.Their results show that, in general, the values of work and heat computed using the two formulations are different, i.e., according to their taxonomy, However, as pointed out by GC2005, different values of Q and W , evaluated independently for the same process, do not violate the First Law, i.e.
This result shows that there subsist in the literature non-equivalent definitions of heat and work, which means that the transfer of energy cannot be univocally categorized as heat or work.Since such definitions do not violate the First Law, this law cannot be the solely criterion to decide which definitions are correct [10].
Even though there is no difference between systembased and surroundings-based heat and work definitions for reversible processes [4], GC2005 claims that when irreversible processes take place the surroundingsbased definitions present several advantages when compared to the system-based ones.In this work we show that there is an additional but essential reason to adopt surroundings-based definitions: their consistency regarding the Second Law.Therefore, as we will see, system-based definitions cannot be considered a valid alternative.

Consistency of heat and work definitions regarding the Second Law
The main objective of this paper is to investigate whether the aforementioned heat and work definitions are consistent with the Second Law.In this sense, heat and work will be evaluated for some irreversible processes and then the Causius relation ( 5) is applied, to check both definitions on the basis of the Second Law.
For convenience of analysis, the irreversibilities associated to the examples are due either (i) to friction (generally, processes involving dissipative work); or (ii) to heat by finite temperature differences between the system and surroundings.It will not be considered examples with both types of irreversibilities simultaneously.
The general procedure is centred in the application of the Clausius relation which requires a cyclic process.In this sense, for each irreversible process, the cycle is defined with an auxiliary reversible process that brings the system back to its initial state.The amounts of work and heat during the irreversible (W and Q) and during the auxiliary reversible (W * and Q * ) processes are then evaluated and the Clausius relation (5) applied to the cycle.
The use of a reversible process to complete the cycle is of fundamental importance since for these processes, the different heat and work definitions are equivalent.Therefore, the inconsistencies eventually found can only be due to differences in the heat and work definitions in the irreversible process.Furthermore, since one of the processes composing the cycle is irreversible, the whole cycle is also irreversible, which implies that the Clausius relation has to hold as an inequality.
The Clausius relation consists in the cyclic integration of (δQ/T e ) which may be replaced by the sum of the two integrals, one for the irreversible process and another for the returning reversible one.It is important to notice that for the reversible processes the integral of (δQ/T e ) leads to the same value independently of the process chosen.
Moreover, all processes have to be quasi-static otherwise it is not possible to evaluate the system-based work because the thermodynamic variables of the system are undefined.This is a very important drawback of the system-based definition, since for non-quasistatic processes, the surroundings-based definition is the only option to evaluate heat and work.
The examples selected for analysis are simple processes and can be found in textbooks.However, in spite of their simplicity these examples are suitable for our aims.

Analysis of irreversible thermodynamical processes
We will consider four examples of irreversible processes.
In the first one, the irreversibility is due to heat caused by a finite temperature difference between the system and its surroundings, considered as a heat reservoir.In the other three examples the irreversibility is caused by friction.
The application of the Clausius relation will support the thesis that, in general, the system-based definition of heat and work cannot be considered as an alternative to the surroundings-based definition, because the former violates the Second Law of Thermodynamics.

Example 1
Irreversible constant-pressure process.The first example, illustrated in Fig. 2, is a typical isobaric expansion of a gas.The system is the gas contained in the cylinder below the frictionless piston of mass m and crosssectional area A. Everything else belongs to the surroundings.The system is in thermal contact, through the cylinder base, with a heat reservoir, whose temperature T e is greater than the system temperature.Above the piston there is vacuum.There are two forces acting on the piston: the force that the system exerts on it, F, and its own weight, mg, where g is the acceleration due to gravity.The thermal conductivity of the separating wall between the gas and the heat reservoir is so low that the heating process occurs quasi-statically.Therefore, the forces applied to the piston almost cancel each other and the piston has a quasi-static motion from height h i to h f .The process is irreversible because it results from heat caused by a finite temperature difference.
Because there is no friction between the piston and the cylinder, the system pressure is equal to the external pressure, P = P e = mg/A, and the process is isobaric.In addition, the volumes of the system and surroundings are coupled and undergo symmetrical variations, dV = −dV e .Hence, in this example, the system-based and surroundings-based work and heat are equivalent To bring the system back to its initial state we can choose any reversible process, because the path integral i f δQ/T e has the same value regardless the reversible process connecting f and i. Therefore we choose the auxiliary reversible returning process the one that follows in reverse order the irreversible path I.
In this way, the system thermodynamical states in both the irreversible and reversible processes are exactly the same, and the Clausius relation applied to the cycle gives Since T e > T the above expression is always negative, meaning that the cyclic process is irreversible.In this particular example, of an irreversible process without friction, system-and surroundings-based heat and work definitions are equivalent and satisfy the Clausius inequality.This is not the case when dissipative work is present, as we will see in the following examples.
Figure 2 -The system is the gas inside the cylinder initially at thermodynamical equilibrium.The energy flows from the heat reservoir at higher temperature to the system through a wall with a very low thermal conductivity, so that the piston moves very slowly.The system expands and lifts the piston from height h i to h f .

Example 2
Irreversible constant-temperature process.The second example, illustrated in Fig. 3, is an isothermal expansion of a gas.As before, the system is just the gas contained in the cylinder below the piston of mass m and cross-sectional area A. Everything else belongs to the surroundings.The system is in thermal contact through the cylinder base with a thermal reservoir at temperature T equal to the initial temperature of the system, T = T i .There are three forces acting on the piston: the force that the system exerts on the piston, F; the weight of the piston, mg; and the frictional force due to the piston-cylinder interaction, F fr .To ensure a quasi-static process we assume a piston-cylinder interaction such that F + F fr + mg ≈ 0. When the catch is removed the piston moves from height h i to h f .Using the surroundings-based definitions and the First Law, the infinitesimal work and heat are given by δW = P e dV e (16) δQ = dU − P e dV e (17) where P e = (mg)/A is the pressure exerted by surroundings on the system; P and V are the system pressure and volume, respectively; and dV e is the sur-roundings volume differential, satisfying the relation dV e = −dV .
Figure 3 -The system is the gas inside the cylinder initially at thermodynamical equilibrium.When the catch is released, the pressure of the gas lifts the piston from height h i to h f .The piston moves very slowly due to a frictional force F fr exerted on the piston by the cylinder.
To construct a cyclic process, a reversible isothermal process is considered to bring the system to its initial state.Using the First Law and the fact that for the f -i reversible process P = P e , the application of the Clausius relation gives The result of the cyclic integral is zero because, the temperature of the surroundings is constant during both processes (equal to the heat reservoir temperature) and U is a thermodynamical property.It is also important to notice that the system pressure during the returning process is equal to the system pressure during irreversible expansion (i-f ) because the system follows the same thermodynamical path but in reverse order.This is a direct consequence of selecting the returning process as an isothermal and reversible one.During the expansion and compression, the piston occupies exactly the same positions (in reverse order), corresponding to the same volume which, in conjunction with the same temperature, implies the same system pressure in both processes.
Therefore, the surroundings-based definitions lead to the Clausius inequality (19), which is in agreement with the fact that the cyclic process is irreversible.On the contrary, when the system-based definitions are used, we obtain the equality (22), which is not compatible with the irreversibility of the cycle.

Example 3
Irreversible constant-volume process.The following illustrative example consists of a system made up of a gas and an electrical resistor enclosed in a rigid recipient (see Fig. 4).The system has mass m and specific heat c.The surroundings include a rechargeable battery having a electromotive force ε.Initially, the system is in an equilibrium state at temperature T i .To transfer an amount of energy from surroundings to the system, the resistor have to be connected to the battery during a certain time interval ∆t and, consequently, the temperature of the system increases to the value T f .If the values of R and ε are such that the heating process is very slow it is acceptable to consider that throughout this process the system is always in thermodynamical equilibrium at a given temperature T .During an infinitesimal time interval dt, an infinitesimal amount of energy dE is transferred from surroundings to the system given by where dq = Idt is the infinitesimal variation of the battery charge due to the current I in the circuit.For a finite process, the final temperature is given by Because is not clear a priori whether dE is work or heat, we start by guessing that it is work (not heat), which allows us to write It is important to realize that this work is surroundings-based work, because ε and q are variables that characterise surroundings.In addition, there are no corresponding variables in the system.In fact, it is not possible to evaluate the work using system variables.This interpretation is the only one consistent with the Clausius relation ( 5), as we will see shortly.Considering an usual reversible cooling process that brings the system to its initial state at temperature T i , So, using the surroundings-based definitions, to apply the Clausius relation to this cycle, where the last inequality is reached because T is always positive and the system internal energy decreases during the return process (f -i ).Once again, the inequality only confirms that the cycle is irreversible.This is a very interesting example because if, by hypothesis, we considered the transferred energy as heat, i.e. δQ = ε 2 dt R = C V dT and δW = 0, Eq. (28) would become At this point, it is important to notice that the process is independent of surroundings temperature.In fact, this variable is not relevant to the process, and thus we are free to select the value of the surroundings temperature.By choosing T e < T i , we are led to which is absurd and so incompatible with the Second Law of Thermodynamics.
If system-based definitions were used, we would have and the increase of energy has to be considered as heat.
In this case we are led again to the Eq. ( 29), which means that system-based definitions are not appropriate at all.

Example 4
Irreversible interaction between two ideal gases.As a final example, let us consider the irreversible process illustrated in Fig. 5. Two amounts (A and B) of the same ideal gas at the same temperature T are contained within a closed, rigid and adiabatic cylinder and are separated by an internal piston.Initially (state i), gas A, considered as the system, is at pressure P i = 2 Pa and occupies the volume V i = 1 m 3 .Gas B, considered as surroundings, is at pressure P ei = 1 Pa and occupies the volume V ei = 2 m 3 .The piston is diathermic, so that the system can exchange heat and work with its surroundings.There is friction between the piston and the cylinder which forces the piston to move very slowly.Moreover, friction is zero when the piston is at rest.Since gases are ideal, the relation P V = nRT holds, where n and R are the amount of gas and the universal gas constant, respectively.So, there is the same amount of the gas in each side of the piston.In addition, energy is a function of temperature only.
When the catch is removed the piston seeks for a new equilibrium state (state f ).Thermal and mechanical equilibrium require that T f = T ef = T eq and P f = P ef = P eq .Since we have V + V e = 3 m 3 , it is clear that V f = V ef = V eq = 3/2 m 3 , T eq = T and P eq = 4/3 Pa.
Figure 5 -In the interior of a closed cylinder with rigid walls, there are two quantities of the same ideal gas separated by rigid and diathermic piston.In a first stage, the system is the gas on the left side of the cylinder.In a second stage, the system will be the gas in the right side.In any case, the system can only interact with the gas in the other partition of the cylinder.
The surroundings-based definitions require the use of gas B variables to evaluate the heat and work.The work during the i-f irreversible process is The energy inside the cylinder is constant, which implies that energy exchanges occur only between gas A (system) and gas B (surroundings).Moreover, since the system and surroundings are the same ideal gas and the process is isothermal, the energy of the gas in each side of the cylinder remains constant which, by the First Law, implies that Q = −W .Therefore, Consider now an isothermal and reversible process which brings the system to its initial state so that a cycle is obtained.Since this auxiliary process is reversible, work can be evaluated using the system variables, The result given by Eq. ( 40) corroborates that the cyclic process is irreversible.If instead the systembased definitions are used, the work in the i-f process would be Considering the same returning process (isothermal and reversible) to build the cycle, the work, W * , and heat, Q * , are also given by Eqs.(37) and (38), and the cyclic integral (39) leads to This result is not compatible with the cycle irreversibility.This means that the system-based definitions lead to an incongruous consequence.
In the previous three examples, the system was clearly defined and we never considered a systemsurroundings interchange.However, the Laws of Thermodynamics do not depend of the system definition.In this sense, in this fourth example there is no clear criterion to decide which gas is the system.In fact, there is the same amount of gas on both sides, their temperature is the same and if the gas A is at higher pressure, the gas B occupies a higher volume.In addition, from a thermodynamical standpoint, the system and its surroundings are both inside the cylinder, with the same constraints.
Therefore, it will be interesting to evaluate the effect of a system-surroundings interchange on values of heat and work.Considering now gas B as the system and gas A as the surroundings, the procedure is very similar to that previously undertaken, and results are summarized in Table 1.
It is interesting to note that heat and work are not invariant under a system-surroundings interchange [8].However, in both analyses (A as system or B as system) the surroundings-based definitions are consistent with the Second Law (Clausius relation) while the systembased definitions lead to a contradiction.Moreover, we can see that the variation of entropy of the surroundings, in both situations, is given by ∆S e = −Q/T e , because surroundings can be considered a heat reservoir given that its temperature is all times spatially invariant [9].
Table 1 -Heat, work and Clausius relation for surroundings-based and system-based definitions, for the example illustrated in Fig. 5, considering gas A (first column) or gas B (second column) as the system.Change of entropy is also shown for each system-surroundings selection.

Conclusion
It is possible to find different heat and work definitions in literature, as well as different methods to apply those definitions.Thermodynamical work is normally based on its mechanical version while heat is related to temperature differences.This fact would not constitute a serious problem if all existing definitions were equivalent and did not lead to a violation of any thermodynamical law.
The main objective of this work was to decide which variables are the most appropriate to calculate heat and work.This subject has been brought to discussion in some recent works.By analysing a great number of the most classic thermodynamical processes, GC2005 have pointed out the advantages of using the surroundingsbased instead of system-based definitions.In essence, they showed that, in some irreversible processes heat and work cannot be evaluated when the system-based definition is adopted, and, in other cases, even when system-based work can be evaluated it often does not satisfy the maximum work theorem.Moreover, according to GC2005, for reversible processes both systemand surroundings-based definitions are equivalent.
In summary, the main conclusions of this work are: i) heat and work definitions have to be based on the surroundings variables; ii) the above conclusion is a consequence of the Second Law of Thermodynamics; and iii) system-and surroundings-based heat and work definitions are equivalent for reversible processes.
In fact, even though both the system-based and surroundings-based definitions of heat and work do not violate the First Law of Thermodynamics, the examples presented in this work showed that only the surroundings-based definition is in agreement with the Second Law.Consequently, the choice between the two formulations is not a matter of convenience but instead compelled by the Second Law, which is the ultimate criterion for analysing such concepts from a thermodynamical standpoint.
As pointed out by GC2005, there is no difference between the system-and surroundings-based definitions for the reversible processes.However, as was shown in the first example the equivalence is also verified for some irreversible processes, namely for those without dissipative work.
In our opinion, the problem discussed in this study has remained unnoticed due to several reasons.In fact, all definitions of heat and work are very similar and seem to be equivalent, so that the consequences due to discrepancies amongst them are not even assessed.In addition, many typical thermodynamical situations, presented for didactical purposes, are very simple and restricted to reversible processes, and for these cases both definitions lead to the same results.Finally, the typical approach is to establish and apply the heat and work definitions and not to compare them.The reasons why system-based definitions persist is also extensively explored in GC2005.
Thermodynamics, in spite of its relative low mathematical complexity, has a lot of subtleties that have promoted a great deal of interest in many recent publications.It is hoped that this work be a relevant contribution to clarify the concepts of heat and work.

Figure 1 -
Figure 1 -Gas contained in a cylinder-piston apparatus.The work exchange (W ) is related to the movement of the piston and the heat exchange (Q) to the temperature difference between the system and its surroundings.
δW = P e dV e = −P dV (sur-based ≡ sys-based) (12) δQ = dU − P e dV e = dU + P dV (sur-based ≡ sys-based) are isothermal and U is a thermodynamical property and taking into account that P e < P the above expression can be written asδQ T e = 1 T f i (P e − P ) dV < 0 (19)On the other hand, using the system-based definitions to establish the infinitesimal work and heat, we haveδW = −P dV (20) δQ = dU + P dV (21)and applying the Clausius relation, considering the same returning process, we are led to

Figure 4 -
Figure 4 -The system (the gas and the electrical resistor) is heated, at constant volume, by connecting the resistor to an external battery.