Here's an idea:
instead of trying to model the entire engine with the valves functioning, you could simplify things by creating two or three meshes.
One mesh is just a closed tube (the combustion chamber with both valves closed). Simulate the combustion.
Take the results of the combustion process after a given pressure is reached (when the exhaust valve would open), take the conditions at that time and make them the starting conditions for the second mesh which is the engine with the exhaust valve open. Run that simulation until the vacuum in the combustion chamber peaks.
Take those conditions and use them as the starting conditions for the third mesh (the engine with exhaust valve closed and intake valve open) and run that simulation.
Repeat as many times as you think necessary.
You won't be able to model the valves as they open and close, but you should be able to get fairly accurate results this way. Hope that helps you out some.