A new computational method for a model of C. elegans biomechanics: Insights into elasticity and locomotion performance