Skip to content

Basic KDMC functionality

Emil Loevbak requested to merge EL_KDsimulation into master

Overview of changes:

  • Added a KDSimulator struct to simulator.hpp and simulator.cpp.
  • Added a file KD_simulation.cpp that contains the routines simulate_particle_from_source and follow_particle, corresponding to the names already used in the code for kinetic simulations.
  • app/eiron-path-distribution-test/main.cpp now has a new command-line argument selecting which time stepping producedure to use. Depending on this argument, either a classic kinetic simulation is started or a KD simulation is started. The resulting quantity being tallied on the grid bi this executable is a time step delta_t multiplied by particle counts in the grid cells, evaluated at intervals delta_t.
  • Added a script that calls the eiron-path-distribution executable for both schemes with varying values of delta_t. For each delta_t, the two results are compared using the grid_diff tool.
  • Modified CMake configuration to add the above changes to the build.
  • Added a placeholder test-case that always fails for now.

Still to be done before merge:

  • Remove commented out CMake lines used to speed up build during debugging
  • Move KD tallying out of timestepping as the current code runs out of memory for delta_t < 0.01 on my machine
  • Add some basic tests and document whether the simulation results make sense.
  • Merge in from master

Future work:

  • Refactoring and cleanup of the code to match remaining codebase
  • More extensive testing
  • Dealing with ionization during diffusion properly
  • Extend KDMC to deal with other simulation types
  • Diffusive estimation

Merge request reports