An energy-preserving muscle tissue model: formulation and compatible discretizations