Skip to content

C++ code to generate random self-affine (in average) surface z(x,y) with low and high frequency cutoffs and prescribed fractal dimension

License

Notifications You must be signed in to change notification settings

vyastreb/SelfAffineSurfaceGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generator of a periodic random self-affine field

Information

  • Author: Vladislav A. Yastrebov
  • Affiliation: MINES Paris, Centre des Materiaux, CNRS
  • Date: 2015-2023
  • Licence: BSD 3-Clause

Description

It is a C++ implementation of the method proposed in Y.Z. Hu and K. Tonder, "Simulation of 3-D random rough surface by 2-D digital filter in fourier space", Int. J. Mach. Tools Manufact. 32:83-90 (1992): DOI One could also check our paper where this method was used to generate rough surfaces for contact analysis between rough surfaces: V.A. Yastrebov, G. Anciaux, J.F. Molinari. "The role of the roughness spectral breadth in elastic contact of rough surfaces", Journal of the Mechanics and Physics of Solids, 107:469-493 (2017): DOI, arXiv

Input: it requires 8 arguments:

  • [1] lower cutoff wavenumber k1 (int)
  • [2] upper cutoff wavenumber k2 (int)
  • [3] Hurst exponent, H (double) // 0 < H < 1
  • [4] number of points per size, L (int) // powers of 2, i.e. 128, 256, 512, etc
  • [5] seed for the random number generator, s (int)
  • [6] standard deviation of heights, rms (double)
  • [7] number of bins in pdf data, Npdf (int)
  • [8] if the power spectral density has a plateau up to k1? (0 - non, 1 -yes)

Short help:

  • to compile src/*
    $ make
  • the executable SURFACE_GENERATOR is put in bin/ to execute run
    $./SURFACE_GENERATOR
    if you do not provide arguments, it will print the arguments it needs.

Python implementation

Python implementation is available under CC0 license, you can find it in python/RandomField.py.

About

C++ code to generate random self-affine (in average) surface z(x,y) with low and high frequency cutoffs and prescribed fractal dimension

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published