Traditional H II region

In this example we model an H II region. In this case we give only the prompted values. This illustrates the use of a blackbody spectrum, with temperature given in keV, and non-solar abundances.

xstar cfrac=1 temperature=1 density=1e2 spectrum='bbody' trad=4e-3
rlrad38=12.7 column=1e23 rlogxi=0.15 abundtbl='xdef' cabund=0.60
nabund=0.36 oabund=0.47 neabund=1.79 mgabund=0. siabund=0.0
sabund=5.63 arabund=0.0 caabund=0 feabund=0 niabund=0 modelname='H
II region' niter=0

We now look at the ion abundance of hydrogen and helium as a function of radius.

>>> import matplotlib.pyplot as plt
>>> from astropy.io import fits
>>> import numpy as np
>>> hdul= fits.open('xout_abund1.fits')
>>> abund=hdul[1].data
>>> hdul.close()
>>> plt.plot(abund['radius'], abund['h_i'])
>>> plt.plot(abund['radius'], abund['he_i'])
>>>
>>> plt.legend(['H I', 'He I'])
>>> plt.xscale("log")
>>> plt.xlabel("radius")
>>> plt.ylabel("Ion fraction")
>>> plt.show()
../_images/hii.png