## 2 Thermoelastoplastic Approximate Algorithms
### Numerical Integration Scheme
The complete residual stress approximation scheme can now be assembled based on the previous definitions and derivations of this chapter; see Figure 3 for the corresponding flow chart, which shall be discussed in the following:

* First, we note that this computational routine needs to be repeated for each individual depth \(\eta\) under consideration. However, since there is no direct coupling between the depths, but only indirect coupling through the elastic solution, this may be done in parallel. Generally, since stress and temperature in the elastic solution decay with distance from the loaded strip, a load imbalance should be expected when parallelizing the evaluation of different depths. * Initial conditions for the stress and equivalent plastic strain are set at the upmost \(\xi_{+}^{*}\) seen in Figure 2b. For efficiency, \(\xi_{+}^{*}\) shall be set as close as possible to the surface loads while asserting that no plasticity occurs for \(\xi>\xi_{+}^{*}\). Thus, \(\varepsilon^{\text{eq}+}=0\) and given that there is no path dependency in the elastic regime, the stress can be initialized by applying the \(P\) operator Equation (31), as seen in Figure 3, which effectively yields an equivalent initial state as we would eventually obtain when starting the integration much further away just to ensure \(\sigma_{ij}^{+}\approx 0\) initially. * With the loop construct in the left of Figure 3, we then proceed through the loaded region in (not necessarily constant) increments of \(\Delta\xi\), see Figure 2b, thus reconstructing the transient loading history a material point would be subjected to in the elastic moving surface load problem. In doing so, the elastoplastic material response is approximated within the assumptions Equations (11) or (12) by a predictor-corrector approach. Elastoplastic increments are solved using either explicit or implicit integration, as detailed in Algorithms 1 and 2, respectively. * While the strains generally do not have to be computed explicitly during this first part of the scheme, which is entirely formulated in terms of stresses, all strain components can easily be updated at the end of each increment based on the discretized version of Equation (13). However, doing so is only strictly necessary for \(\varepsilon_{\zeta\xi}\), since the only strain component required in the overall scheme is \(\overline{\varepsilon}_{\xi\xi}\), for which Equation (17) has to be checked prior to potentially invoking the relaxation step. * Similarly as discussed for the initial condition, it is desirable for efficiency reasons to choose the value of \(\xi_{-}^{*}\), where the integration is stopped, not too far away from the surface loads. Since the elastic solution does satisfy the Merwin-Johnson conditions Equations (16) and (17) for \(\xi\to-\infty\), which the relaxation eventually enforces, path independency in the elastic regime allows not only a coarsening of the integration step length beyond the plastic zone but also using the relaxation procedure earlier,i.e., starting at larger \(\xi^{*}_{-}\), to attain the conforming steady state instead of continuing integration toward some \(\xi^{*}_{-}\) excessively far away from the loads. However, this reasoning is only admissible if elastic behavior is guaranteed beyond \(\xi<\xi^{*}_{-}\) and likewise during relaxation from \(\xi^{*}_{-}\) onward. * As indicated above, the Merwin-Johnson conditions are checked for \(\overline{\sigma}_{\eta\eta}\), \(\overline{\sigma}_{\xi\eta}\) and \(\overline{\xi}_{\xi\xi}\) that result at \(\xi^{*}_{-}\) from the first step of the scheme. If the check fails, the conditions are enforced by reducing the involved stress and strain components to zero in \(M\) increments. Since plasticity may occur during relaxation, \(M\) should be sufficiently large to track the associated loading path dependency. * A very similar predictor-corrector scheme as before is employed during relaxation.