../images/vacancy_diffusion.0.png ../images/vacancy_diffusion.10.png ../images/vacancy_diffusion.63.png ../images/vacancy_diffusion.66.png ../images/vacancy_diffusion.200.png ../images/vacancy_diffusion.label.png

Commands & Concepts

  • Create lattice [1]
  • Initialize spin values
    • set (initialize sites to 1)
    • set (set fraction of sites to 2)
  • Select app style: diffusion (a model for vacancy diffusion)
  • Select solve style: tree (stores event probabilities in binary tree)
  • Set kT: temperature/energy relevant to diffusion model
  • Request output text/images for analysis
  • Choose diag style
    • energy (running energy tally for entire lattice)

spparks input file

  • Run spparks:

    # SPPARKS 'diffusion' model for modeling vacancy diffusion
    # let N=128
    # Simulation temperature
    # kT="1.0"
    # Volume fraction of voids
    # F="0.1"
    spk_flame.gnu -var kT $kT -var N $N  -var F $F < vacancy_diffusion.in
    
  • Download 'vacancy_diffusion.in'

    # SPPARKS vacancy 'diffusion' model 
    # let N=128
    # Simulation temperature
    # kT="1.0"
    # Volume fraction of voids
    # F="0.1"
    # spk_flame.gnu -var kT $kT -var N $N  -var F $F < vacancy_diffusion.in
    
    seed		 56689
    
    app_style	 diffusion linear hop
    
    # 2d lattice; Each site has 8 neighbors
    dimension	 2
    lattice		 sq/8n 1.0
    
    # Define lattice extent called 'square'; 
    region		 square block 0 ${N} 0 ${N} -1.0 1.0
    
    # Define 'axis' aligned simulation domain on 'square'
    create_box	 square
    
    # Creates sites on lattice defined above; also creates neighborhood list for each site
    create_sites     box
    
    # Initializes sites to '1' and a fraction of sites to '2'
    set site value 1
    set site value 2 fraction ${F}
    
    # Simulation temperature; Units of energy
    temperature	 ${kT}
    
    # KMC solver
    solve_style      tree
    # sectors are required to run 'tree' kmc in parallel
    sector yes
    
    # Diagnostic style energy computes the total energy for all sites
    diag_style       energy
    
    # Print diagnostic information to screen 
    stats            5000.0
    
    # Write snapshot of site values to 'vacancy_diffusion.dump' 
    dump  1 text  5000.0 vacancy_diffusion.dump
    
    # Write 'image'; boundary between phases drawn with color = 0 0 0 aka 'black'
    dump vacancy_diffusion_image image 5000 vacancy_diffusion.*.jpg site site crange 1 2 drange 1 1 view 0.0 0.0 boundary site 1 shape cube box no 1 zoom 1.95
    dump_modify vacancy_diffusion_image boundcolor black backcolor white pad 4 
    
    # Run for 1 million *spparks* steps
    run              1000000
    

[1]../images/cubic_lattice_bcc3.gif

https://www.uwgb.edu/dutchs/symmetry/bravais.htm