FCODE
MagLIF Simulation
Install / Use
/learn @fuse-energy/FCODEREADME
FCODE
Accompanying simulation code for MagLIF: Dynamics and energetics of liner and fuel.
https://github.com/fuse-energy/FCODE/assets/77456691/39d5dfd2-c731-4351-a44f-a1cb29a1bc93
Single Simulation
- Create a config file in the
configdirectory to change the initial conditions. - Change the import statement (line 5) of
MagLIF.pyto match the name of the newly created config file. - Run
MagLIF.pyto run the simulation. - The result are stored under the
resultsdirectory.
simulation.py: Simulation results, each row is an iteration.initial.csv: Key-value pair of initial conditions.results.csv: Key-value pair of simulation results.
- Run
plot.pyto show the plots.
Example of plot output
Multiple Simulations: Parametric Variation
- Create a config file in the
config_paramsdirectory to change the initial conditions. - Change the import statement (line 9) of
MagLIF_param.pyto match the name of the newly created config file. - Run
MagLIF_param.pyto run simulations of all initial condition permutations. - The results are stored in
results/params.csv. - Rename the results file to
params_XXMA.csv, whereXXis the current inMA. - In
plot_params.py, change theIvariable to match theXXfrom step 5. - Run
plot_params.pyto show the plots.
Example of plot output
