Opensolar Battery Modeling Gregory