# Energy of each node, Elasticity problem

**URL:** https://community.freefem.org/t/energy-of-each-node-elasticity-problem/2075
**Category:** General Discussion
**Created:** [October 20, 2022, 12:01pm UTC](https://community.freefem.org/t/energy-of-each-node-elasticity-problem/2075 "2022-10-20T12:01:37Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Stefanosv](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@Stefanosv](https://community.freefem.org/u/Stefanosv)
#### Post date: [October 20, 2022, 12:01pm UTC](https://community.freefem.org/t/energy-of-each-node-elasticity-problem/2075/1 "2022-10-20T12:01:37Z")

</div>

I’ve noticed the usage of 2 equations to calculate the energy of each node when solving using the elasticity code

```auto
Energy1=dx(uu)+dy(vv)
Energy2=2*mu*(dx(uu)^2+dy(vv)^2+((dx(vv)+dy(uu))^2)/2.)+lamda*(dx(uu)+dy(vv))^2;

```

I need to calculate the energy for using it as a parameter to be minimized on an optimization problem.  
Which one do you suggest using?  
I can’t seem to find any bibliography about them though.

---

<div class="post-metadata">

### Author: ![Alexandru](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@Alexandru](https://community.freefem.org/u/Alexandru)
#### Post date: [October 21, 2022, 6:13am UTC](https://community.freefem.org/t/energy-of-each-node-elasticity-problem/2075/2 "2022-10-21T06:13:04Z")

</div>

Dear Stefans,

The elastic energy density is \frac{1}{2}(\sigma : \epsilon) = \frac{1}{2}(\lambda (Trace(\epsilon))^2+2\mu(\epsilon : \epsilon)) =\frac{1}{2}\left[\lambda (\frac{\partial u}{\partial x}+\frac{\partial v}{\partial y})^2+2\mu((\frac{\partial u}{\partial x})^2+(\frac{\partial v}{\partial y})^2+\frac{1}{2}(\frac{\partial u}{\partial y}+\frac{\partial v}{\partial x})^2\right].

It seems to me that both formulae in your post are wrong…

Best regards, Alex
