Saturday, March 12, 2011

A few bits and pieces from last quarter

Here is an animation of the physics system project from MS270 (Scientific Computing).  There are some strings / hairs and they fall.
The blue string is unstable and wobbles everywhere because it uses explicit Euler integration to do the physics, which lets inaccuracies accumulate over time; if I had tried to stiffen the string any more those inaccuracies would increase off to infinity.  The red and green strings however use the complicated implicit Euler method, and so they will behave fine at any stiffness. (To do that, I had to build a big matrix full of physics equations and then solve it with a matrix solver.)

Here's another one with both ends of a string held:
Here's part of a fluid dynamics system.  It shows the velocity of moving air over time at each location.  Normally wind slows down and dissipates as it leaves the high-pressure region, but if pressure is forcibly held constant, the wind accelerates.

No air particles are simulated; instead, math is used to deduce the speed of the hypothetical air at grid points.
The math included the incompressible Navier-Stokes equations respecting advection, which we were given some pretty baffling approximation formulas for.

Here's an example of Runge's Phenomenon from Numerical Methods, plotted using Newton's divided difference method.

1 comment: