Simulation of hydrogel mechanics in biomicrofluidic applications