-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Energy Gain in Wall Collisions in Perfectly Elastic Setting #3
Comments
…irectory structure. Big change is a resolution to lost heat issue. The energy totals in the World count were not factoring in heat energy in fixedpolygons. Specifically, each collision with a wall resulted in half of the heat of that collision not being accounted for. Now, total energy is persisting, with some slight gain as observed in issue #3.
Currently, we use a fixed time step dt. If - in between two states - a collision occurred, the step is reversed, and we advance at increment dt/2. This is repeated, incrementing at dt/2^k until no collisions exist above COLLISION_TOL or the modified time increment dt/2^k is below EPSILON. We only seem to be gaining energy when the second condition fails: Lines 91 to 114 in 5c8ac7a
This makes perfect sense, as this is exactly the scenario in which the collision resolution "fails" and has to bail out for fear of instability with a small time step. |
Interestingly, changing the EPSILON parameter results in only negligible improvement in the magnitude of energy error incurred.
|
Reducing time discretization can make this energy gain arbitrarily small, at the cost of more computational time. |
Here the ELASTICITY parameter is set to 1, to indicate that collisions with walls are perfectly elastic. We appear to gain a small (relative to system) amount of total energy with each hit. This effect likely exists with other choices of ELASTICITY, but this should be the simplest case to analyze.
The text was updated successfully, but these errors were encountered: