Make simulation support non-square grid.