Here is a 2000 working paper from the Levy Institute on a stock-flow consistent model of the Danish economy. There was a cheap paperback in the early 1980s by Wynne Godley on the approach whose team formulated it at the Cambridge Dept. of App. Econ. which I coded up in C as a hobby project but perhaps unsurprisingly I've now lost.