Table of Contents

g2c3.in

A sample g2c3.in file:

g2c3.in
&input_parameters
 
! control parameters
  gfilename=0           ! 0 for D3D; 1 for Aditya
  solvertest=0          ! 1 for testing 2D-FEM Poisson solver
  FEM_Order=1           ! 1 for First order and 2 for Second Order FEM 
  eqprofile=1           ! 0 for uniform; 1 for cyclone
  irun=0                ! 0 for initial run, non-zero for restart
  max_iteration=3000    ! # of ions and field time steps
  snap_interval=100     ! # of snapshots
  ndiag=10              ! do diagnosis when mod(istep,ndiag)=0
  tstep=0.02            ! time step size
  nbound=5              ! # of radial cells subjeted to BC
 
! thermal (main) ion 
  micell=250000         ! # of ions per grid per particle domain
  aion=1.0              ! ion mass, unit=proton mass
  qion=1.0              ! ion charge, unit=proton charge
  ngyroi=1              ! N-poit gyro-averaging: N = 1, 4 or 8
  qelectron=-1.0        ! electron charge
 
! simulation_grid_input
  psi0=0.3              ! psi at inner flux surface normalized with psi_sep
  psi1=0.9              ! psi at outer flux surface normalized with psi_sep
  mpsicore=50           ! # of simulation grids allong psi in the core region
  mpsisol=200           ! # of simulation grids allong psi in SOL region
  mthetaRZ=0.2          ! resolution of poloidal grids
  deltas_sim=0.005      ! poloidal grid size
  deltas_factor=10      ! factor to build finer grid 
 
! toroidal grid number
  mtoroidal=32          ! # of toroidal grids
 
! physical unit for equilibrium
  etemp0=1689.46                ! on-axis electron temperature in eV
 
! Additional simulation parameters
  flag_smooth=1         ! 0 for no smoothing; 1 for smoothing
  flag_para_smooth=0    ! 0 to disbale and 1 to enable parallel smoothing
  flag_filter=0         ! 0 to disable and 1 to enable filter
  flag_profile=1        ! 0 cyclone profile and 1 to load 'dat/profile.in' 
  flag_fullf=0          ! 0 for delta-f; 1 for full-f
 
  ipert=0               ! 0 for uniform loading; 1 for perturbed loading
 
! Neural Network parameters
 
  NNdsIterations=20000
/

Following is the FORTRAN subroutine to read the g2c3.in file:

read_g2c3_in
!=================================================================================
 
subroutine read_g2c3_in
 
   use global_parameters
   use cylindricalRZ
   use particle_array
   use system_env
   use write_data_module
   use mpi_module
 
   implicit none  
   logical :: file_exist
   integer :: ierror,micell
   namelist /input_parameters/ &
              gfilename,solvertest,FEM_Order,eqprofile,irun,snap_interval,&
              ndiag,tstep,nbound,micell,aion,qion,ngyroi,max_iteration,&
              qelectron,psi0,psi1,mpsicore,mpsisol,mthetaRZ,&
              deltas_sim,deltas_factor,mtoroidal,etemp0,&
              flag_smooth,flag_para_smooth,flag_filter,flag_profile,&
              flag_fullf,ipert,NNdsIterations
 
 
   ! master process sets default values and reads input file.
   if(mype==0)then
 
     ! check whether the input file exists
     inquire(file='./dat/G2C3.in',exist=file_exist)
     if(file_exist) then
       open(55,file='./dat/G2C3.in',status='old')
       read(55,nml=input_parameters,iostat=ierror)
       if(ierror>0)  call write_g2c3_comment('WARNING(#1): Check G2C3.in')
       close(55)
     else
       call write_g2c3_comment('ERROR(#1): Cannot find file G2C3.in !!!')
       ! call setup_finalize
       stop
     endif
 
     ! approximate # of particles per cell
     mi=micell
 
     if(gfilename==1)etemp0=etemp0/10.0
 
   endif
 
   ! broadcast the input parameters to other MPI processes
   call mpi_bcast_g2c3_in
 
end subroutine read_g2c3_in
 
!=================================================================================