Next: Thermodynamics


Modelling

In Lecture 2, I claimed that engineering was more than applied science, and that engineering had its own laws and its own methods. I've mentioned a couple of laws, but in this lecture I'd like to describe a powerful method engineers use for design in cases where a purely scientific approach won't work. We have seen that, even in a world where the scientific project has been completed and all the fundamental laws are known, we may be unable to predict the outcomes of some situations -- for example, we may be unable to predict how well a new product will perform -- because of various clouds that obscure the lower reaches of the tree. How can we deal with this?

One approach is to look sideways. On one leaf node of the tree is the performance of a new product I'd like to design. I don't know what that performance is, because I haven't built the product yet; and I can't deduce it from fundamental scientific principles, because there's a cloud in the way. What I can do, though, is to note a similarity between this region of the tree and a second region which is already familiar to me. Then, reasoning by analogy, I can draw conclusions about the new region from measurements on the old region. In a word, I am using this region as a model for the unknown region.

The idea of modelling is more complex than it at first appears. Let's start with one kind of model, one based on geometric similarity. I plan to construct a large building -- let's say a University. I construct a scale model; if the building is to be on a square plot, one hundred meters on a side, my scale model will occupy a square plot, one meter on a side. Then I can measure various properties of the model, and deduce conversion factors to give the corresponding properties of the real thing.

Parameter Conversion factor
Length of Water Pipe 100
Length of Wiring 100
Floor Area 10,000
Enclosed Volume 1,000,000
Number of Bricks 1
Weight 1,000,000
Roof Angle 1
Ratio of Study Space to Travel Space 1

You'll notice that some properties have a conversion factor of 1; that is, I can use the results of the model directly. Another way of putting this is, if I have geometric similarity, the numbers representing dimensionless ratios of lengths will be the same in the model and the real thing. Given this relationship, we could simplify the description of the model by giving all its dimensions as multiples of a reference quantity, for example, the length of side of a brick. By using brick-length units, we can describe the model without committing ourselves to what scale it's on. So both the model and the original can be described as `two hundred bricks high, eight hundred bricks long, ...' and so on. This is the most elementary kind of modelling; typically this kind of model would be used by architects (for a house) or designers (for a car), as a basis for aesthetic judgements. We wouldn't use it as a basis for calculation, because most of these calculations are easy to make by other methods.

There are many questions this level of modelling won't answer. For example, suppose I want to know the response of the building to high winds. This is a genuine example, because a high wind exhibits turbulent flow, which is one of the clouds of incomputability. This is why wind-tunnels exist. Well, I can put the model in a wind-tunnel. But how fast should I make the wind? To see if the real building will survive a wind of 100 kph, do I use a windtunnel speed of 100 kph? Or of 1 meters per hour?

What are we worried about the wind doing to the building? One thing it might do is to tip it over on its side.

The critical question is whether the resultant of the wind force, Fw and gravity Fg, falls inside or outside the base of the figure. This depends on the angle the resultant force forms with the horizontal, which depends on the ratio of the two forces. So the behaviour of the model will be the same as the behaviour of the real building if the ratio Fw/Fg is the same. This condition is called dynamic similarity, and it must be fulfilled if the model is to be useful, that is, if its behaviour is to resemble that of the building.

We want to know the value of the wind speed. Let's figure it out from the condition of dynamic similarity. The force exerted by the wind can be obtained from Newton's second law, F = ma. As the wind hits the side of the building, it comes to a stop, so it experiences a change in velocity from V to 0. The mass of wind experiencing this change per second is da*V*L*L, where da is the density of air and L is the length of side of the building. So Fw=da*V*V*L*L, and Fg=L*L*L*d*g, where d is the density of the building. We are concerned that the ratio of these two forces should be the same in the building and the model. We are probably going to do the modelling on Earth, using air and bricks, so we can suppose that da, d and g will have the same values in the building and the model. This leaves us with the characteristic building dimension, L, the corresponding characteristic model dimension, l, the real-world wind velocity that we want the building to withstand, V, and the wind velocity we're going to use in the wind tunnel, v. Setting the ratios of Fw and Fg equal in the two cases and cancelling, we get V*V/v*v = L/l.

That is, if the model is one-hundredth the scale of the original, we must test it with a wind velocity one-tenth that of the original.

Note that one way of describing this conclusion is to give a name to the dimensionless ratio of forces Fw/Fg. If we cancel out the density terms and retain the gravity term, this ratio simplifies to V*V/L*g. This is the Froude number. It can be applied to a class of modelling situations, including the case of ships in a towing tank. In this case, V is the velocity with which the ship is towed through the water. And equality of Froude number guarantees the equality of the gravitational force and the resistance of the fluid.

One thing I want to note is a restrictive clause in the definition of dynamic similarity: we can only argue from model to reality if we have similarity relationships for all the important forces. And which forces are important depends on where we are in the tree; it's a local fact, and our location determines what non-dimensional numbers will appear in our engineering. Engineers at the heart of a neutron star would have quite different non-dimensional numbers.

For example, our boats are sufficiently big, and move sufficiently fast, that the main resistance to their motion comes from the need to push the water aside, rather than the stickiness (or viscosity) of the water. If the oceans on this planet were made of treacle, or if we were the size of insects, our towing tanks would also need to reproduce the effect of viscosity. For this a different non-dimensional number is needed, namely, Reynold's number, which represents the dimensionless ratio of viscous forces and inertial forces.

Again, if we are concerned with designing aeroplanes instead of boats, we note that aeroplanes typically fly in the air, rather than the water. And air, unlike water, is a compressible fluid. So to ensure that a wind-tunnel successfully models an airplane in flight, we must also have equality of Mach number, which represents a dimensionless ratio of velocities (specifically, of the velocity of the plane to the speed of sound).

We are just about coming to the point where these problems can be solved on a computer, rather than by physical modelling. The Boeing 777 was developed in a `computational wind tunnel', using a computer for an approximate solution to the Navier Stokes equations. But other situations -- for example, the combusting flow in a hypersonic ram jet, or in a car engine -- remain too difficult for computer solution, and we will continue to use engineering methods.

I have examined two types of similitude, geometric similarity and dynamic similarity. There are other kinds of similitude, for which other non-dimensional numbers exist. In all these situations, the usefulness of similitude is that, given the many physical factors which could influence the outcome of a situation, it allows us to group these factors into a few dimensionless numbers. For example, the behaviour of a given ship could be influenced by its speed, its size, and the force of gravity. The relationship of dynamic similarity allows us to reduce these factors to a single factor, the Froude number. This is particularly important when we want to do engineering in an area science hasn't reached yet: since we can't work down deductively, we have to investigate experimentally. And for an experimental investigation, we need to reduce the number of experimental parameters to the minimum; otherwise the number of experiments we have to do grows without bound.

Different neighbourhoods among the leaf nodes can be labelled by which non-dimensional numbers are important in that location, and what ranges their values lie in. The behaviour of a system can change qualitatively as a non-dimensional number passes from one range to another. For example, Reynolds number. There is a critical value of the parameter at which the fluid flow changes from a linear, predictable flow to a turbulent, chaotic flow.

Sir Horace Lamb, 1932 I am an old man now, and when I die and go to Heaven there are two matters on which I hope for enlightement. One is quantum electrodynamics and the other is the turbulent motion of fluids. And about the former I am rather optimistic.;

Quoted in Computational Fluid Mechanics and Heat Transfer by Anderson, Tannehill, and Pletcher, 1984, page 197.

Part of the special knowledge of an engineer is to recognise neighbourhoods among the leaf nodes, to know which non-dimensional numbers are important, and what qualitative regime they put us in.

All of the examples I have given so far are from mechanical or civil engineering. What about modelling in electrical engineering? Electrical engineers make use of very few non-dimensional numbers. (Signal-to-noise ratio would be one.) One reason is that electrical engineering is fundamentally an easy subject. We can ensure that electrical circuits obey relatively simple laws; for example, Ohm's law is linear; it isn't true, because resistance changes with temperature, but we can control circuits -- for example, the cooling fan in a PC -- so that it remains approximately true. So in general, the path from above to below is open in this part of the tree. There are exceptions -- magnetohydrodynamics, for example -- but these don't enter the world of most electrical engineers.

A second reason is that electrical quantities are relatively easy to measure and control. It's easier to measure a voltage than to measure a temperature -- indeed, the most common way of measuring temperature is to use a thermocouple, in which we measure a voltage as one step in working out the temperature.

Because of these two reasons, we use electrical systems as models of other physical systems. The similarity between the model and the thing modelled is slightly more abstract here; it can be a formal similarity in the governing equations, rather than a similarity of ratios of forces or lengths. For example, Laplace's equation can describe either the temperature field in a region of space when no heat is generated or adsorbed, or electric potential in a region of space without free charges. Here's an example: we have a circuit board with heat sources along its edges. What is the temperature distribution on its surface? Until recently, such questions could be answered using teledeltos paper. In three dimensions, they could be answered using an electrostatic tank. These are two examples of analog computer modelling; the computer, in this case a piece of paper, undergoes a physical process analogous to the one we're trying to analyse.

Analog computer modelling was popular in the fifties. It was then largely replaced by digital computer modelling, using digital computers. In digital modelling, rather than allowing a system described by the right formal equations to develop in accordance with physical law, we represent the equations themselves, and solve them numerically. In this case you might say, ``Now we really are just doing applied physics; we're working our way down the tree." However, this is still not so. What's happening in the computer is still only a model of the physical situation, and may depart far from physical reality without the guidance of professional modellers, who are a subclass of software engineer. In the first place, we do not represent all of the physical situation on the computer; we judge which effects are important. This is an engineering judgement, relying on the engineer's ability to recognise neighbourhoods. Secondly, we do not specify the initial conditions and the boundary conditions exactly, because of Gelbaert's law. Thirdly, the computer represents physical quantities to a fixed, limited precision. Operations on these limited-precision numbers form a special kind of arithmetic, known as finite arithmetic, whose results may not coincide with those of exact arithmetic.

Among formal modelling techniques, some of the most important are the finite-difference technique, the finite-element technique, and the boundary-element technique. As computing power gets cheaper, these are being increasingly used to replace the use of physical models.

So a look into the future might suggest that this is the future of engineering modelling: increasingly accurate simulations on more powerful computers. And that this will eliminate the use of prototypes, towing tanks and wind tunnels. So it seems that we are approaching the definition of engineering as applied science, in which all design problems can be solved by working our way down the tree.

In the past ten years, though, several contrary trends have emerged. One of these trends comes from a renewed realization that engineering is aimed at a particular practical end, rather than at total knowledge. We have also seen a renaissance of analog computing, with the second generation of neural nets. Neural net modelling and control explicitly gives up on the hope of generating a formal representation of the system being modelled. Say, for example, we want to construct a model of a chemical reactor. The reactor has eight control knobs that can be adjusted, and it produces a stream of a chemical product that varies in temperature, purity, and flow rate. We want to be able to predict the reactor's response to any variation in the control settings.

One approach would be to write down the equations governing the chemical reaction, including whatever we know about chemical kinetics and equilibria, then represent these equations on a digital computer. Another, quite different approach would be to set up a neural net model. The inputs to the reactor are represented by the input to eight input neurons, while the predicted values of temperature, purity and flow rate are represented by the output from three output neurons. Between the input and output neurons are one or more 'hidden layers' of neurons.

The artificial neurons composing the net are simple computational devices, connected by lines. Each line has a certain weight associated with it. At each clock cycle, each neuron sums the weighted inputs it receives, compares this sum with a pre-set threshhold, and on that basis decides whether or not to fire.

To turn this net into a model of the reactor, the network must be trained. We take a series of experimental measurements from the real apparatus. For each set of inputs, we expect a particular set of outputs. At first the output from the net will look nothing like the experimental output. We repeatedly adjust the weights connecting the input layer to the hidden layer, and the hidden layer to the output layer, until we get good agreement between experiment and model. Now we can use the net to predict output for new values of input, and can incorporate it in a control mechanism for the reactor.

The advantages of neural net modelling include speed (due to parallelism) and trainability, which eliminates the need for programming or analysis. So the neural net approach involves the engineer turning away from the knowledge offered by science, a reversal of the trend of the previous fifty years. The skills of the engineer in training nets thus become less like those of the scientist. So it is still too soon to predict the assimilation of engineering by science. Engineering remains a distinct discipline, and we may expect that it will continue to develop novel strategies, additional to and independent of the sciences. [Other examples would include genetic algorithms, cellular automata, and fuzzy logic.]


Next: Thermodynamics