5. Algorithm implemented in Code_Aster#

The numerical scheme used to solve the reference problem [éq 2-1], [éq 2-5] is deduced from the variational formulation [éq 3-2] and the treatment of the various nonlinearities, [éq 4.1-5], [éq 4.2-1], [éq 4.2-2], discussed in the previous section.

The resolution algorithm consists of the sequence of two successive operations at each iteration of the calculation.

Knowing the solution fields at iteration \(n\): \({T}^{n}\) at the nodes and \({u}^{n}\) at the Gauss points, we look for the solutions \({T}^{n+1}\text{et}{u}^{n+1}\) at iteration \(n+1\) as follows:

\(\forall \psi \in V,\)

\(\begin{array}{}\begin{array}{cc}\underset{\Omega }{\int }k({T}^{n})\text{grad}{T}^{n+1}\text{.}\text{grad}\psi d\Omega & +\underset{\Omega }{\int }\omega V\text{.}\text{grad}{T}^{n+1}\psi d\Omega \\ & +\underset{{\partial }_{1}\Omega }{\int }\gamma {T}^{n+1}\psi d\Gamma -\underset{{\partial }_{3}\Omega }{\int }\alpha \text{'}({T}^{n}){T}^{n+1}\psi d\Gamma \end{array}\\ =\underset{\Omega }{\int }Q\psi d\Omega +\underset{{\partial }_{1}\Omega }{\int }\gamma {T}_{\text{ext}}\psi d\Gamma +\underset{{\partial }_{2}\Omega }{\int }{q}_{0}\psi d\Omega \\ +\underset{{\partial }_{3}\Omega }{\int }(\alpha ({T}^{n})-\alpha \text{'}({T}^{n}){T}^{n})\psi d\Gamma +\underset{\Omega }{\int }\left[k({T}^{n})-k({T}^{n-1})\right]\text{grad}{T}^{n}\text{.}\text{grad}\psi d\Omega \\ +\underset{\Omega }{\int }\omega V\text{.}\text{grad}t({u}^{n})\psi d\Omega -\underset{\Omega }{\int }V\text{.}\text{grad}{u}^{n}\psi d\Omega ,\end{array}\) eq 5-1

\({u}^{n+1}\mathrm{=}{u}^{n}+\omega ({T}^{n+1}\mathrm{-}\tau ({u}^{n}))\) eq 5-2

At each iteration, a linear convection-diffusion problem is solved to obtain the field at nodes \({T}^{n+1}\) [éq 5-1], and then a simple local correction is performed to obtain the field at Gauss points \({u}^{n+1}\) [éq 5-2].

The stopping criterion adopted in Code_Aster involves both solution fields at the same time: the temperature field, and the enthalpy field.

The algorithm continues iterations as long as at least one of the relative variations of the iterations is greater than the corresponding tolerance given by the user:

\(\begin{array}{}\frac{{(\sum _{i=\mathrm{1,}\text{.}\text{.}\text{.},\text{nddl}}{({T}_{i}^{n+1}-{T}_{i}^{n})}^{2})}^{1/2}}{{(\sum _{i=\mathrm{1,}\text{.}\text{.}\text{.},\text{nddl}}{({T}_{i}^{n+1})}^{2})}^{1/2}}>\text{tole 1}\\ \\ \frac{{(\sum _{i=\mathrm{1,}\text{.}\text{.}\text{.},\text{npg}}{({u}_{i}^{n+1}-{T}_{i}^{n})}^{2})}^{1/2}}{{(\sum _{i=\mathrm{1,}\text{.}\text{.}\text{.},\text{npg}}{({u}_{i}^{n+1})}^{2})}^{1/2}}>\text{tole 2}\end{array}\)

where \(\mathit{nddl}\) is the total number of degrees of freedom at the nodes, and \(\mathit{npg}\) is the total number of Gauss points.

\(\mathit{tole}1\) is entered under the crit_temp_rela keyword of the convergence factor keyword of the ther_non_line_mo operator.

\(\mathit{tole}2\) is entered under the crit_enth_rela keyword of the convergence factor keyword of the ther_non_line_mo operator.