I wanted to simulate the bar chains on a suspension bridge, roughly a linkage of uniform bars. It's easy to specify equations for motion and tension of a few links, and then hope that Solve and NDSolve can hash things out. However computation time becomes unfeasible as the number of segments grows towards double digits. Whilst a lot of the simulations I'm interested in are essentially static, they should comprise thirty or forty bars.

A log plot of overhead time Mathematica spent simplifying my definition of systems with one to six bars.
The complexity of a numeric system is not intuitively tied to the complexity of its definition. It is easy to describe a simple system in slightly ill thought out equations, and be left with a lot of algebraic work to do. In my system the complex aspects are equalities in derivatives of angles, the initial conditions are a trivial addendum. Rather than generating concise equations for each bar and letting the symbolic algebra do the heavy lifting, I calculate the derivative of the nth bar manually, and simplify for angular second derivatives.

Before simplifying, this four link plot had a simplification overhead of twenty one seconds. Doing the work preemptively on the general link reduces this to one second!
With the difficult symbolic work extracted, one can easily simulate hundreds of links for calm systems. It's easy to insert your own forces and initial conditions on these systems. Pictured is a blade of grass: a uniform chain with forces correcting angular displacement, and providing drag. In theory it's returning to equilibrium as a deforming force is removed. Calculated by NDSolve in a quarter second.

The attached notebook walks through all this, and talks about some structural ideas that aid working on these kinds of simplification.
Attachments: