Loading InputFiles/xp_IonSlowingDown.in +57 −49 Original line number Diff line number Diff line Loading @@ -15,9 +15,23 @@ params%nz = 501, params%NC = 10000, ! Total number of particles params%NS = 50000, ! Total number of time steps params%dt = 1.5E-7, ! Time step in [s] params%zmax = +2.0, params%zmin = -2.0, ! Time steps to record: ! ==================== params%jstart = 1, ! start frame params%jend = 50000, ! end frame params%jincr = 200, ! increment ! Domain geometry: ! ==================== params%dtheta = 6.2832 ! Radians params%r1 = 0.03 ! Inner radius at reference location [m] params%r2 = 0.05 ! Outer radius at reference location [m] params%zmax = +2.0, ! Boundary 2 (right) params%zmin = -2.0, ! Boundary 1 (left) ! Physics: ! ====================== params%iSave = .true., params%iPush = .true., ! Enable RK4 particle pusher params%iColl = .true., ! Collisions or no collisions Loading @@ -25,12 +39,6 @@ params%iHeat = .false., params%iPotential = .false., ! Enable electric potential params%iDrag = .false., ! Enable plasma drag ! Time steps to record: ! ============== params%jstart = 1, ! start frame params%jend = 50000, ! end frame params%jincr = 200, ! increment ! Collision operator conditions: ! ============================== params%Te0 = 250., ! eV Loading InputFiles/xp_Test.indeleted 100644 → 0 +0 −82 Original line number Diff line number Diff line ¶ms_nml ! Simulation name: ! =============== params%fileDescriptor = '2021_02_01a', ! Magnetic field input data: ! ========================= params%rootDir ="/home/nfc/myRepos/LinearFokkerPlanck_Axisymmetric", params%BFieldFileDir = "/BfieldData", params%BFieldFile = "/Bfield_b.txt", params%nz = 501, ! Number of points in BFieldFile ! Simulation conditions: ! ===================== params%NC = 100, ! Total number of particles params%NS = 600, ! Total number of time steps params%dt = 0.5E-7, ! Time step in [s] params%zmax = +5.0, params%zmin = -5.0, params%iSave = .true., params%iPush = .true., ! Enable RK4 particle pusher params%iColl = .true., ! Collisions or no collisions params%iHeat = .false., ! Enable RF heating operator params%iPotential = .false., ! Enable electric potential params%iDrag = .false., ! Enable plasma drag ! Time steps to record: ! ============== params%jstart = 1, ! start frame params%jend = 600, ! end frame params%jincr = 10, ! increment ! Collision operator conditions: ! ============================== params%Te0 = 100., ! eV params%Ti0 = 100., ! eV params%ne0 = 5.0E+19, ! m**-3 params%Aion = 1., ! Ion mass params%Zion = 1., ! Charge number for main ion species params%species_a = 2, ! =1 for electrons, =2 for ions params%elevel = 10, ! Energy at which slowing down power is calculated E = elevel*Te0 params%CollOperType = 2, ! 1 for Boozer-Only, 2 for Boozer-Kim ! Particle boundary conditions: ! ============================ params%BC_Type = 2, ! 1: Isotropic plasma source, 2: NBI, 3: Periodic params%BC_zp_mean = 0.0, ! Mean particle injection params%BC_zp_std = 0.3, ! STD of particle injection params%BC_Ep = 20000., ! Drift kinetic energy params%BC_Tp = 10, ! Thermal kinetic energy params%BC_xip = 0.707, ! Mean pitch angle where xip = cos(theta) = vpar/v ! Initial conditions: !=================== params%IC_Type = 2, ! 1: uniform load, 2: gaussian load params%IC_zp_mean = 0.0, ! Mean particle injection params%IC_zp_std = 0.3, ! STD of particle injection params%IC_Ep = 1000., ! Drift kinetic energy params%IC_Tp = 10.; ! Thermal kinetic energy params%IC_xip = 0.707, ! Mean pitch angle where xip = cos(theta) = vpar/v ! RF heating operator conditions: ! =============================== params%f_RF = 28.0E+9 ! RF frequency params%zRes1 = 2.4 ! Defines interval where RF is present params%zRes2 = 3.0 ! Defines interval where RF is present params%kper = 29920. ! Perpendicular wave number of EBW params%kpar = 5864. ! Parallel wave number of EBW params%Ew = 10000 ! EBW E-minus wave electric field magnitude params%n_harmonic = 4 ! Cyclotron harmonic ! Electric potential conditions: ! ============================= params%s1 = 0, params%s2 = 1.3, params%s3 = 4.0, params%phi1 = 0., params%phi2 = 0, params%phi3 = 0., / InputFiles/xp_TestCollisions.in +57 −49 Original line number Diff line number Diff line Loading @@ -15,9 +15,23 @@ params%nz = 501, ! Number of p params%NC = 100000, ! Total number of particles params%NS = 5000, ! Total number of time steps params%dt = 0.5E-7, ! Time step in [s] params%zmax = +5.0, params%zmin = -5.0, ! Time steps to record: ! ==================== params%jstart = 1, ! start frame params%jend = 5000, ! end frame params%jincr = 50, ! increment ! Domain geometry: ! ==================== params%dtheta = 6.2832 ! Radians params%r1 = 0.03 ! Inner radius at reference location [m] params%r2 = 0.05 ! Outer radius at reference location [m] params%zmax = +5.0, ! Boundary 2 (right) params%zmin = -5.0, ! Boundary 1 (left) ! Physics: ! ====================== params%iSave = .true., params%iPush = .false., ! Enable RK4 particle pusher params%iColl = .true., ! Collisions or no collisions Loading @@ -25,12 +39,6 @@ params%iHeat = .false., params%iPotential = .false., ! Enable electric potential params%iDrag = .false., ! Enable plasma drag ! Time steps to record: ! ============== params%jstart = 1, ! start frame params%jend = 5000, ! end frame params%jincr = 50, ! increment ! Collision operator conditions: ! ============================== params%Te0 = 10., ! eV Loading InputFiles/xp_TestDrag.in +58 −50 Original line number Diff line number Diff line ¶ms_nml ! Simulation name: ! =============== params%fileDescriptor = '2021_02_17b', params%fileDescriptor = '2021_02_17c', ! Magnetic field input data: ! ========================= Loading @@ -15,9 +15,23 @@ params%nz = 501, params%NC = 70000, ! Total number of particles params%NS = 10000, ! Total number of time steps params%dt = 0.5E-7, ! Time step in [s] params%zmax = +5.0, params%zmin = -5.0, ! Time steps to record: ! ==================== params%jstart = 1, ! start frame params%jend = 10000, ! end frame params%jincr = 250, ! increment ! Domain geometry: ! ==================== params%dtheta = 6.2832 ! Radians params%r1 = 0.03 ! Inner radius at reference location [m] params%r2 = 0.05 ! Outer radius at reference location [m] params%zmax = +5.0, ! Boundary 2 (right) params%zmin = -5.0, ! Boundary 1 (left) ! Physics: ! ====================== params%iSave = .true., params%iPush = .true., ! Enable RK4 particle pusher params%iColl = .true., ! Collisions or no collisions Loading @@ -25,12 +39,6 @@ params%iHeat = .true., params%iPotential = .false., ! Enable electric potential params%iDrag = .true., ! Enable plasma drag ! Time steps to record: ! ============== params%jstart = 1, ! start frame params%jend = 10000, ! end frame params%jincr = 250, ! increment ! Collision operator conditions: ! ============================== params%Te0 = 10., ! eV Loading src/Modules.f90 +41 −22 Original line number Diff line number Diff line Loading @@ -216,32 +216,46 @@ USE spline_fits IMPLICIT NONE TYPE paramsTYP CHARACTER*150 :: fileDescriptor, repoDir CHARACTER*150 :: BFieldFile, BFieldFileDir REAL(r8) :: Ti0, Te0, ne0, dt REAL(r8) :: Aion, Zion INTEGER(i4) :: NC, NS, nz, species_a, species_b ! Simulation name: CHARACTER*150 :: fileDescriptor ! Magnetic field input data: CHARACTER*150 :: repoDir, BFieldFile, BFieldFileDir INTEGER(i4) :: nz ! Simulation conditions: INTEGER(i4) :: NC, NS REAL(r8) :: dt ! Time steps to record: INTEGER(i4) :: jstart, jend, jincr INTEGER(i4) :: threads_given ! Domain geometry: REAL(r8) :: zmin, zmax, dtheta, r1, r2, Area0 ! Physics: LOGICAL :: iDrag, iPotential, iSave, iPush, iHeat, iColl INTEGER(i4) :: IC_Type, BC_Type REAL(r8) :: IC_zp_mean, IC_Ep, IC_xip, IC_zp_std, IC_Tp ! Collision operator conditions: REAL(r8) :: Ti0, Te0, ne0, elevel REAL(r8) :: Aion, Zion, Ma, qa INTEGER(i4) :: species_a, species_b, CollOperType ! Particle boundary conditions: INTEGER(i4) :: BC_Type REAL(r8) :: BC_zp_mean, BC_Ep, BC_xip, BC_zp_std, BC_Tp REAL(r8) :: zmin, zmax INTEGER(i4) :: CollOperType REAL(r8) :: elevel REAL(r8) :: s1, s2, s3, phi1, phi2, phi3 ! Initial conditions: INTEGER(i4) :: IC_Type REAL(r8) :: IC_zp_mean, IC_Ep, IC_xip, IC_zp_std, IC_Tp ! RF heating operator conditions: REAL(r8) :: f_RF, kpar, kper, Ew, zRes1, zRes2 INTEGER(i4) :: n_harmonic REAL(r8) :: tComputeTime, tSimTime ! Variables to hold cpu time at start and end of computation REAL(r8) :: Ma, qa ! Electric potential conditions: REAL(r8) :: s1, s2, s3, phi1, phi2, phi3 ! Compute time data: INTEGER(i4) :: threads_given REAL(r8) :: tComputeTime, tSimTime END TYPE paramsTYP TYPE plasmaTYP REAL(r8) , DIMENSION(:), ALLOCATABLE :: zp, kep, xip, a INTEGER(i4), DIMENSION(:), ALLOCATABLE :: f1 , f2 , f3 , f4 REAL(r8) , DIMENSION(:), ALLOCATABLE :: dE1, dE2, dE3, dE4, dE3_hat REAL(r8) , DIMENSION(:), ALLOCATABLE :: tau, Jm, rL, doppler REAL(r8) , DIMENSION(:), ALLOCATABLE :: dErf_hat, doppler REAL(r8) , DIMENSION(:), ALLOCATABLE :: NR , NSP REAL(r8) , DIMENSION(:), ALLOCATABLE :: Eplus, Eminus REAL(r8) , DIMENSION(:), ALLOCATABLE :: Ndot1, Ndot2, Ndot3, Ndot4 Loading Loading @@ -270,7 +284,7 @@ SUBROUTINE InitPlasma(plasma,params) ALLOCATE(plasma%zp(NC) ,plasma%kep(NC) ,plasma%xip(NC),plasma%a(NC) ) ALLOCATE(plasma%f1(NC) ,plasma%f2(NC) ,plasma%f3(NC) ,plasma%f4(NC) ) ALLOCATE(plasma%dE1(NC) ,plasma%dE2(NC) ,plasma%dE3(NC),plasma%dE4(NC)) ALLOCATE(plasma%tau(NC),plasma%Jm(NC) ,plasma%rL(NC) ,plasma%doppler(NC)) ALLOCATE(plasma%dErf_hat(NC),plasma%doppler(NC)) ALLOCATE(plasma%NR(NS) ,plasma%NSP(NS) ) ALLOCATE(plasma%Eplus(NS),plasma%Eminus(NS) ) Loading @@ -279,6 +293,11 @@ SUBROUTINE InitPlasma(plasma,params) ALLOCATE(plasma%dE3_hat(NC),plasma%Edot3_hat(NS)) ! Initialize variables: plasma%f1 = 0.; plasma%f2 = 0.; plasma%f3 = 0.; plasma%f4 = 0. plasma%dE1 = 0.; plasma%dE2 = 0.; plasma%dE3 = 0.; plasma%dE4 = 0. plasma%dErf_hat = 0.; plasma%doppler = 0.; END SUBROUTINE InitPlasma ! -------------------------------------------------------------------------- Loading Loading
InputFiles/xp_IonSlowingDown.in +57 −49 Original line number Diff line number Diff line Loading @@ -15,9 +15,23 @@ params%nz = 501, params%NC = 10000, ! Total number of particles params%NS = 50000, ! Total number of time steps params%dt = 1.5E-7, ! Time step in [s] params%zmax = +2.0, params%zmin = -2.0, ! Time steps to record: ! ==================== params%jstart = 1, ! start frame params%jend = 50000, ! end frame params%jincr = 200, ! increment ! Domain geometry: ! ==================== params%dtheta = 6.2832 ! Radians params%r1 = 0.03 ! Inner radius at reference location [m] params%r2 = 0.05 ! Outer radius at reference location [m] params%zmax = +2.0, ! Boundary 2 (right) params%zmin = -2.0, ! Boundary 1 (left) ! Physics: ! ====================== params%iSave = .true., params%iPush = .true., ! Enable RK4 particle pusher params%iColl = .true., ! Collisions or no collisions Loading @@ -25,12 +39,6 @@ params%iHeat = .false., params%iPotential = .false., ! Enable electric potential params%iDrag = .false., ! Enable plasma drag ! Time steps to record: ! ============== params%jstart = 1, ! start frame params%jend = 50000, ! end frame params%jincr = 200, ! increment ! Collision operator conditions: ! ============================== params%Te0 = 250., ! eV Loading
InputFiles/xp_Test.indeleted 100644 → 0 +0 −82 Original line number Diff line number Diff line ¶ms_nml ! Simulation name: ! =============== params%fileDescriptor = '2021_02_01a', ! Magnetic field input data: ! ========================= params%rootDir ="/home/nfc/myRepos/LinearFokkerPlanck_Axisymmetric", params%BFieldFileDir = "/BfieldData", params%BFieldFile = "/Bfield_b.txt", params%nz = 501, ! Number of points in BFieldFile ! Simulation conditions: ! ===================== params%NC = 100, ! Total number of particles params%NS = 600, ! Total number of time steps params%dt = 0.5E-7, ! Time step in [s] params%zmax = +5.0, params%zmin = -5.0, params%iSave = .true., params%iPush = .true., ! Enable RK4 particle pusher params%iColl = .true., ! Collisions or no collisions params%iHeat = .false., ! Enable RF heating operator params%iPotential = .false., ! Enable electric potential params%iDrag = .false., ! Enable plasma drag ! Time steps to record: ! ============== params%jstart = 1, ! start frame params%jend = 600, ! end frame params%jincr = 10, ! increment ! Collision operator conditions: ! ============================== params%Te0 = 100., ! eV params%Ti0 = 100., ! eV params%ne0 = 5.0E+19, ! m**-3 params%Aion = 1., ! Ion mass params%Zion = 1., ! Charge number for main ion species params%species_a = 2, ! =1 for electrons, =2 for ions params%elevel = 10, ! Energy at which slowing down power is calculated E = elevel*Te0 params%CollOperType = 2, ! 1 for Boozer-Only, 2 for Boozer-Kim ! Particle boundary conditions: ! ============================ params%BC_Type = 2, ! 1: Isotropic plasma source, 2: NBI, 3: Periodic params%BC_zp_mean = 0.0, ! Mean particle injection params%BC_zp_std = 0.3, ! STD of particle injection params%BC_Ep = 20000., ! Drift kinetic energy params%BC_Tp = 10, ! Thermal kinetic energy params%BC_xip = 0.707, ! Mean pitch angle where xip = cos(theta) = vpar/v ! Initial conditions: !=================== params%IC_Type = 2, ! 1: uniform load, 2: gaussian load params%IC_zp_mean = 0.0, ! Mean particle injection params%IC_zp_std = 0.3, ! STD of particle injection params%IC_Ep = 1000., ! Drift kinetic energy params%IC_Tp = 10.; ! Thermal kinetic energy params%IC_xip = 0.707, ! Mean pitch angle where xip = cos(theta) = vpar/v ! RF heating operator conditions: ! =============================== params%f_RF = 28.0E+9 ! RF frequency params%zRes1 = 2.4 ! Defines interval where RF is present params%zRes2 = 3.0 ! Defines interval where RF is present params%kper = 29920. ! Perpendicular wave number of EBW params%kpar = 5864. ! Parallel wave number of EBW params%Ew = 10000 ! EBW E-minus wave electric field magnitude params%n_harmonic = 4 ! Cyclotron harmonic ! Electric potential conditions: ! ============================= params%s1 = 0, params%s2 = 1.3, params%s3 = 4.0, params%phi1 = 0., params%phi2 = 0, params%phi3 = 0., /
InputFiles/xp_TestCollisions.in +57 −49 Original line number Diff line number Diff line Loading @@ -15,9 +15,23 @@ params%nz = 501, ! Number of p params%NC = 100000, ! Total number of particles params%NS = 5000, ! Total number of time steps params%dt = 0.5E-7, ! Time step in [s] params%zmax = +5.0, params%zmin = -5.0, ! Time steps to record: ! ==================== params%jstart = 1, ! start frame params%jend = 5000, ! end frame params%jincr = 50, ! increment ! Domain geometry: ! ==================== params%dtheta = 6.2832 ! Radians params%r1 = 0.03 ! Inner radius at reference location [m] params%r2 = 0.05 ! Outer radius at reference location [m] params%zmax = +5.0, ! Boundary 2 (right) params%zmin = -5.0, ! Boundary 1 (left) ! Physics: ! ====================== params%iSave = .true., params%iPush = .false., ! Enable RK4 particle pusher params%iColl = .true., ! Collisions or no collisions Loading @@ -25,12 +39,6 @@ params%iHeat = .false., params%iPotential = .false., ! Enable electric potential params%iDrag = .false., ! Enable plasma drag ! Time steps to record: ! ============== params%jstart = 1, ! start frame params%jend = 5000, ! end frame params%jincr = 50, ! increment ! Collision operator conditions: ! ============================== params%Te0 = 10., ! eV Loading
InputFiles/xp_TestDrag.in +58 −50 Original line number Diff line number Diff line ¶ms_nml ! Simulation name: ! =============== params%fileDescriptor = '2021_02_17b', params%fileDescriptor = '2021_02_17c', ! Magnetic field input data: ! ========================= Loading @@ -15,9 +15,23 @@ params%nz = 501, params%NC = 70000, ! Total number of particles params%NS = 10000, ! Total number of time steps params%dt = 0.5E-7, ! Time step in [s] params%zmax = +5.0, params%zmin = -5.0, ! Time steps to record: ! ==================== params%jstart = 1, ! start frame params%jend = 10000, ! end frame params%jincr = 250, ! increment ! Domain geometry: ! ==================== params%dtheta = 6.2832 ! Radians params%r1 = 0.03 ! Inner radius at reference location [m] params%r2 = 0.05 ! Outer radius at reference location [m] params%zmax = +5.0, ! Boundary 2 (right) params%zmin = -5.0, ! Boundary 1 (left) ! Physics: ! ====================== params%iSave = .true., params%iPush = .true., ! Enable RK4 particle pusher params%iColl = .true., ! Collisions or no collisions Loading @@ -25,12 +39,6 @@ params%iHeat = .true., params%iPotential = .false., ! Enable electric potential params%iDrag = .true., ! Enable plasma drag ! Time steps to record: ! ============== params%jstart = 1, ! start frame params%jend = 10000, ! end frame params%jincr = 250, ! increment ! Collision operator conditions: ! ============================== params%Te0 = 10., ! eV Loading
src/Modules.f90 +41 −22 Original line number Diff line number Diff line Loading @@ -216,32 +216,46 @@ USE spline_fits IMPLICIT NONE TYPE paramsTYP CHARACTER*150 :: fileDescriptor, repoDir CHARACTER*150 :: BFieldFile, BFieldFileDir REAL(r8) :: Ti0, Te0, ne0, dt REAL(r8) :: Aion, Zion INTEGER(i4) :: NC, NS, nz, species_a, species_b ! Simulation name: CHARACTER*150 :: fileDescriptor ! Magnetic field input data: CHARACTER*150 :: repoDir, BFieldFile, BFieldFileDir INTEGER(i4) :: nz ! Simulation conditions: INTEGER(i4) :: NC, NS REAL(r8) :: dt ! Time steps to record: INTEGER(i4) :: jstart, jend, jincr INTEGER(i4) :: threads_given ! Domain geometry: REAL(r8) :: zmin, zmax, dtheta, r1, r2, Area0 ! Physics: LOGICAL :: iDrag, iPotential, iSave, iPush, iHeat, iColl INTEGER(i4) :: IC_Type, BC_Type REAL(r8) :: IC_zp_mean, IC_Ep, IC_xip, IC_zp_std, IC_Tp ! Collision operator conditions: REAL(r8) :: Ti0, Te0, ne0, elevel REAL(r8) :: Aion, Zion, Ma, qa INTEGER(i4) :: species_a, species_b, CollOperType ! Particle boundary conditions: INTEGER(i4) :: BC_Type REAL(r8) :: BC_zp_mean, BC_Ep, BC_xip, BC_zp_std, BC_Tp REAL(r8) :: zmin, zmax INTEGER(i4) :: CollOperType REAL(r8) :: elevel REAL(r8) :: s1, s2, s3, phi1, phi2, phi3 ! Initial conditions: INTEGER(i4) :: IC_Type REAL(r8) :: IC_zp_mean, IC_Ep, IC_xip, IC_zp_std, IC_Tp ! RF heating operator conditions: REAL(r8) :: f_RF, kpar, kper, Ew, zRes1, zRes2 INTEGER(i4) :: n_harmonic REAL(r8) :: tComputeTime, tSimTime ! Variables to hold cpu time at start and end of computation REAL(r8) :: Ma, qa ! Electric potential conditions: REAL(r8) :: s1, s2, s3, phi1, phi2, phi3 ! Compute time data: INTEGER(i4) :: threads_given REAL(r8) :: tComputeTime, tSimTime END TYPE paramsTYP TYPE plasmaTYP REAL(r8) , DIMENSION(:), ALLOCATABLE :: zp, kep, xip, a INTEGER(i4), DIMENSION(:), ALLOCATABLE :: f1 , f2 , f3 , f4 REAL(r8) , DIMENSION(:), ALLOCATABLE :: dE1, dE2, dE3, dE4, dE3_hat REAL(r8) , DIMENSION(:), ALLOCATABLE :: tau, Jm, rL, doppler REAL(r8) , DIMENSION(:), ALLOCATABLE :: dErf_hat, doppler REAL(r8) , DIMENSION(:), ALLOCATABLE :: NR , NSP REAL(r8) , DIMENSION(:), ALLOCATABLE :: Eplus, Eminus REAL(r8) , DIMENSION(:), ALLOCATABLE :: Ndot1, Ndot2, Ndot3, Ndot4 Loading Loading @@ -270,7 +284,7 @@ SUBROUTINE InitPlasma(plasma,params) ALLOCATE(plasma%zp(NC) ,plasma%kep(NC) ,plasma%xip(NC),plasma%a(NC) ) ALLOCATE(plasma%f1(NC) ,plasma%f2(NC) ,plasma%f3(NC) ,plasma%f4(NC) ) ALLOCATE(plasma%dE1(NC) ,plasma%dE2(NC) ,plasma%dE3(NC),plasma%dE4(NC)) ALLOCATE(plasma%tau(NC),plasma%Jm(NC) ,plasma%rL(NC) ,plasma%doppler(NC)) ALLOCATE(plasma%dErf_hat(NC),plasma%doppler(NC)) ALLOCATE(plasma%NR(NS) ,plasma%NSP(NS) ) ALLOCATE(plasma%Eplus(NS),plasma%Eminus(NS) ) Loading @@ -279,6 +293,11 @@ SUBROUTINE InitPlasma(plasma,params) ALLOCATE(plasma%dE3_hat(NC),plasma%Edot3_hat(NS)) ! Initialize variables: plasma%f1 = 0.; plasma%f2 = 0.; plasma%f3 = 0.; plasma%f4 = 0. plasma%dE1 = 0.; plasma%dE2 = 0.; plasma%dE3 = 0.; plasma%dE4 = 0. plasma%dErf_hat = 0.; plasma%doppler = 0.; END SUBROUTINE InitPlasma ! -------------------------------------------------------------------------- Loading