Using State Functions and MRST’s AD-OO Framework to Implement Simulators for Chemical EOR