calculating electron fraction vs. temperature

5 views
Skip to first unread message

Jonathan Slavin

unread,
Apr 17, 2023, 12:19:27 PM4/17/23
to chianti
Hi all,

I'd like to calculate the electron density/total density vs. temperature. So what I need is Sum(A_i*Sum(X_Z,i*Z)), where A_i is the abundance (relative to H) of element i, and X_Z,i is the ion fraction of ion stage Z (i.e. Z times ionized). It seems I could call ioneq for each element individually to get X_Z,i. Is there a way to do it for all the elements at once? 

I think I see now a way to do this, basically just loading the ioneq file, though maybe there's a more convenient method?

Jon

Peter Young

unread,
Apr 17, 2023, 4:05:08 PM4/17/23
to chianti
Hi Jon,

We don't have an IDL routine for doing this specifically, but you can get the ratio fairly easily by making use of the routine proton_dens. 

For example, for logT=6.0:

IDL> h_e_ratio=proton_dens(6.0,/hydrogen)

which gives the ratio of hydrogen (protons + neutral H) relative to electrons. To get the ratio of all elements relative to electrons, you then do:

IDL> read_abund,!abund_file,ab,ref
IDL> all_e_ratio=h_e_ratio * total(ab)

I get 0.923 when I do this.

Thanks, Peter
Reply all
Reply to author
Forward
0 new messages