Commit 756aae1f authored by Martin Glatzle's avatar Martin Glatzle

Update computation of photodetachment x-sections.

parent 99899483
......@@ -92,7 +92,7 @@ def EA(Z, a, species):
(Z - 0.5) * const.elementary_charge ** 2 / \
(4 * const.pi * const.epsilon_0 * a)
else:
raise Exception("Can't compute EA for positive charges.")
raise ValueError("Can't compute EA for positive charges.")
def Emin(Z, a):
......@@ -237,6 +237,9 @@ def YandEavg(e, Z, a, species):
def sigmaPdt(e, Z, a, species):
"""
Photodetachment cross section.
"""
if Z < 0:
x = xPdt(e, Z, a, species)
if x > 0:
......
......@@ -1090,4 +1090,30 @@ def YandEavgTotal(e, Z, a, species):
return y, en
#############################################################################
# photodetachment x-section, different from wd2001b because Emin is different
def sigmaPdt(e, Z, a, species):
"""
Photodetachment cross section.
"""
if Z < 0:
x = xPdt(e, Z, a, species)
if x > 0:
return 1.2 * 10**-21 * np.fabs(Z) * x/(1 + x**2/3.0)**2
else:
return 0
else:
return 0
def xPdt(e, Z, a, species):
return (e - hnuPdt(Z, a, species))/tools.eVtoJ(3)
def hnuPdt(Z, a, species):
return wd2001b.EA(Z+1, a, species) + Emin(Z, a)
#############################################################################
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment