# Variational Approach for thermal mesh adaptation

Rohit Pethe, Thomas Heuzé, Laurent Stainier

► To cite this version:

Rohit Pethe, Thomas Heuzé, Laurent Stainier. Variational Approach for thermal mesh adaptation. 12e Colloque national en calcul des structures, CSMA; GeM; LaSIE; LBMS; LIMatB; LAMPA; LGCGM, May 2015, Giens, France. hal-01402914

HAL Id: hal-01402914

https://hal.science/hal-01402914

Submitted on 25 Nov 2016

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Variational Approach for thermal mesh adaptation

R. Pethe, T. Heuzé, L. Stainier

GeM, Ecole Centrale Nantes, [pethe.rohit,thomas.heuze,laurent.stainier]@ec-nantes.fr

**Résumé** — In this work, we study the variational approach to mesh adaptation. This approach is shown on a 1-D thermal problem in steady case. The solution obtained with an adapted mesh is compared to that computed with a uniform refinement. We demonstrate that variational mesh adaptation technique costs less than taking a uniform mesh when precise solution is needed.

**Key words** — variational, mesh adaptation, steady thermal

## 1 Introduction

In many engineering problems (thermal or structural), zones of high gradient of fields of interest evolve with time and loading. When we solve such a problem with finite element method, mesh has to be dynamically adapted in order to capture the solution in zones of high gradients with required precision.

Many methods of mesh adaptation are proposed in the literature based on error estimators. But, these methods have limitations when we wish to treat problems with non-linear constitutive relations (e.g. plasticity) [1].

An alternative approach of mesh adaptation was recently proposed [2] [3] based on variational approach [4]. This technique allows to perform calculations in the presence of large transformations and nonlinear irreversible behavior (e.g. plasticity).

In this work, we are focusing on steady state thermal problems. In this case, we try to minimize an energy-like potential $\Phi$. Firstly, we calculate the finite element solution on the initial mesh. Secondly, we choose a patch in the domain and we calculate the local value the potential. Thirdly, we refine the mesh in that patch. Fourthly, we solve a local problem on that patch by fixing the temperature at its boundaries. Then, we check if we improve significantly value of the potential locally by refining the mesh in patch. If so, we refine the patch in the global mesh. Finally, we solve whole problem again on the new mesh obtained. We repeat the procedure till we get a solution of required precision.

## 2 Variational Formulation

If we are dealing in 1D, the strong form reads :

$$k \frac{d^2 T}{dx^2} + r = 0 \qquad (1)$$

with boundary conditions :

$$ \begin{aligned} T(x=0) &= T_0 \\ T(x=L) &= T_1 \end{aligned} \qquad (2) $$

This can be reformulated as a variational problem. The solution for steady thermal problem is then found by minimizing the following convex potential :

$$ \phi(T(x)) = \int_{\Omega} \frac{1}{2} k \overrightarrow{grad} T \cdot \overrightarrow{grad} T d\Omega - \int_{\Omega} r T d\Omega \qquad (3) $$
where k is the thermal conductivity, r the internal heat source, T the temperature field and Ω the domain.
Indeed, the first variation of equation 3 gives :

$$ \langle D\Phi, \delta T \rangle = \int_{\Omega} k \overline{(grad)} T \overline{(grad)} \delta T d\Omega - \int_{\Omega} r \delta T d\Omega = 0 \quad (4) $$

which is the weak form of equation 1. Now, we know that,

$$ \Phi(T_h) \geq \Phi(T_{\text{analytical}}) \quad (5) $$

Where, $T_h$ is the finite element discretization. Now, we solve the local problem on one 1-D element by fixing temperature on end nodes of element and by adding a node in the middle of element. If the local improvement in the potential is significant, we add the node to global mesh. After looping over all the 1-D elements, we have a new global mesh. We solve the global problem on this mesh. We follow this procedure till we get solution of required precision. In the variational technique of mesh adaptation, the idea is that we follow a sequence of meshes such that :

$$ \Phi(T_{h1}) \geq \Phi(T_{h2}) \geq \Phi(T_{h3}) \geq \dots \Phi(T_{h\infty}) = \Phi(T_{\text{analytical}}) \quad (6) $$

We follow this sequence until we get a mesh that gives result of required precision. (Note : Variational form for transient case is not developed here but it will be presented in the conference.)

# 3 Applications

Now, we try to apply this theory to thermal stationary problem.

## 3.1 Analytical solution

We need to solve 1 analytically. We take,

$$ \begin{aligned} r &= x^q \\ T0 &= 0 \\ T1 &= 0 \end{aligned} \quad (7) $$

Where, q is a constant. Therefore, the analytical solution of the problem can be given as follows :

$$ T = \frac{L^{q+1}x}{(q+1)(q+2)} - \frac{x^{q+2}}{(q+1)(q+2)} \quad (8) $$

The energy potential is given by,

$$ U = \frac{k}{2} L^{2q+3} \left( \frac{1}{(q+1)^2(2q+3)} - \frac{1}{(q+1)^2(q+2)^2} \right) - L^{2q+3} \left( \frac{1}{(q+1)(q+2)^2} - \frac{1}{(q+1)(q+2)(2q+3)} \right) \quad (9) $$

By taking $q = 51$, we can represent the analytical solution graphically as shown in figure 1. From figure 1, one can observe the sharp gradient of the field on the extreme right part of the bar.

## 3.2 Numerical solution

We solved the problem numerically by taking $q = 51$. The solution can be represented as shown in figure 4. From figure 4, one can observe that on the right hand side, where we have sharp gradient, we have greater number of elements to capture solution better. However, in the remaining part, algorithm puts fewer elements which are sufficient to represent the solution.
<figure><img src="image_2.png" /><figcaption>FIGURE 1 – representation of analytical solution.</figcaption></figure>

<figure><img src="image_3.png" /><figcaption>FIGURE 2 – representation of numerical solution on initial mesh.</figcaption></figure>

<figure><img src="image_4.png" /><figcaption>FIGURE 3 – representation of numerical solution on intermediate mesh.</figcaption></figure>

<figure><img src="image_5.png" /><figcaption>FIGURE 4 – representation of numerical solution on final mesh.</figcaption></figure>

## 3.3 Analysis

In order to assess the usefulness of this algorithm, we plot the error in calculated solution with respect to the number of nodes in log-log scale. We consider 3 cases. In the first case, we plot the error at each refinement iteration in variational adaptive mesh algorithm with respect to the cumulative number of nodes. We accumulate the number of nodes in this case because it will give us idea of not only the cost of calculating result on a particular mesh, but also it adds the cost of reaching to this particular mesh. In the second case, we plot error at each refinement iteration in adaptive mesh algorithm with respect to the number of nodes in the mesh and in the third case, we plot error in uniform mesh refinement with respect to the number of nodes of each case. Figure 5 shows this plot for L2 norm of error in temperature field and figure 6 shows plot for error in energy norm error in the energy like potential.
<figure><img src="image_6.png" /><figcaption>FIGURE 5 – L2 norm error in temperature field with respect to number of nodes.</figcaption></figure>

<figure><img src="image_7.png" /><figcaption>FIGURE 6 – energy norm error in energy like potential with respect to number of nodes.</figcaption></figure>

## 4 Conclusions

In this work, we explained a variational approach for mesh refinement. Then we applied our hypothesis on a 1-D thermal problem.

In figures 5 and 6, we plotted L2 error norm in temperature field vs. number of nodes and energy error norm in energy vs. number of nodes respectively. In these graphs, we have also plotted the error vs. uniform refinements. The idea is that when mesh adaptation curve lies below the curve of uniform refinement, we have a better algorithm. (Less cost with equal or better precision.) Therefore, we plotted one curve with number of nodes accumulated and another with number of nodes. If we consider energy error as in figure 6, we see that variational algorithm is always better. However, if we consider error in temperature 5, the curve with non-accumulated nodes lies below the curve of refinement. But, the curve in which we accumulate the number of nodes, is first above the curve of uniform refinement, and as the algorithm progresses, it goes below. This behavior is logical because, the regions where variational adaptation curve is above the curve of uniform refinement, the mesh is too coarse.

Finally, we show that the variational mesh adaptation algorithm costs us less than a uniform mesh and still gives us better results.

The next part in this work is to apply this technique to the transient thermal problem. (Results of this part will be shown in conference.) Then, we should try to use the approach on coupled thermo-mechanical problem. Finally, we should extend this approach in 2D and 3D.

## Références

[1] L. Y. LI and P. BETTESS. Error estimates and adaptive remeshing techniques in elasto-plasticity. *Communications in Numerical Methods in Engineering*, 13:285-299, 1997.

[2] J. MOSLER and M. ORTIZ. Variational h-adaptation in finite deformation elasticity and plasticity. *International Journal of Numerical Methods in Engineering*, 72:505-523, 2007.

[3] J. MOSLER and M. ORTIZ. An error-estimate-free and remapping-free variational mesh refinement and coarsening method for dissipative solids at finite strains. *International Journal of Numerical Methods in Engineering*, 77:437-450, 2009.

[4] M. ORTIZ and L. STAINIER. Variational formulation of viscoplastic constitutive updates. *Computational Methods for Applied Mechanical Engineering*, 171:419-444, 1999.