# Rough interface models

### Interface model

The mathematical model for one interface must be specified through one of

    ba.SelfAffineFractalModel(...)
    ba.LinearGrowthModel(...)

These models define the behavior of autocorrelation function of roughness or, better to say, its Fourier spectrum in the full range of spatial frequencies from 0 to infinity.

##### Self-affine fractal model

    ba.SelfAffineFractalModel(sigma, hurst, lateral_corr_length, max_spatial_freq=0.5)

where

- `sigma`, $\sigma$, is the root-mean-square amptitude of out-of-plane (transversal) fluctuation.
- `hurst`, $H$, is a fractal exponent `H` with `0<H<1`. The smaller $H$ is, the more serrate the surface profile looks.
- `lateral_corr_length`, $\xi$, is the lateral (in-plane) correlation length.
- `max_spatial_freq`, $\nu_{max}$, is a cut-off spatial frequency.

This is the K-correlation model of Palasantzas 1993. The autocorrelation spectrum is

$$ S(\nu)=\dfrac{4 \pi H \sigma^2\xi^2}{(1+(2\pi\nu)^2)^{1+H}} ,\quad for \quad \nu<\nu_{max} $$

In case there is no cut-off, the real-space roughness correlation function at the interface is expressed as: $$ < U(x, y) U(x’, y’)> = \sigma^2 \frac{2^{1-H}}{\Gamma(H)} \left( \frac{\tau}{ξ} \right)^H K_H \left( \frac{\tau}{ξ} \right), \quad \tau=[(x-x’)^2+(y-y’)^2]^{\frac{1}{2}} $$

where $U(x, y)$ is the height deviation at position $(x, y)$.

The main property is that it remains nearly constant at low $\nu$ and transitions into a straight line on a log-log scale at high $\nu$, exhibiting an inflection point between these two regions.

##### Linear growth model

    ba.LinearGrowthModel(particle_volume, damp1, damp2, damp3, damp4, max_spatial_freq=0.5)

where

- `particle_volume`, $\Omega$, is the volume of particle (atom, molecule, cluster) coming to the surface during film deposition,
- `damp1-damp4`, $a_1-a_4$, are damping coefficients, responsible for replication of underlying roughness and the growth of the new independent one,
- `max_spatial_freq`, $\nu_{max}$, is a cut-off spatial frequency.

This is the model described by Stearns 1993 and extended by Stearns and Gullikson 2000.

The model describes the evolution of the roughness spectrum on the top surface of a growing film. Its autocorrelation spectrum depends not only on the model parameters but also on the film thickness and the spectrum of the underlying interface. Therefore, the model cannot be applied directly to the substrate.

The autocorrelation spectrum is

$$ S_{above}(\nu)=S_{below}(\nu)e^{-b(\nu)t} + \Omega\dfrac{1-e^{-b(\nu)t}}{b(\nu)}, \quad for \quad \nu<\nu_{max} $$ where $t$ - film thickness, $b(\nu) = \sum{a_i\nu^i}$ - relaxation function

An essential property of the model is that it describes not only autocorrelation but also cross-correlation properties. Therefore, it does not require cross-correlation to be specified separately.

- Introduction
  - Functionality overview
  - Architectural overview

- Install or build
  - Install Python
    - Python on Linux
    - Python on Windows
    - Python on Mac
    - Python modules
  - Install BornAgain
    - Linux
    - Windows
    - MacOS
    - Development snapshot
  - Build BornAgain
    - Unix
      - Install third-party software
      - Get the source
      - Build and install BornAgain
      - Run a first simulation
    - Windows

- Graphical user interface
  - Quick Start
  - GUI overview
  - Fitting in the GUI

- Python scripting
  - Run a script
  - Understand the syntax
  - Fitting
  - Upgrading

- Reference
  - Simulation model
    - Simulation classes
      - Specular
        - Example
      - Scattering
        - Examples
          - GISAS
          - without DWBA terms
          - with specular peak
          - SAS
          - Polarized SANS
          - Monte-Carlo
      - Off-specular
        - Off-specular
      - Depth probe
        - Examples
          - Thin film
          - Transmitted modulus
          - Resonator
    - Common settings
      - Background
      - Options
        - Monte-Carlo
        - # threads
        - Average materials
        - Include specular
      - Progress monitor
  - Instrument model
    - Beam
      - Footprint
      - Beam divergence
    - Scan
      - TOF reflectometry
      - TOF resolution
      - Beam Angular Spread
      - Beam Wavelength Spread
    - Detectors
      - SphericalDetector
      - 2d detector resolution
      - Offspec detector
    - Neutron polarization
      - Spin asymmetry example
    - Examples
      - 2D detector resolution
      - Neutron polarization
        - Magnetic layer
        - Ditto, realistic instrument
        - Polarized scattering
  - Sample model
    - Materials
      - Magnetization
    - Sample
      - Layer
      - LayerStack
      - Layout
    - Roughness
      - Interface model
      - Transient
      - Cross-correlation
      - Examples
        - GISAS
        - Reflectivity
    - Particles
      - Form factor
        - Hard particles
          - Bipyramid4
          - Box
          - CantellatedCube
          - Cone
          - Cylinder
          - Dodecahedron
          - EllipsoidalCylinder
          - HemiEllipsoid
          - HorizontalCylinder
          - Icosahedron
          - PlatonicOctahedron
          - PlatonicTetrahedron
          - Prism3
          - Prism6
          - Pyramid2
          - Pyramid3
          - Pyramid4
          - Pyramid6
          - Sphere
          - SphericalSegment
          - Spheroid
          - SpheroidalSegment
          - TruncatedCube
        - Ripples
          - Bar ripple
          - Cosine ripple
          - Sawtooth ripple
        - Soft particles
          - FuzzySphere
          - Gauss
        - Custom formfactor
      - Composite particles
        - Core and shell
        - Compound particle
        - Mesocrystal
      - Examples
        - Compound particle
        - Core and shell
        - Crossing an interface
        - Mesocrystal
        - Rotation example
        - Dense cylinders
        - Dense hemispheres
        - Uncorrelated mixture
        - Polydispersity
    - Particle assemblies
      - Grating
        - 1D lattice
        - Cosine ripples in a lattice
        - Triangular ripples in a lattice
      - 2D lattice
        - Square lattice
        - Lattice orientation distribution
        - Finite square lattice
        - Lattice with basis
        - Multi-layer lattice
        - Position variance
      - Radial paracrystal
      - 2D paracrystal
      - Others
        - Size-distribution model: decoupling approximation
        - Size-distribution model: local monodisperse approximation
        - Size-distribution model: size-spacing coupling approximation
  - Model modifiers
    - Rotation
    - Distributions
  - Data types
    - Class Datafield
      - Export
      - Find intensity peaks
    - SLD profile
      - SLD profile with rough interfaces
      - SLD profile with a sliced particle layer
  - Plotting
    - Functions
    - Configuration
    - Heat map
    - LaTeX markup
    - Export
    - Plot axes in different units
  - Fitting
    - Data import
      - TIFF
    - Minimizer settings
    - Multiple datasets
    - Examples
      - Fitting with masks
      - Custom objective function
      - Fitting along slices
      - GISAS 2D fits
      - Experiment at GALAXI
      - Find background
      - Minimizer settings
      - Bayesian Sampling
      - Consecutive fitting
      - Considering uncertainties
      - External minimizer
      - External minimizer: plotting
      - Simultaneous fit of two datasets
      - Spin asymmetry fit example
      - Reflectometry: Fit Pt layer
      - Reflectometry: Fit honeycomb

- Literature
  - Babonneau2010
  - Babonneau2013
  - Croset2021
  - Lazzari2002
  - Lazzari2006
  - Pospelov2020
  - Renaud2009
  - Sears1992
  - Wuttke2021

- How to
  - Get announcements
  - Solve known problems
    - Set Python environmental variables under Windows
  - Request help or report bugs
  - Cite BornAgain

- Developers' corner
  - Configure
    - Build
    - Pyenv
  - Develop
    - Manual checks
    - Debug
    - Webdoc
    - Code analyses
  - Release
    - Manual GUI test