I am interested in calculating the total potential energy stored in a finite element mesh given its nodal point displacements alone. The forces that created the displacements are irrelevant because the objective is to calculate the strain energy stored in the mesh post-deformation.
From what I understand the total potential energy can be computed by integrating the strain energy density $W(x, \epsilon(x))$
$$ \Pi = \int_\Omega W(x, \epsilon(x)) d\Omega $$
In a two-dimensional discrete setting
$$ \Pi = \sum_e W_e(x, \epsilon(x)) \cdot A_e $$
where $A_e$ is the area of the element $e$. Is this correct?
If it matters the material is hyperelastic.