Hello all,
Background
I've been playing with computer simulations quite a bit recently, and wrote one that crudely simulates the formation of star systems. My first version was a conventional many body simulation with about 300 small bodies; it actually tends to come up with convincing star systems, either with one or two stars, and several smaller bodies orbiting. In that sense, it is successful.
Unfortunately, the computation cost scaling on an N-body simulation is only so-so, requiring n(n-1) calculations. Even with a negligibility condition, it becomes unmanageable very quickly (and I have a really fast computer...). It's just too many operations.
I've since gone back to the drawing board and decided to try a continuum mechanics approach, where I specify the state of matter at specific fixed intervals, and move mass between them. This way allows considerable optimizations over the N-body simulation, and is more able to be run on my graphics card, which is at least several hundred times more powerful than my CPU for single precision operations (~5TFlops vs ~20GFlops). Cost scaling for this approach appears to be linear for the gravity calculations, plus I can use a look-up table to speed things along.
Problem
While I can currently specify the properties of the gas at any given point, I'm not entirely certain how to move mass between points on the grid. I need something that respects both the bulk velocity of the gas, as well as having it respond to the pressure at adjacent points, and so forth. The most promising suggestion I've heard so far is to model my problem as an electronic one, with a grid of capacitors, and then solve with kirkov's laws. I like that idea, and it would be easy computationally, but I'm not entirely sure how to set up the parallels for current, voltage, etc. Any suggestions would be much appreciated.
-FireStorm-
Background
I've been playing with computer simulations quite a bit recently, and wrote one that crudely simulates the formation of star systems. My first version was a conventional many body simulation with about 300 small bodies; it actually tends to come up with convincing star systems, either with one or two stars, and several smaller bodies orbiting. In that sense, it is successful.
Unfortunately, the computation cost scaling on an N-body simulation is only so-so, requiring n(n-1) calculations. Even with a negligibility condition, it becomes unmanageable very quickly (and I have a really fast computer...). It's just too many operations.
I've since gone back to the drawing board and decided to try a continuum mechanics approach, where I specify the state of matter at specific fixed intervals, and move mass between them. This way allows considerable optimizations over the N-body simulation, and is more able to be run on my graphics card, which is at least several hundred times more powerful than my CPU for single precision operations (~5TFlops vs ~20GFlops). Cost scaling for this approach appears to be linear for the gravity calculations, plus I can use a look-up table to speed things along.
Problem
While I can currently specify the properties of the gas at any given point, I'm not entirely certain how to move mass between points on the grid. I need something that respects both the bulk velocity of the gas, as well as having it respond to the pressure at adjacent points, and so forth. The most promising suggestion I've heard so far is to model my problem as an electronic one, with a grid of capacitors, and then solve with kirkov's laws. I like that idea, and it would be easy computationally, but I'm not entirely sure how to set up the parallels for current, voltage, etc. Any suggestions would be much appreciated.
-FireStorm-