Physical Simulations of Microbial Communities Under Stress