The Hidden Dangers of Technology

Article by Mohan Karmarkar CEng FIChemE

Why checks and balances are so important

OVER the last decade there have been tremendous advances in the power of computing and information technology. So much so that we are very reliant on the availability of the technology in everyday life. We can now do most things we need via our mobile phones (such as shopping, managing our finances, monitoring our use of utilities). We do all our calculations using computers. So what happens when the system breaks down?

I remember a shop assistant telling me: "I cannot serve as my computer is down." I wanted to purchase seven watches at $3 each as these were reduced to clear from the original price of $27 each. I replied "it will be $21". The assistant replied that they couldn't check it without the computer. Needless to say that when the power was restored they checked the total and exclaimed: “You are right! How did you do that?”

How is this relevant to chemical engineers? They are good with mathematics and do lot of calculations involving complex equations etc. To ensure we do not make mistakes we have introduced checks and balances in the way we do our calculations. Therefore, there should be no errors. Should there?

2 x 2 = ???

There are many ways errors can occur in our calculations and we may not even be aware of it. One such example is that of the scientists based in BP’s Research Centre in Sunbury, UK. They found that the simple multiplication 2x2 on the advanced fast chip developed in the early 1990s was giving an answer of 3.9999 to 16 decimal places.

When you are doing thousands of iterative calculations for convergence, this error can get multiplied and therefore the result will be error prone. Normally, engineering calculations are carried out with an accuracy to two decimal places. Therefore the error will be very significant. The chip manufacturer withdrew the chip and reissued after modification. It would have been impossible to find such an error under normal calculation accuracy requirements and we have to thank the BP scientists who worked to such high accuracy levels that they found the fault in the chip.

These days we carry out full plant simulations involving several unit operations and lots of equipment with several recycle streams. This is now made possible with tremendous computing power and very fast processing speeds. Even then for such simulations requiring convergence on all the unit operations with so many iterations, it would require a lot of computing time. Therefore, some recycle streams are disconnected and guesses are made to initialise the simulation. From what I have seen, when the converged solution is presented, many engineers fail to check that the two parts of the disconnected recycle stream show the same mass flow, temperature, pressure etc. The entire plant simulation shows convergence but some of these streams may not have the same mass and/or heat values.

Should you always trust a spreadsheet?

Engineers use spreadsheets to make the majority of their calculations and then present the results in tables and charts. As a quality manager, I checked one report that had been sent to me for checking and approval. The report described seven possible options and these were ranked in their economic viability based on several factors which were evaluated with costs. In flicking through the pages, one option with a cost table caught my attention as the sum did not seem to be correct. So I mentally checked and rechecked the sum and it was wrong.

The report was produced by a young engineer and checked by a senior engineer, yet the mistake was there. I sent the report back to the senior engineer, rejecting it and requesting him to recheck and correct the tables. The upshot of it was that the option with the mistake, which was ranked sixth out of seven, was now in second place. Luckily the overall selection of the first ranked option did not change, otherwise the whole exercise would have had to be repeated.

So why did this mistake occur? It was something as simple as incorrect selection of the number of rows in a column, as some rows were deleted and others were added at the end, but the summing function was not corrected to the revised number of rows. With constant pressure to produce engineering reports and designs in double-quick time, mistakes like this can happen and that is the reason all engineering firms have the procedure for checking and approval. Therefore it is incumbent upon the checkers to be very vigilant whenever spreadsheets are used for calculations.

Checkers must be very vigilant whenever spreadsheets are used for calculations

Another example is the use of an incorrect address in a spreadsheet. An additive flow to a column feed was calculated for prevention of corrosion by the resident expert in that field. I was intrigued by the very small quantity that was prescribed on the data sheet that they presented. The amount was 0.01 g/min. When I queried it and asked for a recheck, to their horror they found out that they had used the wrong cell address in the calculations, and the revised value was 100 g/min. They had used a specific cell address on one sheet but had deleted several rows and columns on different sheets in the calculations and imported the value to the specific cell address and then the numbers were incorrect. When they checked the calculation by hand they discovered the mistake. Therefore it is always worth checking your results, at least once, by manual calculation.

...or simulation software?

There are many simulation packages, eg Aspen, Hysys, Chemcad, ProSim, gPROM etc. These use predicted data based on equations of state (eg SRK, Peng Robinson, Wilson). When using these, a plant simulation is performed and a converged solution is obtained. Then the predicted properties of the streams are recorded in mass and heat balance tables. Consider an exchanger that is heating up the liquid feed by the product liquid stream containing small amount of gas from an equipment. If you check the predicted density of the product stream, you will find that it is invariably incorrect due to the presence of a small amount, less than 2%, of gas. This is particularly true for the cooling water density. Even if you specify steam tables for the cooling water it is worth checking the predicted density against steam tables as the presence of a small amount of gas leads to prediction of lower density.

When HYSIS was being developed, we were given a beta version of a column simulation for testing.

I had the task to set up the column input using the new user interface where the column plates were numbered from top to bottom. The data used was for a column that was already simulated and converged using the old HYSIM version. Therefore I had not expected to have any issues in getting a converged solution yet I could not get a converged solution. After several failed trials I started looking at the details of pressure and temperature profiles, and that immediately gave a clue as to the problem. The temperature profile was the wrong way round as the plate numbering used in the calculation and output was from bottom to top. As a result the feed was in the wrong place, requiring a significantly higher boilup rate. We pointed it out to the HYSIS team, who then corrected the error and had a converged solution.

In the case of heat exchanger simulations, it is always necessary to check that there are no temperature crosses in the converged solution.

Other cases

  • A reactor had been designed by a senior very experienced engineer, and as the project was running very late, the project manager had placed the order with a selected vendor. The reactor datasheet was given to a young engineer who was not involved with the project. They found that the density used to work out the volume of the liquid was at room temperature, but the reaction was carried out at a high temperature and that needed a  significant increase in volume. The result meant the reactor height had to be increased by 1 m to accommodate the increase in volume. As the reactor was made of a very expensive cladding material the increase in cost was substantial. If it was not done then the required product capacity would not have been achieved, with loss of revenue. The project manager had to issue a change notice to the vendor and use the contingency fund to cover it.
  • Another example is that of the Hubble telescope. A simple mistake in conversion from a metric to an FPS system used in the US led to the incorrect curvature and hence blurred images from the Hubble telescope. This had to be rectified by astronauts a year later.
  • Another normally very helpful autocorrect facility can land you in hot water by inserting the wrong correction. A positive sentence can change to negative and vice versa. Names in particular can get mixed up. Therefore, before a report is finalised, switch off the autocorrect facility and then check the report to ensure there is no such reversal.

Check, check, and check again

It is for the reasons outlined here that checks and balances have been provided in the project procedures of most of the engineering and operating companies. The onus is on the checker to be thorough and use a different calculation procedure to that used by the developer and check for consistency. If spreadsheets are used then carry out a manual calculation to check the result.

Article by Mohan Karmarkar CEng FIChemE

Retired group manager for Sheq, Jacobs Engineering

Recent Editions

Catch up on the latest news, views and jobs from The Chemical Engineer. Below are the four latest issues. View a wider selection of the archive from within the Magazine section of this site.