= Users' Document == Introduction ISSDE is a parallel program that is compiled and run on the Linux platform. == Install === Install Requirement * gcc-7.5.0 * openmpi-4.1.1 * gsl lib * Eigen lib === gcc-7.5.0 Install {{{ sudo apt install gcc-7.5.0 }}} === openmpi-4.1.1 Install * Download openmpi[https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.1.tar.gz Install package] * Decompress, compile, install {{{ tar -zxvf openmpi-4.1.1 cd openmpi-4.1.1 ./configure --prefix=/opt/openmpi-4.1.1 --enable-mpi-cxx --enable-mpi-cxx-seek --enable-debug make make install }}} === openmpi-4.1.1 configuration {{{ vim ~/.bashrc }}} * Add contents to the end of .bashrc {{{ export PATH=$PATH:/opt/openmpi-4.1.1/bin export C_PATH=$C_PATH:/opt/openmpi-4.1.1/include export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/openmpi-4.1.1/lib export LIBRARY_PATH=/$LIBRARY_PATH:/opt/openmpi-4.1.1/lib export INCLUDE=$INCLUDE:/opt/openmpi-4.1.1/include }}} * Update the configuration {{{ source ~/.bashrc }}} === gsl lib install and configuration * Download gsl lib[https://mirror.ibcp.fr/pub/gnu/gsl/gsl-latest.tar.gz Install package] * Decompress, compile, install {{{ tar -zxvf gsl-lastest.tar.gz cd gsl-2.7.1 ./configure --prefix=/opt/gsl-2.7.1 make make install }}} === Eigen lib install and configuration * Download Eigen lib[https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz Install Package] * Cecompress and mv to lib {{{ tar -zxvf eigen-3.4.0.tar.gz cp -r Eigen path_of_lib }}} == ISSDE compile, run, function and parameter setting === ISSDE Obtain Contact Us {{{ Email:yifeng.zheng@ipp.ac.cn }}} === Program compile {{{ cd src make }}} === Program run {{{ cd bin mpirun -np 4 ./a.out }}} === Code structure * bin Binary run files * src Source code files * include Head files and input files * lib lib files * configure configure files === Source code strctures * Main function stochastic_process_uniform_field_mpi.cpp * Input interview function read_data.cpp * Newton Method function newton_raphason_general.cpp * Runge-Kutta Method runge_kutta_general.cpp * Extern function ext_fun.cpp === Parameter Setting * Major paramters {{{ int store_size=10; //store size int DATA_NUBEAM=2; //0 single particle, 1 multi-particles, 2 source from NUBEAM int CO_CTR_TANG_PERP=2; //Numbers of beam int A0BEAM=0; //0 for beam 1,1 for beam 2 int CLOCKWISE=1; //Direction of longitudinal magnetic field, 1 for counterclockwise ,-1 for clockwise int CHECKPOINT=0; //checkpoint, 1 use checkpoint data, 0 use initial data int RIP=0; //Ripple setting, 0 no ripple, 1 analysis solution of ripple, 2 EAST Engineering ripple data, 3 Fish-tail ripple(DEVICE=4), 4 BEST Engineering ripple for 3.6m case(DEVICE=5), 5 CFETR Engineering data for 7.2m case (DEVICE=4) int NORMALIZATION=1; //Normalization int SPLITTING=1; //Splitting method int DEVICE=7; //Devices, 0 for EAST discharge #93910, 1 for BEST 3.3m case with Q=1, 2 for BEST 3.3m case with Q=5, 3 for BEST 3.3m with Q=1, 4 for CFETR steady-state case with alpha particles, 5 for BEST 3.6m with alpha particle and Q=, 6 for BEST 3.6m with Q=5, 7 for EAST discharge #101735 int ICRF=1; //When DEVICE=7, ICRF-NBI fast ion with different minority concentration, 0 for only NBI, 1 for 1% H, 2 for 5% H and 3 for 10% H int COLLISION=0; //0 no collision, 1 collision with electron, 2 collision with D, 3 collision with T, 4 collision with electron and D, 5 collision with electron and T, 6 collision with D and t 7 collision with electron, D and T. int BC=1; //0 for LCFS boundary, 1 for first wall int MHD=1; //0 no MHD, 1 with MHD perturbation field int MHD_OVERLAP=0; //0 no MHD overleaping,1 for overlaping of MHD (2,1) and (3,2) }}} * Major output files {{{ v_para_dis_NBI_1_ICRF_EAST_mhd_one_particle_D_Limiter_g_nor_mi_e_i_t_f_mpi.txt; //Parallel velocity distribution of particles v_perp_dis_NBI_1_ICRF_EAST_mhd_one_particle_D_Limiter_g_nor_mi_e_i_t_f_mpi.txt; //Perpendecular velocity distribution of particles v_x_dis_NBI_1_ICRF_EAST_mhd_one_particle_D_Limiter_g_nor_mi_e_i_t_f_mpi.txt; //Velocity distribution in x direction v_y_dis_NBI_1_ICRF_EAST_mhd_one_particle_D_Limiter_g_nor_mi_e_i_t_f_mpi.txt; //Velocity distribution in y direction v_z_dis_NBI_1_ICRF_EAST_mhd_one_particle_D_Limiter_g_nor_mi_e_i_t_f_mpi.txt; //Velocity distribution in z direction x_dis_NBI_1_ICRF_EAST_mhd_one_particle_D_Limiter_g_nor_mi_e_i_t_f_mpi.txt; //Position distribution in x direction y_dis_NBI_1_ICRF_EAST_mhd_one_particle_D_Limiter_g_nor_mi_e_i_t_f_mpi.txt; //Position distribution in y direction z_dis_NBI_1_ICRF_EAST_mhd_one_particle_D_Limiter_g_nor_mi_e_i_t_f_mpi.txt; //Position distribution in z direction }}} === Results * The agreement between the results of ISSDE code and the analytical solution of FP equation [[Image(htdocs:slowing_down_velocity_no_field_e_i_benckmark.png,50%,align=middle)]] * The agreement between the results of ISSDE code and the physical process [[Image(htdocs:slowing_down_thermal_e_e_maxwellian.png,50%,align=middle)]] * Comparison of long-term stability between splitting method and stochastic Runge-Kutta method [[Image(htdocs:relative_energy_error_of_splitting_method.png,50%,align=middle)]] * Fast ion trajectory compared with the results of PTC [[Image(htdocs:Fig.1.png,50%,align=middle)]] * Fast ion loss in EAST [[Image(htdocs:heat_NBI_H001_new_rip_3d_limiter_10ms.png,50%,align=middle)]] [http://lanseyilin.com:8000/trac/wiki/WikiStart_English Prev]