The code can be found here. Below is the documentation that you also find on the linked website.
We implement the
rSN method. This is a modification of the standard
SN method that mitigates ray-effects by rotation of the quadrature step after each time step. An interpolation procedure is required which furthermore requires different (non-tensorized) quadrature sets. All these aspects are implemented in this code with
The two figures below demonstrate the effect that the rotation of the angular quadrature set has on the overall solution quality. In the first picture we see ray-effects for the line-source problem. In the second picture these effects were mitigated due to the rotation.
The code was tested with Julia v0.7.0 and v1.0.0.
- Clone the repository into a local folder
- Change to the src/ directory,
- Start the Julia REPL
- Optional: You might have to add the current directory to your path:
- Optional: You might have to add needed packages v0.7:
v1.0: Inside the REPL type
]which changes the command line to
(v1.0) pkg>. Then type
Running the code
There are two modes. You can run a single test case or predefine multiple test cases and let them be executed one after another. The results will always be stored in
CURRENTTIMESTAMP looks like
2018-08-17T09:24:12.74. We store information about the problem (source, initial conditions, scattering and absorption coefficients) as well as the final density and plots that summarize the test case and the result. The purpose of these plots is not to evaluate the solution accurately but to immediately have an overview over the given content of the folder.
Running one test case
This will execute the test case stored in
KS = KineticSolver("config.txt");
Running multiple test cases
We can specify multiple parameters in
main.jl. The content of
config.txt will be ignored as we are going to generate the corresponding test cases on the fly. For example: If
ORDER=[10,20] the four test cases
nx=100, order=10 and
nx=100, order=20 will be executed.
Modifying the code
Inside the function
methods.jl, different modifications of the
SN method are implemented. This includes the
rSN approach as well as a convolution approach.
methods will be executed at the end of each time loop and can modify the angular flux
phi as well as all information about the quadrature set.
- Better plotting routines
- More initial conditions
- Different boundary conditions