Text this: Simulation of structured populations in chemically stressed environments