An S-N curve defines the number of cycles to failure, N ( S ) , when a material is repeatedly cycled through a given stress range S. The S-N curve can be used to calculate the damage in a fatigue analysis.
To better understand the phenomenon of fatigue check the link below: https://en.wikipedia.org/wiki/Fatigue_(material)
1) Get material Properties (Sut, E, Poisson
2) check de example
3) Run the code