4 Engineering Example 2
4.1 Pressure in an ideal multi-component mixture
Introduction
An ideal multi-component mixture consists of
1. -pentane (5%)
2. -hextane (15%)
3. -heptane (50%)
4. -octane (30%)
In general, the total pressure, (Pa) of an ideal four-component mixture is related to the boiling point, (K) through the formula:
where, for component , the mole fraction is and the vapour pressure is , given by the formula:
Here is in mm Hg (1 mm Hg Pa), is the absolute temperature (K) and the constants and are given in the table below.
component | |||||
1 | -pentane | 0.05 | 15.8333 | 2477.07 | 39.94 |
2 | -hexane | 0.15 | 15.8366 | 2697.55 | 48.78 |
3 | -heptane | 0.50 | 15.8737 | 2911.32 | 56.51 |
4 | -octane | 0.30 | 15.9426 | 3120.29 | 63.63 |
Problem 1
For the liquid compositions, given in the table above, plot a graph of the total pressure, (Pa) against temperature (K) over the range to K.
Solution
, expressed in millimetres of mercury, and so it is 133.32 times that in pascals. Therefore, expressed in pascals, we have
Plotting this from to gives the following graph
Figure 15
Problem 2
Using the Newton-Raphson method, solve the equations to find the boiling points at total pressures of 1, 2, 5 and 10 bars. Show the sequence of iterations and perform sufficient calculations for convergence to three significant figures. Display these solutions on the graph of the total pressure, (Pa) against temperature (K).
Solution
We wish to find when and bars, that is, and Pa.
Reading crude approximations to from the graph gives a starting point for the Newton-Raphson process. We see that for and Pa, temperature is roughly and degrees K, respectively, so we shall use these values as the start of the iteration.
In this case it is easy to calculate the derivative of with respect to exactly, rather than numerically, giving
Therefore to solve the equation , we set to be the starting value above and use the iteration
For this gives the iterations
365 | 362.7915 | 362.7349 | 362.7349 | 362.7349 |
We conclude that, to three significant figures K when Pa.
For this gives the iterations
375 | 390.8987 | 388.8270 | 388.7854 | 388.7854 |
We conclude that, to three significant figures K when Pa.
For this gives the iterations
460 | 430.3698 | 430.4640 | 430.2824 | 430.2821 | 430.2821 |
We conclude that, to three significant figures K when Pa.
For this gives the iterations
475 | 469.0037 | 468.7875 | 468.7873 | 468.7873 | 468.7873 |
We conclude that, to three significant figures K when Pa.
4.2 An approximate Newton-Raphson method
The Newton-Raphson method is an excellent way of approximating zeros of a function, but it requires you to know the derivative of . Sometimes it is undesirable, or simply impossible, to work out the derivative of a function and here we show a way of getting around this.
We approximate the derivative of . From Section 31.3 we know that
is a one-sided (or forward) approximation to and another one, using a central difference, is
The advantage of the forward difference is that only one extra -value has to be computed. If is especially complicated then this can be a considerable saving when compared with the central difference which requires two extra evaluations of . The central difference does have the advantage, as we saw when we looked at truncation errors, of being a more accurate approximation to .
The spreadsheet program Microsoft Excel has a built in “solver" command which can use Newton’s method. (It may be necessary to use the “Add in" feature of Excel to access the solver.) In reality Excel has no way of working out the derivative of the function and must approximate it. Excel gives you the option of using a forward or central difference to estimate .
We now reconsider the problem we met in Examples 24 to 26.
Example 27
We know that the single positive zero of lies between and . Use the Newton-Raphson method, with an approximation to , to approximate the zero of .
Solution
There is no requirement for
this time, but the nature of this method is such that we will resort to a computer straight away. Let us
choose
in our approximations to the derivative.
Using the one-sided difference to approximate
we obtain this sequence of results from the spreadsheet program:
And using the (more accurate) central difference gives
We see that each of these approaches leads to the same value (1.543405) that we found with the Newton-Raphson method.
Task!
Use a spreadsheet to recompute the approximations shown in Example 24, for the following values of :
You should find that as decreases, the numbers get closer and closer to those shown earlier for the Newton-Raphson method. For example, when we find that for a one-sided difference the results are
and those for a central difference with are
It is clear that these two tables very closely resemble the Newton-Raphson results seen earlier.
Exercises
-
It is given that the function
has a single negative zero.
- Find two integers and which bracket the zero of .
- Perform one iteration of the bisection method so as to halve the size of the bracketing interval.
-
Consider a simple electronic circuit with an input voltage of 2.0 V, a resistor of resistance 1000
and a diode. It can be shown that the voltage across the diode can be found as the single
positive zero of
Use one iteration of the Newton-Raphson method, and an initial value of to show that
and then work out a second iteration.
-
It is often necessary to find the zeros of polynomials as part of an analysis of transfer
functions. The function
has a single zero near . Use this value of in an implementation of the Newton-Raphson method performing two iterations. (Work to at least 6 decimal place accuracy.)
-
The smallest positive zero of
is a measure of how quickly certain evanescent water waves decay, and its value, , is near . Use the forward difference
to estimate and use this value in an approximate version of the Newton-Raphson method to derive one improvement on .
-
- By trial and error we find that and , from which we see that the required bracketing interval is where and .
- For an iteration of the bisection method we find the mid-point . Now which is of the opposite sign to and hence the new smaller bracketing interval is .
-
The derivative of
is
and therefore the first iteration
of Newton-Raphson gives
The second iteration gives
Using a spreadsheet we can work out some more iterations. The result of this process is tabulated below
and we conclude that the required zero of is equal to , to 6 decimal places.
-
Using the starting value
you should find that
and
.
This leads to
The second iteration should give you
Subsequent iterations can be used to ‘home in’ on the zero of and, using a computer spreadsheet program, we find that
We see that the method converges to the value .
-
We begin with
to the displayed number of decimal places, and hence an improvement on is
to 6 decimal places. (It can be shown that the root of is 2.798386, to 6 decimal places.)