A micromechanical approach to modeling partly saturated soils