OpenBVE is an open-source train driving simulator. It features detailed per-car simulation of the brake systems, friction, air resistance, toppling and more.