/home66/gary/public_html/cloudy/c08_branch/source/helike_energy.cpp

Go to the documentation of this file.
00001 /* This file is part of Cloudy and is copyright (C)1978-2008 by Gary J. Ferland and
00002  * others.  For conditions of distribution and use see copyright notice in license.txt */
00003 #include "cddefines.h"
00004 #include "physconst.h" 
00005 #include "iso.h"
00006 #include "helike.h"
00007 
00008 /*
00009   Energy order within 2 3P
00010 
00011   The order of the levels within the 2 3P level of atomic helium is opposite
00012   from the order within astrophysically abundant ions.  The indices below
00013   consistently point to the correct level, and the energies are correct,
00014   so the J levels within 2 3P are not in increasing energy order for helium itself. 
00015   This is ok since the atomic data is correct, and the difference in energies is so small.
00016 */
00017 
00018 /* Ionization potentials (in wavenumber) for each ion in the iso-seq up to Z=30.
00019  * These are exactly what you get if you take EionRYD below and multiply by RYD_INF.    */
00020 static double EionWN[LIMELM] =       
00021         /* the first, or H-like, element is not defined for he-like species */
00022         {-DBL_MAX,
00023         198310.6679     ,610003.839889137,1241136.72201499,2091948.45665631,3162116.52584231,
00024         4452446.95015668,5962133.81875305,7692790.05069734,9645221.44709864,11814589.7994457,
00025         14209766.0528639,16822685.5022862,19661412.9625169,22717883.6187518,26000162.0663204,
00026         29508248.5246975,33234078.1790787,37185715.7345311,41363161.0813172,45766414.4389118,
00027         50395475.4781030,55258409.0136949,60339085.8550283,65653635.1927626,71202056.8074231,
00028         76976286.4328920,82984388.3352872,89194104.5722390,95726403.3055320};
00029 
00030 /* Ionization potentials (in Rydbergs) for each ion in the iso-seq up to Z=30.  
00031  * These are exactly what you get if you take Verner's numbers in atmdat_ph1(0,1,nelem,0) 
00032  * and multiply by (0.9998787/EVRYD), exactly as is done elsewhere in Cloudy.   */
00033 static double EionRYD[LIMELM] =       
00034         /* the first, or H-like, element is not defined for he-like species */
00035         {-DBL_MAX,
00036         1.807387521,5.558764,11.310070,19.063237,28.815326,40.573682,54.330961,70.101861,
00037         87.893725,107.662464,129.488916,153.299590,179.167978,207.020588,236.930910,
00038         268.898946,302.851204,338.861175,376.928858,417.054255,459.237363,503.551674,
00039         549.850208,598.279945,648.840883,701.459535,756.209388,812.796486,872.323172};
00040 
00041 /* experimental energies, in wavenumbers, for atomic helium */
00042 #define NHE1LEVELS 111
00043 /* These energies from Drake 1996, except these divided by c */
00044 static double He1Energies[NHE1LEVELS] =
00045 {0.0       , 159855.9734, 166277.4390, 169087.8298, 169086.8417, 169086.7652, 171134.8957,
00046 183236.7908, 184864.8281, 185564.6657, 186101.5615, 186104.9656, 186209.3638, 190298.6619,
00047 190940.6075, 191217.0826, 191444.4868, 191446.4547, 191451.8805, 191451.8964, 191492.7108,
00048 193346.9900, 193663.5106, 193800.7280, 193917.1538, 193918.2888, 193921.1207, 193921.1298,
00049 193921.6166, 193921.6209, 193942.4612, 194936.1184, 195114.8672, 195192.7542, 195260.0724,
00050 195260.7694, 195262.4251, 195262.4307, 195262.7236, 195262.7261, 195262.7930, 195262.7947, 
00051 195274.9074, 195868.2357, 195978.8938, 196027.3216, 196069.6730, 196070.1273, 196071.1763,
00052 196071.1800, 196071.3686, 196071.3702, 196071.4141, 196071.4151, 196071.4283, 196071.4290,
00053 196079.0865, 196461.3605, 196534.5628, 196566.7159, 196595.0620, 196595.3730, 196596.0785,
00054 196596.0810, 196596.2092, 196596.2103, 196596.2404, 196596.2411, 196596.2503, 196596.2508,
00055 196596.2541, 196596.2544, 196601.3992, 196861.9861, 196912.9014, 196935.3339, 196955.2261,
00056 196955.4477, 196955.9445, 196955.9463, 196956.0373, 196956.0380, 196956.0595, 196956.0600,
00057 196956.0666, 196956.0670, 196956.0693, 196956.0696, 196956.0705, 196956.0707, 196959.6917,
00058 197145.2320, 197182.0643, 197198.3343, 197212.8252, 197212.9885, 197213.3513, 197213.3527,
00059 197213.4194, 197213.4200, 197213.4358, 197213.4362, 197213.4411, 197213.4414, 197213.4431,
00060 197213.4433, 197213.4440, 197213.4442, 197213.4445, 197213.4446, 197216.0885};
00061 /* Last energy is 10^1P.        */
00062 
00063 /* >>chng 05 sep 06, RP - update energies of excited states */
00064 #define NIONLEVELS 31
00065 /* These energies are from Chianti 5, up to 5^1P 
00066  * -1 is flag to use quantum defect routines instead 
00067  * >>refer He-like      Energies        Landi et al., 2005; ApJSS, in press 
00068  * >>refer He-like      Energies        Dere, K. P. et al. 1997, 
00069  * >>refercon    Astronomy and Astrophysics Suppl. Ser., Vol. 125, pp. 149-173 */
00070 static double IonEnergies[LIMELM-2][NIONLEVELS] = 
00071 {
00072 /* ipLITHIUM=2; */
00073 {0.00,  476034.98,      491374.60,      494266.57,      494261.17,      494263.44,      501808.59,
00074         554754.45,      558777.88,      559501.16,      561243.67,      561273.62,      561752.82,
00075         579981.33,      581596.77,      581886.34,      582613.64,      582630.95,      582642.97,
00076         582644.04,      582830.11,      591184.26,      591989.55,      592134.36,      592504.32,
00077         592514.43,      592520.11,      592521.11,      -1.00   ,       -1.00   ,       592634.91},
00078 /* ipBERYLLIUM=3;*/
00079 {0.00,  956502.00,      981178.00,      983366.00,      983355.00,      983370.00,      997454.00,
00080         1121184.00,     1127705.00,     1128300.00,     1131383.00,     1131462.00,     1132390.00,
00081         1175295.00,     1178005.00,     1178174.00,     1179451.00,     1179495.00,     1179515.00,
00082         1179514.00,     1179830.00,     1199650.00,     -1.00   ,       1201060.00,     1201702.00,
00083         1201800.00,     1201730.00,     1201742.00,     -1.00   ,       -1.00   ,       1201894.00},
00084 /* ipBORON=4;*/
00085 {0.00,  1601545.00,     1635720.00,     1636938.00,     1636922.00,     1636975.00,     1657980.00,
00086         1882740.00,     1891790.00,     1892221.00,     1896710.00,     1896836.00,     1898063.00,
00087         1976420.00,     -1.00   ,       1980291.11,     1982132.67,     1982220.00,     1982262.67,
00088         1982240.00,     1982762.00,     -1.00   ,       -1.00   ,       2020730.00,     2021700.00,
00089         -1.00   ,       2021665.71,     2021760.00,     2021770.00,     2021770.00,     2022044.00},
00090 /* ipCARBON=5;*/
00091 {0.00,  2411262.00,     2455024.00,     2455162.74,     2455150.23,     2455286.01,     2483371.00,
00092         2839562.00,     2851180.00,     2851418.00,     2857309.67,     2857529.00,     2859375.00,
00093         2983541.00,     -1.00   ,       2988359.00,     2990776.00,     2990923.00,     2990923.40,
00094         2990923.40,     2991710.00,     3048927.00,     -1.00   ,       3051332.00,     3052589.00,
00095         3052656.00,     3052653.30,     3052653.30,     3052659.40,     3052659.40,     3053044.00},
00096 /* ipNITROGEN=6;*/
00097 {0.00,  3385890.00,     3439274.00,     3438312.46,     3438321.13,     3438612.15,     3473790.00,
00098         3991860.00,     -1.00   ,       4006160.00,     4013460.00,     4013770.00,     4016390.00,
00099         4196800.00,     4202520.00,     4202620.00,     4205820.00,     4205830.00,     4205810.00,
00100         4205820.00,     4206810.00,     4290150.00,     4293020.00,     4293080.00,     4294570.00,
00101         4294670.00,     4294700.00,     4294700.00,     -1.00   ,       -1.00   ,       4296090.00},
00102 /* ipOXYGEN=7;*/
00103 {0.00,  4524640.00,     4588380.00,     4585620.76,     4585679.58,     4586231.19,     4629201.00,
00104         5338820.00,     5356420.00,     5355670.00,     5364422.67,     5365470.00,     5368550.00,
00105         5616340.00,     5623100.00,     5622600.00,     5626225.33,     5626670.00,     5626210.00,
00106         5626840.00,     5628100.00,     5742610.00,     -1.00   ,       5745440.00,     5747509.33,
00107         5748230.00,     5747200.00,     5747820.00,     -1.00   ,       -1.00   ,       5748450.00},
00108 /* ipFLUORINE=8;*/
00109 {0.00,  5830040.00,     5903100.00,     5900600.00,     5900750.00,     5901700.00,     5949900.00,
00110         6885090.00,     6903270.00,     6902560.00,     6914073.33,     6915900.00,     6916590.00,
00111         7244270.00,     -1.00   ,       7250390.00,     7255960.00,     7254240.00,     7256750.00,
00112         7257260.00,     7256370.00,     -1.00   ,       -1.00   ,       7410270.00,     7413940.00,
00113         7412290.00,     7414760.00,     7415300.00,     7414780.00,     -1.00   ,       7414000.00},
00114 /* ipNEON=9;*/
00115 {0.00,  7299940.00,     7382680.00,     7378205.53,     7378506.43,     7380050.00,     7436560.00,
00116         8623000.00,     8644880.00,     8644744.44,     8657128.67,     8662400.00,     8660530.00,
00117         9075200.00,     9084060.00,     9084141.11,     9090355.33,     -1.00   ,       9089800.00,
00118         9094400.00,     9090630.00,     9282200.00,     9286650.00,     9286713.33,     9288500.00,
00119         -1.00   ,       9289800.00,     9294400.00,     -1.00   ,       -1.00   ,       9290000.00},
00120 /* ipSODIUM=10;*/
00121 {0.00,  8935337.00,     9027981.00,     9022354.10,     9022876.10,     9025284.70,     9088700.00,
00122         10558946.00,    10583431.00,    10583323.56,    10596783.40,    10597475.00,    10601080.00,
00123         11115065.00,    11124986.00,    11125102.78,    11130639.00,    11131017.00,    11131051.00,
00124         11131056.00,    11132393.00,    11369887.00,    11374868.00,    11374959.89,    11377767.00,
00125         11377984.00,    11377987.00,    11377991.00,    -1.00   ,       -1.00   ,       11378646.00},
00126 /* ipMAGNESIUM=11;*/
00127 {0.00,  10736136.00,    10838778.00,    10831985.83,    10832819.18,    10836391.13,    10906612.00,
00128         12691170.00,    12718304.00,    12718286.89,    12733392.33,    12734298.00,    12738006.00,
00129         13361991.00,    13372977.00,    13373168.22,    13379472.60,    13379830.00,    13379893.00,
00130         13379898.00,    13381265.00,    13669618.00,    13675137.00,    13675269.22,    13678467.13,
00131         13678680.00,    -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       13679363.00},
00132 /* ipALUMINIUM=12;*/
00133 {0.00,  12703061.00,    12815760.00,    12807847.00,    12809088.00,    12814213.00,    12891081.00,
00134         15020463.00,    15050257.00,    15050434.00,    15067287.07,    15068371.00,    15072141.00,
00135         15816791.00,    15828851.00,    15829158.67,    15836125.13,    15836581.00,    -1.00   ,
00136         -1.00   ,       15838068.00,    16182216.00,    16188281.00,    16188471.33,    16192010.13,
00137         16192244.00,    -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       16192975.00},
00138 /* ipSILICON=13;*/
00139 {0.00,  14835945.00,    14958753.00,    14949756.42,    14951532.63,    14958690.57,    15042040.00,
00140         17546734.00,    17579166.00,    17579686.44,    17598406.93,    17599605.00,    17603422.00,
00141         18479389.00,    18492532.00,    18493007.56,    18500821.00,    18501245.00,    -1.00   ,
00142         -1.00   ,       18502736.00,    18907613.00,    18914246.00,    18914502.78,    18918476.30,
00143         18918694.00,    -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       18919421.00},
00144 /* ipPHOSPHORUS=14;*/
00145 {0.00,  17135768.00,    17268828.00,    17258746.00,    17261164.00,    17270908.00,    17360546.00,
00146         20271100.00,    20306284.00,    20307209.11,    20327865.87,    20329412.00,    20332952.00,
00147         21350958.00,    21365192.00,    21365892.89,    21374428.00,    21375044.00,    21375302.00,
00148         21375302.00,    21376454.00,    21846994.00,    21854144.00,    21854552.89,    21858894.80,
00149         21859210.00,    21859340.00,    21859340.00,    -1.00   ,       -1.00   ,       21859464.00},
00150 /* ipSULPHUR=15;*/
00151 {0.00,  19602076.00,    19745473.00,    19734297.61,    19737518.84,    19750576.04,    19846285.00,
00152         23193163.00,    23231087.00,    23232596.56,    23255347.53,    23257195.00,    23260416.00,
00153         24431101.00,    24446439.00,    24447429.78,    24456981.30,    24457576.00,    -1.00   ,
00154         -1.00   ,       24458842.00,    24999972.00,    25007605.00,    25008238.11,    25013102.40,
00155         25013407.00,    -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       25014007.00},
00156 /* ipCHLORINE=16;*/
00157 {0.00,  22236180.00,    22390000.00,    22377820.00,    22381940.00,    22399100.00,    22500680.00,
00158         26314360.00,    26355050.00,    26357324.44,    26382328.67,    26384530.00,    26387270.00,
00159         27720900.00,    27738000.00,    27738966.67,    27749520.00,    27750400.00,    27757331.14,
00160         27757178.00,    27751600.00,    28367700.00,    28376500.00,    28376977.78,    28382286.67,
00161         28382800.00,    -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       28383400.00},
00162 /* ipARGON=17;*/
00163 {0.00,  25038230.00,    25202480.00,    25189388.10,    25194588.99,    25216810.57,    25323950.00,
00164         29634850.00,    29678210.00,    29681541.11,    29713920.00,    29715070.00,    29713740.00,
00165         31221700.00,    31239280.00,    31241087.78,    -1.00   ,       -1.00   ,       -1.00   ,
00166         -1.00   ,       31254280.00,    31951370.00,    31960150.00,    31961182.22,    -1.00   ,
00167         -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       31967860.00},
00168 /* ipPOTASSIUM=18;*/
00169 {0.00,  28004980.00,    28180480.00,    28165880.00,    28172670.00,    28200800.00,    28312910.00,
00170         33151930.00,    33198090.00,    33202622.22,    -1.00   ,       -1.00   ,       33237140.00,
00171         -1.00   ,       34948420.00,    -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,
00172         -1.00   ,       34964920.00,    35747360.00,    35756712.00,    35758032.00,    -1.00   ,
00173         -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       35765192.00},
00174 /* ipCALCIUM=19;*/
00175 {0.00,  31142150.00,    31328450.00,    31312818.51,    31320486.08,    31356326.72,    31473810.00,
00176         36870940.00,    36919930.00,    36925900.00,    -1.00   ,       -1.00   ,       36962850.00,
00177         38850670.00,    38870530.00,    38873536.67,    -1.00   ,       -1.00   ,       -1.00   ,
00178         -1.00   ,       38888680.00,    39761380.00,    39771310.00,    39772968.89,    -1.00   ,
00179         -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       39780630.00},
00180 /* ipSCANDIUM=20;*/
00181 {0.00,  34448120.00,    34645360.00,    34628770.00,    34638550.00,    34682810.00,    34805000.00,
00182         40790620.00,    40842480.00,    40850158.89,    -1.00   ,       -1.00   ,       40889690.00,
00183         42983370.00,    43004390.00,    43008165.56,    -1.00   ,       -1.00   ,       -1.00   ,
00184         -1.00   ,       43024380.00,    43992240.00,    44002740.00,    44004803.33,    -1.00   ,
00185         -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       44013010.00},
00186 /* ipTITANIUM=21;*/
00187 {0.00,  37923880.00,    38131640.00,    38114760.00,    38125260.00,    38180620.00,    38308340.00,
00188         44911910.00,    44966970.00,    44976472.22,    45016028.67,    45021140.00,    45018670.00,
00189         47328500.00,    47351600.00,    47355644.44,    47372326.67,    47374500.00,    -1.00   ,
00190         -1.00   ,       47373500.00,    48440800.00,    48452600.00,    48454581.11,    -1.00   ,
00191         -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       48463700.00},
00192 /* ipVANADIUM=22;*/
00193 {0.00,  41568880.00,    41787830.00,    41770130.00,    41782100.00,    41849950.00,    41982380.00,
00194         49234710.00,    49292760.00,    49304574.44,    49347922.67,    49353910.00,    49349740.00,
00195         51886600.00,    51910900.00,    51915955.56,    51934113.33,    51936800.00,    -1.00   ,
00196         -1.00   ,       51935100.00,    53107300.00,    53119700.00,    53122217.78,    -1.00   ,
00197         -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       53132000.00},
00198 /* ipCHROMIUM=23;*/
00199 {0.00,  45384110.00,    45614410.00,    45595910.00,    45609360.00,    45691820.00,    45828830.00,
00200         53760100.00,    53821190.00,    53835660.00,    53883181.33,    53890160.00,    53884060.00,
00201         56658500.00,    56684100.00,    56690288.89,    56710306.67,    56713200.00,    -1.00   ,
00202         -1.00   ,       56710700.00,    57992700.00,    58005800.00,    58008904.44,    -1.00   ,
00203         -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       58019400.00},
00204 /* ipMANGANESE=24;*/
00205 {0.00,  49370240.00,    49612040.00,    49592800.00,    49607700.00,    49707130.00,    49848620.00,
00206         58488800.00,    58553000.00,    58570522.22,    58622620.00,    58630700.00,    58622500.00,
00207         61644700.00,    61671800.00,    61679233.33,    61701013.33,    61704700.00,    -1.00   ,
00208         -1.00   ,       61701200.00,    63097900.00,    63111600.00,    63115327.78,    -1.00   ,
00209         -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       63126600.00},
00210 /* ipIRON=25;*/
00211 {0.00,  53527760.00,    53781230.00,    53761280.00,    53777570.00,    53896550.00,    54042490.00,
00212         63421700.00,    63489000.00,    63509966.67,    63567120.00,    63576500.00,    63565800.00,
00213         66846900.00,    66875000.00,    66884011.11,    66908120.00,    66912100.00,    -1.00   ,
00214         -1.00   ,       66907600.00,    68423800.00,    68438100.00,    68442730.00,    -1.00   ,
00215         -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       68454800.00},
00216 /* ipCOBALT=26;*/
00217 {0.00,  57857380.00,    58122700.00,    58102090.00,    58119680.00,    58261180.00,    58411430.00,
00218         68560000.00,    68630600.00,    68655444.44,    68718160.00,    68728900.00,    68715500.00,
00219         72266000.00,    72295500.00,    72306144.44,    72332586.67,    72337100.00,    -1.00   ,
00220         -1.00   ,       72331500.00,    73972000.00,    73987000.00,    73992318.89,    -1.00   ,
00221         -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       74005400.00},
00222 /* ipNICKEL=27;*/
00223 {0.00,  62358960.00,    62637200.00,    62615022.80,    62633778.00,    62800884.44,    62952670.00,
00224         73903340.00,    73976370.00,    74005924.44,    -1.00   ,       -1.00   ,       74070580.00,
00225         77900890.00,    77930480.00,    77943808.89,    -1.00   ,       -1.00   ,       -1.00   ,
00226         -1.00   ,       77970500.00,    79740940.00,    79755710.00,    79762730.00,    -1.00   ,
00227         -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       79776290.00},
00228 /* ipCOPPER=28;*/
00229 {0.00,  67035380.00,    67324970.00,    67303150.00,    67322950.00,    67519170.00,    67678080.00,
00230         79453200.00,    79530300.00,    79564500.00,    79640046.67,    79654200.00,    79634300.00,
00231         83754400.00,    83786500.00,    83801155.56,    83832993.33,    83838900.00,    -1.00   ,
00232         -1.00   ,       83830600.00,    85734300.00,    85750700.00,    85759175.00,    -1.00   ,
00233         -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       85773200.00},
00234 /* ipZINC=29;*/
00235 {0.00,  71886300.00,    72188400.00,    72166200.00,    72186600.00,    72415600.00,    72579000.00,
00236         85212700.00,    85293200.00,    85332955.56,    85415826.67,    85431900.00,    85408300.00,
00237         89828600.00,    89862000.00,    89879022.22,    89913666.67,    89920800.00,    -1.00   ,
00238         -1.00   ,       89910900.00,    91953400.00,    91970500.00,    91979222.22,    91995073.33,
00239         92000500.00,    -1.00   ,       -1.00   ,       -1.00   ,       -1.00   ,       91994500.00}};
00240 
00241 /* helike_quantum_defect - calculate quantum defect for a given level and nuclear charge. */
00242 double helike_quantum_defect( long int nelem, long int ipLo )  
00243 {  
00244         /* The quantum defect, and parameters a,b, and c        */
00245         double qd,a,b,c;        
00246 
00247         /* These are values of quantum defects of Helium levels at n=10. 
00248          * First dimension is spin, second is angular momentum.  
00249          * The defects are assumed to be constant for all n>10 and
00250          * equal to these values. */
00251         double HeDefectAsymptotes[2][10] = {
00252                 {1.40005E-01,-1.20673E-02,2.08056E-03,4.21484E-04,1.14868E-04,
00253                         4.08648E-05,1.73548E-05,8.33891E-06,4.39680E-06,2.42075E-06},
00254                 {2.97063E-01,6.81567E-02,2.82381E-03,4.27703E-04,1.17319E-04,
00255                         4.25254E-05,1.85549E-05,9.24641E-06,5.30882E-06,3.02877E-06}
00256         };
00257 
00258         /* Parameters for fits to quantum defects for   */
00259         /* P triplet and S orbitals. The dimensions are */
00260         /*      first: l                                                                        */
00261         /*      second: n                                                                       */
00262         /*      third: parameters a,b,and c.                            */
00263         double param[3][4][3]=  
00264         { 
00265                 {{0.6451941,0.3119437,-1.2722842},              /* ^3S  */
00266                         {0.7664874,0.3455675,-1.3976462}, 
00267                         {0.8247101,0.3603131,-1.4520500}, 
00268                         {0.8878402,0.3714450,-1.4995732}}, 
00269 
00270                 {{1.4203514,0.5311096,-2.6728087},              /* ^1S  */
00271                         {1.5733513,0.5997339,-2.9253834}, 
00272                         {1.4531025,0.5924751,-2.8662756}, 
00273                         {1.6038999,0.6342552,-3.0298071}}, 
00274 
00275                 {{-2.2323488,0.0890840,-0.5166053},             /* ^3P  */
00276                         {-2.0463691,0.1222081,-0.6672983}, 
00277                         {-1.9904104,0.1328918,-0.7150879}, 
00278                         {-1.9500974,0.1452111,-0.7649031}} 
00279         };   
00280 
00281         /* Because they cannot be fit to a funtion of the same form as the other orbitals,
00282          * the P singlets are fit to a different function, with these parameters and dimensions */
00283         /*      first: n                                                                        */
00284         /*      second: parameters a and b.                                     */
00285         double P1[4][2]=
00286         {
00287                 {-56.65245,-3.661923},
00288                 {-52.03411,-4.941075},
00289                 {-50.43744,-5.525750},
00290                 {-49.45137,-5.908615}
00291         };
00292 
00293         long int n = StatesElem[ipHE_LIKE][nelem][ipLo].n;
00294         long int lqn = StatesElem[ipHE_LIKE][nelem][ipLo].l;
00295         long int S = StatesElem[ipHE_LIKE][nelem][ipLo].S;
00296         long int s;
00297 
00298         if( S==1 )
00299                 s = 0;
00300         else if( S==3 )
00301                 s = 1;
00302         else if( S < 0 )
00303         {
00304                 ASSERT( n > iso.n_HighestResolved_max[ipHE_LIKE][nelem] );
00305                 s = S;
00306         }
00307         else
00308                 TotalInsanity();
00309 
00310         DEBUG_ENTRY( "helike_quantum_defect()" );
00311 
00312         ASSERT(n >= 1L);
00313         ASSERT(lqn >= 0 || n > iso.n_HighestResolved_max[ipHE_LIKE][nelem]);
00314         ASSERT(n > lqn);
00315         /* Only Helium and up, and only those turned on.        */
00316         ASSERT((nelem >= ipHELIUM) && (nelem < LIMELM));       
00317 
00318         if( n > iso.n_HighestResolved_max[ipHE_LIKE][nelem] )
00319         {
00320                 /* collapsed levels are assumed to have zero quantum defect. */
00321                 qd = 0.;
00322         }
00323         else if( nelem == ipHELIUM )
00324         {
00325                 if( ipLo<NHE1LEVELS && n<=iso.n_HighestResolved_max[ipHE_LIKE][nelem] )
00326                 {
00327                         /* defects are calculated from theoretical energies. */
00328                         qd = n-sqrt(0.999862926*RYD_INF/(EionWN[ipHELIUM] - He1Energies[ipLo]));
00329                 } 
00330                 else if( lqn<=9 )
00331                 {
00332                         ASSERT( s >= 0 && lqn >= 0 );
00333                         /* defects are set equal to the values at n=10. */
00334                         qd = HeDefectAsymptotes[s][lqn];
00335                 }
00336                 else if( s == 0 )
00337                 {
00338                         /* a simple fit for singlet high-l defects. */
00339                         qd = 0.0497*pow((double)lqn, -4.4303);
00340                 }
00341                 else
00342                 {
00343                         /* a simple fit for triplet high-l defects. */
00344                         qd = 0.0656*pow((double)lqn, -4.5606);
00345                 }
00346         }
00347         else if( ipLo == ipHe1s1S )
00348         {
00349                 /* Quantum defects for ground state are found from the rydberg
00350                  * equation, and the ionization potential of the ion.   
00351                  * the lint needs to see assert and not ASSERT */
00352                 ASSERT(nelem>ipHYDROGEN && nelem<LIMELM );
00353                 qd = 1.0 - nelem * sqrt(1/EionRYD[nelem]);
00354         }
00355         else
00356         {
00357                 /* For levels with n > 5, the quantum defect    */
00358                 /* is approximately the same as if n equaled 5. */
00359                 if( n > 5L )
00360                 {
00361                         n = 5L;
00362                 }
00363                 /* For P singlets       */
00364                 if( lqn==1L && s==0L )
00365                 {
00366                         qd = 1./(P1[n-2][0] + P1[n-2][1] * (nelem+1) * log((double)nelem+1.) );
00367                 }
00368                 /* Defects for orbitals with l>2 are approximately equal to zero.       */
00369                 else if( lqn < 2L )
00370                 {
00371                         a = param[2*(lqn+1)-s-1][n-2][0];  
00372                         b = param[2*(lqn+1)-s-1][n-2][1];  
00373                         c = param[2*(lqn+1)-s-1][n-2][2];  
00374                         qd = exp((a+c*(nelem+1))/(1.0+b*(nelem+1)));  
00375                 }
00376                 /* This fit is a simplification of table 11.9 from 
00377                  * >>refer Helike       defects Drake, G.W.F., editor.  Atomic, Molecular & Optical Physics Handbook.
00378                  * >>refercon   Chapter 11, "High Precision Calculations for Helium", G.W.F. Drake. 
00379                  * >>refercon   AIP Press: Woodbury, New York, 1996
00380                  * This will give quasi-real energies for all transitions, allowing a reasonable
00381                  * determination of which decays are zeroed due to being below the plasma frequency.
00382                  * The 1/nelem dependence is arbitray.          */
00383                 else
00384                 {
00385                         ASSERT( lqn >= 2L );
00386                         qd = ( ( 0.0612/(double)nelem ) / pow((double)lqn, 4.44) );
00387                 }
00388         } 
00389         return qd;
00390 }
00391 
00392 /*helike_energy calculates energy of a given level.     */
00393 double helike_energy(long int nelem, long int ipLev )
00394 {
00395         double Ef, Eff_n;
00396         long ipISO=ipHE_LIKE;
00397 
00398         DEBUG_ENTRY( "helike_energy()" );
00399 
00400         if( N_(ipLev) > iso.n_HighestResolved_max[ipISO][nelem] )
00401         {
00402                 /* \todo        2       make this number a constant in physconst.h */
00403                 /* The first term is the ratio of the helium finite mass rydberg
00404                  * to the infinite mass rydberg. */
00405                 Ef = 0.999862926* RYD_INF * POW2((double)nelem/(double)N_(ipLev));  
00406         }
00407         else if( nelem==ipHELIUM && ipLev<NHE1LEVELS )
00408         {
00409                 /* for atomic helium use experimental energies */
00410                 Ef = EionWN[ipHELIUM] - He1Energies[ipLev];
00411         } 
00412         else if( nelem > ipHELIUM && nelem <= ipZINC &&
00413                 ipLev < NIONLEVELS && IonEnergies[nelem-2][ipLev] >= 0. )
00414         {
00415                 Ef = EionWN[nelem] - IonEnergies[nelem-2][ipLev];
00416         }
00417         else 
00418         {
00419                 Eff_n = N_(ipLev) - helike_quantum_defect( nelem, ipLev );
00420                 /* quantum defect can only be negative for singlet P */
00421                 ASSERT( ( L_(ipLev)==1 && S_(ipLev)==1 ) || ( N_(ipLev) - Eff_n >= 0. ) );
00422 
00423                 /* energies (in wavenumbers) that correspond to quantum defect */
00424                 Ef = 0.999862926 * RYD_INF * POW2((double)nelem/Eff_n);
00425                 Ef = 0.999862926 * RYD_INF * (nelem/Eff_n) * (nelem/Eff_n);  
00426         }
00427 
00428         ASSERT(Ef > 0.);
00429 
00430         return Ef;
00431 }
00432 

Generated on Mon Feb 16 12:01:17 2009 for cloudy by  doxygen 1.4.7