Very strange behavior, exploding balls of particles?
Closed this issue · 3 comments
I made some very minor changes to Constants.h (below). After compiling and running ./createVideo.bash I get an animation. Around 1:10 the right most ball of particles is moving up and to the right. It has a bit of an unusual velocity, but it's plausible because of a series of slingshots. Around 1:31 the ball is all by itself and starts evaporating. Then suddenly around 1:51 is basically explodes with nothing near it.
Expected? I'm on ubuntu 16.04, didn't change the make file, am using the default gcc, and didn't change the createVideo.bash script. I could upload PPMs, or the movie somewhere if that's helpful.
#define HEIGHT 1440
#define NUM_BODIES (1024*32)
#define PI 3.14159265358979323846
#define TO_METERS 1.496e11 // Meters in an AU
#define SYSTEM_SIZE 6 // Farthest particles in AU
#define SYSTEM_THICKNESS 0.08 // 0.05 Thickness in AU
#define INNER_BOUND 0.3 // Closest particles in AU
#define SOFTENING (0.015*TO_METERS)
#define SOLAR_MASS 2.0e30 // in kg
#define BINARY_SEPARATION 0.07 // AU
@spikebike Try pulling the latest version of BarnzNhutt.cpp, I tried a fix in d8c5b92,
and let me know if this fixes it
Does seem like that behavior is fixed. No more evaporating or exploding balls of mass. I am a bit surprised that after the ring collapses into a small ring that large blobs do get flung out to 4-5 times the distance, but maybe that's just the transfer of momentum from the bits that fall to the center.
One behavior I can't quite get my head around is that if a ball of particles starts orbiting around a larger ball of particles the orbit slows, even without friction enabled. But even weirder as larger balls capture smaller balls the smaller ball is sprayed out further than the original orbit.
Just because a smaller ball of particles is getting smaller, that shouldn't increase it's orbit... right?
Can't say for sure that it's not physically accurate, but doesn't seem like it.
Very cool that you do get a feel for why there's a Roche limit.
Blobs do tend to get thrown very far out, this is partly because the initial velocity is not yet calculated so that the system is optimally stable. And yes, the Roche limit is very apparent in these simulations :)
If you are still suspicious of the simulations behavior, you can also try lowering the MAX_DISTANCE parameter. This controls the degree of approximation in aggregate particle force calculations. Smaller values mean more accuracy but longer computation time, larger is faster but can cause artifacts.
Two other parameters to adjust simulation accuracy - lower the TIME_STEP and SOFTENING.
I'm going to close this particular issue.
If you create interesting images/animations send them to me!