<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Dear developers,</div><div><br><br>I would like to obtain a global quantity, the strain energy, defined as $U = 1/2 \int_\Omega \sigma:\varepsilon \mathrm{d}\Omega$, where $\Omega$ is the whole (2D) domain, $\sigma$ is the stress tensor and $\varepsilon$ is the strain tensor (the symmetric gradient of $u$). I modified the Lib_Elasticity_u.pro template file at two places</div><div><br data-mce-bogus="1"></div><div>- the PostQuantity block within the PostProcessing module, by adding<br data-mce-bogus="1"></div><div> { Name energy; Value {<br> Integral { Type Global; [ 1/2. * SquNorm[{d ux}] ];<br> In Vol_Mec; Jacobian Vol; Integration Int; }<br> }<br> }<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>- the Operation block within the PostOperation module, by adding<br data-mce-bogus="1"></div><div> Print[ energy, OnGlobal, File StrCat[resPath, "energy.txt"], Format SimpleTable ];<br data-mce-bogus="1"></div><div><br><br>It gives a number, but of course 1/2. * SquNorm[{d ux}] is not the strain energy I want. Is there a simple way to define the $\varepsilon$ tensor and then take its contraction with the $\sigma$ tensor?<br></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Thank you,<br data-mce-bogus="1"></div><div>Zoltan Csati<br data-mce-bogus="1"></div></div></body></html>