Isothermal_Expansion.nb 1 Work Done During Reversible and Irreversible Expansions of an Ideal Gas by Arthur Ferguson 2002 Dept. of Chemistry Worcester State College Worcester, MA 01602 Translated and modified from the MathCAD document by Alex Grushow 2004 © Copyright 2004 by the Division of Chemical Education, Inc., American Chemical Society. All rights reserved. For classroom use by teachers, one copy per student in the class may be made free of charge. Write to JCE Online, [email protected], for permission to place a document, free of charge, on a class Intranet. Abstract This exercise examines how the work associated with stepped irreversible isothermal expansions and compressions of an ideal gas changes as the number of steps is increased. It uses the graphing power of Mathematica to lead the user to discover that the work approaches an asymptote as the number of steps becomes very large and that asymptote is the work for the reversible expansion or compression. It then challenges the user to recognize that the work for the reversible expansion or compression represents a limiting value for the work for the corresponding irreversible processes. Goal The goal of this exercise is to help the user to discover in a clear, visual, concrete way 1. that as the number of steps in an isothermal expansion or compression of an ideal gas increases and the size of each step decreases, the work for the expansion or compression approaches that for the corresponding reversible process, and by implication that the irreversible process approaches reversibility; 2. that the work for the reversible expansion or compression represents a limiting value of the work for the corresponding irreversible processes. Performance Objectives Isothermal_Expansion.nb 2 After completing this exercise the user should 1. be able to describe how the work for stepped isothermal expansions and compressions of an ideal gas change as the number of steps increases, including sketching graphs of the work vs. the number of steps and relating that graph to the work for the corresponding reversible expansion or compression; 2. recognize that the work for the reversible expansion or compression is the limiting value of the work for the corresponding irreversible expansions or compressions. Introduction The work resulting from the expansion or compression of a pas is PV work, for which the equation is ŸVinitial -Pext „ V Vfinal (1) where Pext is the pressure exerted by the surroundings on the system. By the definition of a reversible process, a reversible expansion is one that occurs so slowly that the system always remains in equilibrium, both internally and with the surroundings. When the system and surrounding are in equilibrium, Pext = P of the system. Therefore, for a reversible expansion ŸVinitial -P „ V Vfinal (2) What does this equation become for one mole of an ideal gas? For an irreversible expansion Pext has to be used in the calculation of w. The irreversible expansions we will look at will involve a series of steps in which the gas starts out at equilibrium, Pext is dropped instantaneously from one value to a new, lower one and is held constant at the new value while the gas expands until a new equilibrium is reached. Then Pext is instantaneously dropped again to start the next step. For example, the expansion of a gas from a pressure of 10 atm to a pressure of 1 atm might happen in a series of 1-atm steps, with Pext first dropping instantaneously from 10 atm to 9 atm and holding there until the gas has expanded enough to come into equilibrium with it, then dropping to 8 atm, etc. (The sudden drop in pressure at the beginning of each step destroys the equilibrium attained at the end of the last step, and it is this destruction of equilibrium that makes the expansion irreversible.) Since Pext is constant during each of these steps, the value of w for each step as calculated from Equation 1 is simply -Pext DV, where Pext is the value of Pext for that step and DV is the change in volume during that step. The total work for the expansion is the sum of the values of w for the individual steps. In this exercise we will examine how the work for an irreversible stepped expansion of 1 mole of an ideal gas at 300 K from a pressure of 10 atm to a pressure of 1 atm changes as the number of steps is increased and will compare the work for the irreversible expansions to the work for a reversible expansion of the same gas between the same two pressures. Setting up the initial parameters: Isothermal_Expansion.nb 3 << Miscellaneous`Units` << Graphics`Graphics` << Graphics`MultipleListPlot` Pinitial = 10 Atmosphere; Pfinal = 1 Atmosphere; T = 300 Kelvin; R = 0.08205 Kelvin ; í Liter; Pinitial R T = í Liter; Pfinal Vinitial = Vfinal Liter Atmosphere R T Establishing Arrays for Pext, V and w Our approach will be to set up arrays for Pext , V and w. Each element of Pext will be the external pressure during a step in the expansion and will be smaller than the previous one by an amount int gotten by dividing the range between Pinitial and Pfinal by the number of steps the expansion will take. Each element of V will be the volume of the gas at the end of a step, when it is in equilibrium with the corresponding value of Pext . Each value of w will be the work for a step, which is equal to -Pext for the step times the change in volume during the step, calculated as the difference between the volume at the end of the step and the volume at the end of the previous step. The total work will be the sum of the elements of the w array. Note that the values of the 0th elements of the Pext and V arrays are set manually and that the range value i starts at 1 rather than 0. Steps = 1; Pex@0D = Pinitial ; V@0D = Vinitial Liter; Pinitial − Pfinal ; int = Steps Do@Pex@iD = Pex@i − 1D − int, 8i, Steps<D; DoAV@iD = RT Pex@iD , 8i, Steps<E; Do@w@iD = −Pex@iD HV@iD − V@i − 1DL, 8i, Steps<D; totalwork = ConvertA ‚ Hw@iDL, JouleE Steps i=1 −2244.7 Joule Isothermal_Expansion.nb 4 Exercise 1 In this exercise you will want to fill in the X and Y matrix below with at least 10 elements each (the first two are given for you). X = 81, 5<; Y = 8−2244.7, −4277.22<; Fill up the matrix elements by repeating the calculation above for totalwork with different values for Steps. Add the number of steps into the X matrix and totalwork into the Y matrix. Verify that the first two entries are correct. Repeat at least 8 more times. Make sure that your values of Steps cover a large range, with the largest value being at least 5000. (The values 1, 2, 10, 25, 50, 100, 500, 1000, 5000, 10000 work well, but you may want to experiment with other values as well.) wlist = Table@8X@@iDD, Y@@iDD<, 8i, Length@XD<D; zplot = ListPlot@wlist, FrameLabel → 8"Number of Steps", "Work"<, RotateLabel → False, PlotStyle → 8Hue@0D, [email protected]<, Frame → True, TextStyle → 8FontFamily → "Times", FontSize → 12<D -2500 -3000 Work -3500 -4000 1 2 a. What does the full graph above look like? Does it look useful? 3 Number of Steps 4 Isothermal_Expansion.nb 5 Change zplot to a LogLinearListPlot so that the x scale is now logarithmic. -2500 -3000 -3500 Work -4000 -4500 -5000 -5500 1 10 100 Number of Steps 1000 b. Does this make the graph look better? Explain. c. Describe the new graph. d. What happens to totalwork as the number of steps gets larger? e. What happens to the size of each step as the number of steps gets larger? f. Is there a correlation between totalwork and the size of the steps? g. What happens to the graph, and the value of totalwork, as the number of steps gets very large? Calculate the work for the reversible expansion of 1 mole of an ideal gas between the same two pressures. The easiest way to do this is to copy Equation 2, and make the appropriate substitution for P. ( Notice how quickly and easily Mathematica evaluates the integral compared to adding up 5000 steps!) To make this calculation comparable to what you have already done, do not forget to Convert the units to Joule similar to what was done above. Isothermal_Expansion.nb 6 ‡ Vfinal wo = ConvertA Vinitial y −I RVT zzzzz V, JouleE { −5742.91 Joule h. Compare the values of total work for the irreversible expansions with the value of work for the reversible expansion. Are the values of totalwork for the irreversible expansions larger or smaller than the value of w for the reversible expansion? Take the sign into account in giving your answer. i. What happens to the difference between the values of totalwork for the irreversible expansions and the value of work for the reversible expansion as the number of steps gets larger? j. Does the value of totalwork (irreversible) ever "pass" the value of work for the reversible expansion? (switch from being larger to being smaller or vice versa) k. Can you think of a mathematical term that describes the relationship between work for the reversible expansion and the values of totalwork for the irreversible expansions? Exercise 2 Repeat Exercise 1 for the compression, rather than the expansion,of the gas. This can be done very easily by simply reversing the values of Pinitial and Pfinalin the Initial Paramters section, recalculating the value of totalwork for each value of Steps. In order to facilitate comparison between the data for the expansion and the compression,you may want to create a new data set YY which will contain the new values of totalwork as function of X. Answer all the questions in Exercise 1 for the compression. l. Can you think of an expression of the relationship between the values of work for the reversible and irreversible processes that applies to both the expansion and the compression? m. Compare the values of work for the reversible expansion and the reversible compression of the gas. Are they related? If so, how? Make a copy of the graph you developed for compression work as a function of step size (using a different name for the Table and LinearListPlot). Develop a similar graph for the compression, plotting X vs –YY. Then use the DisplayTogether command to put both plots together on the same plot (It will also be useful to add the modifier "PlotRange->All") Isothermal_Expansion.nb 7 w1list = Table@8X@@iDD, −YY@@iDD<, 8i, Length@XD<D; zplot1 = LogLinearListPlot@w1list, FrameLabel → 8"Number of Steps", "Work"<, RotateLabel → False, PlotStyle → [email protected], [email protected]<, Frame → True, TextStyle → 8FontFamily → "Times", FontSize → 12<D; DisplayTogether@8zplot, zplot1<, PlotRange → AllD -7500 -10000 -12500 Work -15000 -17500 -20000 -22500 1 10 100 Number of Steps 1000 10000 Isothermal_Expansion.nb 8 -5000 -10000 Work -15000 -20000 1 10 100 Number of Steps 1000 10000 n. What does this graph tell you about the relationship between totalwork for the irreversible expansions and the irreversible compressions as the number of steps becomes very large?
© Copyright 2026 Paperzz