Manuscript Offprint
arXiv:2610.24210Colour-Field Based Particle Categorization for Residual Stress Detection and Reduction in Solid SPH Simulations
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Gizem Kayar
Computer Science Department, New York University, 251 Mercer Street, New York, United States of America
Keywords: Smoothed particle hydrodynamics, residual stress, von-misses yield, physically-based simulations, solid simulations.
Abstract: Residual stress remains in an object even in the absence of external forces or thermal pressure, which, in turn, may cause significant plastic deformations. In case the residual stress creates unwanted effects on the material and so is undesirable, an efficient solution is necessary to track and eliminate this stress. Smoothed Particle Hydrodynamics has been extensively used in solid mechanics simulations and the inherent colour-field generation approach is a promising tracker for the residual stress. In this paper, we propose a way to use the colour-field approach for eliminating the residual stress and prevent the undesirable premature failure of solid objects.

Figure 1. Compressed ductile material implemented with our SPH model and visualized with pressure-based colouring.
1 INTRODUCTION
Residual stresses describe any stress remain in the material even after the external forces and thermal effects are excluded from the environment. These stresses may originate from many causes, e.g. cooling rates, volume changes, etc. and they may be created by welding, rolling, forging, casting, machining, heat treatments or surface treatments. After that point, residual stress is generated when an object is stressed beyond its elastic limit, resulting in plastic deformation.
Residual stress should be managed properly for the design, manufacturing, and maintenance phases. Although it may be desirable in some certain conditions, residual stress generally causes the material to fail prematurely. It may affect the fatigue
aID https://orcid.org/0000-0002-7811-9357 life, stability, resistance and also brittle fractures of objects. Elimination process of residual stresses are extensively researched in material science. Simulations of such conditions help the researchers to understand the problem further and therefore, to create a solution.
Since its introduction (Gingold & Monaghan, 1977; Lucy, 1977), Smoothed Particle Hydrodynamics (SPH) has been accepted as one of the major development mediums for the mechanics of continuum media. Although it was introduced for astrophysical problems, later it has been used in various research fields including but not limited to fluid simulations (e.g. Solenthaler & Pajarola, 2009; Shadloo et al., 2016; Gissler et al., 2019) and solid mechanics (e.g. Libersky & Petschek, 1990; Libersky et al., 1993). Although SPH is still in the process of development, the method has been drastically improved over the years to overcome some major, inherent problems. SPH is still one of the easy-to-use numerical methods to model complex systems.
Residual stress has been generated and/or determined by researchers in some SPH simulations for different purposes, such as arc welding (Das & Cleary, 2010), friction stir welding (Eivani et. al, 2021), etc. In our experiments, we observed that the undesired residual stress is the major cause of instability in SPH solid simulations.
Our contribution in this ongoing work is to eliminate the undesired residual stress behaviour from solid mechanics simulations by applying a colour-field technique which is extensively used in SPH fluid simulations. Colour-field approach helps us to identify the particles with potential residual stress which, in turn, are handled differently to reduce the overall stress.
In 2016, Pan et al. proposed an application where SPH is used to create solitary wave impact on offshore platforms to understand the interaction between large waves and offshore structures which is a good example of SPH's usage in civil engineering and geonumerics field (Pan et al., 2016). In the same year, Holmes et al. proposed a model for grain-scale fluid flows in porous rocks (Holmes et al., 2016).
Regarding our focus, the elimination process of residual stresses is vital especially when the stress is unwanted. Simulations of such conditions help the researchers to understand the problem further and therefore, to create better solutions.
Residual stress has been generated and/or determined by researchers in some SPH simulations for different purposes, such as arc welding (Das & Cleary, 2010), friction stir welding (Eivani et. al, 2021), etc. Eivani shows a specific example on AZ91 Mg alloy where they combine SPH with neuro-fuzzy computations and ultrasonic testing.
Another specific example comes from Saleh, Luzin and Spencer where they analyse the residual stress in cold spray technique using some numerical and empirical methods (Saleh et al, 2014). Liu and his fellow teammates also propose another technique for the numerical simulation and elimination of residual stress by using shot peening in (Liu et al., 2019)
Discussing other fields, such as fluids, is beyond the scope of this paper. However, state of the art reports like (Koschier et al, 2022) are some of the good resources for those who are interested in the topic.
3 SPH
SPH is a method of discretizing spatial quantities using a set of particles equipped with a kernel function. Each particle is defined by a position, mass and a support radius where mass can be computed as:
with : fluid density and V: particle volume. The word “smoothed” in SPH comes from the smoothing operation which actually means calculating any physical quantity of the particle using the weighted sum of the same quantity of the neighboring particles that lie in the range of a kernel function. So, after the continuous approximation is discretized, he smoothing operation looks as:
where A is an arbitrary scalar quantity, x is the position, b is the iterator over all contributing particles and h is the smoothing length.
As we stated before, contributions of the neighbouring particles are governed by the kernel function and can be calculated as, e.g.:
varies depending on the dimensionality of the system.
In such a system, for both fluids and solids, equations of motion in Lagrangian perspective can be given as:
which, in turn, can be written as the sum of forces as:
Here, forces can be computed using SPH interpolation and later be integrated using one of the explicit or implicit numerical integration schemes, e.g. Euler-Cromer, Verlet, etc. With this approach, thousands to billions of particles can be simulated efficiently (see Figure 2).

Figure 2: Our SPH fluid simulation with 1.7 million particles.
4 SPH FOR SOLIDS AND RESIDUAL STRESS DETECTION
It is important to mention that all solid SPH simulations in our work rely on the methodology discussed in the previous section.
However, the SPH method should be extended so that it may reflect the solid behaviour and yielding criterion (see Figure 1 and Figure 3). Therefore, we firstly implemented elastoplastic solid behaviour in our system by integrating the momentum equation:
where
with pressure P, deviatoric stress tensor S. Stress can be computed using Hooke's Law.
At this stage, maximum distortion energy criterion can be introduced to the system to estimate the yield of ductile materials. We can even compare the material's yield stress to Von Misses stress to observe the its resistance and yielding thresholds.
Our main focus in this ongoing work is to determine particles which are potentially carrying residual stress. We therefore propose to use the colour field approach. This approach was first proposed by Müller et al. in (Müller et. al, 2003) for determining surface particles in fluid flows. The same approach helps us to categorize the solid particles. We can identify a particle as a surface particle in two conditions combined: 1) if it has less than a certain number of neighbouring particles and 2) if its surface normal n is showing more than a meaningful threshold. Surface normal in this situation can be computed as:
and
After identifying surface particles, we generated one more additional layer right behind the surface particles and we constrain those two sets to apply only hydrostatic stress to other particles.
5 RESULTS
During this approach, we observed that the stability of the system improved significantly and we could use larger time steps for our simulations. To be specific, our simulation time steps has been increased almost twice for all presented scenes. Additionally, we could prevent all undesired crashes and undesired forces from our system.
As an unexpected effect, we also noticed that we could simulate brittle fractures without using an ad-hoc damage model (see Figure 4).
6 CONCLUSIONS
In this paper, we presented a technique to improve the stability of a solid system simulation by using smoothed particle hydrodynamics. Based on the

Figure 3. Compressed iron with pressure based particle coloring and marching cubes based surface reconstruction.
conventional SPH model, we integrated elastoplastic solid physics and used the idea of surface extraction for isolating the force computation on certain fields. We observed that the technique works well for both ductile and brittle materials.
This is obviously an ongoing work and needs further improvement. We plan to utilize more test scenes and various comparisons for different material properties in the future. Furthermore, we only discussed the general stability but we did not discuss the performance in detail. In the future, we would like to investigate parallelization techniques for the model.
REFERENCES
Gingold, R.A., Monaghan, J.J. (1977). Smoothed Particle Hydrodynamics: theory and application to non-spherical stars. Mon.Not.R. Astron. Soc, 181(3): 375-389.
Lucy, L.B. (1977). A numerical approach to the testing of the fission hypothesis. Astronomy Journal, 82: 1013-1024.
Solenthaler, B., Pajarola, R. (2009). Predictive-corrective incompressible SPH. ACM SIGGRAPH 2009 papers (SIGGRAPH '09). Association for Computing Machinery. New York, NY, USA, Article 40, 1–6. https://doi.org/10.1145/1576246.1531346
Shadloo, M.S., Oger, G., LeTouze, D. (2016). Smoothed particle hydrodynamics method for fluid flows, towards industrial applications: Motivations, current state, and challenges. Computers&Fluids, 136: 11-34.
Gissler, C., Peer, A., Band, S., Bender, J., Teschner, M. (2019). Interlinked SPH Pressure Solvers for Strong Fluid - Rigid Coupling. ACM Transactions on Graphics, 38(1), article no. 5: 1-13.
Ihmsen, M., Wahl, A., Teschner, M.(2013). A Lagrangian Framework for Simulating Granular Material with High Detail. Computers&Graphics.37(7):800-808
Libersky, L.D., Petschek, A.G. (1990). Smooth Particle Hydrodynamics with Strength of Materials, Advances in the Free Lagrange Method. Lecture Notes in Physics. Vol. 395. pp. 248–257. doi:10.1007/3-540-54960-9_58. ISBN 978-3-540-54960-4.
Libersky, L.D., Petschek, A.G. Carney, T.C. Hipp, J.R. Allahdadi, High, F.A (1993). Strain Lagrangian hydrodynamics: a three-dimensional SPH code for dynamic material response. J. Comput. Phys. 109 (1): 67–75. Bibcode:1993JCoPh.109...67L. doi:10.1006/jcph.1993.1199.
Das, R., Cleary, P.W. (2010). Application of SPH for modelling heat transfer and residual stress generation in arc welding. Material Science Forum. 654-656.

Figure 4. Surface particle generation (green), inner layer additional surface set particles (red) and completely fully particles (blue) during a brittle fracture.
Eivani, A.R., Vafaenezhad, H., Jafarian, H.R., Zhou & J. (2021). A novel approach to determine residual stress field during FSW of AZ91 Mg alloy using combined smoothed particle hydrodynamics/neuro-fuzzy computations and ultrasonic testing. Journal of Magnesium and Alloys, 9(4), 1304-1328.
Ghaïtanellis, A., Violeau, D., Ferrand, M., Abderrezzak, K.A.K., Leroy, A., Joly, A. (2018) A SPH elastic-viscoplastic model for granular flows and bed-load transport. Advances in Water Resources, Volume 111, p. 156-173.
Holmes, D.W., Williams, J.R., Tilke, P., Leonardi, C.R.. (2016). Characterizing flow in oil reservoir rock using SPH: absolute permeability. Computational Particle Mechanics. Volume 3, pages141–154
Koschier, D., Bender, J., Solenthaler, B. and Teschner, M. (2022), A Survey on SPH Methods in Computer Graphics. Computer Graphics Forum, 41: 737-760. https://doi.org/10.1111/cgf.14508
Liu, Z., Xiu, L., Wu, J., Lv, G. & Ma, J. (2019). Numerical simulation on residual stress eliminated by shot peening using SPH method. Fusion Engineering and Design, 147, doi.org/10.1016/j.fusengdes.2019.06.004.
Nguyen, C.T., Nguyen, C.T., Bui, H.H. et al. (2017). A new SPH-based approach to simulation of granular flows using viscous damping and stress regularisation. Landslides 14, 69–81. https://doi.org/10.1007/s10346-016-0681-y
Saleh, M., Luzin, V. & Spencer, K. (2014). Analysis of the residual stress and bonding mechanism in the cold spray technique using experimental and numerical methods. Surface and Coatings Technology, 252, 15-28.
Pan, K., IJzermans, R.H.A., Jones, B.D., Thyagarajan, A., van Beest, B.W.H. & Williams, J.R. (2016). Application of the SPH method to solitary wave impact on an offshore platform. Computational Part. Mech., 3, 155-166.
Holmes, D.W., Williams, J.R., Tilke, P. & Leonardi, C.R.. (2016). Characterizing flow in oil reservoir rock using SPH: absolute permeability. Computational Part. Mech., 3, 141-154.
Müller M., Charypar D., Gross M.(2003) Particle based fluid simulation for interactive applications. In SCA'03: Proceedings of the 2003 ACM SIGGRAPH/Eurographics symposium on Computer animation (Aire-la-Ville, Switzerland, Switzerland, 2003), Eurographics Association, pp. 154–159. 2, 3, 4