コード例 #1
0
ファイル: namelist.py プロジェクト: bbw7561135/CR_SPECTRA
###############################################################################
NX = 11  # 2**NX is the X-size of the grid
NE = 7  # 2**NE is the E-size of the grid

Xmin = 0. * cst.pc
Xmax = 2000. * cst.pc
xgridtype = "cartesian"  #"cartesian" # No choice

Emin = 0.99 * cst.GeV
Emax = 50.01 * cst.TeV
egridtype = "logspace"  # Type of grid - # logspace type recomended (only option for the moment)

box_center = 1000. * cst.pc  # Position of the center of the CR source

# Phase space
X = grid.grid(Xmin, Xmax, 2**NX, xgridtype, s_center=box_center)
E = grid.grid(Emin, Emax, 2**NE, egridtype)

###############################################################################
#       OTHER TERMS                                                           #
###############################################################################
in_damping = True  # Ion neutral damping of waves
lz_damping = True  # Lazarian damping of waves
nlld_damping = True  # Non-linear Landau damping of waves (Wiener et al. 2013)
Pcr_1GeV = 1 * cst.eV  # [erg cm^-3] CR background pressure at 1 GeV
Pe_1GeV = 1e-2 * cst.eV  # [erg cm^-3] e- background pressure at 1 GeV
bdiff_model = "ISM_independant"  #ISM_(independant, dependant)

###############################################################################
#        ISM STRUCTURE                                                        #
###############################################################################
コード例 #2
0
Xmin = 0. * cst.pc
Xmax = 2000. * cst.pc
xgridtype = "cartesian"  #"cartesian" # No choice

Emin = 10. * cst.GeV
Emax = 10. * cst.TeV
egridtype = "logspace"  # Type of grid - # logspace type recomended (only option for the moment)

box_center = 1000. * cst.pc  # Position of the center of the CR source

# Phase space
X = grid.grid(Xmin,
              Xmax,
              2**NX,
              xgridtype,
              s_center=box_center,
              width=200. * cst.pc,
              smooth=20. * cst.pc,
              dXmin=1. * cst.pc)
E = grid.grid(Emin, Emax, 2**NE, egridtype)

###############################################################################
#       OTHER TERMS                                                           #
###############################################################################
in_damping = True  # Ion neutral damping of waves
lz_damping = True  # Lazarian damping of waves
nlld_damping = True  # Non-linear Landau damping of waves (Wiener et al. 2013)
Pcr_1GeV = 1 * cst.eV  # [erg cm^-3] CR background pressure at 1 GeV
Pe_1GeV = 1 * cst.eV  # [erg cm^-3] e- background pressure at 1 GeV
bdiff_model = "ISM_independant"  #ISM_(independant, dependant)
コード例 #3
0









# We create the energy grid 
NE        = 10  # 2**NE is the E-size of the grid
Emin      = 0.99*cst.GeV
Emax      = 100.01*cst.TeV
egridtype = "logspace" # Type of grid - # logspace type recomended (only option for the moment)
E = grid.grid(Emin, Emax, 2**NE, egridtype)  




phases = [ism.HII, ism.WIM, ism.WNM, ism.CNM, ism.DiM, ism.DeM, ism.DeC]

xlim   = [Emin/cst.GeV, Emax/cst.GeV]
xlims  = [xlim, xlim, xlim, xlim, xlim, xlim, xlim]

ylim  = [1e-14, 1e-3]
ylims = [ylim, ylim, ylim, ylim, ylim, ylim, ylim]

Name = ["HII", "WIM", "WNM", "CNM", "DiM", "DeM", "DeC"]

size_x = 4