there are units that use the heat of the stove passing through a heat sink to generate power, which then drives a fan. I think EcoFan is a Peltier-junction thermoelectric generator. There are stirling engine alternatives. We used one on our liveaboard boat for years.
Real Programmers don't write in FORTRAN. FORTRAN is for pipe stress freaks and crystallography weenies. FORTRAN is for wimp engineers who wear white socks.