'dust_source': 'ALL', 'reduce_sn_dust': 25, 'destroy': True, 'inflows':{'metals': 0., 'xSFR': 0.5, 'dust': 0}, 'outflows':{'metals': True, 'xSFR': 0.5, 'dust': True}, 'cold_gas_fraction': 0.5, 'epsilon_grain': 1000, 'destruct': 1000. } ] snrate = [] all_results = [] galaxies = [] for item in inits: ch = ChemModel(**item) ''' call modules to run the model: snrate: SN rate at each time step - this also sets time array so ch.supernova_rate() must be called first to set time array for the entire code all results: t, mg, m*, mz, Z, md, md/mz, sfr, dust_source(all), dust_source(stars), dust_source(ism), destruction_time, graingrowth_time ''' snrate = ch.supernova_rate() all_results = ch.gas_metal_dust_mass(snrate) # write all the parameters to a dictionary for each init set params = {'time' : all_results[:,0], 'mgas' : all_results[:,1],
'gasmass_init': 4e10, 'SFH': 'Milkyway.sfh', 't_end': 20., 'gamma': 0, 'IMF_fn': 'Chab', 'dust_source': 'ALL', 'reduce_sn_dust': False, 'destroy': True, 'inflows':{'metals': 0., 'xSFR': 0, 'dust': 0}, 'outflows':{'metals': True, 'xSFR': 0, 'dust': True}, 'cold_gas_fraction': 0.5, 'epsilon_grain': 1000., 'destruct': 1000. } ch = ChemModel(**inits) # call modules to run the model # SN rate at each time step - this also sets time array so # this must be run before ch.gas_metal_dust_mass snrate = ch.supernova_rate() # returns # (a) dust sources vs time (all, stars only and grain growth only) # (b) timescales for destruction & grain growth in Gyrs # (c) all results -- t, mg, m*, mz, Z, md, md/mz, sfr dust_sources, timescales, all_results = ch.gas_metal_dust_mass(snrate) time = all_results[:,0] mgas = all_results[:,1]