In my graduate thermodynamics class last year we did a semester-long project developing a computer model of an internal combustion, spark ignition engine. We started with a simple Otto cycle and through the course of the semester added more realistic effects until by the end of the semester we had a fairly reasonable computer model for an engine.