What is the correct way to find voltage generated in piezoelectric material

1) Using equation constraint with DOF- 9

2) Sum up the EPOT of all the nodes.