Differents grains

32 views
Skip to first unread message

Gabriel Rubio

unread,
Sep 23, 2019, 5:31:24 PM9/23/19
to pyCloudy

Hi everyone! It´s my first time with pycloudy, I have a question: how can I include two different grains? I'm thinking about silicates and PAHs in differents propoprtions Thank you so mcuch.

Christophe Morisset

unread,
Sep 24, 2019, 11:11:27 AM9/24/19
to pyCloudy
Hi Gabriel,

Great you find some interest in using pyCloudy.
You can add as amny dust grain description as you need by calling the set_grains method with a list of grains commands (without "grains" keyword) or various times.

import pycloudy as pc
cinput = pc.CloudyInput()
...
cinput.set_grains('graphite 2')
cinput.set_grains('silicate 3')

or

cinput.set_grains(['graphite 2', 'silicate 3')

If you need to reset the grains commands to empty, call set_grains without argument:
cinput.set_grains()

Hope it helps,
Cheers,
Chrisotphe

Christophe Morisset

unread,
Sep 24, 2019, 11:12:54 AM9/24/19
to pyCloudy
tipo in my previous email, sorry for that:

cinput.set_grains(['graphite 2', 'silicate 3')

must read:

cinput.set_grains(['graphite 2', 'silicate 3'])

Christophe
Reply all
Reply to author
Forward
0 new messages