how to output strain energy

Please post to the list, not to me personally.

What are your values for tchain and pchain and ndof? That determines
how long the vector is. Note that eta[tchain] means there are tchain
values in the vector before any eta_dot values.

Steve