Simulation of bacterial chemotaxis in a porous environment