# Minimizing the potential energy in a hyperelasticity problem

**URL:** <https://fenicsproject.discourse.group/t/minimizing-the-potential-energy-in-a-hyperelasticity-problem/10175>\
**Category:** variational formulation\
**Created:** [January 18, 2023, 9:54am UTC](https://fenicsproject.discourse.group/t/minimizing-the-potential-energy-in-a-hyperelasticity-problem/10175 "2023-01-18T09:54:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fares](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/fares/32/4317_2.png) [@fares](https://fenicsproject.discourse.group/u/fares)\
**Post date:** [January 18, 2023, 9:54am UTC](https://fenicsproject.discourse.group/t/minimizing-the-potential-energy-in-a-hyperelasticity-problem/10175/1 "2023-01-18T09:54:09Z")

</div>

Hello,  
I am currently using the FEniCS/DOLFINx package to simulate deformations on a mesh volume.  
Following [the tutorial](https://jsdokken.com/dolfinx-tutorial/chapter2/hyperelasticity.html), I am using the following equation to find u such as F(u)=0 :  
F = \overrightarrow{grad} \overrightarrow{v} . P ~\overrightarrow{dx} - \overrightarrow{T} . \overrightarrow{v} \overrightarrow{ds}  
with

- P the first Piola Kirchhoff stress P = \frac{\partial \psi}{\partial F}
- \overrightarrow{dx} and \overrightarrow{ds} the volume and surface element
- \overrightarrow{T} a traction force applied on the surface.

Originally, the goal would be to minimize the potential energy, which writes itself as:

\Pi = \int\_{\Omega} \psi (u) \,dx - \int\_{\partial \Omega} T.u \,ds

My question is: **what is the link between these two equations ? How to get to the first one starting from the second one ?** I know that the [Gateaux derivative](https://en.wikipedia.org/wiki/Gateaux_derivative) is used in that case but I don’t know how to apply it to \Pi.

Thank you.

---

<div class="post-metadata">

**Author:** ![kamensky](https://avatars.discourse-cdn.com/v4/letter/k/e95f7d/32.png) [@kamensky](https://fenicsproject.discourse.group/u/kamensky)\
**Post date:** [January 18, 2023, 3:47pm UTC](https://fenicsproject.discourse.group/t/minimizing-the-potential-energy-in-a-hyperelasticity-problem/10175/2 "2023-01-18T15:47:07Z")

</div>

(Note: I apologize in advance for the ugly typesetting, but it seems that the usual way of including inline equations is now rendering them on separate lines, at least in Firefox, and I couldn’t find a workaround by Googling!)

If you’ve studied calculus of variations before, it may help to use the notation \delta\mathbf{u} for the test function instead of \mathbf{v}\text{ ,} then think about setting the Gateaux derivative of \Pi with respect to \mathbf{u} in the direction \delta\mathbf{u} to zero (by analogy to seeking the minimum of a univariate function by looking for an argument such that its ordinary derivative is zero):

d\Pi(\mathbf{u};\delta\mathbf{u}) = \delta\Pi = \int\_\Omega \frac{\partial\psi}{\partial\mathbf{F}}:\delta \mathbf{F}\,d\Omega - \int\_{\partial\Omega} \mathbf{T}\cdot\delta\mathbf{u}\,d\partial\Omega = 0\text{ ,}

where the variation \delta\mathbf{F} is also a Gateaux derivative with respect to displacement of \mathbf{F} = \operatorname{grad}\mathbf{u} + \mathbf{I}\text{ ,} i.e.,

\delta\mathbf{F} = d\mathbf{F}(\mathbf{u};\delta\mathbf{u}) = \operatorname{grad}(\delta\mathbf{u})\text{ .}

Making the substitutions \partial\psi/\partial\mathbf{F}\to\mathbf{P}~,~\delta\mathbf{F}\to\operatorname{grad}(\delta\mathbf{u})~,~\delta\mathbf{u}\to\mathbf{v}\text{ ,} you recover the weak form

\int\_\Omega \operatorname{grad}\mathbf{v}:\mathbf{P}\,d\Omega - \int\_{\partial\Omega}\mathbf{T}\cdot\mathbf{v}\,d\partial\Omega = 0\quad\forall\mathbf{v}\text{ .}

---

<div class="post-metadata">

**Author:** ![fares](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/fares/32/4317_2.png) [@fares](https://fenicsproject.discourse.group/u/fares)\
**Post date:** [January 18, 2023, 4:19pm UTC](https://fenicsproject.discourse.group/t/minimizing-the-potential-energy-in-a-hyperelasticity-problem/10175/3 "2023-01-18T16:19:06Z")

</div>

Thanks a lot for your help @kamensky, I understand it a lot better now !

I guess the volume and surface element somehow correspond to the linked integral in the code formulation.
