In thermodynamics and thermal physics, the Gouy-Stodola theorem is an important theorem for the quantification of irreversibilities in an open system, and aids in the exergy analysis of thermodynamic processes. It asserts that the rate at which work is lost during a process, or at which exergy is destroyed, is proportional to the rate at which entropy is generated, and that the proportionality coefficient is the temperature of the ambient heat reservoir. In the literature, the theorem often appears in a slightly modified form, changing the proportionality coefficient.
 The theorem is named jointly after the French physicist Georges Gouy and Slovak physicist Aurel Stodola, who demonstrated the theorem in 1889 and 1905 respectively. Gouy used it while working on exergy and utilisable energy, and Stodola while working on steam and gas engines.
 The Gouy-Stodola theorem is often applied upon an open thermodynamic system, which can exchange heat with some thermal reservoirs. It holds both for systems which cannot exchange mass, and systems which mass can enter and leave.
 Observe such a system, as sketched in the image shown, as it is going through some process. It is in contact with multiple reservoirs, of which one, that at temperature 
  
    
      
        
          T
          
            0
          
        
      
    
    {\displaystyle T_{0}}
  
, is the environment reservoir. During the process, the system produces work and generates entropy. Under these conditions, the theorem has two general forms.
 The reversible work is the maximal useful work which can be obtained, 
  
    
      
        
          W
          
            r
            e
            v
          
        
        =
        
          W
          
            m
            a
            x
          
        
      
    
    {\displaystyle W_{rev}=W_{max}}
  
, and can only be fully utilized in an ideal reversible process. An irreversible process produces some work 
  
    
      
        
          W
          
            a
            c
            t
            u
            a
            l
          
        
      
    
    {\displaystyle W_{actual}}
  
, which is less than 
  
    
      
        
          W
          
            r
            e
            v
          
        
      
    
    {\displaystyle W_{rev}}
  
. The lost work is then 
  
    
      
        
          W
          
            l
            o
            s
            t
          
        
        =
        
          W
          
            r
            e
            v
          
        
        −
        
          W
          
            a
            c
            t
            u
            a
            l
          
        
      
    
    {\displaystyle W_{lost}=W_{rev}-W_{actual}}
  
; in other words, 
  
    
      
        
          W
          
            l
            o
            s
            t
          
        
      
    
    {\displaystyle W_{lost}}
  
 is the work which was lost or not exploited during the process due to irreversibilities. In terms of lost work, the theorem generally states  Note that 
  
    
      
        
          
            
              
                W
                ˙
              
            
          
          
            l
            o
            s
            t
          
        
      
    
    {\displaystyle {\dot {W}}_{lost}}
  
 is a relative quantity, in that it is measured in relation to a specific thermal reservoir. In the above equations, 
  
    
      
        
          
            
              
                W
                ˙
              
            
          
          
            l
            o
            s
            t
          
        
      
    
    {\displaystyle {\dot {W}}_{lost}}
  
 is defined in reference to the environment reservoir, at 
  
    
      
        
          T
          
            0
          
        
      
    
    {\displaystyle T_{0}}
  
. When comparing the actual process to an ideal, reversible process between the same endpoints (in order to evaluate 
  
    
      
        
          W
          
            r
            e
            v
          
        
      
    
    {\displaystyle W_{rev}}
  
, so as to find the value of 
  
    
      
        
          W
          
            l
            o
            s
            t
          
        
      
    
    {\displaystyle W_{lost}}
  
), only the heat interaction with the reference reservoir 
  
    
      
        
          T
          
            0
          
        
      
    
    {\displaystyle T_{0}}
  
 is allowed to vary. The heat interactions between the system and other reservoirs are kept the same. So, if a different reference reservoir 
  
    
      
        
          T
          
            r
            e
            f
          
        
      
    
    {\displaystyle T_{ref}}
  
 is chosen, the theorem would read 
  
    
      
        
          
            
              
                W
                ˙
              
            
          
          
            l
            o
            s
            t
            ,
            t
            o
            t
          
        
        =
        
          T
          
            r
            e
            f
          
        
        
          
            
              
                S
                ˙
              
            
          
          
            g
            ,
            t
            o
            t
          
        
      
    
    {\displaystyle {\dot {W}}_{lost,tot}=T_{ref}{\dot {S}}_{g,tot}}
  
, where this time 
  
    
      
        
          
            
              
                W
                ˙
              
            
          
          
            l
            o
            s
            t
          
        
      
    
    {\displaystyle {\dot {W}}_{lost}}
  
 is in relation to 
  
    
      
        
          T
          
            r
            e
            f
          
        
      
    
    {\displaystyle T_{ref}}
  
, and in the corresponding reversible process, only the heat interaction with 
  
    
      
        
          T
          
            r
            e
            f
          
        
      
    
    {\displaystyle T_{ref}}
  
 is different. 
 By integrating over the lifetime of the process, the theorem can also be expressed in terms of final quantities, rather than rates: 
  
    
      
        
          
            W
          
          
            l
            o
            s
            t
            ,
            t
            o
            t
          
        
        =
        
          T
          
            0
          
        
        
          
            S
          
          
            g
            ,
            t
            o
            t
          
        
      
    
    {\displaystyle {W}_{lost,tot}=T_{0}{S}_{g,tot}}
  
.
 The theorem also holds for adiabatic processes. That is, for closed systems, which are not in thermal contact with any heat reservoirs.
 Similarly to the non-adiabatic case, the lost work is measured relative to some reference reservoir 
  
    
      
        
          T
          
            0
          
        
      
    
    {\displaystyle T_{0}}
  
. Even though the process itself is adiabatic, the corresponding reversible process may not be, and might require heat exchange with the reference reservoir. Thus, this can be thought of as a special case of the above statement of the theorem - an adiabatic process is one for which the heat interactions with all reservoirs are zero, and in the reversible process, only the heat interaction with the reference thermal reservoir may be different.
 The adiabatic case of the theorem holds also for the other formulation of the theorem, presented below. 
 The exergy of the system is the maximal amount of useful work that the system can generate, during a process which brings it to equilibrium with its environment, or the amount of energy available. During an irreversible process, such as heat exchanges with reservoirs, exergy is destroyed. Generally, the theorem states that  Unlike the lost work formulation, this version of the theorem holds for both the system (the control volume) and for its surroundings (the environment and the thermal reservoirs) separately:  Thus, the exergy formulation of the theorem is less limited, as it can be applied on different regions separately. Nevertheless, the work form is used more often.
 The proof of the theorem, in both forms, uses the first law of thermodynamics, writing out the terms 
  
    
      
        
          
            
              
                W
                ˙
              
            
          
          
            l
            o
            s
            t
          
        
      
    
    {\displaystyle {\dot {W}}_{lost}}
  
, 
  
    
      
        
          
            
              
                ψ
                ˙
              
            
          
          
            d
          
        
      
    
    {\displaystyle {\dot {\psi }}_{d}}
  
, and 
  
    
      
        
          
            
              
                S
                
                  g
                
              
              ˙
            
          
        
      
    
    {\displaystyle {\dot {S_{g}}}}
  
 in the relevant regions, and comparing them.
 In many cases, it is preferable to use a slightly modified version of the Gouy-Stodola theorem in work form, where 
  
    
      
        
          T
          
            0
          
        
      
    
    {\displaystyle T_{0}}
  
 is replaced by some effective temperature. When this is done, it often enlarges the scope of the theorem, and adapts it to be applicable to more systems or situations. For example, the corrections elaborated below are only necessary when the system exchanges heat with more than one reservoir - if it exchanges heat only at the environmental temperature 
  
    
      
        
          T
          
            0
          
        
      
    
    {\displaystyle T_{0}}
  
, the simple form above holds true. Additionally, modifications may change the reversible process to which the real process is compared in calculating 
  
    
      
        
          
            
              
                W
                ˙
              
            
          
          
            l
            o
            s
            t
          
        
      
    
    {\displaystyle {\dot {W}}_{lost}}
  
. 
 The modified theorem then reads  For a flow process, let 
  
    
      
        
          s
          
            1
          
        
      
    
    {\displaystyle s_{1}}
  
 denote the specific entropy (entropy per unit mass) at the inlet, where mass flows in, and 
  
    
      
        
          s
          
            2
          
        
      
    
    {\displaystyle s_{2}}
  
 the specific entropy at the outlet, where mass flows out. Similarly, denote the specific enthalpies by 
  
    
      
        
          h
          
            1
          
        
      
    
    {\displaystyle h_{1}}
  
 and 
  
    
      
        
          h
          
            2
          
        
      
    
    {\displaystyle h_{2}}
  
. The inlet and outlet, in this case, function as initial and final states a process: mass enters the system at an initial state (the inlet, indexed "1"), undergoes some process, and then leaves at a final state (the outlet, indexed "2").
 This process is then compared to a reversible process, with the same initial state, but with a (possibly) different final state. The theoretical specific entropy and enthalpy after this ideal, isentropic process are given by 
  
    
      
        
          s
          
            2
            ,
            r
            e
            v
          
        
      
    
    {\displaystyle s_{2,rev}}
  
 and 
  
    
      
        
          h
          
            2
            ,
            r
            e
            v
          
        
      
    
    {\displaystyle h_{2,rev}}
  
, respectively. When the actual process is compared to this theoretical reversible process and 
  
    
      
        
          
            
              
                W
                ˙
              
            
          
          
            l
            o
            s
            t
          
        
      
    
    {\displaystyle {\dot {W}}_{lost}}
  
 is evaluated, the proper effective temperature is given by  This equation above can sometimes be simplified. If both the pressure and the specific heat capacity remain constant, then the changes in enthalpy and entropy can be written in terms of the temperatures, and  In general, the Gouy-Stodola theorem is used to quantify irreversibilities in a system and to perform exergy analysis. That is, it allows one to take a thermodynamic system and better understand how inefficient it is (energy-wise), how much work is lost, how much room there is for improvement and where. The second law of thermodynamics states, in essence, that the entropy of a system only increases. Over time, thermodynamic systems tend to gain entropy and lose energy (in approaching equilibrium): thus, the entropy is "somehow" related to how much exergy or potential for useful work a system has. The Gouy-Stodola theorem provides a concrete link. For the most part, this is how the theorem is used - to find and quantify inefficiencies in a system. 
 A flow process is a type of thermodynamic process, where matter flows in and out of an open system called the control volume. Such a process may be steady, meaning that the matter and energy flowing into and out of the system are constant through time. It can also be unsteady, or transient, meaning that the flows may change and differ at different times.
 Many proofs of the theorem demonstrate it specifically for flow systems. Thus, the theorem is particularly useful in performing exergy analysis on such systems.
 The Gouy-Stodola theorem is often applied to refrigeration cycles. These are thermodynamic cycles or mechanical systems where external work can be used to move heat from low temperature sources to high temperature sinks, or vice versa. Specifically, the theorem is useful in analyzing vapor compression and vapor absorption refrigeration cycles. 
 The theorem can help identify which components of a system have major irreversibilities, and how much exergy they destroy. It can be used to find at which temperatures the performance is optimal, or what size system should be constructed. Overall, that is, the Gouy-Stodola theorem is a tool to find and quantify inefficiencies in a system, and can point to how to minimize them - this is the goal of exergy analysis. When the theorem is used for these purposes, it is usually applied in its modified form.
 Macroscopically, the theorem may be useful environmentally, in ecophysics. An ecosystem is a complex system, where many factors and components interact, some biotic and some abiotic. The Gouy-Stodola theorem can find how much entropy is generated by each part of the system, or how much work is lost. Where there is human interference in an ecosystem, whether the ecosystem continues to exist or is lost may depend on how many irreversibilities it can support. The amount of entropy which is generated or the amount of work the system can perform may vary. Hence, two different states (for example, a healthy forest versus one which has undergone significant deforestation) of the same ecosystem may be compared in terms of entropy generation, and this may be used to evaluate the sustainability of the ecosystem under human interference.
 The theorem is also useful on a more microscopic scale, in biology. Living systems, such as cells, can be analyzed thermodynamically. They are rather complex systems, where many energy transformations occur, and they often waste heat. Hence, the Gouy-Stodola theorem may be useful, in certain situations, to perform exergy analysis on such systems. In particular, it may help to highlight differences between healthy and diseased cells. 
 Generally, the theorem may find applications in fields of biomedicine, or where biology and physics cross over, such as biochemical engineering thermodynamics.
 A variational principle in physics, such as the principle of least action or Fermat's principle in optics, allows one to describe the system in a global manner and to solve it using the calculus of variations. In thermodynamics, such a principle would allow a Lagrangian formulation. The Gouy-Stodola theorem can be used as the basis for such a variational principle, in thermodynamics. It has been proven to satisfy the necessary conditions.
 This is fundamentally different from most of the theorem's other uses - here, it isn't being applied in order to locate components with irreversibilities or loss of exergy, but rather helps give some more general information about the system.