6
Instructions Page 1 DEWCALC.XLS This workbook will calculate dew point temperatures and pressures usi DewCalc This is the worksheet that carries out the calculation It is currently provided to perform calculations using be modified for other activity relations. As provided, equation for vapor pressure. Background This worksheet provides background on the iterative ca Worksheets are protected. Values in blue may be changed without unloc permit most common calculations. To unprotect, use Tools...Protection password. Copyright 1997, Carl Lira For use with "An Introduction to Applied Thermodynamics" by J.R. Elli www.egr.msu.edu/~lira/thermtxt.htm

Dew Calc

  • Upload
    sdrtfg

  • View
    38

  • Download
    2

Embed Size (px)

DESCRIPTION

Excel calc sheet

Citation preview

Page 1: Dew Calc

Instructions

Page 1

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.

Background This worksheet provides background on the iterative calculations.

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 2: Dew Calc

Instructions

Page 2

This workbook will calculate dew point temperatures and pressures using Modified Raoult's Law.

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

This worksheet provides background on the iterative calculations.

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

For use with "An Introduction to Applied Thermodynamics" by J.R. Elliott, C.T. Lira

Page 3: Dew Calc

document.xls

Page 3

Dew Point Calculator protected without password

Modified Raoult's Law, One term Margules

System Acetone(1)-Methanol(2), B = 0.64

T(C)= 55.1 P= 629 (mm Hg)

A

Margules Parameter 0.64 For Dew Temperature

Calculation, adjust T until

component 1 2

y 0.3 0.7 For Dew Pressure

Antoine A 7.11714 8.08097 calculations, adjust P until

Antoine B 1210.595 1582.271

Antoine C 229.664 239.726

Psat(mm Hg) 734.3751 517.8142

x' Err:522 Err:522

Err:522 Err:522

Err:522 Err:522

Err:522

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.

GE/RT = A *x1*x2

xT = 1.

xT = 1.

xn

xT

Page 4: Dew Calc

document.xls

Page 4

Calculation, adjust T until

calculations, adjust P until

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

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.

Page 5: Dew Calc

Background

Page 5

The iterations in this spreadsheet involve the rows for x', x(n), gamma.

1.

2.

3.

The worksheet "DewCalc" uses circular references to set up iterative calculations. For a dew calculation,

from the last converged answer. This value is used to calculate a new value for x, which in turn changes 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,

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.

diverge, giving a error, and the best way to recover is to reload the saved spreadsheet.

each x' is calculated from the appropriate y * P / ( * Psat).

xn is the normalized composition calculated using the x' values.

is calculated from xn, which was calculated from x', thus completing the loop.

the value of depends on x, which is not known until the answer is obtained. Therefore, the initial guess is taken

value of , 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 and x reference each other. Iteration procedes until the values change by less than the

(cell C15) was set to 1. Then formulas were entered in cells C12,C13,C14, and

Save the spreadsheet after it is set up. A poor guess can cause an interative calculation to

Page 6: Dew Calc

Background

Page 6

The worksheet "DewCalc" uses circular references to set up iterative calculations. For a dew calculation,

from the last converged answer. This value is used to calculate a new value for x, which in turn changes the

value of the "Maximum Change" variable or the number of iterations set in the "Maximum Iterations" variable.

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

Before entering a circular reference, choose Tools... Options... Calculation .... and click on Manual

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,

depends on x, which is not known until the answer is obtained. Therefore, the initial guess is taken

, which is used to calculate a new value for x. Programming the cells sets up a circular reference which

and x reference each other. Iteration procedes until the values change by less than the

A poor guess can cause an interative calculation to