A cell-based framework for modeling cardiac mechanics