Вы находитесь на странице: 1из 6

Instructions

DEWCALC.XLS
This workbook will calculate dew point temperatures and pressures using Modified Raoult's Law. DewCalc This is the worksheet that carries out the calculations. The method uses iterative calculations. It is currently provided to perform calculations using the one-term Margules equations, but be modified for other activity relations. As provided, the spreadsheet uses the Antoine equation for vapor pressure. This worksheet provides background on the iterative calculations.

Background

Worksheets are protected. Values in blue may be changed without unlocking the spreadsheet, which will permit most common calculations. To unprotect, use Tools...Protection...Unprotect. Enter "thermo" for the password. Copyright 1997, Carl Lira For use with "An Introduction to Applied Thermodynamics" by J.R. Elliott, C.T. Lira www.egr.msu.edu/~lira/thermtxt.htm

Page 1

Instructions

uses iterative calculations. argules equations, but t uses the Antoine

adsheet, which will nter "thermo" for the

Page 2

133426601.xls.ms_office

Dew Point Calculator protected without password Modified Raoult's Law, One term Margules GE/RT = A *x1*x2 System Acetone(1)-Methanol(2), B = 0.64
T(C)= 55.1 Margules Parameter component y Antoine A Antoine B Antoine C Psat(mm Hg) x' xn g 1 0.3 7.11714 1210.595 229.664 734.3751 0.164343 0.16433 1.563523 P= 629 (mm Hg) A 0.64 2 0.7 8.08097 1582.271 239.726 517.8142 0.835736 0.835671 1.017433 For Dew Temperature Calculation, adjust T until xT = 1. For Dew Pressure calculations, adjust P until xT = 1.

xT 1.000079 This spreadsheet uses circular references. If you receive an error "Cannot resolve circular references", then Excel is not expecting circular references. To permit circular references, choose Tools..Options... Calculation... and click on the box for Iterations. Click on the "Background" tab to learn more about circular references. Occasionly, circular references don't work. In that event a macro can be written to perform succesive substitution. See the appendix of the text for instructions on writing macros.

Page 3

133426601.xls.ms_office

m succesive substitution.

Page 4

Background

The iterations in this spreadsheet involve the rows for x', x(n), gamma. sat 1. each x' is calculated from the appropriate y * P / ( g * P ). 2. xn is the normalized composition calculated using the x' values. 3. g is calculated from x n, which was calculated from x', thus completing the loop. The worksheet "DewCalc" uses circular references to set up iterative calculations. For a dew calculation, the value of g depends on x, which is not known until the answer is obtained. Therefore, the initial guess is taken from the last converged answer. This value is used to calculate a new value for x, which in turn changes the value of g, which is used to calculate a new value for x. Programming the cells sets up a circular reference which the values in the cells for g and x reference each other. Iteration procedes until the values change by less than the value of the "Maximum Change" variable or the number of iterations set in the "Maximum Iterations" variable. Iteration is controlled by choosing Tools... Options...Calculations... This spreadsheet was converged using Maximum Iterations = 100, Maximum Change = 0.0001. Note that in a spreadsheet using circular references, a large change in parameter/variable values from one problem to the next can create a poor first guess which causes the calculations to diverge. If you have problems with this, load your saved version, and change the values gradually over wide ranges. To set up your own iterative spreadsheet: Before entering a circular reference, choose Tools... Options... Calculation .... and click on Manual to set the calculations to manual. (F9 will start the calculation in Manual mode.) You must enter formulas in the order the iteration should procede. In this example, g (cell C15) was set to 1. Then formulas were entered in cells C12,C13,C14, and finally C15, where the order is important. Reasonable values for all cells should be used because the initial guess is established as you type in the formulas. When all the formulas are entered, the calculations may be turned back to Automatic. Save the spreadsheet after it is set up. A poor guess can cause an interative calculation to diverge, giving a error, and the best way to recover is to reload the saved spreadsheet.

Page 5

Background

nitial guess is taken rn changes the ular reference which ange by less than the ations" variable.

Page 6

Вам также может понравиться