pyTPCI is an improved version of The PLUTO-CLOUDY Interface, coupling together hydrodynamics code PLUTO and gas microphysics code CLOUDY.
- Make sure you have libhdf5-dev installed. On Ubuntu, you can do "sudo apt install libhdf5-dev"
- After cloning the pyTPCI directory to your computer, copy the
wrapperfolder for each instance of pyTPCI you wish to run. - Define the environment variable
PLUTO_DIRand run$PLUTO_DIR/setup.pyin your folder. Further customization of PLUTO takes place inpluto_template.ini. - Run
makeandmake cleanin your folder to produce the PLUTO executable. - Run
makeincloudy/sourceto producecloudy.exe.
pyTPCI runs PLUTO and then CLOUDY in alternating steps, transferring heating information between them with write_heating_file. In order to save computational power and improve speed,
by default pyTPCI only calls CLOUDY if there is at least a 10% maximum fractional difference (max_rel_diff) in density or pressure between PLUTO files.
- Create a stellar spectrum at the planet's surface (semimajor axis), with columns of log10(frequency (Hz)) and log10(F_nu), spectral irradiance (ergs/(s cm^2 Hz)). At the end this also contains the band-integrated flux at the planet's surface, and the energy range in Rydbergs. See
spectra_example.ini. - Edit
tpci.pyto set the system parameters: the stellar spectrum file, the semimajor axis, planet radius and mass, stellar mass, initial temperature, and metallicity. Upon running, this will generate a CLOUDYparams.hfile and an input script ending in.in. - Open
screenand runpython tpci.pyto start at t=0 and use the default timestep dt=0.01. If restarting from a previous pyTPCI run, instead dopython tpci.py global_ind time timestep, whereglobal_indis the number of the CLOUDY file you wish to start from. - Monitor pyTPCI's progress by plotting PLUTO and CLOUDY files using
plot.pyandcloudy_plot.py.
- To plot one file, run
python plot.py global_indwhereglobal_indis the number of the file, such as "54". - To plot multiple files, run
python plot.py start stop step, wherestartandstopare the initial and final file numbers to plot, with a givenstep. Plotting files will automatically skip file names that do not exist.
- pyTPCI run information is in
tpci_log.txt. - PLUTO output logs for each PLUTO run are appended in
pluto_log.txt - CLOUDY docs are in
cloudy/docsand PLUTO docs are inPLUTO/Doc
- Is the path to the
spectra.inifile correct? - Does
definitions.hcontain#include params.hat the top? - If CLOUDY crashes quickly, try using a smaller dt=0.001