pyCloudy input file commands

191 views
Skip to first unread message

sherry yeh

unread,
May 29, 2020, 8:50:33 PM5/29/20
to pyCloudy
Hi All, 

I have a couple of questions regarding setting up geometry, ionizing source, and save commands in pyCloudy.

1. How to set up a cylindrical geometry in pyCloudy? Would it be something like c_input.set_cylinder() ? 
2. I use customized stellar atmospheric models in Cloudy as my ionizing source. How do I read in customized models in pyCloudy? 
3. I need to save specific emission line fluxes, and in Cloudy I do "save line list". In my pyCloudy-generated input files I saw a series of save commands such as "save last overview ".ovr" ", but I couldn't find where it came from.   


Thanks for your help, I am excited to run C3D once I have C1D set up correctly. 


-Sherry

Christophe Morisset

unread,
May 29, 2020, 9:24:07 PM5/29/20
to pyCloudy

Hi Sherry,


Great you appreciate using pyCloudy!


Hi All, 

I have a couple of questions regarding setting up geometry, ionizing source, and save commands in pyCloudy.

1. How to set up a cylindrical geometry in pyCloudy? Would it be something like c_input.set_cylinder() ? 
 

Anything that is not in a predefined method in the CloudyInput class can be set up using the set_others() method:

c_input.set_other(('no molecules',
                   'no level2 lines',
                   'no fine opacities',
                   'atom h-like levels small',
                   'atom he-like levels small',
                   'COSMIC RAY BACKGROUND',
                   'element limit off -8',
'cylinder log semi height=9.12',
 ))
 
2. I use customized stellar atmospheric models in Cloudy as my ionizing source. How do I read in customized models in pyCloudy? 
Use the set_star method, as in:

c_input.set_star(SED = 'table Rauch', SED_params = (60000, 6.0), lumi_unit='luminosity solar log', lumi_value=55)

3. I need to save specific emission line fluxes, and in Cloudy I do "save line list". In my pyCloudy-generated input files I saw a series of save commands such as "save last overview ".ovr" ", but I couldn't find where it came from.   

You may use the set_line_file, as in

c_input.set_line_file(line_file = 'mylinelist.dat', absolute=False)

In a more general way, you can explore all the methods of the CloudyInput class using the help command:

help(pc.CloudyInput)
help(pc.CloudyModel)

etc.

Thanks for your help, I am excited to run C3D once I have C1D set up correctly. 


-Sherry

Hope it helps,
Christophe

sherry yeh

unread,
May 29, 2020, 10:26:52 PM5/29/20
to pyCloudy
Hi Christophe,

Thanks for your prompt reply, very helpful! 

For input ionizing source I actually need table star "model.dat" <temperature> <log_surface_gravity>. set_star did not include "table star" in the line so Cloudy complained. How do I call the table star function? 

Thanks,
Sherry

Christophe Morisset

unread,
May 29, 2020, 10:41:49 PM5/29/20
to pyCloudy
Hi Sherry,

You may try:
c_input.set_star(SED = 'table star "model.dat", SED_params = (temperature, logg), lumi_unit='luminosity solar log', lumi_value=55))

If this does not work, you can always put the information in the set_others method, which accept any command. Take care to also put the luminosity information in the set_others, as Cloudy likes having both information close together.

Hope it solves the problem,
Saludos,
Christophe


Reply all
Reply to author
Forward
0 new messages