What are computer models?
Especially in discussions of global warming, one can often see the argument “computer models have never worked”. I think most often these people have wrong expectations about models. Maybe in their mind, they see some hollywood-ish animations that jump out of the computer by pressing a button and illustrate in Technicolor how the future will look like. Well, actually, it´s not quite that easy or appealing to the eye. As I have worked a bit with simulations and numerical models, I thought I might as well write up some things about how a computer model works.
We could as well start at the back. To get something appealing to the eye, you have to take your simulation results and process them. They are probably MB or GB of data. Numbers. In columns or rows. That´s it. No pictures. If you´re lucky, you´ll get an easy format or some indication which column is what. If not, go read the manual. Or bug the person who wrote the stuff.
Then you take some program, there are illustrator programs, or gnuplot, or god forgive me: Excel (I don´t know how anyone can work with Excel for a long time for processing data, but that´s another story). You could plot two properties, maybe time on the x-axis and some property you simulated, e.g. wind speed, on the y-axis. You probably have to process and transform your data, calculate some properties (averages, standard deviations etc.). I ususally write small Perl progams for such kind of things now, but C++ for bigger problems. You will then have to look at your plots or at your determining values and decide whether the simulation was good. You try to compare it to measured data when adjusting a model. You find conspicuities (that will always exist as no model is perfect). By changing the parameters you try to improve your results, then you try to explain the parts where the model simply isn´t accurate enough to simulate the correct data. But though the results might not always be completely correct or have every feature, it always depends on what you want to do with your data. For seeing trends, a coarse simulation with many simplifications might work. If you try to find smaller features or more delicate or complex processes, you will have to tune the model or your parameters more.
If we move backwards, we come to the point where you have a piece of software that solves your equations. So now you want to use that software to solve some problem. You have to decide what your computational domain will look like. Then, you have to subdivide your domain into smaller parts.
That means the box in which your events will take place. Let´s say you simulate vibrations of a part of a car. Then you will represent your part and its shape by very small tetrahedra (like little pyramids with a triangular base). Your computational domain will be a box in which this part is placed. Another example could be a climate simulation. You would decide to simulate all of Europe. Then you would subdivide the athmosphere into boxes which might typically extent horizontally 30km in each direction, and upwards you´ll have maybe 20 subdivisions in logarithmically divided heights. In the simulation, this type of dividing is used most often and called finite elements. Your equations to solve are usually differential equations, and continuous, but as you can´t simulate an infinite number of points, you just solve them in discrete steps at points that are close to each other (compared to the size of the overall domain). The finite elements methods work by applying some schemes, by which you can transform differential equations so that you have only some “simple” equation sets to solve on each point (but they are usually build from big matrices). Saying simple, I mean operations that a computer can do, adding or multiplying. You also discretize time, that means you will always simulate a small time step, do some stuff like control your computation or write your data to a file, then move on with the next time step. The choice of small enough time steps and a fine enough grid is essential to a working simulation and to its computational stability. This takes lots of fiddling; there will be lots of crashes of the model before you get correct values!
For the user, there are more parameters to choose besides time step and grid size, and this is the time-consuming and frustrating part of modeling. This is basically what you spend your time on: Look at what parameters are available. Try to find parameters that describe your problem. Go back and forth, tune here, fiddle there, try to see what this strange parameter does, make plots, crash the program. That, you spend your days on. A work that never ends, so there´s the part where the person using it has to make the (educated) decision: When is my simulation good enough or when do I have to keep on improving my parameters.
Even more brain power goes into developing the software: I already named this kind of software “a model” a few times. That´s what physicists do: We take reality and try to describe it by some parameters, and try to determine how these parameters interact and formulate these interactions by some equations. We always have to make simplifications. Now, especially for a model we want to simulate, we have to choose a set of processes that we will include, we can´t simulate everything. Then, we decide on which equations we will use to describe these processes. That´s our model: Our set of parameters and equations we choose to describe our problem. That´s not a bad thing, that´s just how it goes. So, the next time you hear: Model or theory, it doesn´t mean scientists aren´t sure about it or don´t test it or that it sounds inaccurate. It´s what these things are called, as scientists are conscious of the fact that they are just represantations that have to be adjusted and retested. It doesn´t mean they´re bad!
Let´s say, we want to simulate the weather. We can have thousands of parameters, but if you know how few are actually used today and how computationally demanding the simulations already are, well, you have another opinion of models than “It all doesn´t work”. For weather, we sure need to put wind speed, wind direction, aire pressure, humidity in. Then we could have some equations that determine whether it will rain. They might be very simple. If humidity is like this and we have an updrift here, make rain in 2 hours time. That will probably give horrible results most of the time. Then we add more stuff. Cloud formations (mostly in very simple terms, as we really don´t know yet how a cloud works exactly), solar radiation, reflection coefficients, and so on.
Now, formulate your equations, discretize them to fit your computational domain.
Oh, and of course, with each computational box, with each differential equation, there are the much dreaded boundaries. Choosing boundary conditions is another dmemanding issue and might be crucial to whether a model works or not. But that´s for another day.
No Comments »
No comments yet.
Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed!
promotion
