Exemplo n.º 1
0
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)

###############################################################################
#        ISM STRUCTURE                                                        #
###############################################################################
phases = []  # Phases list
# Append phases in the order of the setup you want to create
# phases.append([ism.WNM, dict(Xmin=0.*cst.pc,    Xmax=300.*cst.pc),  getVA(E, ism.WNM)])
# phases.append([ism.CNM, dict(Xmin=300.*cst.pc,  Xmax=500.*cst.pc),  getVA(E, ism.CNM)])
# phases.append([ism.DiM, dict(Xmin=500.*cst.pc,  Xmax=600.*cst.pc),  getVA(E, ism.DiM)])
# phases.append([ism.CNM, dict(Xmin=600.*cst.pc,  Xmax=800.*cst.pc),  getVA(E, ism.CNM)])
# phases.append([ism.WNM, dict(Xmin=800.*cst.pc,  Xmax=950.*cst.pc),  getVA(E, ism.WNM)])
# phases.append([ism.HII, dict(Xmin=950.*cst.pc,  Xmax=1050.*cst.pc), getVA(E, ism.HII)])
# phases.append([ism.WNM, dict(Xmin=1050.*cst.pc, Xmax=1200.*cst.pc), getVA(E, ism.WNM)])
# phases.append([ism.CNM, dict(Xmin=1200.*cst.pc, Xmax=1400.*cst.pc), getVA(E, ism.CNM)])
# phases.append([ism.DiM, dict(Xmin=1400.*cst.pc, Xmax=1500.*cst.pc), getVA(E, ism.DiM)])
# phases.append([ism.CNM, dict(Xmin=1500.*cst.pc, Xmax=1700.*cst.pc), getVA(E, ism.CNM)])
# phases.append([ism.WNM, dict(Xmin=1700.*cst.pc, Xmax=2000.*cst.pc), getVA(E, ism.WNM)])

phases.append([ism.WNM, dict(Xmin=Xmin, Xmax=Xmax), getVA(E, ism.WNM)])

smooth_width_transition = 10. * cst.pc  # Smooth width transition between two phases (10 pc min to avoid jumps)

# We calculate the smoothed variables
T, B, ni, nn, nt, Xi, mi, mn, va = mh.SmoothPhaseTransition(
    X, E, phases, smooth_width_transition)
# ISM secondary variables
ism_values = dict(T=T, B=B, ni=ni, nn=nn, nt=nt, X=Xi, mi=mi, mn=mn, VA=va)
Exemplo n.º 2
0
    getDamping(E, ism.CNM)[0],
    getDamping(E, ism.CNM)[1]
])
phases.append([
    ism.WNM,
    dict(Xmin=1130. * cst.pc, Xmax=2000. * cst.pc),
    getVA(E, ism.WNM),
    getDamping(E, ism.WNM)[0],
    getDamping(E, ism.WNM)[1]
])
smooth_width_transition = [
    10. * cst.pc, 3. * cst.pc, 3. * cst.pc, 10. * cst.pc, 10. * cst.pc,
    3. * cst.pc, 3. * cst.pc, 10. * cst.pc
]

# We calculate the smoothed variables
T, B, ni, nn, nt, Xi, mi, mn, va, gamma_in, gamma_lz = mh.SmoothPhaseTransition(
    X, E, phases, smooth_width_transition)
# ISM secondary variables
ism_values = dict(T=T,
                  B=B,
                  ni=ni,
                  nn=nn,
                  nt=nt,
                  X=Xi,
                  mi=mi,
                  mn=mn,
                  VA=va,
                  gamma_in=gamma_in,
                  gamma_lz=gamma_lz)