-
Notifications
You must be signed in to change notification settings - Fork 1
/
adpak.f
2511 lines (2509 loc) · 72 KB
/
adpak.f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
SUBROUTINE ADCE
C
C REV: 10/10/82 FOR NEW AD PACKAGE
C
C CALCULATE CORONAL EQUILIBRIUM (INCLUDING CHARGE
C EXCHANGE RECOMBINATION, IF PRESENT) USING THE IONIZATION,
C RECOMBINATION, AND RADIATION RATES
C STORED IN THE APPROPRIATE ARRAYS BY PREVIOUS CALLS
C TO ADSET, ADERC, AND ADBCXR.
C
COMMON / ADSDAT / NUCZ, NSPC, APN(100,10), AQN(100,10),
& NVALNC(100), SIGMA(10,10), QN(100,10),
& EN(100,10), EIN(100,5), ENM(100,5,10),
& FNM(100,5,10), FNN(100), ENN(100)
C
COMMON / ADELEC / RCLION(100), RRAREC(100), RDIREC(100),
& CIZLOS(100), RADRRC(100), RADDRC(100),
& RADCLX(100), RADBRM(100)
C
COMMON / ADNEUT / RCXREC(100), RADBCX(100)
C
COMMON / ADCEQ / CEFRAC(100), CEAVGZ, CERAD
C
DIMENSION ZIONT(100), ZRECT(100), ZRADT(100)
DIMENSION ZI(1), ZRE(1), ZRA(1)
C
C FILL TOTAL IONIZATION, RECOMBINATION, AND RADIATION ARRAYS
C
DO 10 JSPC = 1, NSPC
C
ZIONT(JSPC) = RCLION(JSPC)
ZRECT(JSPC) = RRAREC(JSPC) + RDIREC(JSPC) + RCXREC(JSPC)
ZRADT(JSPC) = RADRRC(JSPC) + RADDRC(JSPC) + RADCLX(JSPC)
& + RADBRM(JSPC) + RADBCX(JSPC)
C
10 CONTINUE
C
GO TO 15
C
C ENTRY FOR ALTERNATIVE EXTERNAL INPUT OF TOTAL RATE DATA
C
ENTRY ADCE2(ZI, ZRE, ZRA)
C
DO 12 JSPC= 1, NSPC
ZIONT(JSPC) = ZI(JSPC)
ZRECT(JSPC) = ZRE(JSPC)
ZRADT(JSPC) = ZRA(JSPC)
12 CONTINUE
C
C FIRST GUESS AT MAXIMUM SPECIES
C
15 DO 20 JQ = 1 , NSPC
IF(ZRECT(JQ) .GE. ZIONT(JQ))GO TO 21
20 CONTINUE
JQ = NSPC
21 ICNTR = JQ
CW WRITE(IOUT,23)ICNTR
23 FORMAT(1X,'ICNTR 1ST GUESS =',I3)
IPASS = 1
C
C INITIALIZE CEFRAC ARRAY
C
25 DO 26 JQ = 1,NSPC
26 CEFRAC(JQ) = 0.
CEFRAC(ICNTR) = 1.
C
C IF ICNTR IS FULLY STRIPPED WORK DOWN IN IONIZ ONLY
C
IF(ICNTR.EQ.NSPC)GO TO 35
C
C WORK UP FROM ICNTR SPECIES (TOWARDS HIGHER IONIZ STATES)
C
II = ICNTR + 1
C
DO 30 JQ = II,NSPC
CEFRAC(JQ) = CEFRAC(JQ-1) * ZIONT(JQ-1) / ZRECT(JQ)
IF(CEFRAC(JQ).LT.1.E-10*CEFRAC(ICNTR)) GO TO 32
30 CONTINUE
C
C IF ICNTR IS NEUTRAL WE'RE DONE
C
32 IF(ICNTR.EQ.1)GO TO 42
C
C WORK DOWN FROM ICNTR SPECIES
C
35 II = ICNTR - 1
DO 40 J = 1,II
JQ = II - J + 1
CEFRAC(JQ) = CEFRAC(JQ+1) * ZRECT(JQ+1) / ZIONT(JQ)
IF(CEFRAC(JQ).LT.1.E-10*CEFRAC(ICNTR)) GO TO 42
40 CONTINUE
C
C
42 IF(IPASS.EQ.2)GO TO 49
C
C END OF FIRST PASS - FIND NEW MAX SPECIES AND ITERATE
C
IPASS = 2
ZFRCMX = 0.
DO 45 JQ = 1, NSPC
IF(CEFRAC(JQ).LT.ZFRCMX)GO TO 45
ZFRCMX = CEFRAC(JQ)
IQFRAC = JQ
45 CONTINUE
ICNTR = IQFRAC
GO TO 25
C
C
C
49 ZPSUM = 0.
DO 50 JQ = 1, NSPC
50 ZPSUM = ZPSUM + CEFRAC(JQ)
C
C NORMALIZE SPECIES FRACTIONS AND COMPUTE RADIATION RATE
C
C
CERAD = 0.
C
DO 60 JQ = 1, NSPC
CEFRAC(JQ) = CEFRAC(JQ) / ZPSUM
IF(ZRADT(JQ) .LE. 0.) GO TO 60
IF(CEFRAC(JQ) .GT. 1.E-37 / ZRADT(JQ))
& CERAD = CEFRAC(JQ) * ZRADT(JQ) + CERAD
C
60 CONTINUE
C
C COMPUTE <Z>
C
CEAVGZ = 0.
DO 70 JQ = 2,NSPC
70 CEAVGZ = CEAVGZ + FLOAT(JQ-1) * CEFRAC(JQ)
C
C
RETURN
END
SUBROUTINE ADSET(KNUCZ)
C
C REV: 10/10/82 FOR NEW AD PACKAGE
C
C SETUP BASIC ATOMIC STRUCTURE DATA FOR CHOSEN ELEMENT
C (SHELL POPULATIONS, ENERGIES, ETC.)
C
COMMON / ADSDAT / NUCZ, NSPC, APN(100,10), AQN(100,10),
& NVALNC(100), SIGMA(10,10), QN(100,10),
& EN(100,10), EIN(100,5), ENM(100,5,10),
& FNM(100,5,10), FNN(100), ENN(100)
C
COMMON / ADPARM / LADEN, LADTIP, LTIPOK, LECI, LECIOK
C
NUCZ = KNUCZ
C
CALL ADAPN
C
IF(LADEN .NE. 0 .AND. LADEN .NE. 1) STOP
IF(LADEN .EQ. 0) CALL ADMAYR
IF(LADEN .EQ. 1) CALL ADMORE
C
IF(LADTIP .NE. 0 .AND. LADTIP .NE. 1) STOP
LTIPOK = 0
IF(LADTIP .EQ. 1) CALL ADTIP(LTIPOK)
C
CALL ADFNM
C
RETURN
END
SUBROUTINE ADAPN
C
C REV: 10/9/82 FOR NEW AD PACKAGE
C
C REV: 6/15/78
C
C INPUT : NUCZ
C OUTPUT : NSPC, APN, AQN, NVALNC
C
C ASSIGN THE NUMBER OF ELECTRONS PER SHELL FOR EACH
C IONIC SPECIES. APN(JQ,JN) = NUMBER OF ELECTRONS IN
C SHELL JN FOR SPECIES WITH CHARGE JQ-1, WHILE AQN(JQ,JN) =
C (2.*JN**2 - APN(JQ,JN))/(2.*JN**2) IS THE FRACTIONAL VACANCY.
C THE SHELLS ARE FILLED IN SIMPLE CONSECUTIVE ASCENDING ORDER.
C ALSO, THE PRINCIPAL QUANTUM NUMBER OF THE HIGHEST
C OCCUPIED ('VALENCE') SHELL FOR EACH SPECIES IS STORED
C IN NVALNC(JQ).
C
C NOTE: FOR THE FULLY IONIZED SPECIES NVALNC IS DEFAULTED TO 1.
C ALSO: NSPC = NUCZ + 1 IS SET BY THIS ROUTINE
C
C
COMMON / ADSDAT / NUCZ, NSPC, APN(100,10), AQN(100,10),
& NVALNC(100), SIGMA(10,10), QN(100,10),
& EN(100,10), EIN(100,5), ENM(100,5,10),
& FNM(100,5,10), FNN(100), ENN(100)
C
C SET MAXIMUM SPECIES INDEX NSPC = NUCZ + 1
C
NSPC = NUCZ +1
C
C
DO 1 JQ = 1,NSPC
ICOUNT = NUCZ-JQ+1
C
C
DO 2 JN = 1,10
IFULL = 2*JN*JN
ISHELL = MIN0 (ICOUNT,IFULL)
ICOUNT = ICOUNT - ISHELL
IF(ISHELL.GT.0) NVALNC(JQ) = JN
APN(JQ,JN) = FLOAT(ISHELL)
AQN(JQ,JN) = FLOAT(IFULL - ISHELL)/FLOAT(IFULL)
C
CW WRITE(6,900)JQ,JN,APN(JQ,JN),NVALNC(JQ)
CW 900 FORMAT(1X,'JQ =',I3,' JN =',I3,' APN=',F4.0,' NVALNC=',I3)
C
2 CONTINUE
C
C
1 CONTINUE
C
C
NVALNC(NSPC) = 1
C
RETURN
END
SUBROUTINE ADMORE
C
C REV: 10/10/82 FOR NEW AD PACKAGE
C
C REV: 1 SEPTEMBER 1981
C
C INPUT : NUCZ, NSPC, APN, NVALNC
C OUTPUT : EN, EIN, ENM, QN
C
C EXCITATION ENERGIES AND IONIZATION POTENTIALS ARE
C TABULATED FOR ALL OCCUPIED SHELLS FOR EACH SPECIES. ENERGIES
C ARE IN KEV, JQ = SPECIES INDEX = IONIC CHARGE + 1, AND
C JN = SHELL INDEX.
C
C USES THE R. MORE REVISED SHIELDING CONSTANTS (AND NEW
C CALCULATION PROCEDURE) IN LIEU OF THE ORIGINAL 'XSNQ'
C TREATMENT BASED ON THE H. MAYER SHIELDING CONSTANTS.
C (ORIGINAL TREATMENT, REFS. 1-4; PRESENT TREATMENT, REF. 5).
C CERTAIN ASPECTS OF THE FORMALISM (E.G. QN AND EN ARRAYS) ARE
C 'HISTORICAL' IN NATURE.
C
C
C SIGMA(JN,JM) R. MORE SHIELDING CONSTANTS
C
C QN(JQ,JN) EFFECTIVE NUCLEAR CHARGE AT SHELL JN
C CONSIDERING ALL ELECTRONS IN THE GROUND STATE
C ION, NOW COMPUTED FROM ZSEN (RATHER THAN
C THAN VICE-VERSA). THIS IS *NOT* THE
C SAME AS QN IN MORE'S NOTATION, WHICH
C IS THE SHIELDED CHARGE DUE TO INNER
C SHIELDING ONLY.
C
C EN(JQ,JN) ENERGY LEVELS FOR RECOMBINATION OF THE
C GROUND STATE ION.
C
C EIN(JQ,JN) IONIZATION POTENTIAL FOR ELECTRON IN SHELL
C JN CALCULATED FROM THE DIFFERENCE IN TOTAL
C ION ENERGIES WITH AND WITHOUT AN ELECTRON
C REMOVED FROM SHELL JN.
C
C ENM(JQ,JN,JM) EXCITATION ENERGY FROM SHELL JN UP TO SHELL
C JM CALULATED FROM THE DIFFERENCE IN
C THE TOTAL ION ENERGIES OF OF THE GROUND
C STATE AND EXCITED STATE ELECTRON POPULATIONS.
C
C ZBETOT(JQ) TOTAL BINDING ENERGY FOR EACH ION.
C
C
C REFERENCES:
C
C 1) POST ET AL., PPPL-1352 (CORRECTED)
C 2) LOKKE AND GRASBERGER, LLL REPORT UCRL-52276 (CORRECTED)
C 3) H. MAYER, 'METHODS OF OPACITY CALCULATIONS', LOS ALAMOS
C SCIENTIFIC LABORATORY LA-647 (1947).
C 4) XSNQ LISTING
C 5) R. MORE 'ATOMIC PHYSICS IN INERTIAL CONFINEMENT FUSION -
C PART I' LLL REPORT UCRL-84991 (1981) (TO APPEAR
C IN 'APPLIED ATOMIC COLLISION PHYSICS', VOLUME II,
C ACADEMIC PRESS)
C
C NOTE: THERE ARE DISCREPANCIES BETWEEN THESE REFERENCES FOR A FEW
C OF THE H. MAYER SHIELDING CONSTANT VALUES.
C
C
DIMENSION ZSEN(10), ZBETOT(100), ZDUM(10)
C
COMMON / ADSDAT / NUCZ, NSPC, APN(100,10), AQN(100,10),
& NVALNC(100), SIGMA(10,10), QN(100,10),
& EN(100,10), EIN(100,5), ENM(100,5,10),
& FNM(100,5,10), FNN(100), ENN(100)
C
C
C MAIN SPECIES LOOP
C
DO 100 JQ = 1, NSPC
JJQ = JQ
IVALNC = NVALNC(JQ)
C
C COMPUTE ZBETOT AND ZSEN
C
IHOLE = 0
IEXCIT = 0
CALL ADSHEN(JJQ, IHOLE, IEXCIT, ZSEN(1), ZBETOT(JJQ))
C
C COMPUTE EIN, ENM, AND EN FROM DIFFERENCES IN TOTAL
C ION ENERGIES (RATHER FROM ZSEN'S) IN ORDER TO AGREE
C WITH RESULTS IN MORE'S FIGURE III-7. COMPUTE
C QN FROM THE ZSEN IN ORDER TO HAVE THE APPROPRIATE LIMITING
C INTEGRAL CHARGES AT HIGH N SHELLS.
C
C CLEAR ARRAYS
C
DO 30 JN = 1, 5
C
EIN(JQ,JN) = 0.0
C
DO 20 JM = 1, 10
ENM(JQ,JN,JM) = 0.0
20 CONTINUE
30 CONTINUE
C
C SKIP FULLY STRIPPED STATE
C
IF(JQ. EQ. NSPC) GO TO 60
C
DO 50 JN = 1, IVALNC
C
IHOLE = JN
IEXCIT = 0
CALL ADSHEN(JJQ, IHOLE, IEXCIT, ZDUM(1), ZBEIZ)
EIN(JQ,JN) = ZBETOT(JQ) - ZBEIZ
C
IIJM = IVALNC
IF(JN .EQ. IVALNC .OR. AQN(JQ,IVALNC) .EQ. 0.0) IIJM = IIJM+1
C
DO 40 JM = IIJM, 10
IHOLE = JN
IEXCIT = JM
CALL ADSHEN(JJQ, IHOLE, IEXCIT, ZDUM(1), ZBEEX)
ENM(JQ,JN,JM) = ZBETOT(JQ) - ZBEEX
40 CONTINUE
50 CONTINUE
C
C CLEAR ARRAYS
C
60 DO 70 JN = 1, 10
EN(JQ,JN) = 0.0
QN(JQ,JN) = 0.0
70 CONTINUE
C
C SKIP NEUTRAL STATE
C
IF(JQ .EQ. 1) GO TO 100
C
C COMPUTE EN AND QN
C
IIJN = IVALNC
IF(AQN(JQ,IVALNC) .EQ. 0.0) IIJN = IVALNC+1
C
DO 80 JN = IIJN, 10
IHOLE = 0
IEXCIT = JN
CALL ADSHEN(JJQ, IHOLE, IEXCIT, ZDUM(1), ZBEREC)
EN(JQ,JN) = ZBEREC - ZBETOT(JQ)
QN(JQ,JN) = FLOAT(JN) * SQRT(ZSEN(JN)/0.0136)
80 CONTINUE
100 CONTINUE
C
RETURN
END
C
C---------------------------------------------------------------
C
SUBROUTINE ADSHEN(KQ, KHOLE, KEXCIT, PSEN, PBETOT)
C
C REV: 10/10/82 FOR NEW AD PACKAGE
C
C REV: 1 SEPTEMBER 1981
C
C INPUT: NUCZ, KQ, KHOLE, KEXCIT, APN
C OUTPUT: PSEN(10), PBETOT
C
C COMPUTE SHELL ENERGIES USING NEW SHIELDING CONSTANTS
C AND METHOD DUE TO R. MORE (UCRL-84991).
C
C NUCZ = ION NUCLEAR CHARGE
C KQ = SPECIES INDEX = IONIC CHARGE + 1
C KHOLE, KEXCIT = ELECTRON REMOVED FROM SHELL KHOLE AND/OR
C ADDED (EXCITED) TO SHELL KEXCIT BEFORE
C ENERGIES ARE COMPUTED (KHOLE = 0 NO ELECTRON
C REMOVED, KEXCIT = 0 NO ELECTRON ADDED)
C APN(100,10) = ARRAY OF SHELL POPULATIONS
C PSEN = OUTPUT ARRAY OF SHELL ENERGIES (KEV) (DEFINED POSITIVE)
C PBETOT = OUTPUT TOTAL ION ENERGY (DEFINED POSITIVE)
C
DIMENSION PSEN(10), ZAPN(10), ZQ(10), ZEN0(10)
C
COMMON / ADSDAT / NUCZ, NSPC, APN(100,10), AQN(100,10),
& NVALNC(100), SIGMA(10,10), QN(100,10),
& EN(100,10), EIN(100,5), ENM(100,5,10),
& FNM(100,5,10), FNN(100), ENN(100)
C
COMMON / SMORE / SIGMOR(10,10)
C
DATA ((SIGMOR(JN,JM),JN=1,10),JM=1,10)/
1 0.3125, 0.9380, 0.9840, 0.9954, 0.9970,
1 0.9970, 0.9990, 0.9999, 0.9999, 0.9999,
2 0.2345, 0.6038, 0.9040, 0.9722, 0.9979,
2 0.9880, 0.9900, 0.9990, 0.9990, 0.9999,
3 0.1093, 0.4018, 0.6800, 0.9155, 0.9796,
3 0.9820, 0.9860, 0.9900, 0.9920, 0.9999,
4 0.0622, 0.2430, 0.5150, 0.7100, 0.9200,
4 0.9600, 0.9750, 0.9830, 0.9860, 0.9900,
5 0.0399, 0.1597, 0.3527, 0.5888, 0.7320,
5 0.8300, 0.9000, 0.9500, 0.9700, 0.9800,
6 0.0277, 0.1098, 0.2455, 0.4267, 0.5764,
6 0.7248, 0.8300, 0.9000, 0.9500, 0.9700,
7 0.0204, 0.0808, 0.1811, 0.3184, 0.4592,
7 0.6098, 0.7374, 0.8300, 0.9000, 0.9500,
8 0.0156, 0.0624, 0.1392, 0.2457, 0.3711,
8 0.5062, 0.6355, 0.7441, 0.8300, 0.9000,
9 0.0123, 0.0493, 0.1102, 0.1948, 0.2994,
9 0.4222, 0.5444, 0.6558, 0.7553, 0.8300, 0.0100, 0.0400,
& 0.0900, 0.1584, 0.2450, 0.3492, 0.4655, 0.5760, 0.6723, 0.7612/
C
DO 10 JN = 1, 10
ZAPN(JN) = APN(KQ,JN)
10 CONTINUE
C
C REMOVE ELECTRON FROM SHELL KHOLE
C
IF(KHOLE .GT. 0 .AND. ZAPN(KHOLE) .GT. 0.0)
& ZAPN(KHOLE) = ZAPN(KHOLE) - 1.0
C
C ADD ELECTRON TO SHELL KEXCIT
C
IF(KEXCIT .GT. 0) ZAPN(KEXCIT) = ZAPN(KEXCIT) + 1.0
C
C COMPUTE NUCLEAR CHARGE AS SHIELDED BY INNER ELECTRONS ONLY
C
DO 30 JN = 1, 10
C
ZQ(JN) = FLOAT(NUCZ) - 0.5 * SIGMOR(JN,JN) * ZAPN(JN)
C
IF(JN .EQ. 1) GO TO 30
JNM1 = JN - 1
C
DO 20 JM = 1, JNM1
ZQ(JN) = ZQ(JN) - SIGMOR(JN,JM) * ZAPN(JM)
20 CONTINUE
30 CONTINUE
C
C COMPUTE POTENTIAL DUE TO OUTER ELECTRONS
C
DO 50 JN = 1, 10
ZEN0(JN) = 0.0136 * SIGMOR(JN,JN) * ZAPN(JN)
& * ZQ(JN) / (FLOAT(JN)**2)
C
IF(JN .EQ. 10) GO TO 50
JNP1 = JN + 1
C
DO 40 JM = JNP1, 10
ZEN0(JN) = ZEN0(JN) + 0.0272 * ZAPN(JM) * SIGMOR(JM,JN)
& * ZQ(JM) / (FLOAT(JM)**2)
40 CONTINUE
C
50 CONTINUE
C
C COMPUTE FINAL SHELL ENERGIES AND TOTAL ION BINDING ENERGY,
C BOTH DEFINED POSITIVE.
C
PBETOT = 0.0
C
DO 60 JN = 1, 10
PSEN(JN) = 0.0136 * ((ZQ(JN)/FLOAT(JN))**2) - ZEN0(JN)
PBETOT = PBETOT + 0.0136 * ZAPN(JN) * ((ZQ(JN)/FLOAT(JN))**2)
60 CONTINUE
C
RETURN
END
SUBROUTINE ADMAYR
C
C REV: 10/10/82 FOR NEW AD PACKAGE
C
C REV: 6/15/78
C
C INPUT : NUCZ, NSPC, APN
C OUTPUT : SIGMA, QN, EN, EIN, ENM
C
C COMPUTES ENERGY LEVELS FOR THE GROUND STATE IONIC SPECIES
C AND FOR SPECIES WITH SINGLE INNER ELECTRON VACANCIES.
C EXCITATION ENERGIES AND IONIZATION POTENTIALS ARE THUS
C TABULATED FOR ALL OCCUPIED SHELLS FOR EACH SPECIES. ENERGIES
C ARE IN KEV, JQ = SPECIES INDEX = IONIC CHARGE + 1, AND
C JN = SHELL INDEX.
C
C FOR EACH CONFIGURATION AND SHELL OF INTEREST, THE EFFECTIVE
C NUCLEAR CHARGE IS CALCULATED USING THE H. MAYER SHIELDING
C CONSTANTS. THE ENERGY LEVELS ARE THEN FOUND USING THIS EFFECTIVE
C CHARGE IN THE PAULI APPROXIMATION TO THE DIRAC ENERGY LEVEL
C FORMULA. THE SHELL ENERGY IS TAKEN AS THE MEAN OF THE LOWEST
C AND HIGHEST SUBSHELL ENERGIES FOR THAT N.
C
C
C SIGMA(JN,JM) H. MAYER SHIELDING CONSTANTS
C
C QN(JQ,JN) EFFECTIVE NUCLEAR CHARGE AT SHELL JN
C CONSIDERING ALL ELECTRONS IN THE GROUND STATE ION.
C
C EN(JQ,JN) ENERGY LEVELS FOR GROUND STATE ION
C (FORMERLY EQN(JQ,JN) IN PREVIOUS VERSIONS)
C
C EIN(JQ,JN) IONIZATION POTENTIAL FOR ELECTRON IN SHELL JN;
C USES SHIELDED CHARGE CALCULATED WITH ONE
C ELECTRON REMOVED FROM SHELL JN.
C
C ENM(JQ,JN,JM) EXCITATION ENERGY FROM SHELL JN UP TO SHELL JM;
C THE DIFFERENCE BETWEEN THE JN AND JM ENERGY LEVELS
C CALCULATED WITH THE JN SHELL ELECTRON REMOVED.
C
C
C
C REFERENCES:
C
C 1) POST ET AL., PPPL-1352 (CORRECTED)
C 2) LOKKE AND GRASBERGER, LLL REPORT UCRL-52276 (CORRECTED)
C 3) H. MAYER, 'METHODS OF OPACITY CALCULATIONS', LOS ALAMOS
C SCIENTIFIC LABORATORY LA-647 (1947).
C 4) XSNQ LISTING
C
C NOTE: THERE ARE DISCREPANCIES BETWEEN THESE REFERENCES FOR A FEW
C SHIELDING CONSTANT VALUES.
C
C
DIMENSION ZSIGMA(10,10)
C
COMMON / ADSDAT / NUCZ, NSPC, APN(100,10), AQN(100,10),
& NVALNC(100), SIGMA(10,10), QN(100,10),
& EN(100,10), EIN(100,5), ENM(100,5,10),
& FNM(100,5,10), FNN(100), ENN(100)
C
C
COMMON / SMAYER / SIGMAY(10,10)
C
DATA ((SIGMAY(JN,JM),JN=1,10),JM=1,10)/
1 .625,.938,.981,.987,.994,.997,.999,1.00,1.00,1.00,
2 .235,.690,.893,.940,.970,.984,.990,.993,.995,1.00,
3 .109,.397,.702,.850,.920,.955,.970,.980,.990,1.00,
4 .0617,.235,.478,.705,.830,.900,.950,.970,.980,.990,
5 .0398,.155,.331,.531,.720,.830,.900,.950,.970,.980,
6 .0277,.109,.239,.400,.580,.735,.830,.900,.950,.970,
7 .0204,.0808,.178,.310,.459,.610,.745,.830,.900,.950,
8 .0156,.0625,.138,.243,.371,.506,.635,.750,.830,.900,
9 .0123,.0494,.111,.194,.299,.431,.544,.656,.760,.830,
& .010,.040,.090,.158,.245,.353,.460,.576,.670,.765/
C
C
C
C START MAIN SPECIES LOOP
C
C
DO 100 JQ = 1 , NSPC
C
IVALNC = NVALNC(JQ)
C
C
C COMPUTE QN AND EN
C
DO 30 JN = 1 , 10
ZJN = FLOAT(JN)
C
ZQN = FLOAT(NUCZ)
C
DO 20 JM = 1 , IVALNC
ZQN = ZQN - SIGMAY(JN,JM) * APN(JQ,JM)
20 CONTINUE
C
ZQN = ZQN + APN(JQ,JN) * SIGMAY(JN,JN) / (2. * ZJN**2)
C
QN(JQ,JN) = ZQN
IN = JN
EN(JQ,JN) = ADPALI(ZQN,IN)
30 CONTINUE
C
C
C CLEAR ARRAYS THEN COMPUTE EIN AND ENM
C
C
DO 40 JN = 1 , 5
EIN(JQ,JN) = 0.
DO 40 JM = 1 , 10
ENM(JQ,JN,JM) = 0.
40 CONTINUE
C
C SKIP IONIZATION AND EXCITATION ENERGIES FOR FULLY STRIPPED ION
C
IF(JQ .EQ. NSPC) GO TO 100
C
C
DO 70 JN = 1 , IVALNC
ZJN = FLOAT(JN)
C
C COMPUTE ZQNN = EFFECTIVE CHARGE AT SHELL JN WITH ONE ELECTRON
C REMOVED FROM SHELL JN.
C
ZQNN = QN(JQ,JN) + SIGMAY(JN,JN) * (1. - 1./(2.*ZJN**2))
C
C EIN(JQ,JN) = IONIZATION POTENTIAL FOR SHELL JN
C
IN = JN
EIN(JQ,JN) = ADPALI(ZQNN,IN)
C
C COMPUTE ENM(JQ,JN,JM) FROM ZQNM, EFFECTIVE CHARGE AT SHELL
C JM WITH ONE ELECTRON REMOVED FROM SHELL JN.
C
IIJM = IVALNC
IF(JN .EQ. IVALNC .OR.
& AQN(JQ,IVALNC) .EQ. 0.) IIJM = IVALNC + 1
C
DO 60 JM = IIJM , 10
C
ZQNM = QN(JQ,JM) + SIGMAY(JM,JN)
C
IM = JM
ENM(JQ,JN,JM) = EIN(JQ,JN) - ADPALI(ZQNM,IM)
C
60 CONTINUE
C
C
70 CONTINUE
C
C
100 CONTINUE
C
C
RETURN
END
C
C
C------------------------------------------------------------------
C
C
FUNCTION ADPALI(PQ,KN)
C
C REV: 10/10/82 FOR NEW AD PACKAGE
C
C REV: 6/15/78
C
C EVALUATE THE PAULI APPROXIMATION TO THE
C THE DIRAC ENERGY LEVEL EQUATION, TAKING THE MEAN OF THE
C LOWEST AND HIGHEST SUBSHELL ENERGIES TO BE THE SHELL ENERGY.
C ADPALI(PQ,KN) IS IN KEV, PQ IS THE EFFECTIVE NUCLEAR
C CHARGE (IN UNITS OF ELECTRONIC CHARGE) AND KN IS THE PRINCIPAL
C QUANTUM NUMBER.
C
C
ZALPHA = .007298
C
C
ZKN = FLOAT(KN)
C
ADPALI = .0136 * ( (PQ / ZKN)**2 ) *
& (1. + ((ZALPHA*PQ)**2) * (0.5 - 1./(4.*ZKN)) / ZKN)
C
C
RETURN
END
SUBROUTINE ADTIP(KTIPOK)
C
C SUBSTITUTE TABULATED IONIZATION POTENTIALS FOR THOSE
C CALCULATED BY SHIELDING CONSTANTS IN SETENM. NOTE THAT THE
C 'NUMBER OF EQUIVALENT ELECTRONS' IS NOT CORRECTLY RE-DEFINED
C TO ACCOMPANY THIS PROCEDURE, BUT THE APPROXIMATION IS STILL
C AN IMPROVEMENT FOR NEAR-NEUTRAL SPECIES.
C
COMMON / ADSDAT / NUCZ, NSPC, APN(100,10), AQN(100,10),
& NVALNC(100), SIGMA(10,10), QN(100,10),
& EN(100,10), EIN(100,5), ENM(100,5,10),
& FNM(100,5,10), FNN(100), ENN(100)
C
DIMENSION ZTIP(100)
C
DO 1 JSPC = 1, 100
ZTIP(JSPC) = 0.0
1 CONTINUE
C
IF(NUCZ .NE. 2) GO TO 3
C
C HELIUM
C
ZTIP(1) = 24.58E-3
ZTIP(2) = 54.4E-3
C
GO TO 100
3 IF(NUCZ .NE. 3) GO TO 4
C
C LITHIUM
C
ZTIP(1) = 5.4E-3
ZTIP(2) = 75.6E-3
ZTIP(3) = 122.4E-3
C
GO TO 100
C
4 IF(NUCZ .NE. 4) GO TO 5
C
C BERYLLIUM
C
ZTIP(1) = 9.32E-3
ZTIP(2) = 18.2E-3
ZTIP(3) = 153.9E-3
ZTIP(4) = 217.6E-3
C
GO TO 100
C
5 IF(NUCZ .NE. 5) GO TO 6
C
C BORON
C
ZTIP(1) = 8.296E-3
ZTIP(2) = 25.15E-3
ZTIP(3) = 37.9E-3
ZTIP(4) = 259.3E-3
ZTIP(5) = 340.0E-3
C
GO TO 100
C
6 IF(NUCZ .NE. 6) GO TO 8
C
C CARBON
C
ZTIP(1) = 11.3E-3
ZTIP(2) = 24.4E-3
ZTIP(3) = 47.9E-3
ZTIP(4) = 64.5E-3
ZTIP(5) = 0.392
ZTIP(6) = 0.490
C
GO TO 100
8 IF(NUCZ .NE. 8) GO TO 10
C
C OXYGEN
C
ZTIP(1) = 13.6E-3
ZTIP(2) = 35.1E-3
ZTIP(3) = 54.9E-3
ZTIP(4) = 77.4E-3
ZTIP(5) = 0.114
ZTIP(6) = 0.138
ZTIP(7) = 0.739
ZTIP(8) = 0.871
C
GO TO 100
10 IF(NUCZ .NE. 10) GO TO 13
C
C NEON
C
ZTIP(1) = 21.6E-3
ZTIP(2) = 41.0E-3
ZTIP(3) = 63.5E-3
ZTIP(4) = 97.1E-3
ZTIP(5) = 0.126
ZTIP(6) = 0.158
ZTIP(7) = 0.207
ZTIP(8) = 0.239
ZTIP(9) = 1.196
ZTIP(10) = 1.362
C
GO TO 100
13 IF(NUCZ .NE. 13) GO TO 18
C
C ALUMINUM
C
ZTIP(1) = 5.99E-3
ZTIP(2) = 18.8E-3
ZTIP(3) = 28.4E-3
ZTIP(4) = 0.120
ZTIP(5) = 0.154
ZTIP(6) = 0.190
ZTIP(7) = 0.241
ZTIP(8) = 0.285
ZTIP(9) = 0.330
ZTIP(10) = 0.399
ZTIP(11) = 0.442
ZTIP(12) = 2.086
ZTIP(13) = 2.304
C
GO TO 100
18 IF(NUCZ .NE. 18) GO TO 22
C
C ARGON
C
ZTIP(1) = 15.8E-3
ZTIP(2) = 27.6E-3
ZTIP(3) = 40.7E-3
ZTIP(4) = 59.8E-3
ZTIP(5) = 75.0E-3
ZTIP(6) = 91.0E-3
ZTIP(7) = 0.124
ZTIP(8) = 0.143
ZTIP(9) = 0.422
ZTIP(10) = 0.479
ZTIP(11) = 0.539
ZTIP(12) = 0.618
ZTIP(13) = 0.686
ZTIP(14) = 0.756
ZTIP(15) = 0.855
ZTIP(16) = 0.918
ZTIP(17) = 4.121
ZTIP(18) = 4.426
C
GO TO 100
22 IF(NUCZ .NE. 22) GO TO 26
C
C TITANIUM
C
ZTIP(1) = 6.82E-3
ZTIP(2) = 13.6E-3
ZTIP(3) = 27.5E-3
ZTIP(4) = 43.3E-3
ZTIP(5) = 99.2E-3
ZTIP(6) = 0.119
ZTIP(7) = 0.141
ZTIP(8) = 0.169
ZTIP(9) = 0.193
ZTIP(10) = 0.216
ZTIP(11) = 0.265
ZTIP(12) = 0.292
ZTIP(13) = 0.787
ZTIP(14) = 0.861
ZTIP(15) = 0.940
ZTIP(16) = 1.042
ZTIP(17) = 1.131
ZTIP(18) = 1.220
ZTIP(19) = 1.342
ZTIP(20) = 1.425
ZTIP(21) = 6.249
ZTIP(22) = 6.626
C
GO TO 100
26 IF(NUCZ .NE. 26) GO TO 100
C
C IRON
C
ZTIP(1) = 7.87E-3
ZTIP(2) = 16.2E-3
ZTIP(3) = 30.7E-3
ZTIP(4) = 54.8E-3
ZTIP(5) = 75.0E-3
ZTIP(6) = 99.0E-3
ZTIP(7) = 0.125
ZTIP(8) = 0.151
ZTIP(9) = 0.235
ZTIP(10) = 0.262
ZTIP(11) = 0.290
ZTIP(12) = 0.331
ZTIP(13) = 0.361
ZTIP(14) = 0.392
ZTIP(15) = 0.457
ZTIP(16) = 0.490
ZTIP(17) = 1.265
ZTIP(18) = 1.358
ZTIP(19) = 1.456
ZTIP(20) = 1.582
ZTIP(21) = 1.689
ZTIP(22) = 1.799
ZTIP(23) = 1.950
ZTIP(24) = 2.045
ZTIP(25) = 8.828
ZTIP(26) = 9.278
C
C END OF CURRENT TABULATION; RETURN IF SELECTED
C ELEMENT NOT PRESENT AND SET FLAG.
C
100 KTIPOK = 0
IF(ZTIP(1) .EQ. 0.0) RETURN
C
KTIPOK = 1
C
DO 150 JSPC = 1, NUCZ
IVALNC = NVALNC(JSPC)
JSPCP1 = JSPC + 1
C
EIN(JSPC,IVALNC) = ZTIP(JSPC)
EN(JSPCP1,IVALNC) = ZTIP(JSPC)
150 CONTINUE
C
RETURN
END
SUBROUTINE ADFNM
C
C REV: 10/10/82 FOR NEW AD PACKAGE
C
C REV: 8/10/79 CORRECT ZEPSNN(59) (4F13) VALUE FROM 3.43E-3
C TO 3.43E-2 (ERROR IN POST ET AL.)
C REV: 6/15/78
C
C INPUT : NUCZ, APN, AQN, NVALNC, ENM
C OUTPUT : FNM, FNN, ENN
C
C CALCULATES ABSORPTION OSCILLATOR STRENGTHS FOR TRANSITIONS
C FROM SHELL IN TO SHELL IM FOR EACH SPECIES JQ AND STORES THEM
C IN THE ARRAY FNM(JQ,IN,IM). F(N,M) = (HYDROGENIC VALUE,
C TABULATED FOR LOW N,M CALCULATED OTHERWISE) X (CORRECTION
C FACTOR(S)) X (ELECTRON POPULATION OF SHELL IN) X (VACANY
C FRACTION OF SHELL IM).
C
C FOR N - N (E.G. DELTA N EQUAL ZERO) TRANSITIONS WE HAVE
C F(N,N) = ANN + BNN/ZNUC, WHICH REPRESENTS A FIT TO THE
C 'EQUIVALENT' SINGLE TRANSITION USED TO MODEL ALL THE PHYSICAL
C N - N TRANSITIONS. ALSO COMPUTED IS E(N,N), THE 'EQUIVALENT'
C ENERGY, E(N,N) = EPSILONNN * (ZCHG+1) ** ALPHANN. THE ZANN, ETC.
C ARRAYS ARE INDEXED BY THE TOTAL NUMBER OF BOUND ELECTRONS
C IN THEIR ELECTRONIC CONFIGURATIONS (SEE REFERENCE (1)).
C
C NOTE THAT HERE, AS IN OTHER ROUTINES, THE FILLING OF SHELLS
C IN SIMPLE ASCENDING ORDER IS ASSUMED BOTH EXPLICITLY
C (E.G., IN THE APN ARRAY CONTENTS) AS WELL AS IMPLICITY (THROUGH
C THE USE OF NVALNC, ETC.). ALSO, THE ANN, BNN, ETC.
C COEFFICIENTS ARE DEFINED SPECIFICALLY FOR SUCH STATES.
C
C
C REFERENCES:
C 1) POST ET AL., PPPL-1352 (WITH CORRECTIONS)
C 2) GRASBERGER, XSNQ - TOKAMAK MEMORANDUM #4, 7/29/76
C 3) GRASBERGER, XSNQ - TOKAMAK MEMORANDUM #10, 1/5/77
C 4) LOKKE & GRASBERGER, 'XSNQ-U A NON-LTE EMISSION AND
C ABSORPTION COEFFICIENT SUBROUTINE', LLL REPORT UCRL-52276
C 5) MERTS ET AL., 'THE CALCULATED POWER OUTPUT FROM
C A THIN IRON-SEEDED PLASMA', LOS ALAMOS REPORT LA-6220-MS
C 6) XSNQ FORTRAN LISTING
C
C
C
COMMON / ADSDAT / NUCZ, NSPC, APN(100,10), AQN(100,10),
& NVALNC(100), SIGMA(10,10), QN(100,10),
& EN(100,10), EIN(100,5), ENM(100,5,10),
& FNM(100,5,10), FNN(100), ENN(100)
C
C
COMMON / FNMDAT / ZANN(60), ZBNN(60), ZEPSNN(60), ZALPNN(60),
& ZY0(10), ZY1(10), ZY2(10)
C
C
DATA (ZANN(J),J=1,60) / 0., 0.,
1 -.02, -.01, -.04, .04, -.01, -.01, .01, 0.,
2 .01, .1, .25, .17, .08, -.02, -.14, -.27,
3 -.29, -.3, -.3, -.29, -.27, -.24, -.2, -.14,
4 -.08, 0., .97, 1.96, 1.92, 1.89, 1.86, 1.83,
5 1.78, 1.73, 1.41, 1.05, .674, .261, -.167,
6 -.637, -1.14, -1.67, -2.26, -2.88, -2.9,
7 -2.83, -2.72, -2.61, -2.45, -2.27, -2.05, -1.81,
8 -1.55, -1.25, -.94, -.63, -.31, 0. /
C
C
DATA (ZBNN(J),J=1,60) / 0., 0.,
1 2., 4.33, 4.68, 3.6, 2.85, 2.4, 1.3, 0.,
2 10.5, 20., 16.4, 24.7, 34.1, 44.8, 56.8, 70.3,
3 68.6, 65.8, 61.9, 56.9, 50.7, 45.5, 34.4,
4 24.2, 12.8, 0., -25.8, -53.1, -28.1, -2.97,
5 23., 50.3, 79.1, 109.2, 141.7, 176., 213.9,
6 256.6, 299.6, 348.2, 400.5, 456.6, 518.1,
7 584.0, 571.9, 550.7, 524.9, 496.8, 463.4,
8 427., 385.3, 339.8, 291.3, 237.4, 181.3, 122.9,
9 62.2, 0. /
C
C
DATA (ZEPSNN(J),J=1,28) / 0., 0.,
1 2.04E-3, 4.49E-3, 6.8E-3, 8.16E-3, 6.80E-3,
2 1.06E-2, 1.31E-2, 0., 2.3E-3, 3.88E-3,
3 5.71E-3, 5.44E-3, 8.16E-3, 6.8E-3, 8.3E-3,
4 4.32E-3, 5.11E-3, 6.04E-3, 7.08E-3,
5 8.12E-3, 9.69E-3, 1.13E-2, 1.37E-2, 1.49E-2,
6 1.71E-2, 0. /
C
DATA (ZEPSNN(J),J=29,60) / 1.52E-5, 1.93E-5,
1 5.62E-5, 1.20E-4, 2.13E-4, 3.34E-4, 4.66E-4,
2 6.66E-4, 9.10E-4, 1.25E-3, 1.69E-3, 1.98E-3,
3 3.03E-3, 3.92E-3, 5.19E-3, 6.40E-3, 8.05E-3,
4 9.80E-3, 1.08E-2, 1.19E-2, 1.32E-2, 1.47E-2,
5 1.59E-2, 1.81E-2, 1.92E-2, 2.10E-2, 2.33E-2,
6 2.57E-2, 2.82E-2, 3.10E-2, 3.43E-2, 0. /
C
C
DATA (ZALPNN(J),J=1,60) / 1.0, 1.0,
1 1.0, .93, .86, .80, .87, .77, .77, 1.0,
2 .99, .90, .83, .87, .77, .82, .79, 1.06,
3 1.03, 1., .97, .94, .91, .88, .85,
4 .83, .80, 1.0, 2.46, 2.4, 2.14, 1.96,
5 1.83, 1.72, 1.64, 1.57, 1.49, 1.41, 1.34,
6 1.30, 1.19, 1.13, 1.06, 1.01, .95, .91,
7 .89, .87, .85, .83, .82, .80, .78, .76,
8 .74, .72, .70, .68, .66, 1.0 /
C
C
DATA (ZY0(J),J=1,10) / 1.0, .511, .400, 7*.230 /
C