Hacker News new | ask | show | jobs
by adamius 1345 days ago
How does such a simulation work?

Eg how do hou predict the temperature at x,y? Is it ground type, water, sand?Altitude? Neighboring values thereof?

What are the inputs? Do you give it a starting point and apply it to a bunch of elements like some giant automata like game of life?

Some kind of finite element analysis thing?

So many questions.

5 comments

Here is a very brief and basic introduction to numerical simulation:

Simulation of dynamic systems is a big deep area. In general you use what is called numerical simulation where you have a model describing your system, in the form of a partial differential equal equations.

You start with the chosen initial conditions, choose a delta-t as your time increment, and solve the equation for those inputs. That result is the input to the next iteration.

The most basic algorithm to solve such an equation is “Newton’s method” but no one actually uses that, they use many more advanced methods. But if you are learning that is where you start.

This approach has advanced greatly over the last 70 years. Doing numerical simulation is why early computing work got funding, to simulated nuclear reaction inside bombs.

Now numerical simulation is the occupation of all the worlds top super computers. It’s used for climate simulation, bridge strength, how sky scrapers flex in the wind, testing car crashes or even simulating the strength of ceramics. Oh and it used a lot in financial simulations to model risk and calculate the price of assets.

Right now I'm playing with simulated weather systems using an automata for each grid location at an effective resolution of a square km. I'm getting predictive real-world accuracy within around 10 degrees C with a range of 2 days. Very rough. Takes a long time to simulate a globe which I've found is really important to do. A limited region is usually not as useful.

Its an interesting field. But its seems not so easy to get the real methods used by the bigger models.

(I'm not using a supercomputer...)

Such simulations usually consist of three major systems (atmosphere, land, and ocean) that are coupled together at their geometric boundaries by a coupler that 'communicates' values like temperature from one domain to another. The coupler is needed because of different grid geometries, time step size differences and other aspects.

You initialize the system at some known state (I.e. set the temperature, pressure, etc. at all grid points to real world measurements) and then integrate a complex differential equation for the next time step and so forth. So it is not like a automaton. Finite elements analysis comes closer, but I think they use a different scheme like finite volume methods.

A lot of insight can be gained by [this](https://pure.mpg.de/rest/items/item_3379183/component/file_3...) paper. The first 10 pages should give you a rough overview.

> Do you give it a starting point and apply it to a bunch of elements like some giant automata like game of life?

Roughly speaking yes. Divide all into a grid of cells. Model a cell state with a bunch of numbers, apply some rules to update cell state with neighbors. The trick is to figure out rules of updating state. One needs to write differential equations first, incorporating all relevant physical processes into them, and to transform equations into those rules of updating, which will be a way more complex than with Game of Life.

Though it may be even more complex, like different time steps at different time-points, or changing a grid of cells to increase details in some areas where much is going on by slowing down simulation. Most of complications are due to a limited abilities of our computers: the idea to get more precision by calculating less.

giant partial differential equations
They are simpler than you think.
Try proving that their solution is unique.
Simple does not mean trivial.
If only there was a way to find out...
I know, right? But together we can still dream.