code relating to the analysis of squeezing codes [1].
setting things up:
run Pkg.activate(".") and Pkg.Instantiate() in the project folder.
simulation_driver.jl: Run a single simulation with custom parameters.
examples:
julia --project=. simulation_driver.jl --mode=dw_growth --Lprl=100 --rule=R --p=0.05
julia --project=. simulation_driver.jl --mode=dw_history --Lprl=50 --T_evolve=200
julia --project=. simulation_driver.jl --mode=dw_roughness --Lprl=20 --n_trials=10Main Parameters:
mode: Simulation mode"dw_growth"computes growth of interface roughness in time"dw_roughness"computes late-time height fluctuations of interface"dw_history"visualizes the growth of an interface"history"visualizes the normal 2d dynamics
rule: Rule name -"R","F", or"M"(default:"R")Lprl: System size parallel to domain wallLperp: System size perpendicular to domain wallp: Noise strength (default:0.0)rotate: Iftrue, rotate the system by 90 degrees (default:false)r: Iftrue, reverse spins in initial configuration (default:false)save: Iftrue, save data to file indata/folder with pre-defined name (default:truefordw_growthanddw_roughness,falseelse)
Other Parameters:
T_evolve: Number of time steps to evolven_trials: Number of trials to average over (fordw_growthanddw_roughnessmodes)border: Border thickness for active region padding (default:4)use_max_height: Iftrue, defines height field using maximum height of flipped spin rather than sum (default:false)final_state: Iftrue, saves only the final state as an imagepretty: Iftrue, makes animations with minimal visual clutterout_adj: Optional string to append to filename before.jld2extensionreset_center: Iftrue, resets domain wall center when it drifts too far (default:true)
All parameters can be set via command-line arguments using --param=value syntax.
Defaults are defined in the script; to run the script in the REPL, modify these values and run include("simulation_driver.jl).
run_batch.jl: Run parameter sweeps, either sequentially or as SLURM job arrays.
# Run all jobs sequentially (for testing)
julia --project=. run_batch.jl
# Submit as SLURM job array (see run_batch_slurm.sh)
sbatch run_batch_slurm.shEdit the parameter vectors in run_batch.jl to define the parameter sweep.
plotter.py: Plot simulation results from JLD2 files.
# Plot automatically from data/ directory
python3 plotter.py
# Plot specific files
python3 plotter.py data/R_dw_growth_Lprl50.jld2
# options:
-instexp # Plot instantaneous exponent
-allhists # Plot individual trial historiesvisualization:
julia --project=. simulation_driver.jl --mode=dw_history --Lprl=150 --Lperp=100 --T_evolve=300 --rule=R --p=.1julia --project=. simulation_driver.jl --mode=dw_history --Lprl=150 --Lperp=100 --T_evolve=300 --rule=M --rotate=truejulia --project=. simulation_driver.jl --mode=dw_history --Lprl=150 --Lperp=100 --T_evolve=300 --rule=F --rotate=true --r=truejulia --project=. simulation_driver.jl --mode=history --Lprl=150 --Lperp=150 --rule=M --r=true
domain growth:
julia --project=. simulation_driver.jl --mode=dw_growth --Lprl=75 --rule=R --n_trials=25python3 plotter.py data/R_dw_growth_Lprl75_n_trials25.jld2
domain roughness:
julia --project=. simulation_driver.jl --mode=dw_roughness --Lprl=20 --rule=F --n_trials=25python3 plotter.py data/F_dw_roughness_Lprl20_n_trials25.jld2(just plots a single data point; designed to be run with multiple files at different system sizes)