It's not massively sophisticated at the moment. There's a reservoir of SAN that depletes at random moments with a SAN roll (either 1 or d20) and there are random top ups of SAN (called End_of_Adventure) that have the opposite effect (d10). I've added in Cthulhu Mythos which randomly increases by d3 every so often and limits max SAN.
The graphical interface just has a knob for setting starting SAN, a button marked "Run" and a graph of SAN against time with lines for SAN loses and gains (see cut for piccy).
It's nothing terribly flash as far as iThink is concerned. After all, the software was built for running simulations of assembly lines and complicated dynamical processes such as crisis management of epidemics. So a bit of roleplaying? No sweat.
On the other hand, it has got me thinking about the fact that I should really write some of this down in a more structured fashion. I know someone's done a big paper on the mechanics of various games (I'll find a link later) but it's really just taxonomy. It doesn't talk about the various kinds of structures that you get in these systems from the basic negative and positive feedback loops to the more complicated causal loop diagrams (not casual loops, those are much more laid back and would rather spend their time on the couch with a beer discussing the phenomenology of socks than doing anything else), nor does it show you how to build systems that produce the kind of design features that you'd like in your game.
The fact that this is what I'm paid to do during the week might explain my reluctance to do it a weekends but it's a nice idea.
If "causal loop diagram" makes your brain hurt, you could try the MIT introduction here