Skip to content

SciProgCentre/rl-tge-sim

Repository files navigation

Reactor like TGE model: proof of concept

Description

For fast checking the potential of RL-TGE model, we considered a next simplified model:

  • There is only one tuning parameter --- the local coefficient of gamma multiplication, describing state of the atmosphere (field strength and distribution as well as density);

  • The number of produced of photons in a cell follows Poisson distribution, direction of momentum of a generated gamma is defined by the electric field direction;

  • Electric field is chaotic: direction of field in cell ignition point is generated by spatial uniform distribution, but magnitude is a constant for the whole cloud;

  • Energy of particle is not taken into account, propagation of gamma is simulated with exponential distribution with fixed mean free path;

  • Cloud size (meaning the volume with the field) could be varied, but as a reference we take one kilometer cube, we do not track particles outside the field volume.

Installation

  1. Install JDK (8 or higher) one way:

    • From official Oracle site;
    • Using your packege manager (for exemple, in Debian/Ubuntu use sudo apt-get install openjdk-8-jdk );
    • For any Unix use SDKMAN.
  2. Clone this repository on your PC using Mercurial or download this source code as zip-archive.

  3. Open terminal and go to the folder with source.

  4. Compile program with gradle wrapper:

    • For Windwos ``
    • For *nix usechmod +x gradlew && ./gradlew installDist

    or compile program using Gradle build tools

We could find the installed program in ./build/install/skysim/bin

Usage

For getting all options, print help:

  • For *nix: skysim --help
  • For Windwos: TODO
usage: skysim
    --cell-length <NUMBER>       set the length of acceleration cell
                                 (influence on birth point of new photon)
    --cloud-size <NUMBER>        set the cloud size
    --dynamic-plot               start server with dynamic plot
    --field-magnitude <NUMBER>   set the field magnitude
    --free-path <NUMBER>         set the photon free mean path
 -g,--gain <NUMBER>              set the local coefficient of gamma
                                 multiplication
 -h,--help                       print this message and exit
 -l,--particle-limit <NUMBER>    set the upper limit of number of particle
 -o,--output <FILENAME>          print simulation result in the file with
                                 given name
 -s,--seed <NUMBER>              set the random generator seed
    --save-plot <FILENAME>       save graph of simulation result in the
                                 html-file with given name
    --seed-photons <FILENAME>    set the path to file contains list of
                                 seed photons in next format:
                                 POSITION_X POSITION_Y POSITION_Z
                                 DIRECTION_X DIRECTION_Y DIRECTION_Z
                                 ENERGY NUMBER
                                 POSITION_X POSITION_Y POSITION_Z
                                 DIRECTION_X DIRECTION_Y DIRECTION_Z
                                 ENERGY NUMBER
                                 ...
                                 by default using:
                                 0.0 0.0 cloud-size/2 0.0 0.0 -1.0 1.0 1
 -v,--version                    print information about version and exit

For start the animated plot:

skysim --dynamic-plot --gain=1.6 -l=100000 --seed-photons seed.txt

For saving the result in file:

skysim -o filename.txt

For saving the graph in html:

skysim --save-plot plot.html

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages