示例#1
0
def compute_dr(z, dr_type, path=""):
    """
    Main routine, computes DR for given element and recombination process
    """
    elem = fac.ATOMICSYMBOL[z]
    # Initialise
    fac.Reinit()
    fac.SetAtom(elem)
    # Execute problem specific configuration
    type_name = dr_type()
    # Generate filenames
    f_stub = path + elem + "_" + type_name
    f_lev = f_stub + ".lev"
    f_lev_b = f_lev + ".b"  # temp binary
    f_tr = f_stub + ".tr"
    f_tr_b = f_tr + ".b"  # temp binary
    f_ai = f_stub + ".ai"
    f_ai_b = f_ai + ".b"  # temp binary
    # Start solving
    fac.ConfigEnergy(0)
    # According to the manual we should Optimize on the recombined ion
    # (have seen other things out in the wild)
    fac.OptimizeRadial(["final"])
    fac.ConfigEnergy(1)
    # Compute structure and energy levels
    fac.Structure(f_lev_b, ["initial", "transient", "final"])
    fac.MemENTable(f_lev_b)
    fac.PrintTable(f_lev_b, f_lev, 1)
    # Compute the transisiton table for radiative decay
    # Transition Table defaults to m=0 since FAC1.0.7 (not in current docs)
    # which computes all multipoles according to new (unreleased) docs
    fac.TransitionTable(f_tr_b, ["final"], ["transient"])
    fac.PrintTable(f_tr_b, f_tr, 1)
    # Compute the Autoionisation table
    fac.AITable(f_ai_b, ["transient"], ["initial"])
    fac.PrintTable(f_ai_b, f_ai, 1)
    # Clean up
    for f in [f_lev_b, f_tr_b, f_ai_b]:
        try:
            os.remove(f)
        except OSError as e:  ## if failed, report it back to the user ##
            print("Error: %s - %s." % (e.filename, e.strerror))
    print("Element:" + elem + " DR: " + type_name + " done.")
示例#2
0
from pfac import fac
import os

fac.SetAtom('Fe')
fac.Closed('1s')

##Set the target configurations
#fac.Config('T1', '2*7')
#fac.Config('T2', '2*6 3*1')
#fac.Config('T31.4s', '2s2 2p4 4s1')
#fac.Config('T31.4p', '2s2 2p4 4p1')
#fac.Config('T31.4d', '2s2 2p4 4d1')
#
#fac.Config('T32.4s', '2s1 2p5 4s1')
#fac.Config('T32.4p', '2s1 2p5 4p1')
#fac.Config('T32.4d', '2s1 2p5 4d1')
#
##CI
#fac.Config('T31.4f', '2s2 2p4 4f1')
#fac.Config('T32.4f', '2s1 2p5 4f1')
#fac.Config('T33.4*', '2p6 4*1')

#Set the bound configurations
fac.Config('T1.2*', '2*8')
fac.Config('T1.3*', '2*7 3*1')
fac.Config('T1.4*', '2*7 4*1')
fac.Config('T1.5*', '2*7 5*1')
fac.Config('T1.6*', '2*7 6*1')
fac.Config('T1.7*', '2*7 7*1')
fac.Config('T1.8*', '2*7 8*1')
fac.Config('T1.9*', '2*7 9*1')
示例#3
0
""" calculate the autoionization rates for Ne-like Se.
"""

# import the modules
from pfac import fac

fac.SetAtom('Se')

# configurations for the F-like ion
fac.Closed('1s')
fac.Closed('2s')
fac.Config('2p5', group='n2')

# configurations of doubly excited Ne-like ion
fac.Config('2p4 3s2', '2p4 3s1 3p1', group='n33')

fac.ConfigEnergy(0)
fac.OptimizeRadial('n33')
fac.ConfigEnergy(1)
fac.Structure('se.lev.b', ['n2'])
fac.Structure('se.lev.b', ['n33'])
fac.MemENTable('se.lev.b')
fac.PrintTable('se.lev.b', 'se.lev', 1)

fac.AITable('se.ai.b', ['n33'], ['n2'])
fac.PrintTable('se.ai.b', 'se.ai', 1)
示例#4
0
#30
from pfac import fac
import time
start = time.clock()

fac.SetUTA(0)
fac.SetAtom('Ho')
fac.Closed('1s', '2s', '2p', '3s', '3p', '3d', '4s')

fac.Config('4p6 4d2', group='Gnd.0')
fac.Config('4p5 4d3', group='Gnd.1')
fac.Config('4p6 4d1 4f1', group='Gnd.3')
fac.Config('4p5 4d2 4f1', group='Exc.1')
fac.Config('4p4 4d4', group='Exc.2')
fac.Config('4p6 4d0 4f2', group='Exc.3')

fac.ConfigEnergy(0)
fac.OptimizeRadial(['Gnd.0'])
fac.ConfigEnergy(1)

fac.Structure('Ho.lev.b',
              ['Gnd.0', 'Gnd.1', 'Gnd.3', 'Exc.1', 'Exc.2', 'Exc.3'])

fac.MemENTable('Ho.lev.b')
fac.TransitionTable('Ho.tr.b', ['Gnd.1'], ['Exc.1'], -1)
fac.TransitionTable('Ho.tr.b', ['Gnd.1'], ['Exc.2'], -1)
fac.TransitionTable('Ho.tr.b', ['Gnd.3'], ['Exc.3'], -1)

fac.PrintTable('Ho.lev.b', 'Ho30.lev', 1)
fac.PrintTable('Ho.tr.b', 'Ho30.tr', 1)
示例#5
0
from pfac import fac
import time

print 'Be-like C III'

t = str(time.localtime())
print 'Script started at', t

# Atomic Structure

print 'calculating atomic structure'

fac.SetAtom('C')

fac.Config('1s2 2s', group='lithium')
fac.Config('1s2 2*2', group='ground')

fac.Config('1s2 2*1 3*1', group='2exc3')
fac.Config('1s2 2*1 4*1', group='2exc4')
fac.Config('1s2 2*1 5*1', group='2exc5')

fac.Config('1s 2*3', group='1exc2')
fac.Config('1s 2*2 3*1', group='1exc3')
fac.Config('1s 2*2 4*1', group='1exc4')
fac.Config('1s 2*2 5*1', group='1exc5')

fac.ConfigEnergy(0)
fac.OptimizeRadial(['ground'])
fac.ConfigEnergy(1)

fac.Structure('beb.en', ['ground'])