Пример #1
0
# Tabulated EOS stuff
GAMMA = 4. / 3.
TABLE = '-table' in sys.argv
EOS = "EOS_TYPE_TABLE" if TABLE else "EOS_TYPE_GAMMA"
NVAR_PASSIVE = 2 if TABLE else 0
M_UNIT = 1.
L_UNIT = 1.e-2
RHOMIN, RHOMAX, NRHO = 1e-7, 1e2, 234
UMIN, UMAX, NU = 1e-7, 1e2, 136
YEMIN, YEMAX, NYE = 0.0, 0.55, 50
CRASH_ON_SOUND_SPEED = False
if TABLE:
    sys.path.append('../../script/analysis')
    import make_tabulated_gamma as tab
    tablepath = tab.make_filename(GAMMA)
    units = tab.UnitSystem(M_UNIT, L_unit=L_UNIT)
    tab.make_table_u(RHOMIN, RHOMAX, NRHO, UMIN, UMAX, NU, YEMIN, YEMAX, NYE,
                     units, GAMMA, tablepath, CRASH_ON_SOUND_SPEED)

    ### COMPILE TIME PARAMETERS ###

# SPATIAL RESOLUTION AND MPI DECOMPOSITION
bhl.config.set_cparm('N1TOT', 64)
bhl.config.set_cparm('N2TOT', 64)
bhl.config.set_cparm('N3TOT', 64)
bhl.config.set_cparm('N1CPU', 1)
bhl.config.set_cparm('N2CPU', 1)
bhl.config.set_cparm('N3CPU', 1)

# OPENMP PARALLELIZATION
bhl.config.set_cparm('OPENMP', True)
Пример #2
0
M_UNIT = 8.e23
EOS = "EOS_TYPE_TABLE" if GAMTABLE else "EOS_TYPE_GAMMA"
NVAR_PASSIVE = 1 if GAMTABLE else 0
GAMMA_FALLBACK = GAMTABLE

RHOMIN, RHOMAX, NRHO = 1e-16, 1e5, 400
UMIN, UMAX, NU = 1e-16, 1e5, 200
YEMIN, YEMAX, NYE = 0.0, 0.6, 50
CRASH_ON_SOUND_SPEED = False

if GAMTABLE:
    sys.path.append('../../script/analysis')
    import make_tabulated_gamma as tab
    tablepath = tab.make_filename(GAMMA)
    units = tab.UnitSystem(M_UNIT, Mbh=MBH)
    tab.make_table_u(RHOMIN, RHOMAX, NRHO, UMIN, UMAX, NU, YEMIN, YEMAX, NYE,
                     units, GAMMA, tablepath, CRASH_ON_SOUND_SPEED)

    ### COMPILE TIME PARAMETERS ###

NPH_TOT = 1.e5
N1CPU = 1
N2CPU = 4
N3CPU = 1
NTOTCPU = N1CPU * N2CPU * N3CPU

# SPATIAL RESOLUTION AND MPI DECOMPOSITION
bhl.config.set_cparm('N1TOT', 96)
bhl.config.set_cparm('N2TOT', 96)
bhl.config.set_cparm('N3TOT', 1)