Skip to content

confinement_time

ConfinementTimeModel

Bases: IntEnum

Confinement time (τ_E) model types

Source code in process/models/physics/confinement_time.py
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
class ConfinementTimeModel(IntEnum):
    """Confinement time (τ_E) model types"""

    USER_INPUT = (0, "User input electron confinement   ")
    NEO_ALCATOR = (1, "Neo-Alcator                (Ohmic)")
    MIRNOV = (2, "Mirnov                         (H)")
    MEREZHKIN_MUHKOVATOV = (3, "Merezkhin-Muhkovatov    (Ohmic)(L)")
    SHIMOMURA = (4, "Shimomura                      (H)")
    KAYE_GOLDSTON = (5, "Kaye-Goldston                  (L)")
    ITER_89P = (6, "ITER 89-P                      (L)")
    ITER_89_0 = (7, "ITER 89-O                      (L)")
    REBUT_LALLIA = (8, "Rebut-Lallia                   (L)")
    GOLDSTON = (9, "Goldston                       (L)")
    T_10 = (10, "T10                            (L)")
    JAERI = (11, "JAERI / Odajima-Shimomura      (L)")
    KAYE_BIG = (12, "Kaye-Big Complex               (L)")
    ITER_H90_P = (13, "ITER H90-P                     (H)")
    MINIMUM_OF_ITER_89P_AND_ITER_89_0 = (14, "ITER 89-P & 89-O min           (L)")
    RIEDEL_L = (15, "Riedel                         (L)")
    CHRISTIANSEN = (16, "Christiansen                   (L)")
    LACKNER_GOTTARDI = (17, "Lackner-Gottardi               (L)")
    NEO_KAYE = (18, "Neo-Kaye                       (L)")
    RIEDEL_H = (19, "Riedel                         (H)")
    ITER_H90_P_AMENDED = (20, "ITER H90-P amended             (H)")
    SUDO_ET_AL = (21, "LHD                        (Stell)")
    GYRO_REDUCED_BOHM = (22, "Gyro-reduced Bohm          (Stell)")
    LACKNER_GOTTARDI_STELLARATOR = (23, "Lackner-Gottardi           (Stell)")
    ITER_93H = (24, "ITER-93H  ELM-free             (H)")
    TITAN_REMOVED = (25, "TITAN RFP OBSOLETE                ")
    ITER_H97P = (26, "ITER H-97P ELM-free            (H)")
    ITER_H97P_ELMY = (27, "ITER H-97P ELMy                (H)")
    ITER_96P = (28, "ITER-96P (ITER-97L)            (L)")
    VALOVIC_ELMY = (29, "Valovic modified ELMy          (H)")
    KAYE = (30, "Kaye 98 modified               (L)")
    ITER_PB98P_Y = (31, "ITERH-PB98P(y)                 (H)")
    IPB98_Y = (32, "IPB98(y)                       (H)")
    ITER_IPB98Y1 = (33, "IPB98(y,1)                     (H)")
    ITER_IPB98Y2 = (34, "IPB98(y,2)                     (H)")
    ITER_IPB98Y3 = (35, "IPB98(y,3)                     (H)")
    ITER_IPB98Y4 = (36, "IPB98(y,4)                     (H)")
    ISS95_STELLARATOR = (37, "ISS95                      (Stell)")
    ISS04_STELLARATOR = (38, "ISS04                      (Stell)")
    DS03 = (39, "DS03 beta-independent          (H)")
    MURARI = (40, 'Murari "Non-power law"         (H)')
    PETTY08 = (41, "Petty 2008                 (ST)(H)")
    LANG_HIGH_DENSITY = (42, "Lang high density              (H)")
    HUBBARD_NOMINAL = (43, "Hubbard 2017 - nominal         (I)")
    HUBBARD_LOWER = (44, "Hubbard 2017 - lower           (I)")
    HUBBARD_UPPER = (45, "Hubbard 2017 - upper           (I)")
    MENARD_NSTX = (46, "Menard NSTX                (ST)(H)")
    MENARD_NSTX_PETTY08_HYBRID = (47, "Menard NSTX-Petty08 hybrid (ST)(H)")
    NSTX_GYRO_BOHM = (48, "Buxton NSTX gyro-Bohm      (ST)(H)")
    ITPA20 = (49, "ITPA20                         (H)")
    ITPA20_IL = (50, "ITPA20-IL                      (H)")

    def __new__(cls, value, full_name):
        obj = int.__new__(cls, value)
        obj._value_ = value
        obj.full_name = full_name
        return obj

USER_INPUT = (0, 'User input electron confinement ') class-attribute instance-attribute

NEO_ALCATOR = (1, 'Neo-Alcator (Ohmic)') class-attribute instance-attribute

MIRNOV = (2, 'Mirnov (H)') class-attribute instance-attribute

MEREZHKIN_MUHKOVATOV = (3, 'Merezkhin-Muhkovatov (Ohmic)(L)') class-attribute instance-attribute

SHIMOMURA = (4, 'Shimomura (H)') class-attribute instance-attribute

KAYE_GOLDSTON = (5, 'Kaye-Goldston (L)') class-attribute instance-attribute

ITER_89P = (6, 'ITER 89-P (L)') class-attribute instance-attribute

ITER_89_0 = (7, 'ITER 89-O (L)') class-attribute instance-attribute

REBUT_LALLIA = (8, 'Rebut-Lallia (L)') class-attribute instance-attribute

GOLDSTON = (9, 'Goldston (L)') class-attribute instance-attribute

T_10 = (10, 'T10 (L)') class-attribute instance-attribute

JAERI = (11, 'JAERI / Odajima-Shimomura (L)') class-attribute instance-attribute

KAYE_BIG = (12, 'Kaye-Big Complex (L)') class-attribute instance-attribute

ITER_H90_P = (13, 'ITER H90-P (H)') class-attribute instance-attribute

MINIMUM_OF_ITER_89P_AND_ITER_89_0 = (14, 'ITER 89-P & 89-O min (L)') class-attribute instance-attribute

RIEDEL_L = (15, 'Riedel (L)') class-attribute instance-attribute

CHRISTIANSEN = (16, 'Christiansen (L)') class-attribute instance-attribute

LACKNER_GOTTARDI = (17, 'Lackner-Gottardi (L)') class-attribute instance-attribute

NEO_KAYE = (18, 'Neo-Kaye (L)') class-attribute instance-attribute

RIEDEL_H = (19, 'Riedel (H)') class-attribute instance-attribute

ITER_H90_P_AMENDED = (20, 'ITER H90-P amended (H)') class-attribute instance-attribute

SUDO_ET_AL = (21, 'LHD (Stell)') class-attribute instance-attribute

GYRO_REDUCED_BOHM = (22, 'Gyro-reduced Bohm (Stell)') class-attribute instance-attribute

LACKNER_GOTTARDI_STELLARATOR = (23, 'Lackner-Gottardi (Stell)') class-attribute instance-attribute

ITER_93H = (24, 'ITER-93H ELM-free (H)') class-attribute instance-attribute

TITAN_REMOVED = (25, 'TITAN RFP OBSOLETE ') class-attribute instance-attribute

ITER_H97P = (26, 'ITER H-97P ELM-free (H)') class-attribute instance-attribute

ITER_H97P_ELMY = (27, 'ITER H-97P ELMy (H)') class-attribute instance-attribute

ITER_96P = (28, 'ITER-96P (ITER-97L) (L)') class-attribute instance-attribute

VALOVIC_ELMY = (29, 'Valovic modified ELMy (H)') class-attribute instance-attribute

KAYE = (30, 'Kaye 98 modified (L)') class-attribute instance-attribute

ITER_PB98P_Y = (31, 'ITERH-PB98P(y) (H)') class-attribute instance-attribute

IPB98_Y = (32, 'IPB98(y) (H)') class-attribute instance-attribute

ITER_IPB98Y1 = (33, 'IPB98(y,1) (H)') class-attribute instance-attribute

ITER_IPB98Y2 = (34, 'IPB98(y,2) (H)') class-attribute instance-attribute

ITER_IPB98Y3 = (35, 'IPB98(y,3) (H)') class-attribute instance-attribute

ITER_IPB98Y4 = (36, 'IPB98(y,4) (H)') class-attribute instance-attribute

ISS95_STELLARATOR = (37, 'ISS95 (Stell)') class-attribute instance-attribute

ISS04_STELLARATOR = (38, 'ISS04 (Stell)') class-attribute instance-attribute

DS03 = (39, 'DS03 beta-independent (H)') class-attribute instance-attribute

MURARI = (40, 'Murari "Non-power law" (H)') class-attribute instance-attribute

PETTY08 = (41, 'Petty 2008 (ST)(H)') class-attribute instance-attribute

LANG_HIGH_DENSITY = (42, 'Lang high density (H)') class-attribute instance-attribute

HUBBARD_NOMINAL = (43, 'Hubbard 2017 - nominal (I)') class-attribute instance-attribute

HUBBARD_LOWER = (44, 'Hubbard 2017 - lower (I)') class-attribute instance-attribute

HUBBARD_UPPER = (45, 'Hubbard 2017 - upper (I)') class-attribute instance-attribute

MENARD_NSTX = (46, 'Menard NSTX (ST)(H)') class-attribute instance-attribute

MENARD_NSTX_PETTY08_HYBRID = (47, 'Menard NSTX-Petty08 hybrid (ST)(H)') class-attribute instance-attribute

NSTX_GYRO_BOHM = (48, 'Buxton NSTX gyro-Bohm (ST)(H)') class-attribute instance-attribute

ITPA20 = (49, 'ITPA20 (H)') class-attribute instance-attribute

ITPA20_IL = (50, 'ITPA20-IL (H)') class-attribute instance-attribute

ConfinementRadiationLossModel

Bases: IntEnum

Confinement radiation loss model types

Source code in process/models/physics/confinement_time.py
82
83
84
85
86
87
88
89
90
91
92
93
class ConfinementRadiationLossModel(IntEnum):
    """Confinement radiation loss model types"""

    FULL_RADIATION = (0, "All radiation included in loss power term")
    CORE_ONLY = (1, "Only core radiation included in loss power term")
    NO_RADIATION = (2, "No radiation included in loss power term")

    def __new__(cls, value, description):
        obj = int.__new__(cls, value)
        obj._value_ = value
        obj.description = description
        return obj

FULL_RADIATION = (0, 'All radiation included in loss power term') class-attribute instance-attribute

CORE_ONLY = (1, 'Only core radiation included in loss power term') class-attribute instance-attribute

NO_RADIATION = (2, 'No radiation included in loss power term') class-attribute instance-attribute

PlasmaConfinementTime

Class to calculate plasma confinement time using various empirical scaling laws

Source code in process/models/physics/confinement_time.py
  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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
class PlasmaConfinementTime:
    """Class to calculate plasma confinement time using various empirical scaling laws"""

    def __init__(self):
        self.outfile = constants.NOUT
        self.mfile = constants.MFILE

    def calculate_confinement_time(
        self,
        m_fuel_amu: float,
        p_alpha_total_mw: float,
        aspect: float,
        b_plasma_toroidal_on_axis: float,
        nd_plasma_ions_total_vol_avg: float,
        nd_plasma_electrons_vol_avg: float,
        nd_plasma_electron_line: float,
        eps: float,
        hfact: float,
        i_confinement_time: int,
        i_plasma_ignited: int,
        kappa: float,
        kappa95: float,
        p_non_alpha_charged_mw: float,
        p_hcd_injected_total_mw: float,
        plasma_current: float,
        pden_plasma_core_rad_mw: float,
        rmajor: float,
        rminor: float,
        temp_plasma_electron_density_weighted_kev: float,
        temp_plasma_ion_density_weighted_kev: float,
        q95: float,
        qstar: float,
        vol_plasma: float,
        zeff: float,
    ) -> tuple[float, float, float, float, float, float, float]:
        """Calculate the confinement times and the transport power loss terms.

        Parameters
        ----------
        m_fuel_amu :
            Average mass of fuel (amu)
        p_alpha_total_mw :
            Alpha particle power (MW)
        aspect :
            Aspect ratio
        b_plasma_toroidal_on_axis :
            Toroidal field on axis (T)
        nd_plasma_ions_total_vol_avg :
            Total ion density (/m3)
        nd_plasma_electrons_vol_avg :
            Volume averaged electron density (/m3)
        nd_plasma_electron_line :
            Line-averaged electron density (/m3)
        eps :
            Inverse aspect ratio
        hfact :
            H factor on energy confinement scalings
        i_confinement_time :
            Switch for energy confinement scaling to use
        i_plasma_ignited :
            Switch for ignited calculation
        kappa :
            Plasma elongation
        kappa95 :
            Plasma elongation at 95% surface
        p_non_alpha_charged_mw :
            Non-alpha charged particle fusion power (MW)
        p_hcd_injected_total_mw :
            Auxiliary power to ions and electrons (MW)
        plasma_current :
            Plasma current (A)
        pden_plasma_core_rad_mw :
            Total core radiation power (MW/m3)
        q95 :
            Edge safety factor (tokamaks), or rotational transform iotabar (stellarators)
        qstar :
            Equivalent cylindrical edge safety factor
        rmajor :
            Plasma major radius (m)
        rminor :
            Plasma minor radius (m)
        temp_plasma_electron_density_weighted_kev :
            Density weighted average electron temperature (keV)
        temp_plasma_ion_density_weighted_kev :
            Density weighted average ion temperature (keV)
        vol_plasma :
            Plasma volume (m3)
        a_plasma_poloidal :
            Plasma cross-sectional area (m2)
        zeff :
            Plasma effective charge

        Returns
        -------
        type
            Tuple containing:
            - pden_electron_transport_loss_mw (float): Electron transport power (MW/m3)
            - pden_ion_transport_loss_mw (float): Ion transport power (MW/m3)
            - t_electron_energy_confinement (float): Electron energy confinement time (s)
            - t_ion_energy_confinement (float): Ion energy confinement time (s)
            - t_energy_confinement (float): Global energy confinement time (s)
            - p_plasma_loss_mw (float): Heating power (MW) assumed in calculation

        """

        # ========================================================================

        # Calculate heating power (MW)
        p_plasma_loss_mw = (
            physics_variables.f_p_alpha_plasma_deposited * p_alpha_total_mw
            + p_non_alpha_charged_mw
            + physics_variables.p_plasma_ohmic_mw
        )

        # If the device is not ignited, add the injected auxiliary power
        if i_plasma_ignited == 0:
            p_plasma_loss_mw = p_plasma_loss_mw + p_hcd_injected_total_mw

        # Include the radiation as a loss term based on radiation model
        try:
            model = ConfinementRadiationLossModel(int(physics_variables.i_rad_loss))

            if model == ConfinementRadiationLossModel.FULL_RADIATION:
                p_plasma_loss_mw = (
                    p_plasma_loss_mw - physics_variables.pden_plasma_rad_mw * vol_plasma
                )
            elif model == ConfinementRadiationLossModel.CORE_ONLY:
                p_plasma_loss_mw = (
                    p_plasma_loss_mw - pden_plasma_core_rad_mw * vol_plasma
                )
            # NO_RADIATION: do not adjust p_plasma_loss_mw for radiation
        except ValueError as e:
            raise ProcessValueError(
                "Illegal value of i_rad_loss",
                i_rad_loss=physics_variables.i_rad_loss,
            ) from e

        # Ensure heating power is positive (shouldn't be necessary)
        p_plasma_loss_mw = max(p_plasma_loss_mw, 1.0e-3)

        # ========================================================================

        # Line averaged electron density in scaled units
        dnla20 = nd_plasma_electron_line * 1.0e-20
        dnla19 = nd_plasma_electron_line * 1.0e-19

        # Volume averaged electron density in units of 10**20 m**-3
        n20 = nd_plasma_electrons_vol_avg / 1.0e20

        # Plasma current in MA
        pcur = plasma_current / 1.0e6

        # Separatrix kappa defined with plasma volume for IPB scalings
        # Updated version of kappa used by the IPB98 scalings correction in:

        # None Otto Kardaun, N. K. Thomsen, and None Alexander Chudnovskiy,
        # “Corrections to a sequence of papers in Nuclear Fusion,” Nuclear Fusion,
        # vol. 48, no. 9, pp. 099801099801, Aug. 2008,
        # doi: https://doi.org/10.1088/0029-5515/48/9/099801.

        physics_variables.kappa_ipb = (vol_plasma / (2.0 * np.pi * rmajor)) / (
            np.pi * rminor**2
        )

        # Electron energy confinement times

        try:
            model = ConfinementTimeModel(i_confinement_time)
        except ValueError as e:
            raise ProcessValueError(
                "Illegal value for i_confinement_time",
                i_confinement_time=i_confinement_time,
            ) from e

        # ========================================================================

        # User defined confinement time
        if (
            model == ConfinementTimeModel.USER_INPUT
        ):  # t_electron_energy_confinement is an input
            t_electron_confinement = physics_variables.tauee_in

        # ========================================================================

        # Nec-Alcator(NA) OH scaling
        if (
            model == ConfinementTimeModel.NEO_ALCATOR
        ):  # t_electron_energy_confinement is an input
            t_electron_confinement = self.neo_alcator_confinement_time(
                n20, rminor, rmajor, qstar
            )

        # ========================================================================

        # "Mirnov"-like scaling (H-mode)
        elif model == ConfinementTimeModel.MIRNOV:  # Mirnov scaling (H-mode)
            t_electron_confinement = self.mirnov_confinement_time(rminor, kappa95, pcur)

        # ========================================================================

        # Merezhkin-Mukhovatov (MM) OH/L-mode scaling
        elif model == ConfinementTimeModel.MEREZHKIN_MUHKOVATOV:
            t_electron_confinement = self.merezhkin_muhkovatov_confinement_time(
                rmajor,
                rminor,
                kappa95,
                qstar,
                dnla20,
                m_fuel_amu,
                temp_plasma_electron_density_weighted_kev,
            )

        # ========================================================================

        # Shimomura (S) optimized H-mode scaling
        elif model == ConfinementTimeModel.SHIMOMURA:
            t_electron_confinement = self.shimomura_confinement_time(
                rmajor, rminor, b_plasma_toroidal_on_axis, kappa95, m_fuel_amu
            )

        # ========================================================================

        # Kaye-Goldston scaling (L-mode)
        elif model == ConfinementTimeModel.KAYE_GOLDSTON:
            t_electron_confinement = self.kaye_goldston_confinement_time(
                pcur,
                rmajor,
                rminor,
                kappa,
                dnla20,
                b_plasma_toroidal_on_axis,
                m_fuel_amu,
                p_plasma_loss_mw,
            )

        # ========================================================================

        # ITER Power scaling - ITER 89-P (L-mode)
        elif model == ConfinementTimeModel.ITER_89P:
            t_electron_confinement = self.iter_89p_confinement_time(
                pcur,
                rmajor,
                rminor,
                kappa,
                dnla20,
                b_plasma_toroidal_on_axis,
                m_fuel_amu,
                p_plasma_loss_mw,
            )

        # ========================================================================

        # ITER Offset linear scaling - ITER 89-O (L-mode)
        elif model == ConfinementTimeModel.ITER_89_0:
            t_electron_confinement = self.iter_89_0_confinement_time(
                pcur,
                rmajor,
                rminor,
                kappa,
                dnla20,
                b_plasma_toroidal_on_axis,
                m_fuel_amu,
                p_plasma_loss_mw,
            )
        # ========================================================================

        # Rebut-Lallia offset linear scaling (L-mode)
        elif model == ConfinementTimeModel.REBUT_LALLIA:
            t_electron_confinement = self.rebut_lallia_confinement_time(
                rminor,
                rmajor,
                kappa,
                m_fuel_amu,
                pcur,
                zeff,
                dnla20,
                b_plasma_toroidal_on_axis,
                p_plasma_loss_mw,
            )

        # ========================================================================

        # Goldston scaling (L-mode)
        elif model == ConfinementTimeModel.GOLDSTON:  # Goldston scaling (L-mode)
            t_electron_confinement = self.goldston_confinement_time(
                pcur, rmajor, rminor, kappa95, m_fuel_amu, p_plasma_loss_mw
            )

        # ========================================================================

        # T-10 scaling (L-mode)
        elif model == ConfinementTimeModel.T_10:
            t_electron_confinement = self.t10_confinement_time(
                dnla20,
                rmajor,
                qstar,
                b_plasma_toroidal_on_axis,
                rminor,
                kappa95,
                p_plasma_loss_mw,
                zeff,
                pcur,
            )

        # ========================================================================

        # JAERI / Odajima-Shimomura L-mode scaling
        elif model == ConfinementTimeModel.JAERI:  # JAERI scaling
            t_electron_confinement = self.jaeri_confinement_time(
                kappa95,
                rminor,
                m_fuel_amu,
                n20,
                pcur,
                b_plasma_toroidal_on_axis,
                rmajor,
                qstar,
                zeff,
                p_plasma_loss_mw,
            )

        # ========================================================================

        # Kaye "big"  L-mode scaling (based only on big tokamak data)
        elif model == ConfinementTimeModel.KAYE_BIG:
            t_electron_confinement = self.kaye_big_confinement_time(
                rmajor,
                rminor,
                b_plasma_toroidal_on_axis,
                kappa95,
                pcur,
                n20,
                m_fuel_amu,
                p_plasma_loss_mw,
            )

        # ========================================================================

        # ITER H90-P H-mode scaling
        elif model == ConfinementTimeModel.ITER_H90_P:
            t_electron_confinement = self.iter_h90_p_confinement_time(
                pcur,
                rmajor,
                rminor,
                kappa,
                dnla20,
                b_plasma_toroidal_on_axis,
                m_fuel_amu,
                p_plasma_loss_mw,
            )

        # ========================================================================

        # Minimum of ITER 89-P and ITER 89-O
        elif model == ConfinementTimeModel.MINIMUM_OF_ITER_89P_AND_ITER_89_0:
            t_electron_confinement = min(
                self.iter_89p_confinement_time(
                    pcur,
                    rmajor,
                    rminor,
                    kappa,
                    dnla20,
                    b_plasma_toroidal_on_axis,
                    m_fuel_amu,
                    p_plasma_loss_mw,
                ),
                self.iter_89_0_confinement_time(
                    pcur,
                    rmajor,
                    rminor,
                    kappa,
                    dnla20,
                    b_plasma_toroidal_on_axis,
                    m_fuel_amu,
                    p_plasma_loss_mw,
                ),
            )

        # ========================================================================

        # Riedel scaling (L-mode)
        elif model == ConfinementTimeModel.RIEDEL_L:
            t_electron_confinement = self.riedel_l_confinement_time(
                pcur,
                rmajor,
                rminor,
                kappa95,
                dnla20,
                b_plasma_toroidal_on_axis,
                p_plasma_loss_mw,
            )

        # ========================================================================

        # Christiansen et al scaling (L-mode)
        elif model == ConfinementTimeModel.CHRISTIANSEN:
            t_electron_confinement = self.christiansen_confinement_time(
                pcur,
                rmajor,
                rminor,
                kappa95,
                dnla20,
                b_plasma_toroidal_on_axis,
                p_plasma_loss_mw,
                m_fuel_amu,
            )

        # ========================================================================

        # Lackner-Gottardi scaling (L-mode)
        elif model == ConfinementTimeModel.LACKNER_GOTTARDI:
            t_electron_confinement = self.lackner_gottardi_confinement_time(
                pcur,
                rmajor,
                rminor,
                kappa95,
                dnla20,
                b_plasma_toroidal_on_axis,
                p_plasma_loss_mw,
            )

        # ========================================================================

        # Neo-Kaye scaling (L-mode)
        elif model == ConfinementTimeModel.NEO_KAYE:
            t_electron_confinement = self.neo_kaye_confinement_time(
                pcur,
                rmajor,
                rminor,
                kappa95,
                dnla20,
                b_plasma_toroidal_on_axis,
                p_plasma_loss_mw,
            )

        # ======== ================================================================

        # Riedel scaling (H-mode)
        elif model == ConfinementTimeModel.RIEDEL_H:
            t_electron_confinement = self.riedel_h_confinement_time(
                pcur,
                rmajor,
                rminor,
                kappa95,
                dnla20,
                b_plasma_toroidal_on_axis,
                m_fuel_amu,
                p_plasma_loss_mw,
            )

        # ========================================================================

        # Amended version of ITER H90-P law
        elif model == ConfinementTimeModel.ITER_H90_P_AMENDED:
            t_electron_confinement = self.iter_h90_p_amended_confinement_time(
                pcur,
                b_plasma_toroidal_on_axis,
                m_fuel_amu,
                rmajor,
                p_plasma_loss_mw,
                kappa,
            )

        # ==========================================================================

        # Sudo et al. scaling (stellarators/heliotron)
        elif model == ConfinementTimeModel.SUDO_ET_AL:
            t_electron_confinement = self.sudo_et_al_confinement_time(
                rmajor,
                rminor,
                dnla20,
                b_plasma_toroidal_on_axis,
                p_plasma_loss_mw,
            )

        # ==========================================================================

        # Gyro-reduced Bohm scaling
        elif model == ConfinementTimeModel.GYRO_REDUCED_BOHM:
            t_electron_confinement = self.gyro_reduced_bohm_confinement_time(
                b_plasma_toroidal_on_axis,
                dnla20,
                p_plasma_loss_mw,
                rminor,
                rmajor,
            )

        # ==========================================================================

        # Lackner-Gottardi stellarator scaling
        elif model == ConfinementTimeModel.LACKNER_GOTTARDI_STELLARATOR:
            t_electron_confinement = self.lackner_gottardi_stellarator_confinement_time(
                rmajor,
                rminor,
                dnla20,
                b_plasma_toroidal_on_axis,
                p_plasma_loss_mw,
                q95,
            )

        # ==========================================================================

        # ITER_93 ELM-free H-mode scaling
        elif model == ConfinementTimeModel.ITER_93H:
            t_electron_confinement = self.iter_93h_confinement_time(
                pcur,
                b_plasma_toroidal_on_axis,
                p_plasma_loss_mw,
                m_fuel_amu,
                rmajor,
                dnla20,
                aspect,
                kappa,
            )

        # ==========================================================================
        # Scaling removed
        elif model == ConfinementTimeModel.TITAN_REMOVED:
            raise ProcessValueError("Scaling removed")
        # ==========================================================================

        # ELM-free: ITERH-97P
        elif model == ConfinementTimeModel.ITER_H97P:
            t_electron_confinement = self.iter_h97p_confinement_time(
                pcur,
                b_plasma_toroidal_on_axis,
                p_plasma_loss_mw,
                dnla19,
                rmajor,
                aspect,
                kappa,
                m_fuel_amu,
            )

        # ==========================================================================

        # ELMy: ITERH-97P(y)
        elif model == ConfinementTimeModel.ITER_H97P_ELMY:
            t_electron_confinement = self.iter_h97p_elmy_confinement_time(
                pcur,
                b_plasma_toroidal_on_axis,
                p_plasma_loss_mw,
                dnla19,
                rmajor,
                aspect,
                kappa,
                m_fuel_amu,
            )

        # ==========================================================================

        # ITER-96P (= ITER-97L) L-mode scaling
        elif model == ConfinementTimeModel.ITER_96P:
            t_electron_confinement = self.iter_96p_confinement_time(
                pcur,
                b_plasma_toroidal_on_axis,
                kappa95,
                rmajor,
                aspect,
                dnla19,
                m_fuel_amu,
                p_plasma_loss_mw,
            )

        # ==========================================================================

        # Valovic modified ELMy-H mode scaling
        # WARNING: No reference found for this scaling. This may not be its real name
        elif model == ConfinementTimeModel.VALOVIC_ELMY:
            t_electron_confinement = self.valovic_elmy_confinement_time(
                pcur,
                b_plasma_toroidal_on_axis,
                dnla19,
                m_fuel_amu,
                rmajor,
                rminor,
                kappa,
                p_plasma_loss_mw,
            )

        # ==========================================================================

        # Kaye PPPL Workshop April 1998 L-mode scaling
        # WARNING: No reference found for this scaling. This may not be its real name
        elif model == ConfinementTimeModel.KAYE:
            t_electron_confinement = self.kaye_confinement_time(
                pcur,
                b_plasma_toroidal_on_axis,
                kappa,
                rmajor,
                aspect,
                dnla19,
                m_fuel_amu,
                p_plasma_loss_mw,
            )

        # ==========================================================================

        # ITERH-PB98P(y), ELMy H-mode scaling
        # WARNING: No reference found for this scaling. This may not be its real name
        elif model == ConfinementTimeModel.ITER_PB98P_Y:
            t_electron_confinement = self.iter_pb98py_confinement_time(
                pcur,
                b_plasma_toroidal_on_axis,
                dnla19,
                p_plasma_loss_mw,
                rmajor,
                physics_variables.kappa_ipb,
                aspect,
                m_fuel_amu,
            )

        # ==========================================================================

        # IPB98(y), ELMy H-mode scaling
        elif model == ConfinementTimeModel.IPB98_Y:
            t_electron_confinement = self.iter_ipb98y_confinement_time(
                pcur,
                b_plasma_toroidal_on_axis,
                dnla19,
                p_plasma_loss_mw,
                rmajor,
                kappa,
                aspect,
                m_fuel_amu,
            )

        # ==========================================================================

        # IPB98(y,1), ELMy H-mode scaling
        elif model == ConfinementTimeModel.ITER_IPB98Y1:
            t_electron_confinement = self.iter_ipb98y1_confinement_time(
                pcur,
                b_plasma_toroidal_on_axis,
                dnla19,
                p_plasma_loss_mw,
                rmajor,
                physics_variables.kappa_ipb,
                aspect,
                m_fuel_amu,
            )

        # ==========================================================================

        # IPB98(y,2), ELMy H-mode scaling
        elif model == ConfinementTimeModel.ITER_IPB98Y2:
            t_electron_confinement = self.iter_ipb98y2_confinement_time(
                pcur,
                b_plasma_toroidal_on_axis,
                dnla19,
                p_plasma_loss_mw,
                rmajor,
                physics_variables.kappa_ipb,
                aspect,
                m_fuel_amu,
            )

        # ==========================================================================

        # IPB98(y,3), ELMy H-mode scaling
        elif model == ConfinementTimeModel.ITER_IPB98Y3:
            t_electron_confinement = self.iter_ipb98y3_confinement_time(
                pcur,
                b_plasma_toroidal_on_axis,
                dnla19,
                p_plasma_loss_mw,
                rmajor,
                physics_variables.kappa_ipb,
                aspect,
                m_fuel_amu,
            )

        # ==========================================================================

        # IPB98(y,4), ELMy H-mode scaling
        elif model == ConfinementTimeModel.ITER_IPB98Y4:
            t_electron_confinement = self.iter_ipb98y4_confinement_time(
                pcur,
                b_plasma_toroidal_on_axis,
                dnla19,
                p_plasma_loss_mw,
                rmajor,
                physics_variables.kappa_ipb,
                aspect,
                m_fuel_amu,
            )

        # ==========================================================================

        # ISS95 stellarator scaling
        elif model == ConfinementTimeModel.ISS95_STELLARATOR:
            # dummy argument q95 is actual argument iotabar for stellarators
            iotabar = q95
            t_electron_confinement = self.iss95_stellarator_confinement_time(
                rminor,
                rmajor,
                dnla19,
                b_plasma_toroidal_on_axis,
                p_plasma_loss_mw,
                iotabar,
            )

        # ==========================================================================

        # ISS04 stellarator scaling
        elif model == ConfinementTimeModel.ISS04_STELLARATOR:
            # dummy argument q95 is actual argument iotabar for stellarators
            iotabar = q95
            t_electron_confinement = self.iss04_stellarator_confinement_time(
                rminor,
                rmajor,
                dnla19,
                b_plasma_toroidal_on_axis,
                p_plasma_loss_mw,
                iotabar,
            )

        # ==========================================================================

        # DS03 beta-independent H-mode scaling
        elif model == ConfinementTimeModel.DS03:
            t_electron_confinement = self.ds03_confinement_time(
                pcur,
                b_plasma_toroidal_on_axis,
                dnla19,
                p_plasma_loss_mw,
                rmajor,
                kappa95,
                aspect,
                m_fuel_amu,
            )

        # ==========================================================================

        #  Murari "Non-power law" scaling
        elif model == ConfinementTimeModel.MURARI:
            t_electron_confinement = self.murari_confinement_time(
                pcur,
                rmajor,
                physics_variables.kappa_ipb,
                dnla19,
                b_plasma_toroidal_on_axis,
                p_plasma_loss_mw,
            )

        # ==========================================================================

        # Petty08, beta independent dimensionless scaling
        elif model == ConfinementTimeModel.PETTY08:
            t_electron_confinement = self.petty08_confinement_time(
                pcur,
                b_plasma_toroidal_on_axis,
                dnla19,
                p_plasma_loss_mw,
                rmajor,
                physics_variables.kappa_ipb,
                aspect,
            )

        # ==========================================================================

        # Lang high density relevant confinement scaling
        elif model == ConfinementTimeModel.LANG_HIGH_DENSITY:
            t_electron_confinement = self.lang_high_density_confinement_time(
                plasma_current,
                b_plasma_toroidal_on_axis,
                nd_plasma_electron_line,
                p_plasma_loss_mw,
                rmajor,
                rminor,
                q95,
                qstar,
                aspect,
                m_fuel_amu,
                physics_variables.kappa_ipb,
            )

        # ==========================================================================

        # Hubbard 2017 I-mode confinement time scaling - nominal
        elif model == ConfinementTimeModel.HUBBARD_NOMINAL:
            t_electron_confinement = self.hubbard_nominal_confinement_time(
                pcur,
                b_plasma_toroidal_on_axis,
                dnla20,
                p_plasma_loss_mw,
            )

        # ==========================================================================

        # Hubbard 2017 I-mode confinement time scaling - lower
        elif model == ConfinementTimeModel.HUBBARD_LOWER:
            t_electron_confinement = self.hubbard_lower_confinement_time(
                pcur,
                b_plasma_toroidal_on_axis,
                dnla20,
                p_plasma_loss_mw,
            )

        # ==========================================================================

        # Hubbard 2017 I-mode confinement time scaling - upper
        elif model == ConfinementTimeModel.HUBBARD_UPPER:
            t_electron_confinement = self.hubbard_upper_confinement_time(
                pcur,
                b_plasma_toroidal_on_axis,
                dnla20,
                p_plasma_loss_mw,
            )

        # ==========================================================================

        # Menard NSTX, ELMy H-mode scaling
        elif model == ConfinementTimeModel.MENARD_NSTX:
            t_electron_confinement = self.menard_nstx_confinement_time(
                pcur,
                b_plasma_toroidal_on_axis,
                dnla19,
                p_plasma_loss_mw,
                rmajor,
                physics_variables.kappa_ipb,
                aspect,
                m_fuel_amu,
            )

        # ==========================================================================

        # Menard NSTX-Petty08 Hybrid
        elif model == ConfinementTimeModel.MENARD_NSTX_PETTY08_HYBRID:
            t_electron_confinement = self.menard_nstx_petty08_hybrid_confinement_time(
                pcur,
                b_plasma_toroidal_on_axis,
                dnla19,
                p_plasma_loss_mw,
                rmajor,
                physics_variables.kappa_ipb,
                aspect,
                m_fuel_amu,
            )

        # ==========================================================================

        # NSTX gyro-Bohm (Buxton)
        elif model == ConfinementTimeModel.NSTX_GYRO_BOHM:
            t_electron_confinement = self.nstx_gyro_bohm_confinement_time(
                pcur,
                b_plasma_toroidal_on_axis,
                p_plasma_loss_mw,
                rmajor,
                dnla20,
            )

        # ==========================================================================

        # ITPA20 H-mode scaling
        elif model == ConfinementTimeModel.ITPA20:
            t_electron_confinement = self.itpa20_confinement_time(
                pcur,
                b_plasma_toroidal_on_axis,
                dnla19,
                p_plasma_loss_mw,
                rmajor,
                physics_variables.triang,
                physics_variables.kappa_ipb,
                eps,
                physics_variables.m_ions_total_amu,
            )

        # ==========================================================================

        # ITPA20-IL confinement time scaling
        elif model == ConfinementTimeModel.ITPA20_IL:
            t_electron_confinement = self.itpa20_il_confinement_time(
                pcur,
                b_plasma_toroidal_on_axis,
                p_plasma_loss_mw,
                dnla19,
                physics_variables.m_ions_total_amu,
                rmajor,
                physics_variables.triang,
                physics_variables.kappa_ipb,
            )

        # ==========================================================================

        else:
            raise ProcessValueError(
                "Illegal value for i_confinement_time",
                i_confinement_time=i_confinement_time,
            )

        # Apply H-factor correction to chosen scaling
        t_electron_energy_confinement = hfact * t_electron_confinement

        # Ion energy confinement time
        t_ion_energy_confinement = t_electron_energy_confinement

        # Calculate H* non-radiation corrected H factor
        # Note: we will assume the IPB-98y2 scaling.
        if physics_variables.i_rad_loss == 1:
            physics_variables.hstar = (
                hfact
                * (
                    p_plasma_loss_mw
                    / (
                        p_plasma_loss_mw
                        + physics_variables.pden_plasma_sync_mw * vol_plasma
                        + physics_variables.p_plasma_inner_rad_mw
                    )
                )
                ** 0.31
            )
        elif physics_variables.i_rad_loss == 0:
            physics_variables.hstar = (
                hfact
                * (
                    p_plasma_loss_mw
                    / (
                        p_plasma_loss_mw
                        + physics_variables.pden_plasma_rad_mw * vol_plasma
                    )
                )
                ** 0.31
            )
        elif physics_variables.i_rad_loss == 2:
            physics_variables.hstar = hfact

        # Calculation of the transport power loss terms
        # Transport losses in Watts/m3 are 3/2 * n.e.T / tau , with T in eV
        # (here, temp_plasma_ion_density_weighted_kev and temp_plasma_electron_density_weighted_kev are in keV, and pden_electron_transport_loss_mw and pden_ion_transport_loss_mw are in MW/m3)

        # The transport losses is just the electron and ion thermal energies divided by the confinement time.
        pden_ion_transport_loss_mw = (
            (3 / 2)
            * (constants.ELECTRON_CHARGE / 1e3)
            * nd_plasma_ions_total_vol_avg
            * temp_plasma_ion_density_weighted_kev
            / t_ion_energy_confinement
        )
        pden_electron_transport_loss_mw = (
            (3 / 2)
            * (constants.ELECTRON_CHARGE / 1e3)
            * nd_plasma_electrons_vol_avg
            * temp_plasma_electron_density_weighted_kev
            / t_electron_energy_confinement
        )

        ratio = (nd_plasma_ions_total_vol_avg / nd_plasma_electrons_vol_avg) * (
            temp_plasma_ion_density_weighted_kev
            / temp_plasma_electron_density_weighted_kev
        )

        # Global energy confinement time

        t_energy_confinement = (ratio + 1.0e0) / (
            ratio / t_ion_energy_confinement + 1.0e0 / t_electron_energy_confinement
        )

        # For comparison directly calculate the confinement time from the stored energy calculated
        # from the total plasma beta and the loss power used above.
        physics_variables.t_energy_confinement_beta = (
            physics_variables.e_plasma_beta / 1e6
        ) / p_plasma_loss_mw

        return (
            pden_electron_transport_loss_mw,
            pden_ion_transport_loss_mw,
            t_electron_energy_confinement,
            t_ion_energy_confinement,
            t_energy_confinement,
            p_plasma_loss_mw,
        )

    @staticmethod
    def calculate_double_and_triple_product(
        nd_plasma_electrons_vol_avg: float,
        temp_plasma_electrons_vol_avg_kev: float,
        t_energy_confinement: float,
    ) -> tuple[float, float]:
        """Calculate the plasma double (nτ_E) and triple product (nTτ_E)

        Parameters
        ----------
        nd_plasma_electrons_vol_avg :
            Volume averaged electron density [m⁻³]
        temp_plasma_electrons_vol_avg_kev :
            Volume averaged electron temperature [keV]
        t_energy_confinement :
            Energy confinement time [s]

        Returns
        -------
        :
            Tuple[float, float]: (ntau, nTtau) where ntau is the plasma double product (n * τ_E) in units of m⁻³ * s,
            and nTtau is the plasma triple product (n * T * τ_E) in units of keV * s * m⁻³

        """

        ntau = t_energy_confinement * nd_plasma_electrons_vol_avg
        nTtau = ntau * temp_plasma_electrons_vol_avg_kev

        return ntau, nTtau

    def find_other_h_factors(self, i_confinement_time: int) -> float:
        """Function to find H-factor for the equivalent confinement time in other scalings.

        Parameters
        ----------
        i_confinement_time : int
            Index of the confinement time scaling to use.

        Returns
        -------
        float
            The calculated H-factor.

        """

        def fhz(hfact: float) -> float:
            """Function used to find power balance.

            Parameters
            ----------
            hfact : float
                H-factor to be used in the calculation.
            hfact: float :


            Returns
            -------
            float
                The difference between the calculated power and the required power for balance.

            """
            (
                ptrez,
                ptriz,
                _,
                _,
                _,
                _,
            ) = self.calculate_confinement_time(
                m_fuel_amu=physics_variables.m_fuel_amu,
                p_alpha_total_mw=physics_variables.p_alpha_total_mw,
                aspect=physics_variables.aspect,
                b_plasma_toroidal_on_axis=physics_variables.b_plasma_toroidal_on_axis,
                nd_plasma_ions_total_vol_avg=physics_variables.nd_plasma_ions_total_vol_avg,
                nd_plasma_electrons_vol_avg=physics_variables.nd_plasma_electrons_vol_avg,
                nd_plasma_electron_line=physics_variables.nd_plasma_electron_line,
                eps=physics_variables.eps,
                hfact=hfact,
                i_confinement_time=i_confinement_time,
                i_plasma_ignited=physics_variables.i_plasma_ignited,
                kappa=physics_variables.kappa,
                kappa95=physics_variables.kappa95,
                p_non_alpha_charged_mw=physics_variables.p_non_alpha_charged_mw,
                p_hcd_injected_total_mw=current_drive_variables.p_hcd_injected_total_mw,
                plasma_current=physics_variables.plasma_current,
                pden_plasma_core_rad_mw=physics_variables.pden_plasma_core_rad_mw,
                rmajor=physics_variables.rmajor,
                rminor=physics_variables.rminor,
                temp_plasma_electron_density_weighted_kev=physics_variables.temp_plasma_electron_density_weighted_kev,
                temp_plasma_ion_density_weighted_kev=physics_variables.temp_plasma_ion_density_weighted_kev,
                q95=physics_variables.q95,
                qstar=physics_variables.qstar,
                vol_plasma=physics_variables.vol_plasma,
                zeff=physics_variables.n_charge_plasma_effective_vol_avg,
            )

            # At power balance, fhz is zero.
            fhz_value = (
                ptrez
                + ptriz
                - physics_variables.f_p_alpha_plasma_deposited
                * physics_variables.pden_alpha_total_mw
                - physics_variables.pden_non_alpha_charged_mw
                - physics_variables.pden_plasma_ohmic_mw
            )

            # Take into account whether injected power is included in tau_e calculation (i.e. whether device is ignited)
            if physics_variables.i_plasma_ignited == 0:
                fhz_value -= (
                    current_drive_variables.p_hcd_injected_total_mw
                    / physics_variables.vol_plasma
                )

            # Include the radiation power if requested
            if physics_variables.i_rad_loss == 0:
                fhz_value += physics_variables.pden_plasma_rad_mw
            elif physics_variables.i_rad_loss == 1:
                fhz_value += physics_variables.pden_plasma_core_rad_mw

            return fhz_value

        return root_scalar(fhz, bracket=(0.01, 150), xtol=0.001).root

    def output_confinement_time_info(self):
        po.oheadr(self.outfile, "Energy Confinement")

        if physics_variables.i_plasma_ignited == 1:
            po.ocmmnt(
                self.outfile,
                "Device is assumed to be ignited for the calculation of confinement time",
            )
            po.oblnkl(self.outfile)

        tauelaw = ConfinementTimeModel(physics_variables.i_confinement_time).full_name

        po.ocmmnt(
            self.outfile,
            f"Confinement scaling law: {tauelaw}",
        )

        po.ovarst(
            self.outfile,
            "Confinement scaling law",
            "(tauelaw)",
            f'"{tauelaw.strip().split(" ")[0]}"',
        )

        po.ovarrf(
            self.outfile, "Confinement H factor", "(hfact)", physics_variables.hfact
        )
        po.ovarrf(
            self.outfile,
            "Global thermal energy confinement time, from scaling (s)",
            "(t_energy_confinement)",
            physics_variables.t_energy_confinement,
            "OP ",
        )
        po.ovarrf(
            self.outfile,
            "Directly calculated total energy confinement time (s)",
            "(t_energy_confinement_beta)",
            physics_variables.t_energy_confinement_beta,
            "OP ",
        )
        po.ocmmnt(
            self.outfile,
            "(Total thermal energy derived from total plasma beta / loss power)",
        )
        po.ovarrf(
            self.outfile,
            "Ion energy confinement time, from scaling (s)",
            "(t_ion_energy_confinement)",
            physics_variables.t_ion_energy_confinement,
            "OP ",
        )
        po.ovarrf(
            self.outfile,
            "Electron energy confinement time, from scaling (s)",
            "(t_electron_energy_confinement)",
            physics_variables.t_electron_energy_confinement,
            "OP ",
        )
        po.ovarre(
            self.outfile,
            "Fusion double product (s/m3)",
            "(ntau)",
            physics_variables.ntau,
            "OP ",
        )
        po.ovarre(
            self.outfile,
            "Lawson Triple product (keV s/m3)",
            "(nTtau)",
            physics_variables.nTtau,
            "OP ",
        )
        po.ovarre(
            self.outfile,
            "Transport loss power assumed in scaling law (MW)",
            "(p_plasma_loss_mw)",
            physics_variables.p_plasma_loss_mw,
            "OP ",
        )
        po.ovarin(
            self.outfile,
            "Switch for radiation loss term usage in power balance",
            "(i_rad_loss)",
            physics_variables.i_rad_loss,
        )
        model = ConfinementRadiationLossModel(physics_variables.i_rad_loss)

        if model == ConfinementRadiationLossModel.FULL_RADIATION:
            po.ovarre(
                self.outfile,
                "Radiation power subtracted from plasma heating power balance (MW)",
                "",
                physics_variables.p_plasma_rad_mw,
                "OP ",
            )
        elif model == ConfinementRadiationLossModel.CORE_ONLY:
            po.ovarre(
                self.outfile,
                "Radiation power subtracted from plasma heating power balance (MW)",
                "",
                physics_variables.p_plasma_inner_rad_mw,
                "OP ",
            )
        else:  # NO_RADIATION
            po.ovarre(
                self.outfile,
                "Radiation power subtracted from plasma heating power balance (MW)",
                "",
                0.0e0,
            )

        po.ocmmnt(self.outfile, f"  (Radiation correction: {model.description})")
        po.ovarrf(
            self.outfile,
            "H* non-radiation corrected",
            "(hstar)",
            physics_variables.hstar,
            "OP",
        )
        po.ocmmnt(self.outfile, "  (H* assumes IPB98(y,2), ELMy H-mode scaling)")
        po.ovarrf(
            self.outfile,
            "Alpha particle confinement time (s)",
            "(t_alpha_confinement)",
            physics_variables.t_alpha_confinement,
            "OP ",
        )
        # Note alpha confinement time is no longer equal to fuel particle confinement time.
        po.ovarrf(
            self.outfile,
            "Alpha particle/energy confinement time ratio",
            "(f_alpha_energy_confinement)",
            physics_variables.f_alpha_energy_confinement,
            "OP ",
        )
        po.ovarrf(
            self.outfile,
            "Lower limit on f_alpha_energy_confinement",
            "(f_alpha_energy_confinement_min)",
            constraint_variables.f_alpha_energy_confinement_min,
        )

        # Plot table of al the H-factor scalings and coparison values
        self.output_confinement_comparison(istell=stellarator_variables.istell)

    def output_confinement_comparison(self, istell: int):
        """Routine to calculate ignition margin for different confinement scalings and equivalent confinement times for H=1.

        This routine calculates the ignition margin at the final point with different scalings and outputs the results to a file.

        The output includes:
        - Energy confinement times
        - Required H-factors for power balance

        The routine iterates over a range of confinement times, skipping the first user input and a specific index (25). For each confinement time, it calculates various parameters related to confinement and ignition using the `calculate_confinement_time` method. It then calculates the H-factor for when the plasma is ignited using the `find_other_h_factors` method and writes the results to the output file.

        Output format:
        - Header: "Energy confinement times, and required H-factors :"
        - Columns: "Scaling law", "Confinement time [s]", "H-factor for power balance"

        Methods used:
        - `calculate_confinement_time`: Calculates confinement-related parameters.
        - `find_other_h_factors`: Calculates the H-factor for a given confinement time.

        Parameters
        ----------
        istell :
            Indicator for stellarator (0 for tokamak, >=1 for stellarator).

        """

        po.oheadr(self.outfile, "Energy confinement times, and required H-factors :")
        po.ocmmnt(
            self.outfile,
            f"{'':>2}{'Scaling law':<27}{'Electron confinement time [s]':<32}Equivalent H-factor for",
        )
        po.ocmmnt(
            self.outfile,
            f"{'':>38}{'for H = 1':<23}same confinement time",
        )
        po.oblnkl(self.outfile)

        # List of key values for stellarator scalings
        stellarator_scalings = [21, 22, 23, 37, 38]

        # Plot all of the confinement scalings for comparison when H = 1
        # Start from range 1 as the first i_confinement_time is a user input
        # If stellarator, use the stellarator scalings
        for i_confinement_time in (
            range(1, physics_variables.N_CONFINEMENT_SCALINGS)
            if istell == 0
            else stellarator_scalings
        ):
            if i_confinement_time == 25:
                continue
            (
                _,
                _,
                taueez,
                _,
                _,
                _,
            ) = self.calculate_confinement_time(
                m_fuel_amu=physics_variables.m_fuel_amu,
                p_alpha_total_mw=physics_variables.p_alpha_total_mw,
                aspect=physics_variables.aspect,
                b_plasma_toroidal_on_axis=physics_variables.b_plasma_toroidal_on_axis,
                nd_plasma_ions_total_vol_avg=physics_variables.nd_plasma_ions_total_vol_avg,
                nd_plasma_electrons_vol_avg=physics_variables.nd_plasma_electrons_vol_avg,
                nd_plasma_electron_line=physics_variables.nd_plasma_electron_line,
                eps=physics_variables.eps,
                hfact=1.0,
                i_confinement_time=i_confinement_time,
                i_plasma_ignited=physics_variables.i_plasma_ignited,
                kappa=physics_variables.kappa,
                kappa95=physics_variables.kappa95,
                p_non_alpha_charged_mw=physics_variables.p_non_alpha_charged_mw,
                p_hcd_injected_total_mw=current_drive_variables.p_hcd_injected_total_mw,
                plasma_current=physics_variables.plasma_current,
                pden_plasma_core_rad_mw=physics_variables.pden_plasma_core_rad_mw,
                rmajor=physics_variables.rmajor,
                rminor=physics_variables.rminor,
                temp_plasma_electron_density_weighted_kev=physics_variables.temp_plasma_electron_density_weighted_kev,
                temp_plasma_ion_density_weighted_kev=physics_variables.temp_plasma_ion_density_weighted_kev,
                q95=physics_variables.q95,
                qstar=physics_variables.qstar,
                vol_plasma=physics_variables.vol_plasma,
                zeff=physics_variables.n_charge_plasma_effective_vol_avg,
            )

            try:
                # Calculate the H-factor for the same confinement time in other scalings
                physics_variables.hfac[i_confinement_time - 1] = (
                    self.find_other_h_factors(i_confinement_time)
                )
            except ValueError:
                # This is only used for a table in the OUT.DAT so if it fails
                # just write a NaN--its not worth crashing PROCESS over.
                physics_variables.hfac[i_confinement_time - 1] = np.nan

            scaling_name = ConfinementTimeModel(i_confinement_time).full_name

            po.ocmmnt(
                self.outfile,
                f"{'':>2}{scaling_name:<38}"
                f"{taueez:<28.3f}{physics_variables.hfac[i_confinement_time - 1]:.3f}",
            )

        po.oblnkl(self.outfile)
        po.ostars(self.outfile, 110)

    @staticmethod
    def neo_alcator_confinement_time(
        dene20: float, rminor: float, rmajor: float, qstar: float
    ) -> float:
        """Calculate the Nec-Alcator(NA) OH scaling confinement time

        Parameters
        ----------
        dene20 :
            Volume averaged electron density in units of 10**20 m**-3
        rminor :
            Plasma minor radius [m]
        rmajor :
            Plasma major radius [m]
        qstar :
            Equivalent cylindrical edge safety factor

        Returns
        -------
        :
            float: Neo-Alcator confinement time [s]


        References:
            - N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group,
            "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
        """
        return 0.07e0 * dene20 * rminor * rmajor * rmajor * qstar

    @staticmethod
    def mirnov_confinement_time(rminor: float, kappa95: float, pcur: float) -> float:
        """Calculate the Mirnov scaling (H-mode) confinement time

        Parameters
        ----------
        rminor :
            Plasma minor radius [m]
        kappa95 :
            Plasma elongation at 95% flux surface
        pcur :
            Plasma current [MA]

        Returns
        -------
        :
            float: Mirnov scaling confinement time [s]

        References:
            - N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group,
            "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
        """
        return 0.2e0 * rminor * np.sqrt(kappa95) * pcur

    @staticmethod
    def merezhkin_muhkovatov_confinement_time(
        rmajor: float,
        rminor: float,
        kappa95: float,
        qstar: float,
        dnla20: float,
        afuel: float,
        ten: float,
    ) -> float:
        """Calculate the Merezhkin-Mukhovatov (MM) OH/L-mode scaling confinement time

        Parameters
        ----------
        rmajor :
            Plasma major radius [m]
        rminor :
            Plasma minor radius [m]
        kappa95 :
            Plasma elongation at 95% flux surface
        qstar :
            Equivalent cylindrical edge safety factor
        dnla20 :
            Line averaged electron density in units of 10**20 m**-3
        afuel :
            Fuel atomic mass number
        ten :
            Electron temperature [keV]

        Returns
        -------
        :
            float: Merezhkin-Mukhovatov confinement time [s]


        References:
            - N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group,
            "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
        """
        return (
            3.5e-3
            * rmajor**2.75e0
            * rminor**0.25e0
            * kappa95**0.125e0
            * qstar
            * dnla20
            * np.sqrt(afuel)
            / np.sqrt(ten / 10.0e0)
        )

    @staticmethod
    def shimomura_confinement_time(
        rmajor: float,
        rminor: float,
        b_plasma_toroidal_on_axis: float,
        kappa95: float,
        afuel: float,
    ) -> float:
        """Calculate the  Shimomura (S) optimized H-mode scaling confinement time

        Parameters
        ----------
        rmajor :
            Plasma major radius [m]
        rminor :
            Plasma minor radius [m]
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        kappa95 :
            Plasma elongation at 95% flux surface
        afuel :
            Fuel atomic mass number

        Returns
        -------
        :
            float: Shimomura confinement time [s]

        References:
            - N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group,
            "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
        """
        return (
            0.045e0
            * rmajor
            * rminor
            * b_plasma_toroidal_on_axis
            * np.sqrt(kappa95)
            * np.sqrt(afuel)
        )

    @staticmethod
    def kaye_goldston_confinement_time(
        kappa95: float,
        pcur: float,
        n20: float,
        rmajor: float,
        afuel: float,
        b_plasma_toroidal_on_axis: float,
        rminor: float,
        p_plasma_loss_mw: float,
    ) -> float:
        """Calculate the Kaye-Goldston (KG) L-mode scaling confinement time

        Parameters
        ----------
        kappa95 :
            Plasma elongation at 95% flux surface
        pcur :
            Plasma current [MA]
        n20 :
            Line averaged electron density in units of 10**20 m**-3
        rmajor :
            Plasma major radius [m]
        afuel :
            Fuel atomic mass number
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        rminor :
            Plasma minor radius [m]
        p_plasma_loss_mw :
            Net Heating power [MW]

        Returns
        -------
        :
            float: Kaye-Goldston confinement time [s]

        Notes:
            - An isotope correction factor (M_i/1.5)^0.5 is added to the original scaling to reflect the fact
            that the empirical fits to the data were from experiments with H and D mixture, M_i = 1.5

        References:
            - N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group,
            "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
        """
        return (
            0.055e0
            * kappa95**0.28e0
            * pcur**1.24e0
            * n20**0.26e0
            * rmajor**1.65e0
            * np.sqrt(afuel / 1.5e0)
            / (
                b_plasma_toroidal_on_axis**0.09e0
                * rminor**0.49e0
                * p_plasma_loss_mw**0.58e0
            )
        )

    @staticmethod
    def iter_89p_confinement_time(
        pcur: float,
        rmajor: float,
        rminor: float,
        kappa: float,
        dnla20: float,
        b_plasma_toroidal_on_axis: float,
        afuel: float,
        p_plasma_loss_mw: float,
    ) -> float:
        """Calculate the ITER Power scaling - ITER 89-P (L-mode) confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        rmajor :
            Plasma major radius [m]
        rminor :
            Plasma minor radius [m]
        kappa :
            Plasma elongation
        dnla20 :
            Line averaged electron density in units of 10**20 m**-3
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        afuel :
            Fuel atomic mass number
        p_plasma_loss_mw :
            Net Heating power [MW]

        Returns
        -------
        :
            float: ITER 89-P confinement time [s]


        References:
            - T.C.Hender et.al., 'Physics Assesment of the European Reactor Study', AEA FUS 172, 1992

            - N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group,
            "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
        """
        return (
            0.048e0
            * pcur**0.85e0
            * rmajor**1.2e0
            * rminor**0.3e0
            * np.sqrt(kappa)
            * dnla20**0.1e0
            * b_plasma_toroidal_on_axis**0.2e0
            * np.sqrt(afuel)
            / np.sqrt(p_plasma_loss_mw)
        )

    @staticmethod
    def iter_89_0_confinement_time(
        pcur: float,
        rmajor: float,
        rminor: float,
        kappa: float,
        dnla20: float,
        b_plasma_toroidal_on_axis: float,
        afuel: float,
        p_plasma_loss_mw: float,
    ) -> float:
        """Calculate the ITER Offset linear scaling - ITER 89-O (L-mode) confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        rmajor :
            Plasma major radius [m]
        rminor :
            Plasma minor radius [m]
        kappa :
            Plasma elongation
        dnla20 :
            Line averaged electron density in units of 10**20 m**-3
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        afuel :
            Fuel atomic mass number
        p_plasma_loss_mw :
            Net Heating power [MW]

        Returns
        -------
        :
            float: ITER 89-O confinement time [s]

        References:
            - T.C.Hender et.al., 'Physics Assesment of the European Reactor Study', AEA FUS 172, 1992
        """
        term1 = (
            0.04e0
            * pcur**0.5e0
            * rmajor**0.3e0
            * rminor**0.8e0
            * kappa**0.6e0
            * afuel**0.5e0
        )
        term2 = (
            0.064e0
            * pcur**0.8e0
            * rmajor**1.6e0
            * rminor**0.6e0
            * kappa**0.5e0
            * dnla20**0.6e0
            * b_plasma_toroidal_on_axis**0.35e0
            * afuel**0.2e0
            / p_plasma_loss_mw
        )
        return term1 + term2

    @staticmethod
    def rebut_lallia_confinement_time(
        rminor: float,
        rmajor: float,
        kappa: float,
        afuel: float,
        pcur: float,
        zeff: float,
        dnla20: float,
        b_plasma_toroidal_on_axis: float,
        p_plasma_loss_mw: float,
    ) -> float:
        """Calculate the Rebut-Lallia offset linear scaling (L-mode) confinement time

        Parameters
        ----------
        rminor :
            Plasma minor radius [m]
        rmajor :
            Plasma major radius [m]
        kappa :
            Plasma elongation at 95% flux surface
        afuel :
            Fuel atomic mass number
        pcur :
            Plasma current [MA]
        zeff :
            Effective charge
        dnla20 :
            Line averaged electron density in units of 10**20 m**-3
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        p_plasma_loss_mw :
            Net Heating power [MW]

        Returns
        -------
        :
            float: Rebut-Lallia confinement time [s]


        References:
            - T.C.Hender et.al., 'Physics Assesment of the European Reactor Study', AEA FUS 172, 1992
        """
        rll = (rminor**2 * rmajor * kappa) ** (1.0e0 / 3.0e0)
        term1 = 1.2e-2 * pcur * rll**1.5e0 / np.sqrt(zeff)
        term2 = (
            0.146e0
            * dnla20**0.75e0
            * np.sqrt(pcur)
            * np.sqrt(b_plasma_toroidal_on_axis)
            * rll**2.75e0
            * zeff**0.25e0
            / p_plasma_loss_mw
        )
        return 1.65e0 * np.sqrt(afuel / 2.0e0) * (term1 + term2)

    @staticmethod
    def goldston_confinement_time(
        pcur: float,
        rmajor: float,
        rminor: float,
        kappa95: float,
        afuel: float,
        p_plasma_loss_mw: float,
    ) -> float:
        """Calculate the Goldston scaling (L-mode) confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        rmajor :
            Plasma major radius [m]
        rminor :
            Plasma minor radius [m]
        kappa95 :
            Plasma elongation at 95% flux surface
        afuel :
            Fuel atomic mass number
        p_plasma_loss_mw :
            Net Heating power [MW]

        Returns
        -------
        :
            float: Goldston confinement time [s]

        References:
            - N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group,
            "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
        """
        return (
            0.037e0
            * pcur
            * rmajor**1.75e0
            * rminor ** (-0.37e0)
            * np.sqrt(kappa95)
            * np.sqrt(afuel / 1.5e0)
            / np.sqrt(p_plasma_loss_mw)
        )

    @staticmethod
    def t10_confinement_time(
        dnla20: float,
        rmajor: float,
        qstar: float,
        b_plasma_toroidal_on_axis: float,
        rminor: float,
        kappa95: float,
        p_plasma_loss_mw: float,
        zeff: float,
        pcur: float,
    ) -> float:
        """Calculate the T-10 scaling confinement time

        Parameters
        ----------
        dnla20 :
            Line averaged electron density in units of 10**20 m**-3
        rmajor :
            Plasma major radius [m]
        qstar :
            Equivalent cylindrical edge safety factor
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        rminor :
            Plasma minor radius [m]
        kappa95 :
            Plasma elongation at 95% flux surface
        p_plasma_loss_mw :
            Net Heating power [MW]
        zeff :
            Effective charge
        pcur :
            Plasma current [MA]

        Returns
        -------
        :
            float: T-10 confinement time [s]

        References:
            - N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group,
            "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
        """
        denfac = dnla20 * rmajor * qstar / (1.3e0 * b_plasma_toroidal_on_axis)
        denfac = min(1.0e0, denfac)
        return (
            0.095e0
            * rmajor
            * rminor
            * b_plasma_toroidal_on_axis
            * np.sqrt(kappa95)
            * denfac
            / p_plasma_loss_mw**0.4e0
            * (zeff**2 * pcur**4 / (rmajor * rminor * qstar**3 * kappa95**1.5e0))
            ** 0.08e0
        )

    @staticmethod
    def jaeri_confinement_time(
        kappa95: float,
        rminor: float,
        afuel: float,
        n20: float,
        pcur: float,
        b_plasma_toroidal_on_axis: float,
        rmajor: float,
        qstar: float,
        zeff: float,
        p_plasma_loss_mw: float,
    ) -> float:
        """Calculate the JAERI / Odajima-Shimomura L-mode scaling confinement time

        Parameters
        ----------
        kappa95 :
            Plasma elongation at 95% flux surface
        rminor :
            Plasma minor radius [m]
        afuel :
            Fuel atomic mass number
        n20 :
            Line averaged electron density in units of 10**20 m**-3
        pcur :
            Plasma current [MA]
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        rmajor :
            Plasma major radius [m]
        qstar :
            Equivalent cylindrical edge safety factor
        zeff :
            Effective charge
        p_plasma_loss_mw :
            Net Heating power [MW]

        Returns
        -------
        :
            float: JAERI confinement time [s]

        References:
            - N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group,
            "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
        """
        gjaeri = (
            zeff**0.4e0
            * ((15.0e0 - zeff) / 20.0e0) ** 0.6e0
            * (3.0e0 * qstar * (qstar + 5.0e0) / ((qstar + 2.0e0) * (qstar + 7.0e0)))
            ** 0.6e0
        )
        return (
            0.085e0 * kappa95 * rminor**2 * np.sqrt(afuel)
            + 0.069e0
            * n20**0.6e0
            * pcur
            * b_plasma_toroidal_on_axis**0.2e0
            * rminor**0.4e0
            * rmajor**1.6e0
            * np.sqrt(afuel)
            * gjaeri
            * kappa95**0.2e0
            / p_plasma_loss_mw
        )

    @staticmethod
    def kaye_big_confinement_time(
        rmajor: float,
        rminor: float,
        b_plasma_toroidal_on_axis: float,
        kappa95: float,
        pcur: float,
        n20: float,
        afuel: float,
        p_plasma_loss_mw: float,
    ) -> float:
        """Calculate the Kaye-Big scaling confinement time

        Parameters
        ----------
        rmajor :
            Plasma major radius [m]
        rminor :
            Plasma minor radius [m]
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        kappa95 :
            Plasma elongation at 95% flux surface
        pcur :
            Plasma current [MA]
        n20 :
            Line averaged electron density in units of 10**20 m**-3
        afuel :
            Fuel atomic mass number
        p_plasma_loss_mw :
            Net Heating power [MW]

        Returns
        -------
        :
            float: Kaye-Big confinement time [s]


        References:
            - N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group,
            "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
        """
        return (
            0.105e0
            * np.sqrt(rmajor)
            * rminor**0.8e0
            * b_plasma_toroidal_on_axis**0.3e0
            * kappa95**0.25e0
            * pcur**0.85e0
            * n20**0.1e0
            * np.sqrt(afuel)
            / np.sqrt(p_plasma_loss_mw)
        )

    @staticmethod
    def iter_h90_p_confinement_time(
        pcur: float,
        rmajor: float,
        rminor: float,
        kappa: float,
        dnla20: float,
        b_plasma_toroidal_on_axis: float,
        afuel: float,
        p_plasma_loss_mw: float,
    ) -> float:
        """Calculate the ITER H-mode scaling - ITER H90-P confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        rmajor :
            Plasma major radius [m]
        rminor :
            Plasma minor radius [m]
        kappa :
            Plasma elongation
        dnla20 :
            Line averaged electron density in units of 10**20 m**-3
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        afuel :
            Fuel atomic mass number
        p_plasma_loss_mw :
            Net Heating power [MW]

        Returns
        -------
        :
            float: ITER H90-P confinement time [s]


        References:
            - T.C.Hender et.al., 'Physics Assesment of the European Reactor Study', AEA FUS 172, 1992
        """
        return (
            0.064e0
            * pcur**0.87e0
            * rmajor**1.82e0
            * rminor ** (-0.12e0)
            * kappa**0.35e0
            * dnla20**0.09e0
            * b_plasma_toroidal_on_axis**0.15e0
            * np.sqrt(afuel)
            / np.sqrt(p_plasma_loss_mw)
        )

    @staticmethod
    def riedel_l_confinement_time(
        pcur: float,
        rmajor: float,
        rminor: float,
        kappa95: float,
        dnla20: float,
        b_plasma_toroidal_on_axis: float,
        p_plasma_loss_mw: float,
    ) -> float:
        """Calculate the Riedel scaling (L-mode) confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        rmajor :
            Plasma major radius [m]
        rminor :
            Plasma minor radius [m]
        kappa95 :
            Plasma elongation at 95% flux surface
        dnla20 :
            Line averaged electron density in units of 10**20 m**-3
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        p_plasma_loss_mw :
            Net Heating power [MW]

        Returns
        -------
        :
            float: Riedel confinement time [s]

        References:
            - T.C.Hender et.al., 'Physics Assesment of the European Reactor Study', AEA FUS 172, 1992
        """
        return (
            0.044e0
            * pcur**0.93e0
            * rmajor**1.37e0
            * rminor ** (-0.049e0)
            * kappa95**0.588e0
            * dnla20**0.078e0
            * b_plasma_toroidal_on_axis**0.152e0
            / p_plasma_loss_mw**0.537e0
        )

    @staticmethod
    def christiansen_confinement_time(
        pcur: float,
        rmajor: float,
        rminor: float,
        kappa95: float,
        dnla20: float,
        b_plasma_toroidal_on_axis: float,
        p_plasma_loss_mw: float,
        afuel: float,
    ) -> float:
        """Calculate the Christiansen et al scaling (L-mode) confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        rmajor :
            Plasma major radius [m]
        rminor :
            Plasma minor radius [m]
        kappa95 :
            Plasma elongation at 95% flux surface
        dnla20 :
            Line averaged electron density in units of 10**20 m**-3
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        p_plasma_loss_mw :
            Net Heating power [MW]
        afuel :
            Fuel atomic mass number

        Returns
        -------
        :
            float: Christiansen confinement time [s]

        References:
            - T.C.Hender et.al., 'Physics Assesment of the European Reactor Study', AEA FUS 172, 1992
        """
        return (
            0.24e0
            * pcur**0.79e0
            * rmajor**0.56e0
            * rminor**1.46e0
            * kappa95**0.73e0
            * dnla20**0.41e0
            * b_plasma_toroidal_on_axis**0.29e0
            / (p_plasma_loss_mw**0.79e0 * afuel**0.02e0)
        )

    @staticmethod
    def lackner_gottardi_confinement_time(
        pcur: float,
        rmajor: float,
        rminor: float,
        kappa95: float,
        dnla20: float,
        b_plasma_toroidal_on_axis: float,
        p_plasma_loss_mw: float,
    ) -> float:
        """Calculate the Lackner-Gottardi scaling (L-mode) confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        rmajor :
            Plasma major radius [m]
        rminor :
            Plasma minor radius [m]
        kappa95 :
            Plasma elongation at 95% flux surface
        dnla20 :
            Line averaged electron density in units of 10**20 m**-3
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        p_plasma_loss_mw :
            Net Heating power [MW]

        Returns
        -------
        :
            float: Lackner-Gottardi confinement time [s]

        References:
            - T.C.Hender et.al., 'Physics Assesment of the European Reactor Study', AEA FUS 172, 1992
        """
        qhat = (
            (1.0e0 + kappa95**2)
            * rminor**2
            * b_plasma_toroidal_on_axis
            / (0.4e0 * pcur * rmajor)
        )
        return (
            0.12e0
            * pcur**0.8e0
            * rmajor**1.8e0
            * rminor**0.4e0
            * kappa95
            * (1.0e0 + kappa95) ** (-0.8e0)
            * dnla20**0.6e0
            * qhat**0.4e0
            / p_plasma_loss_mw**0.6e0
        )

    @staticmethod
    def neo_kaye_confinement_time(
        pcur: float,
        rmajor: float,
        rminor: float,
        kappa95: float,
        dnla20: float,
        b_plasma_toroidal_on_axis: float,
        p_plasma_loss_mw: float,
    ) -> float:
        """Calculate the Neo-Kaye scaling (L-mode) confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        rmajor :
            Plasma major radius [m]
        rminor :
            Plasma minor radius [m]
        kappa95 :
            Plasma elongation at 95% flux surface
        dnla20 :
            Line averaged electron density in units of 10**20 m**-3
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        p_plasma_loss_mw :
            Net Heating power [MW]

        Returns
        -------
        :
            float: Neo-Kaye confinement time [s]


        References:
            - T.C.Hender et.al., 'Physics Assesment of the European Reactor Study', AEA FUS 172, 1992
        """
        return (
            0.063e0
            * pcur**1.12e0
            * rmajor**1.3e0
            * rminor ** (-0.04e0)
            * kappa95**0.28e0
            * dnla20**0.14e0
            * b_plasma_toroidal_on_axis**0.04e0
            / p_plasma_loss_mw**0.59e0
        )

    @staticmethod
    def riedel_h_confinement_time(
        pcur: float,
        rmajor: float,
        rminor: float,
        kappa95: float,
        dnla20: float,
        b_plasma_toroidal_on_axis: float,
        afuel: float,
        p_plasma_loss_mw: float,
    ) -> float:
        """Calculate the Riedel scaling (H-mode) confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        rmajor :
            Plasma major radius [m]
        rminor :
            Plasma minor radius [m]
        kappa95 :
            Plasma elongation at 95% flux surface
        dnla20 :
            Line averaged electron density in units of 10**20 m**-3
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        afuel :
            Fuel atomic mass number
        p_plasma_loss_mw :
            Net Heating power [MW]

        Returns
        -------
        :
            float: Riedel H-mode confinement time [s]

        References:
            - T.C.Hender et.al., 'Physics Assesment of the European Reactor Study', AEA FUS 172, 1992
        """
        return (
            0.1e0
            * np.sqrt(afuel)
            * pcur**0.884e0
            * rmajor**1.24e0
            * rminor ** (-0.23e0)
            * kappa95**0.317e0
            * b_plasma_toroidal_on_axis**0.207e0
            * dnla20**0.105e0
            / p_plasma_loss_mw**0.486e0
        )

    @staticmethod
    def iter_h90_p_amended_confinement_time(
        pcur: float,
        b_plasma_toroidal_on_axis: float,
        afuel: float,
        rmajor: float,
        p_plasma_loss_mw: float,
        kappa: float,
    ) -> float:
        """Calculate the amended ITER H90-P confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        afuel :
            Fuel atomic mass number
        rmajor :
            Plasma major radius [m]
        p_plasma_loss_mw :
            Net Heating power [MW]
        kappa :
            Plasma elongation

        Returns
        -------
        :
            float: Amended ITER H90-P confinement time [s]

        References:
            - J. P. Christiansen et al., “Global energy confinement H-mode database for ITER,”
            Nuclear Fusion, vol. 32, no. 2, pp. 291-338, Feb. 1992,
            doi: https://doi.org/10.1088/0029-5515/32/2/i11.
        """
        return (
            0.082e0
            * pcur**1.02e0
            * b_plasma_toroidal_on_axis**0.15e0
            * np.sqrt(afuel)
            * rmajor**1.60e0
            / (p_plasma_loss_mw**0.47e0 * kappa**0.19e0)
        )

    @staticmethod
    def sudo_et_al_confinement_time(
        rmajor: float,
        rminor: float,
        dnla20: float,
        b_plasma_toroidal_on_axis: float,
        p_plasma_loss_mw: float,
    ) -> float:
        """Calculate the Sudo et al. scaling confinement time

        Parameters
        ----------
        rmajor :
            Plasma major radius [m]
        rminor :
            Plasma minor radius [m]
        dnla20 :
            Line averaged electron density in units of 10**20 m**-3
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        p_plasma_loss_mw :
            Net Heating power [MW]

        Returns
        -------
        :
            float: Sudo et al. confinement time [s]

        References:
            - S. Sudo et al., “Scalings of energy confinement and density limit in stellarator/heliotron devices,”
            Nuclear Fusion, vol. 30, no. 1, pp. 11-21, Jan. 1990,
            doi: https://doi.org/10.1088/0029-5515/30/1/002.
        """

        return (
            0.17e0
            * rmajor**0.75e0
            * rminor**2
            * dnla20**0.69e0
            * b_plasma_toroidal_on_axis**0.84e0
            * p_plasma_loss_mw ** (-0.58e0)
        )

    @staticmethod
    def gyro_reduced_bohm_confinement_time(
        b_plasma_toroidal_on_axis: float,
        dnla20: float,
        p_plasma_loss_mw: float,
        rminor: float,
        rmajor: float,
    ) -> float:
        """Calculate the Gyro-reduced Bohm scaling confinement time

        Parameters
        ----------
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        dnla20 :
            Line averaged electron density in units of 10**20 m**-3
        p_plasma_loss_mw :
            Net Heating power [MW]
        rminor :
            Plasma minor radius [m]
        rmajor :
            Plasma major radius [m]

        Returns
        -------
        :
            float: Gyro-reduced Bohm confinement time [s]

        References:
            - Goldston, R. J., H. Biglari, and G. W. Hammett. "E x B/B 2 vs. μ B/B as the Cause of Transport in Tokamaks."
            Bull. Am. Phys. Soc 34 (1989): 1964.
        """
        return (
            0.25e0
            * b_plasma_toroidal_on_axis**0.8e0
            * dnla20**0.6e0
            * p_plasma_loss_mw ** (-0.6e0)
            * rminor**2.4e0
            * rmajor**0.6e0
        )

    @staticmethod
    def lackner_gottardi_stellarator_confinement_time(
        rmajor: float,
        rminor: float,
        dnla20: float,
        b_plasma_toroidal_on_axis: float,
        p_plasma_loss_mw: float,
        q: float,
    ) -> float:
        """Calculate the Lackner-Gottardi stellarator scaling confinement time

        Parameters
        ----------
        rmajor :
            Plasma major radius [m]
        rminor :
            Plasma minor radius [m]
        dnla20 :
            Line averaged electron density in units of 10**20 m**-3
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        p_plasma_loss_mw :
            Net Heating power [MW]
        q :
            Edge safety factor

        Returns
        -------
        :
            float: Lackner-Gottardi stellarator confinement time [s]

        References:
            - K. Lackner and N. A. O. Gottardi, “Tokamak confinement in relation to plateau scaling,”
            Nuclear Fusion, vol. 30, no. 4, pp. 767-770, Apr. 1990,
            doi: https://doi.org/10.1088/0029-5515/30/4/018.
        """
        return (
            0.17e0
            * rmajor
            * rminor**2
            * dnla20**0.6e0
            * b_plasma_toroidal_on_axis**0.8e0
            * p_plasma_loss_mw ** (-0.6e0)
            * q**0.4e0
        )

    @staticmethod
    def iter_93h_confinement_time(
        pcur: float,
        b_plasma_toroidal_on_axis: float,
        p_plasma_loss_mw: float,
        afuel: float,
        rmajor: float,
        dnla20: float,
        aspect: float,
        kappa: float,
    ) -> float:
        """Calculate the ITER-93H scaling ELM-free confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        p_plasma_loss_mw :
            Net Heating power [MW]
        afuel :
            Fuel atomic mass number
        rmajor :
            Plasma major radius [m]
        dnla20 :
            Line averaged electron density in units of 10**20 m**-3
        aspect :
            Aspect ratio
        kappa :
            Plasma elongation

        Returns
        -------
        :
            float: ITER-93H confinement time [s]

        References:
            - K. Thomsen et al., “ITER H mode confinement database update,”
            vol. 34, no. 1, pp. 131-167, Jan. 1994, doi: https://doi.org/10.1088/0029-5515/34/1/i10.
        """
        return (
            0.036e0
            * pcur**1.06e0
            * b_plasma_toroidal_on_axis**0.32e0
            * p_plasma_loss_mw ** (-0.67e0)
            * afuel**0.41e0
            * rmajor**1.79e0
            * dnla20**0.17e0
            * aspect**0.11e0
            * kappa**0.66e0
        )

    @staticmethod
    def iter_h97p_confinement_time(
        pcur: float,
        b_plasma_toroidal_on_axis: float,
        p_plasma_loss_mw: float,
        dnla19: float,
        rmajor: float,
        aspect: float,
        kappa: float,
        afuel: float,
    ) -> float:
        """Calculate the ELM-free ITER H-mode scaling - ITER H97-P confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        p_plasma_loss_mw :
            Net Heating power [MW]
        dnla19 :
            Line averaged electron density in units of 10**19 m**-3
        rmajor :
            Plasma major radius [m]
        aspect :
            Aspect ratio
        kappa :
            Plasma elongation
        afuel :
            Fuel atomic mass number

        Returns
        -------
        :
            float: ITER H97-P confinement time [s]

        References:
            - I. C. Database and M. W. G. (presented Cordey), “Energy confinement scaling and the extrapolation to ITER,”
            Plasma Physics and Controlled Fusion, vol. 39, no. 12B, pp. B115-B127, Dec. 1997,
            doi: https://doi.org/10.1088/0741-3335/39/12b/009.
        """
        return (
            0.031e0
            * pcur**0.95e0
            * b_plasma_toroidal_on_axis**0.25e0
            * p_plasma_loss_mw ** (-0.67e0)
            * dnla19**0.35e0
            * rmajor**1.92e0
            * aspect ** (-0.08e0)
            * kappa**0.63e0
            * afuel**0.42e0
        )

    @staticmethod
    def iter_h97p_elmy_confinement_time(
        pcur: float,
        b_plasma_toroidal_on_axis: float,
        p_plasma_loss_mw: float,
        dnla19: float,
        rmajor: float,
        aspect: float,
        kappa: float,
        afuel: float,
    ) -> float:
        """Calculate the ELMy ITER H-mode scaling - ITER H97-P(y) confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        p_plasma_loss_mw :
            Net Heating power [MW]
        dnla19 :
            Line averaged electron density in units of 10**19 m**-3
        rmajor :
            Plasma major radius [m]
        aspect :
            Aspect ratio
        kappa :
            Plasma elongation
        afuel :
            Fuel atomic mass number

        Returns
        -------
        :
            float: ITER H97-P(y) confinement time [s]

        References:
            - I. C. Database and M. W. G. (presented Cordey), “Energy confinement scaling and the extrapolation to ITER,”
            Plasma Physics and Controlled Fusion, vol. 39, no. 12B, pp. B115-B127, Dec. 1997,
            doi: https://doi.org/10.1088/0741-3335/39/12b/009.

            - International Atomic Energy Agency, Vienna (Austria), "Technical basis for the ITER final design report, cost review and safety analysis (FDR)",
            no.16. Dec. 1998.
        """
        return (
            0.029e0
            * pcur**0.90e0
            * b_plasma_toroidal_on_axis**0.20e0
            * p_plasma_loss_mw ** (-0.66e0)
            * dnla19**0.40e0
            * rmajor**2.03e0
            * aspect ** (-0.19e0)
            * kappa**0.92e0
            * afuel**0.2e0
        )

    @staticmethod
    def iter_96p_confinement_time(
        pcur: float,
        b_plasma_toroidal_on_axis: float,
        kappa95: float,
        rmajor: float,
        aspect: float,
        dnla19: float,
        afuel: float,
        p_plasma_loss_mw: float,
    ) -> float:
        """Calculate the ITER-96P (= ITER-97L) L-mode scaling confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        kappa95 :
            Plasma elongation at 95% flux surface
        rmajor :
            Plasma major radius [m]
        aspect :
            Aspect ratio
        dnla19 :
            Line averaged electron density in units of 10**19 m**-3
        afuel :
            Fuel atomic mass number
        p_plasma_loss_mw :
            Net Heating power [MW]

        Returns
        -------
        :
            float: ITER-96P confinement time [s]

        Notes:
            - The thermal energy confinement time is given below

        References:
            - S. B. Kaye et al., “ITER L mode confinement database,”
            Nuclear Fusion, vol. 37, no. 9, pp. 1303-1328, Sep. 1997,
            doi: https://doi.org/10.1088/0029-5515/37/9/i10.
        """
        return (
            0.023e0
            * pcur**0.96e0
            * b_plasma_toroidal_on_axis**0.03e0
            * kappa95**0.64e0
            * rmajor**1.83e0
            * aspect**0.06e0
            * dnla19**0.40e0
            * afuel**0.20e0
            * p_plasma_loss_mw ** (-0.73e0)
        )

    @staticmethod
    def valovic_elmy_confinement_time(
        pcur: float,
        b_plasma_toroidal_on_axis: float,
        dnla19: float,
        afuel: float,
        rmajor: float,
        rminor: float,
        kappa: float,
        p_plasma_loss_mw: float,
    ) -> float:
        """Calculate the Valovic modified ELMy-H mode scaling confinement time

        Parameters
        ----------
        hfact :
            H-factor
        pcur :
            Plasma current [MA]
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        dnla19 :
            Line averaged electron density in units of 10**19 m**-3
        afuel :
            Fuel atomic mass number
        rmajor :
            Plasma major radius [m]
        rminor :
            Plasma minor radius [m]
        kappa :
            Plasma elongation
        p_plasma_loss_mw :
            Net Heating power [MW]

        Returns
        -------
        :
            float: Valovic modified ELMy-H mode confinement time [s]
        """
        return (
            0.067e0
            * pcur**0.9e0
            * b_plasma_toroidal_on_axis**0.17e0
            * dnla19**0.45e0
            * afuel**0.05e0
            * rmajor**1.316e0
            * rminor**0.79e0
            * kappa**0.56e0
            * p_plasma_loss_mw ** (-0.68e0)
        )

    @staticmethod
    def kaye_confinement_time(
        pcur: float,
        b_plasma_toroidal_on_axis: float,
        kappa: float,
        rmajor: float,
        aspect: float,
        dnla19: float,
        afuel: float,
        p_plasma_loss_mw: float,
    ) -> float:
        """Calculate the Kaye PPPL Workshop April 1998 L-mode scaling confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        kappa :
            Plasma elongation
        rmajor :
            Plasma major radius [m]
        aspect :
            Aspect ratio
        dnla19 :
            Line averaged electron density in units of 10**19 m**-3
        afuel :
            Fuel atomic mass number
        p_plasma_loss_mw :
            Net Heating power [MW]

        Returns
        -------
        :
            float: Kaye PPPL Workshop confinement time [s]

        References:
            - Kaye PPPL Workshop April 1998
        """
        return (
            0.021e0
            * pcur**0.81e0
            * b_plasma_toroidal_on_axis**0.14e0
            * kappa**0.7e0
            * rmajor**2.01e0
            * aspect ** (-0.18e0)
            * dnla19**0.47e0
            * afuel**0.25e0
            * p_plasma_loss_mw ** (-0.73e0)
        )

    @staticmethod
    def iter_pb98py_confinement_time(
        pcur: float,
        b_plasma_toroidal_on_axis: float,
        dnla19: float,
        p_plasma_loss_mw: float,
        rmajor: float,
        kappa: float,
        aspect: float,
        afuel: float,
    ) -> float:
        """Calculate the ITERH-PB98P(y) ELMy H-mode scaling confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        dnla19 :
            Line averaged electron density in units of 10**19 m**-3
        p_plasma_loss_mw :
            Net Heating power [MW]
        rmajor :
            Plasma major radius [m]
        kappa :
            Plasma separatrix elongation
        aspect :
            Aspect ratio
        afuel :
            Fuel atomic mass number

        Returns
        -------
        :
            float: ITERH-PB98P(y) ELMy H-mode confinement time [s]
        """
        return (
            0.0615e0
            * pcur**0.9e0
            * b_plasma_toroidal_on_axis**0.1e0
            * dnla19**0.4e0
            * p_plasma_loss_mw ** (-0.66e0)
            * rmajor**2
            * kappa**0.75e0
            * aspect ** (-0.66e0)
            * afuel**0.2e0
        )

    @staticmethod
    def iter_ipb98y_confinement_time(
        pcur: float,
        b_plasma_toroidal_on_axis: float,
        dnla19: float,
        p_plasma_loss_mw: float,
        rmajor: float,
        kappa: float,
        aspect: float,
        afuel: float,
    ) -> float:
        """Calculate the IPB98(y) ELMy H-mode scaling confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        dnla19 :
            Line averaged electron density in units of 10**19 m**-3
        p_plasma_loss_mw :
            Net Heating power [MW]
        rmajor :
            Plasma major radius [m]
        kappa :
            IPB sprcific plasma separatrix elongation
        aspect :
            Aspect ratio
        afuel :
            Fuel atomic mass number

        Returns
        -------
        :
            float: IPB98(y) ELMy H-mode confinement time [s]

        Notes:
            - Unlike the other IPB98 scaling laws, the IPB98(y) scaling law uses the true separatrix elongation.
            - See correction paper below for more information

        References:
            - I. P. E. G. on C. Transport, I. P. E. G. on C. Database, and I. P. B. Editors, “Chapter 2: Plasma confinement and transport,”
            Nuclear Fusion, vol. 39, no. 12, pp. 2175-2249, Dec. 1999, doi: https://doi.org/10.1088/0029-5515/39/12/302.

            - None Otto Kardaun, N. K. Thomsen, and None Alexander Chudnovskiy, “Corrections to a sequence of papers in Nuclear Fusion,”
            Nuclear Fusion, vol. 48, no. 9, pp. 099801-099801, Aug. 2008, doi: https://doi.org/10.1088/0029-5515/48/9/099801.
        """
        return (
            0.0365e0
            * pcur**0.97e0
            * b_plasma_toroidal_on_axis**0.08e0
            * dnla19**0.41e0
            * p_plasma_loss_mw ** (-0.63e0)
            * rmajor**1.93e0
            * kappa**0.67e0
            * aspect ** (-0.23e0)
            * afuel**0.2e0
        )

    @staticmethod
    def iter_ipb98y1_confinement_time(
        pcur: float,
        b_plasma_toroidal_on_axis: float,
        dnla19: float,
        p_plasma_loss_mw: float,
        rmajor: float,
        kappa_ipb: float,
        aspect: float,
        afuel: float,
    ) -> float:
        """Calculate the IPB98(y,1) ELMy H-mode scaling confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        dnla19 :
            Line averaged electron density in units of 10**19 m**-3
        p_plasma_loss_mw :
            Net Heating power [MW]
        rmajor :
            Plasma major radius [m]
        kappa_ipb :
            IPB specific plasma separatrix elongation
        aspect :
            Aspect ratio
        afuel :
            Fuel atomic mass number

        Returns
        -------
        :
            float: IPB98(y,1) ELMy H-mode confinement time [s]

        Notes:
            - See correction paper below for more information about the re-definition of the elongation used.

        References:
            - I. P. E. G. on C. Transport, I. P. E. G. on C. Database, and I. P. B. Editors, “Chapter 2: Plasma confinement and transport,”
            Nuclear Fusion, vol. 39, no. 12, pp. 2175-2249, Dec. 1999, doi: https://doi.org/10.1088/0029-5515/39/12/302.

            - None Otto Kardaun, N. K. Thomsen, and None Alexander Chudnovskiy, “Corrections to a sequence of papers in Nuclear Fusion,”
            Nuclear Fusion, vol. 48, no. 9, pp. 099801-099801, Aug. 2008, doi: https://doi.org/10.1088/0029-5515/48/9/099801.
        """
        return (
            0.0503e0
            * pcur**0.91e0
            * b_plasma_toroidal_on_axis**0.15e0
            * dnla19**0.44e0
            * p_plasma_loss_mw ** (-0.65e0)
            * rmajor**2.05e0
            * kappa_ipb**0.72e0
            * aspect ** (-0.57e0)
            * afuel**0.13e0
        )

    @staticmethod
    def iter_ipb98y2_confinement_time(
        pcur: float,
        b_plasma_toroidal_on_axis: float,
        dnla19: float,
        p_plasma_loss_mw: float,
        rmajor: float,
        kappa_ipb: float,
        aspect: float,
        afuel: float,
    ) -> float:
        """Calculate the IPB98(y,2) ELMy H-mode scaling confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        dnla19 :
            Line averaged electron density in units of 10**19 m**-3
        p_plasma_loss_mw :
            Net Heating power [MW]
        rmajor :
            Plasma major radius [m]
        kappa_ipb :
            IPB specific plasma separatrix elongation
        aspect :
            Aspect ratio
        afuel :
            Fuel atomic mass number

        Returns
        -------
        :
            float: IPB98(y,2) ELMy H-mode confinement time [s]

        Notes:
            - See correction paper below for more information about the re-definition of the elongation used.

        References:
            - I. P. E. G. on C. Transport, I. P. E. G. on C. Database, and I. P. B. Editors, “Chapter 2: Plasma confinement and transport,”
            Nuclear Fusion, vol. 39, no. 12, pp. 2175-2249, Dec. 1999, doi: https://doi.org/10.1088/0029-5515/39/12/302.

            - None Otto Kardaun, N. K. Thomsen, and None Alexander Chudnovskiy, “Corrections to a sequence of papers in Nuclear Fusion,”
            Nuclear Fusion, vol. 48, no. 9, pp. 099801-099801, Aug. 2008, doi: https://doi.org/10.1088/0029-5515/48/9/099801.
        """
        return (
            0.0562e0
            * pcur**0.93e0
            * b_plasma_toroidal_on_axis**0.15e0
            * dnla19**0.41e0
            * p_plasma_loss_mw ** (-0.69e0)
            * rmajor**1.97e0
            * kappa_ipb**0.78e0
            * aspect ** (-0.58e0)
            * afuel**0.19e0
        )

    @staticmethod
    def iter_ipb98y3_confinement_time(
        pcur: float,
        b_plasma_toroidal_on_axis: float,
        dnla19: float,
        p_plasma_loss_mw: float,
        rmajor: float,
        kappa_ipb: float,
        aspect: float,
        afuel: float,
    ) -> float:
        """Calculate the IPB98(y,3) ELMy H-mode scaling confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        dnla19 :
            Line averaged electron density in units of 10**19 m**-3
        p_plasma_loss_mw :
            Net Heating power [MW]
        rmajor :
            Plasma major radius [m]
        kappa_ipb :
            IPB specific plasma separatrix elongation
        aspect :
            Aspect ratio
        afuel :
            Fuel atomic mass number

        Returns
        -------
        :
            float: IPB98(y,3) ELMy H-mode confinement time [s]

        Notes:
            - See correction paper below for more information about the re-definition of the elongation used.

        References:
            - I. P. E. G. on C. Transport, I. P. E. G. on C. Database, and I. P. B. Editors, “Chapter 2: Plasma confinement and transport,”
            Nuclear Fusion, vol. 39, no. 12, pp. 2175-2249, Dec. 1999, doi: https://doi.org/10.1088/0029-5515/39/12/302.

            - None Otto Kardaun, N. K. Thomsen, and None Alexander Chudnovskiy, “Corrections to a sequence of papers in Nuclear Fusion,”
            Nuclear Fusion, vol. 48, no. 9, pp. 099801-099801, Aug. 2008, doi: https://doi.org/10.1088/0029-5515/48/9/099801.
        """
        return (
            0.0564e0
            * pcur**0.88e0
            * b_plasma_toroidal_on_axis**0.07e0
            * dnla19**0.40e0
            * p_plasma_loss_mw ** (-0.69e0)
            * rmajor**2.15e0
            * kappa_ipb**0.78e0
            * aspect ** (-0.64e0)
            * afuel**0.20e0
        )

    @staticmethod
    def iter_ipb98y4_confinement_time(
        pcur: float,
        b_plasma_toroidal_on_axis: float,
        dnla19: float,
        p_plasma_loss_mw: float,
        rmajor: float,
        kappa_ipb: float,
        aspect: float,
        afuel: float,
    ) -> float:
        """Calculate the IPB98(y,4) ELMy H-mode scaling confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        dnla19 :
            Line averaged electron density in units of 10**19 m**-3
        p_plasma_loss_mw :
            Net Heating power [MW]
        rmajor :
            Plasma major radius [m]
        kappa_ipb :
            IPB specific plasma separatrix elongation
        aspect :
            Aspect ratio
        afuel :
            Fuel atomic mass number

        Returns
        -------
        :
            float: IPB98(y,4) ELMy H-mode confinement time [s]

        Notes:
            - See correction paper below for more information about the re-definition of the elongation used.

        References:
            - I. P. E. G. on C. Transport, I. P. E. G. on C. Database, and I. P. B. Editors, “Chapter 2: Plasma confinement and transport,”
            Nuclear Fusion, vol. 39, no. 12, pp. 2175-2249, Dec. 1999, doi: https://doi.org/10.1088/0029-5515/39/12/302.

            - None Otto Kardaun, N. K. Thomsen, and None Alexander Chudnovskiy, “Corrections to a sequence of papers in Nuclear Fusion,”
            Nuclear Fusion, vol. 48, no. 9, pp. 099801-099801, Aug. 2008, doi: https://doi.org/10.1088/0029-5515/48/9/099801.
        """
        return (
            0.0587e0
            * pcur**0.85e0
            * b_plasma_toroidal_on_axis**0.29e0
            * dnla19**0.39e0
            * p_plasma_loss_mw ** (-0.70e0)
            * rmajor**2.08e0
            * kappa_ipb**0.76e0
            * aspect ** (-0.69e0)
            * afuel**0.17e0
        )

    @staticmethod
    def iss95_stellarator_confinement_time(
        rminor: float,
        rmajor: float,
        dnla19: float,
        b_plasma_toroidal_on_axis: float,
        p_plasma_loss_mw: float,
        iotabar: float,
    ) -> float:
        """Calculate the ISS95 stellarator scaling confinement time

        Parameters
        ----------
        rminor :
            Plasma minor radius [m]
        rmajor :
            Plasma major radius [m]
        dnla19 :
            Line averaged electron density in units of 10**19 m**-3
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        p_plasma_loss_mw :
            Net Heating power [MW]
        iotabar :
            Rotational transform

        Returns
        -------
        :
            float: ISS95 stellarator confinement time [s]

        References:
            - U. Stroth et al., “Energy confinement scaling from the international stellarator database,”
            vol. 36, no. 8, pp. 1063-1077, Aug. 1996, doi: https://doi.org/10.1088/0029-5515/36/8/i11.
        """
        return (
            0.079e0
            * rminor**2.21e0
            * rmajor**0.65e0
            * dnla19**0.51e0
            * b_plasma_toroidal_on_axis**0.83e0
            * p_plasma_loss_mw ** (-0.59e0)
            * iotabar**0.4e0
        )

    @staticmethod
    def iss04_stellarator_confinement_time(
        rminor: float,
        rmajor: float,
        dnla19: float,
        b_plasma_toroidal_on_axis: float,
        p_plasma_loss_mw: float,
        iotabar: float,
    ) -> float:
        """Calculate the ISS04 stellarator scaling confinement time

        Parameters
        ----------
        rminor :
            Plasma minor radius [m]
        rmajor :
            Plasma major radius [m]
        dnla19 :
            Line averaged electron density in units of 10**19 m**-3
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        p_plasma_loss_mw :
            Net Heating power [MW]
        iotabar :
            Rotational transform

        Returns
        -------
        :
            float: ISS04 stellarator confinement time [s]

        References:
            - H. Yamada et al., “Characterization of energy confinement in net-current free plasmas using the extended International Stellarator Database,”
            vol. 45, no. 12, pp. 1684-1693, Nov. 2005, doi: https://doi.org/10.1088/0029-5515/45/12/024.
        """
        return (
            0.134e0
            * rminor**2.28e0
            * rmajor**0.64e0
            * dnla19**0.54e0
            * b_plasma_toroidal_on_axis**0.84e0
            * p_plasma_loss_mw ** (-0.61e0)
            * iotabar**0.41e0
        )

    @staticmethod
    def ds03_confinement_time(
        pcur: float,
        b_plasma_toroidal_on_axis: float,
        dnla19: float,
        p_plasma_loss_mw: float,
        rmajor: float,
        kappa95: float,
        aspect: float,
        afuel: float,
    ) -> float:
        """Calculate the DS03 beta-independent H-mode scaling confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        dnla19 :
            Line averaged electron density in units of 10**19 m**-3
        p_plasma_loss_mw :
            Net Heating power [MW]
        rmajor :
            Plasma major radius [m]
        kappa95 :
            Plasma elongation at 95% flux surface
        aspect :
            Aspect ratio
        afuel :
            Fuel atomic mass number

        Returns
        -------
        :
            float: DS03 beta-independent H-mode confinement time [s]

        References:
            - T. C. Luce, C. C. Petty, and J. G. Cordey, “Application of dimensionless parameter scaling techniques to the design and interpretation of magnetic fusion experiments,”
            Plasma Physics and Controlled Fusion, vol. 50, no. 4, p. 043001, Mar. 2008,
            doi: https://doi.org/10.1088/0741-3335/50/4/043001.
        """
        return (
            0.028e0
            * pcur**0.83e0
            * b_plasma_toroidal_on_axis**0.07e0
            * dnla19**0.49e0
            * p_plasma_loss_mw ** (-0.55e0)
            * rmajor**2.11e0
            * kappa95**0.75e0
            * aspect ** (-0.3e0)
            * afuel**0.14e0
        )

    @staticmethod
    def murari_confinement_time(
        pcur: float,
        rmajor: float,
        kappa_ipb: float,
        dnla19: float,
        b_plasma_toroidal_on_axis: float,
        p_plasma_loss_mw: float,
    ) -> float:
        """Calculate the Murari H-mode energy confinement scaling time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        rmajor :
            Plasma major radius [m]
        kappa_ipb :
            IPB specific plasma separatrix elongation
        dnla19 :
            Line averaged electron density in units of 10**19 m**-3
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        p_plasma_loss_mw :
            Net Heating power [MW]

        Returns
        -------
        :
            float: Murari confinement time [s]

        Notes:
            - This scaling uses the IPB defintiion of elongation, see reference for more information.

        References:
            - A. Murari, E. Peluso, Michela Gelfusa, I. Lupelli, and P. Gaudio, “A new approach to the formulation and validation of scaling expressions for plasma confinement in tokamaks,”
            Nuclear Fusion, vol. 55, no. 7, pp. 073009-073009, Jun. 2015, doi: https://doi.org/10.1088/0029-5515/55/7/073009.

            - None Otto Kardaun, N. K. Thomsen, and None Alexander Chudnovskiy, “Corrections to a sequence of papers in Nuclear Fusion,”
            Nuclear Fusion, vol. 48, no. 9, pp. 099801-099801, Aug. 2008, doi: https://doi.org/10.1088/0029-5515/48/9/099801.
        """
        return (
            0.0367
            * pcur**1.006
            * rmajor**1.731
            * kappa_ipb**1.450
            * p_plasma_loss_mw ** (-0.735)
            * (
                dnla19**0.448
                / (1.0 + np.exp(-9.403 * (dnla19 / b_plasma_toroidal_on_axis) ** -1.365))
            )
        )

    @staticmethod
    def petty08_confinement_time(
        pcur: float,
        b_plasma_toroidal_on_axis: float,
        dnla19: float,
        p_plasma_loss_mw: float,
        rmajor: float,
        kappa_ipb: float,
        aspect: float,
    ) -> float:
        """Calculate the beta independent dimensionless Petty08 confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        dnla19 :
            Line averaged electron density in units of 10**19 m**-3
        p_plasma_loss_mw :
            Net Heating power [MW]
        rmajor :
            Plasma major radius [m]
        kappa_ipb :
            IPB specific plasma separatrix elongation
        aspect :
            Aspect ratio

        Returns
        -------
        :
            float: Petty08 confinement time [s]

        Notes:
            - This scaling uses the IPB defintiion of elongation, see reference for more information.

        References:
            - C. C. Petty, “Sizing up plasmas using dimensionless parameters,”
            Physics of Plasmas, vol. 15, no. 8, Aug. 2008, doi: https://doi.org/10.1063/1.2961043.

            - None Otto Kardaun, N. K. Thomsen, and None Alexander Chudnovskiy, “Corrections to a sequence of papers in Nuclear Fusion,”
            Nuclear Fusion, vol. 48, no. 9, pp. 099801-099801, Aug. 2008, doi: https://doi.org/10.1088/0029-5515/48/9/099801.
        """
        return (
            0.052e0
            * pcur**0.75e0
            * b_plasma_toroidal_on_axis**0.3e0
            * dnla19**0.32e0
            * p_plasma_loss_mw ** (-0.47e0)
            * rmajor**2.09e0
            * kappa_ipb**0.88e0
            * aspect ** (-0.84e0)
        )

    @staticmethod
    def lang_high_density_confinement_time(
        plasma_current: float,
        b_plasma_toroidal_on_axis: float,
        nd_plasma_electron_line: float,
        p_plasma_loss_mw: float,
        rmajor: float,
        rminor: float,
        q: float,
        qstar: float,
        aspect: float,
        afuel: float,
        kappa_ipb: float,
    ) -> float:
        """Calculate the high density relevant confinement time

        Parameters
        ----------
        plasma_current :
            Plasma current [MA]
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        nd_plasma_electron_line :
            Line averaged electron density [m**-3]
        p_plasma_loss_mw :
            Net Heating power [MW]
        rmajor :
            Plasma major radius [m]
        rminor :
            Plasma minor radius [m]
        q :
            Safety factor
        qstar :
            Equivalent cylindrical edge safety factor
        aspect :
            Aspect ratio
        afuel :
            Fuel atomic mass number
        kappa_ipb :
            Plasma elongation at 95% flux surface

        Returns
        -------
        :
            float: High density relevant confinement time [s]

        References:
            - P. T. Lang, C. Angioni, R. M. M. Dermott, R. Fischer, and H. Zohm, “Pellet Induced High Density Phases during ELM Suppression in ASDEX Upgrade,”
            24th IAEA Conference Fusion Energy, 2012, Oct. 2012,
            Available: https://www.researchgate.net/publication/274456104_Pellet_Induced_High_Density_Phases_during_ELM_Suppression_in_ASDEX_Upgrade
        """
        qratio = q / qstar
        n_gw = 1.0e14 * plasma_current / (np.pi * rminor * rminor)
        nratio = nd_plasma_electron_line / n_gw
        return (
            6.94e-7
            * plasma_current**1.3678e0
            * b_plasma_toroidal_on_axis**0.12e0
            * nd_plasma_electron_line**0.032236e0
            * (p_plasma_loss_mw * 1.0e6) ** (-0.74e0)
            * rmajor**1.2345e0
            * kappa_ipb**0.37e0
            * aspect**2.48205e0
            * afuel**0.2e0
            * qratio**0.77e0
            * aspect ** (-0.9e0 * np.log(aspect))
            * nratio ** (-0.22e0 * np.log(nratio))
        )

    @staticmethod
    def hubbard_nominal_confinement_time(
        pcur: float,
        b_plasma_toroidal_on_axis: float,
        dnla20: float,
        p_plasma_loss_mw: float,
    ) -> float:
        """Calculate the Hubbard 2017 I-mode confinement time scaling - nominal

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        dnla20 :
            Line averaged electron density in units of 10**20 m**-3
        p_plasma_loss_mw :
            Net Heating power [MW]

        Returns
        -------
        :
            float: Hubbard confinement time [s]

        References:
            - A. E. Hubbard et al., “Physics and performance of the I-mode regime over an expanded operating space on Alcator C-Mod,”
            Nuclear Fusion, vol. 57, no. 12, p. 126039, Oct. 2017, doi: https://doi.org/10.1088/1741-4326/aa8570.
        """
        return (
            0.014e0
            * pcur**0.68e0
            * b_plasma_toroidal_on_axis**0.77e0
            * dnla20**0.02e0
            * p_plasma_loss_mw ** (-0.29e0)
        )

    @staticmethod
    def hubbard_lower_confinement_time(
        pcur: float,
        b_plasma_toroidal_on_axis: float,
        dnla20: float,
        p_plasma_loss_mw: float,
    ) -> float:
        """Calculate the Hubbard 2017 I-mode confinement time scaling - lower

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        dnla20 :
            Line averaged electron density in units of 10**20 m**-3
        p_plasma_loss_mw :
            Net Heating power [MW]

        Returns
        -------
        :
            float: Hubbard confinement time [s]

        References:
            - A. E. Hubbard et al., “Physics and performance of the I-mode regime over an expanded operating space on Alcator C-Mod,”
            Nuclear Fusion, vol. 57, no. 12, p. 126039, Oct. 2017, doi: https://doi.org/10.1088/1741-4326/aa8570.
        """
        return (
            0.014e0
            * pcur**0.60e0
            * b_plasma_toroidal_on_axis**0.70e0
            * dnla20 ** (-0.03e0)
            * p_plasma_loss_mw ** (-0.33e0)
        )

    @staticmethod
    def hubbard_upper_confinement_time(
        pcur: float,
        b_plasma_toroidal_on_axis: float,
        dnla20: float,
        p_plasma_loss_mw: float,
    ) -> float:
        """Calculate the Hubbard 2017 I-mode confinement time scaling - upper

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        dnla20 :
            Line averaged electron density in units of 10**20 m**-3
        p_plasma_loss_mw :
            Net Heating power [MW]

        Returns
        -------
        :
            float: Hubbard confinement time [s]

        References:
            - A. E. Hubbard et al., “Physics and performance of the I-mode regime over an expanded operating space on Alcator C-Mod,”
            Nuclear Fusion, vol. 57, no. 12, p. 126039, Oct. 2017, doi: https://doi.org/10.1088/1741-4326/aa8570.
        """
        return (
            0.014e0
            * pcur**0.76e0
            * b_plasma_toroidal_on_axis**0.84e0
            * dnla20**0.07
            * p_plasma_loss_mw ** (-0.25e0)
        )

    @staticmethod
    def menard_nstx_confinement_time(
        pcur: float,
        b_plasma_toroidal_on_axis: float,
        dnla19: float,
        p_plasma_loss_mw: float,
        rmajor: float,
        kappa_ipb: float,
        aspect: float,
        afuel: float,
    ) -> float:
        """Calculate the Menard NSTX ELMy H-mode scaling confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        dnla19 :
            Line averaged electron density in units of 10**19 m**-3
        p_plasma_loss_mw :
            Net Heating power [MW]
        rmajor :
            Plasma major radius [m]
        kappa_ipb :
            IPB specific plasma separatrix elongation
        aspect :
            Aspect ratio
        afuel :
            Fuel atomic mass number

        Returns
        -------
        :
            float: Menard NSTX ELMy H-mode confinement time [s]

        Notes:
            - "The leading NSTX confinement scaling coefficient is chosen such that the ITER and ST energy confinement times are
            identical for a reference NSTX scenario"
            - Assumes IPB98(y,2) exponents are applicable where the ST exponents are not yet determined, i.e.
            the species mass, major radius, inverse aspect ratio and elongation. Hence here we use the IPB98(y,2) definition
            of elongation.

        References:
            - J. E. Menard, “Compact steady-state tokamak performance dependence on magnet and core physics limits,”
            Philosophical Transactions of the Royal Society A, vol. 377, no. 2141, pp. 20170440-20170440, Feb. 2019,
            doi: https://doi.org/10.1098/rsta.2017.0440.
        """
        return (
            0.095e0
            * pcur**0.57e0
            * b_plasma_toroidal_on_axis**1.08e0
            * dnla19**0.44e0
            * p_plasma_loss_mw ** (-0.73e0)
            * rmajor**1.97e0
            * kappa_ipb**0.78e0
            * aspect ** (-0.58e0)
            * afuel**0.19e0
        )

    @classmethod
    def menard_nstx_petty08_hybrid_confinement_time(
        cls,
        pcur: float,
        b_plasma_toroidal_on_axis: float,
        dnla19: float,
        p_plasma_loss_mw: float,
        rmajor: float,
        kappa_ipb: float,
        aspect: float,
        afuel: float,
    ) -> float:
        """Calculate the Menard NSTX-Petty hybrid confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        dnla19 :
            Line averaged electron density in units of 10**19 m**-3
        p_plasma_loss_mw :
            Net Heating power [MW]
        rmajor :
            Plasma major radius [m]
        kappa_ipb :
            IPB specific plasma separatrix elongation
        aspect :
            Aspect ratio
        afuel :
            Fuel atomic mass number

        Returns
        -------
        :
            float: Menard NSTX-Petty hybrid confinement time [s]

        Notes:
            - Assuming a linear interpolation in (1/aspect) between the two scalings

        References:
            - J. E. Menard, “Compact steady-state tokamak performance dependence on magnet and core physics limits,”
            Philosophical Transactions of the Royal Society A, vol. 377, no. 2141, pp. 20170440-20170440, Feb. 2019,
            doi: https://doi.org/10.1098/rsta.2017.0440.
        """
        # Equivalent to A > 2.5, use Petty scaling
        if (1.0e0 / aspect) <= 0.4e0:
            return cls.petty08_confinement_time(
                pcur,
                b_plasma_toroidal_on_axis,
                dnla19,
                p_plasma_loss_mw,
                rmajor,
                kappa_ipb,
                aspect,
            )

        #  Equivalent to A < 1.7, use NSTX scaling
        if (1.0e0 / aspect) >= 0.6e0:
            return cls.menard_nstx_confinement_time(
                pcur,
                b_plasma_toroidal_on_axis,
                dnla19,
                p_plasma_loss_mw,
                rmajor,
                kappa_ipb,
                aspect,
                afuel,
            )
        return (((1.0e0 / aspect) - 0.4e0) / (0.6e0 - 0.4e0)) * (
            cls.menard_nstx_confinement_time(
                pcur,
                b_plasma_toroidal_on_axis,
                dnla19,
                p_plasma_loss_mw,
                rmajor,
                kappa_ipb,
                aspect,
                afuel,
            )
        ) + ((0.6e0 - (1.0e0 / aspect)) / (0.6e0 - 0.4e0)) * (
            cls.petty08_confinement_time(
                pcur,
                b_plasma_toroidal_on_axis,
                dnla19,
                p_plasma_loss_mw,
                rmajor,
                kappa_ipb,
                aspect,
            )
        )

    @staticmethod
    def nstx_gyro_bohm_confinement_time(
        pcur: float,
        b_plasma_toroidal_on_axis: float,
        p_plasma_loss_mw: float,
        rmajor: float,
        dnla20: float,
    ) -> float:
        """Calculate the NSTX gyro-Bohm confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        p_plasma_loss_mw :
            Net Heating power [MW]
        rmajor :
            Plasma major radius [m]
        dnla20 :
            Line averaged electron density in units of 10**20 m**-3

        Returns
        -------
        :
            float: NSTX gyro-Bohm confinement time [s]

        References:
            - P. F. Buxton, L. Connor, A. E. Costley, Mikhail Gryaznevich, and S. McNamara,
            “On the energy confinement time in spherical tokamaks: implications for the design of pilot plants and fusion reactors,”
            vol. 61, no. 3, pp. 035006-035006, Jan. 2019, doi: https://doi.org/10.1088/1361-6587/aaf7e5.
        """
        return (
            0.21e0
            * pcur**0.54e0
            * b_plasma_toroidal_on_axis**0.91e0
            * p_plasma_loss_mw ** (-0.38e0)
            * rmajor**2.14e0
            * dnla20 ** (-0.05e0)
        )

    @staticmethod
    def itpa20_confinement_time(
        pcur: float,
        b_plasma_toroidal_on_axis: float,
        dnla19: float,
        p_plasma_loss_mw: float,
        rmajor: float,
        triang: float,
        kappa_ipb: float,
        eps: float,
        aion: float,
    ) -> float:
        """Calculate the ITPA20 Issue #3164 confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        dnla19 :
            Central line-averaged electron density in units of 10**19 m**-3
        p_plasma_loss_mw :
            Thermal power lost due to transport through the LCFS [MW]
        rmajor :
            Plasma major radius [m]
        triang :
            Triangularity
        kappa_ipb :
            IPB specific plasma separatrix elongation
        eps :
            Inverse aspect ratio
        aion :
            Average mass of all ions (amu)

        Returns
        -------
        :
            float: ITPA20 confinement time [s]

        Notes:
            - Mass term is the effective mass of the plasma, so we assume the total ion mass here
            - This scaling uses the IPB defintiion of elongation, see reference for more information.

        References:
            - G. Verdoolaege et al., “The updated ITPA global H-mode confinement database: description and analysis,”
            Nuclear Fusion, vol. 61, no. 7, pp. 076006-076006, Jan. 2021, doi: https://doi.org/10.1088/1741-4326/abdb91.
        """
        return (
            0.053
            * pcur**0.98
            * b_plasma_toroidal_on_axis**0.22
            * dnla19**0.24
            * p_plasma_loss_mw ** (-0.669)
            * rmajor**1.71
            * (1 + triang) ** 0.36
            * kappa_ipb**0.8
            * eps**0.35
            * aion**0.2
        )

    @staticmethod
    def itpa20_il_confinement_time(
        pcur: float,
        b_plasma_toroidal_on_axis: float,
        p_plasma_loss_mw: float,
        dnla19: float,
        aion: float,
        rmajor: float,
        triang: float,
        kappa_ipb: float,
    ) -> float:
        """Calculate the ITPA20-IL Issue #1852 confinement time

        Parameters
        ----------
        pcur :
            Plasma current [MA]
        b_plasma_toroidal_on_axis :
            Toroidal magnetic field [T]
        p_plasma_loss_mw :
            Thermal power lost due to transport through the LCFS [MW]
        dnla19 :
            Central line-averaged electron density in units of 10**19 m**-3
        aion :
            Average mass of all ions (amu)
        rmajor :
            Plasma major radius [m]
        triang :
            Triangularity
        kappa_ipb :
            IPB specific plasma separatrix elongation

        Returns
        -------
        :
            float: ITPA20-IL confinement time [s]

        Notes:
            - Mass term is the effective mass of the plasma, so we assume the total ion mass here
            - This scaling uses the IPB defintiion of elongation, see reference for more information.

        References:
            - T. Luda et al., “Validation of a full-plasma integrated modeling approach on ASDEX Upgrade,”
            Nuclear Fusion, vol. 61, no. 12, pp. 126048-126048, Nov. 2021, doi: https://doi.org/10.1088/1741-4326/ac3293.
        """

        return (
            0.067
            * pcur**1.29
            * b_plasma_toroidal_on_axis**-0.13
            * p_plasma_loss_mw ** (-0.644)
            * dnla19**0.15
            * aion**0.3
            * rmajor**1.19
            * (1 + triang) ** 0.56
            * kappa_ipb**0.67
        )

outfile = constants.NOUT instance-attribute

mfile = constants.MFILE instance-attribute

calculate_confinement_time(m_fuel_amu, p_alpha_total_mw, aspect, b_plasma_toroidal_on_axis, nd_plasma_ions_total_vol_avg, nd_plasma_electrons_vol_avg, nd_plasma_electron_line, eps, hfact, i_confinement_time, i_plasma_ignited, kappa, kappa95, p_non_alpha_charged_mw, p_hcd_injected_total_mw, plasma_current, pden_plasma_core_rad_mw, rmajor, rminor, temp_plasma_electron_density_weighted_kev, temp_plasma_ion_density_weighted_kev, q95, qstar, vol_plasma, zeff)

Calculate the confinement times and the transport power loss terms.

Parameters:

Name Type Description Default
m_fuel_amu float

Average mass of fuel (amu)

required
p_alpha_total_mw float

Alpha particle power (MW)

required
aspect float

Aspect ratio

required
b_plasma_toroidal_on_axis float

Toroidal field on axis (T)

required
nd_plasma_ions_total_vol_avg float

Total ion density (/m3)

required
nd_plasma_electrons_vol_avg float

Volume averaged electron density (/m3)

required
nd_plasma_electron_line float

Line-averaged electron density (/m3)

required
eps float

Inverse aspect ratio

required
hfact float

H factor on energy confinement scalings

required
i_confinement_time int

Switch for energy confinement scaling to use

required
i_plasma_ignited int

Switch for ignited calculation

required
kappa float

Plasma elongation

required
kappa95 float

Plasma elongation at 95% surface

required
p_non_alpha_charged_mw float

Non-alpha charged particle fusion power (MW)

required
p_hcd_injected_total_mw float

Auxiliary power to ions and electrons (MW)

required
plasma_current float

Plasma current (A)

required
pden_plasma_core_rad_mw float

Total core radiation power (MW/m3)

required
q95 float

Edge safety factor (tokamaks), or rotational transform iotabar (stellarators)

required
qstar float

Equivalent cylindrical edge safety factor

required
rmajor float

Plasma major radius (m)

required
rminor float

Plasma minor radius (m)

required
temp_plasma_electron_density_weighted_kev float

Density weighted average electron temperature (keV)

required
temp_plasma_ion_density_weighted_kev float

Density weighted average ion temperature (keV)

required
vol_plasma float

Plasma volume (m3)

required
a_plasma_poloidal

Plasma cross-sectional area (m2)

required
zeff float

Plasma effective charge

required

Returns:

Type Description
type

Tuple containing: - pden_electron_transport_loss_mw (float): Electron transport power (MW/m3) - pden_ion_transport_loss_mw (float): Ion transport power (MW/m3) - t_electron_energy_confinement (float): Electron energy confinement time (s) - t_ion_energy_confinement (float): Ion energy confinement time (s) - t_energy_confinement (float): Global energy confinement time (s) - p_plasma_loss_mw (float): Heating power (MW) assumed in calculation

Source code in process/models/physics/confinement_time.py
 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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
def calculate_confinement_time(
    self,
    m_fuel_amu: float,
    p_alpha_total_mw: float,
    aspect: float,
    b_plasma_toroidal_on_axis: float,
    nd_plasma_ions_total_vol_avg: float,
    nd_plasma_electrons_vol_avg: float,
    nd_plasma_electron_line: float,
    eps: float,
    hfact: float,
    i_confinement_time: int,
    i_plasma_ignited: int,
    kappa: float,
    kappa95: float,
    p_non_alpha_charged_mw: float,
    p_hcd_injected_total_mw: float,
    plasma_current: float,
    pden_plasma_core_rad_mw: float,
    rmajor: float,
    rminor: float,
    temp_plasma_electron_density_weighted_kev: float,
    temp_plasma_ion_density_weighted_kev: float,
    q95: float,
    qstar: float,
    vol_plasma: float,
    zeff: float,
) -> tuple[float, float, float, float, float, float, float]:
    """Calculate the confinement times and the transport power loss terms.

    Parameters
    ----------
    m_fuel_amu :
        Average mass of fuel (amu)
    p_alpha_total_mw :
        Alpha particle power (MW)
    aspect :
        Aspect ratio
    b_plasma_toroidal_on_axis :
        Toroidal field on axis (T)
    nd_plasma_ions_total_vol_avg :
        Total ion density (/m3)
    nd_plasma_electrons_vol_avg :
        Volume averaged electron density (/m3)
    nd_plasma_electron_line :
        Line-averaged electron density (/m3)
    eps :
        Inverse aspect ratio
    hfact :
        H factor on energy confinement scalings
    i_confinement_time :
        Switch for energy confinement scaling to use
    i_plasma_ignited :
        Switch for ignited calculation
    kappa :
        Plasma elongation
    kappa95 :
        Plasma elongation at 95% surface
    p_non_alpha_charged_mw :
        Non-alpha charged particle fusion power (MW)
    p_hcd_injected_total_mw :
        Auxiliary power to ions and electrons (MW)
    plasma_current :
        Plasma current (A)
    pden_plasma_core_rad_mw :
        Total core radiation power (MW/m3)
    q95 :
        Edge safety factor (tokamaks), or rotational transform iotabar (stellarators)
    qstar :
        Equivalent cylindrical edge safety factor
    rmajor :
        Plasma major radius (m)
    rminor :
        Plasma minor radius (m)
    temp_plasma_electron_density_weighted_kev :
        Density weighted average electron temperature (keV)
    temp_plasma_ion_density_weighted_kev :
        Density weighted average ion temperature (keV)
    vol_plasma :
        Plasma volume (m3)
    a_plasma_poloidal :
        Plasma cross-sectional area (m2)
    zeff :
        Plasma effective charge

    Returns
    -------
    type
        Tuple containing:
        - pden_electron_transport_loss_mw (float): Electron transport power (MW/m3)
        - pden_ion_transport_loss_mw (float): Ion transport power (MW/m3)
        - t_electron_energy_confinement (float): Electron energy confinement time (s)
        - t_ion_energy_confinement (float): Ion energy confinement time (s)
        - t_energy_confinement (float): Global energy confinement time (s)
        - p_plasma_loss_mw (float): Heating power (MW) assumed in calculation

    """

    # ========================================================================

    # Calculate heating power (MW)
    p_plasma_loss_mw = (
        physics_variables.f_p_alpha_plasma_deposited * p_alpha_total_mw
        + p_non_alpha_charged_mw
        + physics_variables.p_plasma_ohmic_mw
    )

    # If the device is not ignited, add the injected auxiliary power
    if i_plasma_ignited == 0:
        p_plasma_loss_mw = p_plasma_loss_mw + p_hcd_injected_total_mw

    # Include the radiation as a loss term based on radiation model
    try:
        model = ConfinementRadiationLossModel(int(physics_variables.i_rad_loss))

        if model == ConfinementRadiationLossModel.FULL_RADIATION:
            p_plasma_loss_mw = (
                p_plasma_loss_mw - physics_variables.pden_plasma_rad_mw * vol_plasma
            )
        elif model == ConfinementRadiationLossModel.CORE_ONLY:
            p_plasma_loss_mw = (
                p_plasma_loss_mw - pden_plasma_core_rad_mw * vol_plasma
            )
        # NO_RADIATION: do not adjust p_plasma_loss_mw for radiation
    except ValueError as e:
        raise ProcessValueError(
            "Illegal value of i_rad_loss",
            i_rad_loss=physics_variables.i_rad_loss,
        ) from e

    # Ensure heating power is positive (shouldn't be necessary)
    p_plasma_loss_mw = max(p_plasma_loss_mw, 1.0e-3)

    # ========================================================================

    # Line averaged electron density in scaled units
    dnla20 = nd_plasma_electron_line * 1.0e-20
    dnla19 = nd_plasma_electron_line * 1.0e-19

    # Volume averaged electron density in units of 10**20 m**-3
    n20 = nd_plasma_electrons_vol_avg / 1.0e20

    # Plasma current in MA
    pcur = plasma_current / 1.0e6

    # Separatrix kappa defined with plasma volume for IPB scalings
    # Updated version of kappa used by the IPB98 scalings correction in:

    # None Otto Kardaun, N. K. Thomsen, and None Alexander Chudnovskiy,
    # “Corrections to a sequence of papers in Nuclear Fusion,” Nuclear Fusion,
    # vol. 48, no. 9, pp. 099801099801, Aug. 2008,
    # doi: https://doi.org/10.1088/0029-5515/48/9/099801.

    physics_variables.kappa_ipb = (vol_plasma / (2.0 * np.pi * rmajor)) / (
        np.pi * rminor**2
    )

    # Electron energy confinement times

    try:
        model = ConfinementTimeModel(i_confinement_time)
    except ValueError as e:
        raise ProcessValueError(
            "Illegal value for i_confinement_time",
            i_confinement_time=i_confinement_time,
        ) from e

    # ========================================================================

    # User defined confinement time
    if (
        model == ConfinementTimeModel.USER_INPUT
    ):  # t_electron_energy_confinement is an input
        t_electron_confinement = physics_variables.tauee_in

    # ========================================================================

    # Nec-Alcator(NA) OH scaling
    if (
        model == ConfinementTimeModel.NEO_ALCATOR
    ):  # t_electron_energy_confinement is an input
        t_electron_confinement = self.neo_alcator_confinement_time(
            n20, rminor, rmajor, qstar
        )

    # ========================================================================

    # "Mirnov"-like scaling (H-mode)
    elif model == ConfinementTimeModel.MIRNOV:  # Mirnov scaling (H-mode)
        t_electron_confinement = self.mirnov_confinement_time(rminor, kappa95, pcur)

    # ========================================================================

    # Merezhkin-Mukhovatov (MM) OH/L-mode scaling
    elif model == ConfinementTimeModel.MEREZHKIN_MUHKOVATOV:
        t_electron_confinement = self.merezhkin_muhkovatov_confinement_time(
            rmajor,
            rminor,
            kappa95,
            qstar,
            dnla20,
            m_fuel_amu,
            temp_plasma_electron_density_weighted_kev,
        )

    # ========================================================================

    # Shimomura (S) optimized H-mode scaling
    elif model == ConfinementTimeModel.SHIMOMURA:
        t_electron_confinement = self.shimomura_confinement_time(
            rmajor, rminor, b_plasma_toroidal_on_axis, kappa95, m_fuel_amu
        )

    # ========================================================================

    # Kaye-Goldston scaling (L-mode)
    elif model == ConfinementTimeModel.KAYE_GOLDSTON:
        t_electron_confinement = self.kaye_goldston_confinement_time(
            pcur,
            rmajor,
            rminor,
            kappa,
            dnla20,
            b_plasma_toroidal_on_axis,
            m_fuel_amu,
            p_plasma_loss_mw,
        )

    # ========================================================================

    # ITER Power scaling - ITER 89-P (L-mode)
    elif model == ConfinementTimeModel.ITER_89P:
        t_electron_confinement = self.iter_89p_confinement_time(
            pcur,
            rmajor,
            rminor,
            kappa,
            dnla20,
            b_plasma_toroidal_on_axis,
            m_fuel_amu,
            p_plasma_loss_mw,
        )

    # ========================================================================

    # ITER Offset linear scaling - ITER 89-O (L-mode)
    elif model == ConfinementTimeModel.ITER_89_0:
        t_electron_confinement = self.iter_89_0_confinement_time(
            pcur,
            rmajor,
            rminor,
            kappa,
            dnla20,
            b_plasma_toroidal_on_axis,
            m_fuel_amu,
            p_plasma_loss_mw,
        )
    # ========================================================================

    # Rebut-Lallia offset linear scaling (L-mode)
    elif model == ConfinementTimeModel.REBUT_LALLIA:
        t_electron_confinement = self.rebut_lallia_confinement_time(
            rminor,
            rmajor,
            kappa,
            m_fuel_amu,
            pcur,
            zeff,
            dnla20,
            b_plasma_toroidal_on_axis,
            p_plasma_loss_mw,
        )

    # ========================================================================

    # Goldston scaling (L-mode)
    elif model == ConfinementTimeModel.GOLDSTON:  # Goldston scaling (L-mode)
        t_electron_confinement = self.goldston_confinement_time(
            pcur, rmajor, rminor, kappa95, m_fuel_amu, p_plasma_loss_mw
        )

    # ========================================================================

    # T-10 scaling (L-mode)
    elif model == ConfinementTimeModel.T_10:
        t_electron_confinement = self.t10_confinement_time(
            dnla20,
            rmajor,
            qstar,
            b_plasma_toroidal_on_axis,
            rminor,
            kappa95,
            p_plasma_loss_mw,
            zeff,
            pcur,
        )

    # ========================================================================

    # JAERI / Odajima-Shimomura L-mode scaling
    elif model == ConfinementTimeModel.JAERI:  # JAERI scaling
        t_electron_confinement = self.jaeri_confinement_time(
            kappa95,
            rminor,
            m_fuel_amu,
            n20,
            pcur,
            b_plasma_toroidal_on_axis,
            rmajor,
            qstar,
            zeff,
            p_plasma_loss_mw,
        )

    # ========================================================================

    # Kaye "big"  L-mode scaling (based only on big tokamak data)
    elif model == ConfinementTimeModel.KAYE_BIG:
        t_electron_confinement = self.kaye_big_confinement_time(
            rmajor,
            rminor,
            b_plasma_toroidal_on_axis,
            kappa95,
            pcur,
            n20,
            m_fuel_amu,
            p_plasma_loss_mw,
        )

    # ========================================================================

    # ITER H90-P H-mode scaling
    elif model == ConfinementTimeModel.ITER_H90_P:
        t_electron_confinement = self.iter_h90_p_confinement_time(
            pcur,
            rmajor,
            rminor,
            kappa,
            dnla20,
            b_plasma_toroidal_on_axis,
            m_fuel_amu,
            p_plasma_loss_mw,
        )

    # ========================================================================

    # Minimum of ITER 89-P and ITER 89-O
    elif model == ConfinementTimeModel.MINIMUM_OF_ITER_89P_AND_ITER_89_0:
        t_electron_confinement = min(
            self.iter_89p_confinement_time(
                pcur,
                rmajor,
                rminor,
                kappa,
                dnla20,
                b_plasma_toroidal_on_axis,
                m_fuel_amu,
                p_plasma_loss_mw,
            ),
            self.iter_89_0_confinement_time(
                pcur,
                rmajor,
                rminor,
                kappa,
                dnla20,
                b_plasma_toroidal_on_axis,
                m_fuel_amu,
                p_plasma_loss_mw,
            ),
        )

    # ========================================================================

    # Riedel scaling (L-mode)
    elif model == ConfinementTimeModel.RIEDEL_L:
        t_electron_confinement = self.riedel_l_confinement_time(
            pcur,
            rmajor,
            rminor,
            kappa95,
            dnla20,
            b_plasma_toroidal_on_axis,
            p_plasma_loss_mw,
        )

    # ========================================================================

    # Christiansen et al scaling (L-mode)
    elif model == ConfinementTimeModel.CHRISTIANSEN:
        t_electron_confinement = self.christiansen_confinement_time(
            pcur,
            rmajor,
            rminor,
            kappa95,
            dnla20,
            b_plasma_toroidal_on_axis,
            p_plasma_loss_mw,
            m_fuel_amu,
        )

    # ========================================================================

    # Lackner-Gottardi scaling (L-mode)
    elif model == ConfinementTimeModel.LACKNER_GOTTARDI:
        t_electron_confinement = self.lackner_gottardi_confinement_time(
            pcur,
            rmajor,
            rminor,
            kappa95,
            dnla20,
            b_plasma_toroidal_on_axis,
            p_plasma_loss_mw,
        )

    # ========================================================================

    # Neo-Kaye scaling (L-mode)
    elif model == ConfinementTimeModel.NEO_KAYE:
        t_electron_confinement = self.neo_kaye_confinement_time(
            pcur,
            rmajor,
            rminor,
            kappa95,
            dnla20,
            b_plasma_toroidal_on_axis,
            p_plasma_loss_mw,
        )

    # ======== ================================================================

    # Riedel scaling (H-mode)
    elif model == ConfinementTimeModel.RIEDEL_H:
        t_electron_confinement = self.riedel_h_confinement_time(
            pcur,
            rmajor,
            rminor,
            kappa95,
            dnla20,
            b_plasma_toroidal_on_axis,
            m_fuel_amu,
            p_plasma_loss_mw,
        )

    # ========================================================================

    # Amended version of ITER H90-P law
    elif model == ConfinementTimeModel.ITER_H90_P_AMENDED:
        t_electron_confinement = self.iter_h90_p_amended_confinement_time(
            pcur,
            b_plasma_toroidal_on_axis,
            m_fuel_amu,
            rmajor,
            p_plasma_loss_mw,
            kappa,
        )

    # ==========================================================================

    # Sudo et al. scaling (stellarators/heliotron)
    elif model == ConfinementTimeModel.SUDO_ET_AL:
        t_electron_confinement = self.sudo_et_al_confinement_time(
            rmajor,
            rminor,
            dnla20,
            b_plasma_toroidal_on_axis,
            p_plasma_loss_mw,
        )

    # ==========================================================================

    # Gyro-reduced Bohm scaling
    elif model == ConfinementTimeModel.GYRO_REDUCED_BOHM:
        t_electron_confinement = self.gyro_reduced_bohm_confinement_time(
            b_plasma_toroidal_on_axis,
            dnla20,
            p_plasma_loss_mw,
            rminor,
            rmajor,
        )

    # ==========================================================================

    # Lackner-Gottardi stellarator scaling
    elif model == ConfinementTimeModel.LACKNER_GOTTARDI_STELLARATOR:
        t_electron_confinement = self.lackner_gottardi_stellarator_confinement_time(
            rmajor,
            rminor,
            dnla20,
            b_plasma_toroidal_on_axis,
            p_plasma_loss_mw,
            q95,
        )

    # ==========================================================================

    # ITER_93 ELM-free H-mode scaling
    elif model == ConfinementTimeModel.ITER_93H:
        t_electron_confinement = self.iter_93h_confinement_time(
            pcur,
            b_plasma_toroidal_on_axis,
            p_plasma_loss_mw,
            m_fuel_amu,
            rmajor,
            dnla20,
            aspect,
            kappa,
        )

    # ==========================================================================
    # Scaling removed
    elif model == ConfinementTimeModel.TITAN_REMOVED:
        raise ProcessValueError("Scaling removed")
    # ==========================================================================

    # ELM-free: ITERH-97P
    elif model == ConfinementTimeModel.ITER_H97P:
        t_electron_confinement = self.iter_h97p_confinement_time(
            pcur,
            b_plasma_toroidal_on_axis,
            p_plasma_loss_mw,
            dnla19,
            rmajor,
            aspect,
            kappa,
            m_fuel_amu,
        )

    # ==========================================================================

    # ELMy: ITERH-97P(y)
    elif model == ConfinementTimeModel.ITER_H97P_ELMY:
        t_electron_confinement = self.iter_h97p_elmy_confinement_time(
            pcur,
            b_plasma_toroidal_on_axis,
            p_plasma_loss_mw,
            dnla19,
            rmajor,
            aspect,
            kappa,
            m_fuel_amu,
        )

    # ==========================================================================

    # ITER-96P (= ITER-97L) L-mode scaling
    elif model == ConfinementTimeModel.ITER_96P:
        t_electron_confinement = self.iter_96p_confinement_time(
            pcur,
            b_plasma_toroidal_on_axis,
            kappa95,
            rmajor,
            aspect,
            dnla19,
            m_fuel_amu,
            p_plasma_loss_mw,
        )

    # ==========================================================================

    # Valovic modified ELMy-H mode scaling
    # WARNING: No reference found for this scaling. This may not be its real name
    elif model == ConfinementTimeModel.VALOVIC_ELMY:
        t_electron_confinement = self.valovic_elmy_confinement_time(
            pcur,
            b_plasma_toroidal_on_axis,
            dnla19,
            m_fuel_amu,
            rmajor,
            rminor,
            kappa,
            p_plasma_loss_mw,
        )

    # ==========================================================================

    # Kaye PPPL Workshop April 1998 L-mode scaling
    # WARNING: No reference found for this scaling. This may not be its real name
    elif model == ConfinementTimeModel.KAYE:
        t_electron_confinement = self.kaye_confinement_time(
            pcur,
            b_plasma_toroidal_on_axis,
            kappa,
            rmajor,
            aspect,
            dnla19,
            m_fuel_amu,
            p_plasma_loss_mw,
        )

    # ==========================================================================

    # ITERH-PB98P(y), ELMy H-mode scaling
    # WARNING: No reference found for this scaling. This may not be its real name
    elif model == ConfinementTimeModel.ITER_PB98P_Y:
        t_electron_confinement = self.iter_pb98py_confinement_time(
            pcur,
            b_plasma_toroidal_on_axis,
            dnla19,
            p_plasma_loss_mw,
            rmajor,
            physics_variables.kappa_ipb,
            aspect,
            m_fuel_amu,
        )

    # ==========================================================================

    # IPB98(y), ELMy H-mode scaling
    elif model == ConfinementTimeModel.IPB98_Y:
        t_electron_confinement = self.iter_ipb98y_confinement_time(
            pcur,
            b_plasma_toroidal_on_axis,
            dnla19,
            p_plasma_loss_mw,
            rmajor,
            kappa,
            aspect,
            m_fuel_amu,
        )

    # ==========================================================================

    # IPB98(y,1), ELMy H-mode scaling
    elif model == ConfinementTimeModel.ITER_IPB98Y1:
        t_electron_confinement = self.iter_ipb98y1_confinement_time(
            pcur,
            b_plasma_toroidal_on_axis,
            dnla19,
            p_plasma_loss_mw,
            rmajor,
            physics_variables.kappa_ipb,
            aspect,
            m_fuel_amu,
        )

    # ==========================================================================

    # IPB98(y,2), ELMy H-mode scaling
    elif model == ConfinementTimeModel.ITER_IPB98Y2:
        t_electron_confinement = self.iter_ipb98y2_confinement_time(
            pcur,
            b_plasma_toroidal_on_axis,
            dnla19,
            p_plasma_loss_mw,
            rmajor,
            physics_variables.kappa_ipb,
            aspect,
            m_fuel_amu,
        )

    # ==========================================================================

    # IPB98(y,3), ELMy H-mode scaling
    elif model == ConfinementTimeModel.ITER_IPB98Y3:
        t_electron_confinement = self.iter_ipb98y3_confinement_time(
            pcur,
            b_plasma_toroidal_on_axis,
            dnla19,
            p_plasma_loss_mw,
            rmajor,
            physics_variables.kappa_ipb,
            aspect,
            m_fuel_amu,
        )

    # ==========================================================================

    # IPB98(y,4), ELMy H-mode scaling
    elif model == ConfinementTimeModel.ITER_IPB98Y4:
        t_electron_confinement = self.iter_ipb98y4_confinement_time(
            pcur,
            b_plasma_toroidal_on_axis,
            dnla19,
            p_plasma_loss_mw,
            rmajor,
            physics_variables.kappa_ipb,
            aspect,
            m_fuel_amu,
        )

    # ==========================================================================

    # ISS95 stellarator scaling
    elif model == ConfinementTimeModel.ISS95_STELLARATOR:
        # dummy argument q95 is actual argument iotabar for stellarators
        iotabar = q95
        t_electron_confinement = self.iss95_stellarator_confinement_time(
            rminor,
            rmajor,
            dnla19,
            b_plasma_toroidal_on_axis,
            p_plasma_loss_mw,
            iotabar,
        )

    # ==========================================================================

    # ISS04 stellarator scaling
    elif model == ConfinementTimeModel.ISS04_STELLARATOR:
        # dummy argument q95 is actual argument iotabar for stellarators
        iotabar = q95
        t_electron_confinement = self.iss04_stellarator_confinement_time(
            rminor,
            rmajor,
            dnla19,
            b_plasma_toroidal_on_axis,
            p_plasma_loss_mw,
            iotabar,
        )

    # ==========================================================================

    # DS03 beta-independent H-mode scaling
    elif model == ConfinementTimeModel.DS03:
        t_electron_confinement = self.ds03_confinement_time(
            pcur,
            b_plasma_toroidal_on_axis,
            dnla19,
            p_plasma_loss_mw,
            rmajor,
            kappa95,
            aspect,
            m_fuel_amu,
        )

    # ==========================================================================

    #  Murari "Non-power law" scaling
    elif model == ConfinementTimeModel.MURARI:
        t_electron_confinement = self.murari_confinement_time(
            pcur,
            rmajor,
            physics_variables.kappa_ipb,
            dnla19,
            b_plasma_toroidal_on_axis,
            p_plasma_loss_mw,
        )

    # ==========================================================================

    # Petty08, beta independent dimensionless scaling
    elif model == ConfinementTimeModel.PETTY08:
        t_electron_confinement = self.petty08_confinement_time(
            pcur,
            b_plasma_toroidal_on_axis,
            dnla19,
            p_plasma_loss_mw,
            rmajor,
            physics_variables.kappa_ipb,
            aspect,
        )

    # ==========================================================================

    # Lang high density relevant confinement scaling
    elif model == ConfinementTimeModel.LANG_HIGH_DENSITY:
        t_electron_confinement = self.lang_high_density_confinement_time(
            plasma_current,
            b_plasma_toroidal_on_axis,
            nd_plasma_electron_line,
            p_plasma_loss_mw,
            rmajor,
            rminor,
            q95,
            qstar,
            aspect,
            m_fuel_amu,
            physics_variables.kappa_ipb,
        )

    # ==========================================================================

    # Hubbard 2017 I-mode confinement time scaling - nominal
    elif model == ConfinementTimeModel.HUBBARD_NOMINAL:
        t_electron_confinement = self.hubbard_nominal_confinement_time(
            pcur,
            b_plasma_toroidal_on_axis,
            dnla20,
            p_plasma_loss_mw,
        )

    # ==========================================================================

    # Hubbard 2017 I-mode confinement time scaling - lower
    elif model == ConfinementTimeModel.HUBBARD_LOWER:
        t_electron_confinement = self.hubbard_lower_confinement_time(
            pcur,
            b_plasma_toroidal_on_axis,
            dnla20,
            p_plasma_loss_mw,
        )

    # ==========================================================================

    # Hubbard 2017 I-mode confinement time scaling - upper
    elif model == ConfinementTimeModel.HUBBARD_UPPER:
        t_electron_confinement = self.hubbard_upper_confinement_time(
            pcur,
            b_plasma_toroidal_on_axis,
            dnla20,
            p_plasma_loss_mw,
        )

    # ==========================================================================

    # Menard NSTX, ELMy H-mode scaling
    elif model == ConfinementTimeModel.MENARD_NSTX:
        t_electron_confinement = self.menard_nstx_confinement_time(
            pcur,
            b_plasma_toroidal_on_axis,
            dnla19,
            p_plasma_loss_mw,
            rmajor,
            physics_variables.kappa_ipb,
            aspect,
            m_fuel_amu,
        )

    # ==========================================================================

    # Menard NSTX-Petty08 Hybrid
    elif model == ConfinementTimeModel.MENARD_NSTX_PETTY08_HYBRID:
        t_electron_confinement = self.menard_nstx_petty08_hybrid_confinement_time(
            pcur,
            b_plasma_toroidal_on_axis,
            dnla19,
            p_plasma_loss_mw,
            rmajor,
            physics_variables.kappa_ipb,
            aspect,
            m_fuel_amu,
        )

    # ==========================================================================

    # NSTX gyro-Bohm (Buxton)
    elif model == ConfinementTimeModel.NSTX_GYRO_BOHM:
        t_electron_confinement = self.nstx_gyro_bohm_confinement_time(
            pcur,
            b_plasma_toroidal_on_axis,
            p_plasma_loss_mw,
            rmajor,
            dnla20,
        )

    # ==========================================================================

    # ITPA20 H-mode scaling
    elif model == ConfinementTimeModel.ITPA20:
        t_electron_confinement = self.itpa20_confinement_time(
            pcur,
            b_plasma_toroidal_on_axis,
            dnla19,
            p_plasma_loss_mw,
            rmajor,
            physics_variables.triang,
            physics_variables.kappa_ipb,
            eps,
            physics_variables.m_ions_total_amu,
        )

    # ==========================================================================

    # ITPA20-IL confinement time scaling
    elif model == ConfinementTimeModel.ITPA20_IL:
        t_electron_confinement = self.itpa20_il_confinement_time(
            pcur,
            b_plasma_toroidal_on_axis,
            p_plasma_loss_mw,
            dnla19,
            physics_variables.m_ions_total_amu,
            rmajor,
            physics_variables.triang,
            physics_variables.kappa_ipb,
        )

    # ==========================================================================

    else:
        raise ProcessValueError(
            "Illegal value for i_confinement_time",
            i_confinement_time=i_confinement_time,
        )

    # Apply H-factor correction to chosen scaling
    t_electron_energy_confinement = hfact * t_electron_confinement

    # Ion energy confinement time
    t_ion_energy_confinement = t_electron_energy_confinement

    # Calculate H* non-radiation corrected H factor
    # Note: we will assume the IPB-98y2 scaling.
    if physics_variables.i_rad_loss == 1:
        physics_variables.hstar = (
            hfact
            * (
                p_plasma_loss_mw
                / (
                    p_plasma_loss_mw
                    + physics_variables.pden_plasma_sync_mw * vol_plasma
                    + physics_variables.p_plasma_inner_rad_mw
                )
            )
            ** 0.31
        )
    elif physics_variables.i_rad_loss == 0:
        physics_variables.hstar = (
            hfact
            * (
                p_plasma_loss_mw
                / (
                    p_plasma_loss_mw
                    + physics_variables.pden_plasma_rad_mw * vol_plasma
                )
            )
            ** 0.31
        )
    elif physics_variables.i_rad_loss == 2:
        physics_variables.hstar = hfact

    # Calculation of the transport power loss terms
    # Transport losses in Watts/m3 are 3/2 * n.e.T / tau , with T in eV
    # (here, temp_plasma_ion_density_weighted_kev and temp_plasma_electron_density_weighted_kev are in keV, and pden_electron_transport_loss_mw and pden_ion_transport_loss_mw are in MW/m3)

    # The transport losses is just the electron and ion thermal energies divided by the confinement time.
    pden_ion_transport_loss_mw = (
        (3 / 2)
        * (constants.ELECTRON_CHARGE / 1e3)
        * nd_plasma_ions_total_vol_avg
        * temp_plasma_ion_density_weighted_kev
        / t_ion_energy_confinement
    )
    pden_electron_transport_loss_mw = (
        (3 / 2)
        * (constants.ELECTRON_CHARGE / 1e3)
        * nd_plasma_electrons_vol_avg
        * temp_plasma_electron_density_weighted_kev
        / t_electron_energy_confinement
    )

    ratio = (nd_plasma_ions_total_vol_avg / nd_plasma_electrons_vol_avg) * (
        temp_plasma_ion_density_weighted_kev
        / temp_plasma_electron_density_weighted_kev
    )

    # Global energy confinement time

    t_energy_confinement = (ratio + 1.0e0) / (
        ratio / t_ion_energy_confinement + 1.0e0 / t_electron_energy_confinement
    )

    # For comparison directly calculate the confinement time from the stored energy calculated
    # from the total plasma beta and the loss power used above.
    physics_variables.t_energy_confinement_beta = (
        physics_variables.e_plasma_beta / 1e6
    ) / p_plasma_loss_mw

    return (
        pden_electron_transport_loss_mw,
        pden_ion_transport_loss_mw,
        t_electron_energy_confinement,
        t_ion_energy_confinement,
        t_energy_confinement,
        p_plasma_loss_mw,
    )

calculate_double_and_triple_product(nd_plasma_electrons_vol_avg, temp_plasma_electrons_vol_avg_kev, t_energy_confinement) staticmethod

Calculate the plasma double (nτ_E) and triple product (nTτ_E)

Parameters:

Name Type Description Default
nd_plasma_electrons_vol_avg float

Volume averaged electron density [m⁻³]

required
temp_plasma_electrons_vol_avg_kev float

Volume averaged electron temperature [keV]

required
t_energy_confinement float

Energy confinement time [s]

required

Returns:

Type Description
tuple[float, float]

Tuple[float, float]: (ntau, nTtau) where ntau is the plasma double product (n * τ_E) in units of m⁻³ * s, and nTtau is the plasma triple product (n * T * τ_E) in units of keV * s * m⁻³

Source code in process/models/physics/confinement_time.py
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
@staticmethod
def calculate_double_and_triple_product(
    nd_plasma_electrons_vol_avg: float,
    temp_plasma_electrons_vol_avg_kev: float,
    t_energy_confinement: float,
) -> tuple[float, float]:
    """Calculate the plasma double (nτ_E) and triple product (nTτ_E)

    Parameters
    ----------
    nd_plasma_electrons_vol_avg :
        Volume averaged electron density [m⁻³]
    temp_plasma_electrons_vol_avg_kev :
        Volume averaged electron temperature [keV]
    t_energy_confinement :
        Energy confinement time [s]

    Returns
    -------
    :
        Tuple[float, float]: (ntau, nTtau) where ntau is the plasma double product (n * τ_E) in units of m⁻³ * s,
        and nTtau is the plasma triple product (n * T * τ_E) in units of keV * s * m⁻³

    """

    ntau = t_energy_confinement * nd_plasma_electrons_vol_avg
    nTtau = ntau * temp_plasma_electrons_vol_avg_kev

    return ntau, nTtau

find_other_h_factors(i_confinement_time)

Function to find H-factor for the equivalent confinement time in other scalings.

Parameters:

Name Type Description Default
i_confinement_time int

Index of the confinement time scaling to use.

required

Returns:

Type Description
float

The calculated H-factor.

Source code in process/models/physics/confinement_time.py
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
def find_other_h_factors(self, i_confinement_time: int) -> float:
    """Function to find H-factor for the equivalent confinement time in other scalings.

    Parameters
    ----------
    i_confinement_time : int
        Index of the confinement time scaling to use.

    Returns
    -------
    float
        The calculated H-factor.

    """

    def fhz(hfact: float) -> float:
        """Function used to find power balance.

        Parameters
        ----------
        hfact : float
            H-factor to be used in the calculation.
        hfact: float :


        Returns
        -------
        float
            The difference between the calculated power and the required power for balance.

        """
        (
            ptrez,
            ptriz,
            _,
            _,
            _,
            _,
        ) = self.calculate_confinement_time(
            m_fuel_amu=physics_variables.m_fuel_amu,
            p_alpha_total_mw=physics_variables.p_alpha_total_mw,
            aspect=physics_variables.aspect,
            b_plasma_toroidal_on_axis=physics_variables.b_plasma_toroidal_on_axis,
            nd_plasma_ions_total_vol_avg=physics_variables.nd_plasma_ions_total_vol_avg,
            nd_plasma_electrons_vol_avg=physics_variables.nd_plasma_electrons_vol_avg,
            nd_plasma_electron_line=physics_variables.nd_plasma_electron_line,
            eps=physics_variables.eps,
            hfact=hfact,
            i_confinement_time=i_confinement_time,
            i_plasma_ignited=physics_variables.i_plasma_ignited,
            kappa=physics_variables.kappa,
            kappa95=physics_variables.kappa95,
            p_non_alpha_charged_mw=physics_variables.p_non_alpha_charged_mw,
            p_hcd_injected_total_mw=current_drive_variables.p_hcd_injected_total_mw,
            plasma_current=physics_variables.plasma_current,
            pden_plasma_core_rad_mw=physics_variables.pden_plasma_core_rad_mw,
            rmajor=physics_variables.rmajor,
            rminor=physics_variables.rminor,
            temp_plasma_electron_density_weighted_kev=physics_variables.temp_plasma_electron_density_weighted_kev,
            temp_plasma_ion_density_weighted_kev=physics_variables.temp_plasma_ion_density_weighted_kev,
            q95=physics_variables.q95,
            qstar=physics_variables.qstar,
            vol_plasma=physics_variables.vol_plasma,
            zeff=physics_variables.n_charge_plasma_effective_vol_avg,
        )

        # At power balance, fhz is zero.
        fhz_value = (
            ptrez
            + ptriz
            - physics_variables.f_p_alpha_plasma_deposited
            * physics_variables.pden_alpha_total_mw
            - physics_variables.pden_non_alpha_charged_mw
            - physics_variables.pden_plasma_ohmic_mw
        )

        # Take into account whether injected power is included in tau_e calculation (i.e. whether device is ignited)
        if physics_variables.i_plasma_ignited == 0:
            fhz_value -= (
                current_drive_variables.p_hcd_injected_total_mw
                / physics_variables.vol_plasma
            )

        # Include the radiation power if requested
        if physics_variables.i_rad_loss == 0:
            fhz_value += physics_variables.pden_plasma_rad_mw
        elif physics_variables.i_rad_loss == 1:
            fhz_value += physics_variables.pden_plasma_core_rad_mw

        return fhz_value

    return root_scalar(fhz, bracket=(0.01, 150), xtol=0.001).root

output_confinement_time_info()

Source code in process/models/physics/confinement_time.py
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
def output_confinement_time_info(self):
    po.oheadr(self.outfile, "Energy Confinement")

    if physics_variables.i_plasma_ignited == 1:
        po.ocmmnt(
            self.outfile,
            "Device is assumed to be ignited for the calculation of confinement time",
        )
        po.oblnkl(self.outfile)

    tauelaw = ConfinementTimeModel(physics_variables.i_confinement_time).full_name

    po.ocmmnt(
        self.outfile,
        f"Confinement scaling law: {tauelaw}",
    )

    po.ovarst(
        self.outfile,
        "Confinement scaling law",
        "(tauelaw)",
        f'"{tauelaw.strip().split(" ")[0]}"',
    )

    po.ovarrf(
        self.outfile, "Confinement H factor", "(hfact)", physics_variables.hfact
    )
    po.ovarrf(
        self.outfile,
        "Global thermal energy confinement time, from scaling (s)",
        "(t_energy_confinement)",
        physics_variables.t_energy_confinement,
        "OP ",
    )
    po.ovarrf(
        self.outfile,
        "Directly calculated total energy confinement time (s)",
        "(t_energy_confinement_beta)",
        physics_variables.t_energy_confinement_beta,
        "OP ",
    )
    po.ocmmnt(
        self.outfile,
        "(Total thermal energy derived from total plasma beta / loss power)",
    )
    po.ovarrf(
        self.outfile,
        "Ion energy confinement time, from scaling (s)",
        "(t_ion_energy_confinement)",
        physics_variables.t_ion_energy_confinement,
        "OP ",
    )
    po.ovarrf(
        self.outfile,
        "Electron energy confinement time, from scaling (s)",
        "(t_electron_energy_confinement)",
        physics_variables.t_electron_energy_confinement,
        "OP ",
    )
    po.ovarre(
        self.outfile,
        "Fusion double product (s/m3)",
        "(ntau)",
        physics_variables.ntau,
        "OP ",
    )
    po.ovarre(
        self.outfile,
        "Lawson Triple product (keV s/m3)",
        "(nTtau)",
        physics_variables.nTtau,
        "OP ",
    )
    po.ovarre(
        self.outfile,
        "Transport loss power assumed in scaling law (MW)",
        "(p_plasma_loss_mw)",
        physics_variables.p_plasma_loss_mw,
        "OP ",
    )
    po.ovarin(
        self.outfile,
        "Switch for radiation loss term usage in power balance",
        "(i_rad_loss)",
        physics_variables.i_rad_loss,
    )
    model = ConfinementRadiationLossModel(physics_variables.i_rad_loss)

    if model == ConfinementRadiationLossModel.FULL_RADIATION:
        po.ovarre(
            self.outfile,
            "Radiation power subtracted from plasma heating power balance (MW)",
            "",
            physics_variables.p_plasma_rad_mw,
            "OP ",
        )
    elif model == ConfinementRadiationLossModel.CORE_ONLY:
        po.ovarre(
            self.outfile,
            "Radiation power subtracted from plasma heating power balance (MW)",
            "",
            physics_variables.p_plasma_inner_rad_mw,
            "OP ",
        )
    else:  # NO_RADIATION
        po.ovarre(
            self.outfile,
            "Radiation power subtracted from plasma heating power balance (MW)",
            "",
            0.0e0,
        )

    po.ocmmnt(self.outfile, f"  (Radiation correction: {model.description})")
    po.ovarrf(
        self.outfile,
        "H* non-radiation corrected",
        "(hstar)",
        physics_variables.hstar,
        "OP",
    )
    po.ocmmnt(self.outfile, "  (H* assumes IPB98(y,2), ELMy H-mode scaling)")
    po.ovarrf(
        self.outfile,
        "Alpha particle confinement time (s)",
        "(t_alpha_confinement)",
        physics_variables.t_alpha_confinement,
        "OP ",
    )
    # Note alpha confinement time is no longer equal to fuel particle confinement time.
    po.ovarrf(
        self.outfile,
        "Alpha particle/energy confinement time ratio",
        "(f_alpha_energy_confinement)",
        physics_variables.f_alpha_energy_confinement,
        "OP ",
    )
    po.ovarrf(
        self.outfile,
        "Lower limit on f_alpha_energy_confinement",
        "(f_alpha_energy_confinement_min)",
        constraint_variables.f_alpha_energy_confinement_min,
    )

    # Plot table of al the H-factor scalings and coparison values
    self.output_confinement_comparison(istell=stellarator_variables.istell)

output_confinement_comparison(istell)

Routine to calculate ignition margin for different confinement scalings and equivalent confinement times for H=1.

This routine calculates the ignition margin at the final point with different scalings and outputs the results to a file.

The output includes: - Energy confinement times - Required H-factors for power balance

The routine iterates over a range of confinement times, skipping the first user input and a specific index (25). For each confinement time, it calculates various parameters related to confinement and ignition using the calculate_confinement_time method. It then calculates the H-factor for when the plasma is ignited using the find_other_h_factors method and writes the results to the output file.

Output format: - Header: "Energy confinement times, and required H-factors :" - Columns: "Scaling law", "Confinement time [s]", "H-factor for power balance"

Methods used: - calculate_confinement_time: Calculates confinement-related parameters. - find_other_h_factors: Calculates the H-factor for a given confinement time.

Parameters:

Name Type Description Default
istell int

Indicator for stellarator (0 for tokamak, >=1 for stellarator).

required
Source code in process/models/physics/confinement_time.py
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
def output_confinement_comparison(self, istell: int):
    """Routine to calculate ignition margin for different confinement scalings and equivalent confinement times for H=1.

    This routine calculates the ignition margin at the final point with different scalings and outputs the results to a file.

    The output includes:
    - Energy confinement times
    - Required H-factors for power balance

    The routine iterates over a range of confinement times, skipping the first user input and a specific index (25). For each confinement time, it calculates various parameters related to confinement and ignition using the `calculate_confinement_time` method. It then calculates the H-factor for when the plasma is ignited using the `find_other_h_factors` method and writes the results to the output file.

    Output format:
    - Header: "Energy confinement times, and required H-factors :"
    - Columns: "Scaling law", "Confinement time [s]", "H-factor for power balance"

    Methods used:
    - `calculate_confinement_time`: Calculates confinement-related parameters.
    - `find_other_h_factors`: Calculates the H-factor for a given confinement time.

    Parameters
    ----------
    istell :
        Indicator for stellarator (0 for tokamak, >=1 for stellarator).

    """

    po.oheadr(self.outfile, "Energy confinement times, and required H-factors :")
    po.ocmmnt(
        self.outfile,
        f"{'':>2}{'Scaling law':<27}{'Electron confinement time [s]':<32}Equivalent H-factor for",
    )
    po.ocmmnt(
        self.outfile,
        f"{'':>38}{'for H = 1':<23}same confinement time",
    )
    po.oblnkl(self.outfile)

    # List of key values for stellarator scalings
    stellarator_scalings = [21, 22, 23, 37, 38]

    # Plot all of the confinement scalings for comparison when H = 1
    # Start from range 1 as the first i_confinement_time is a user input
    # If stellarator, use the stellarator scalings
    for i_confinement_time in (
        range(1, physics_variables.N_CONFINEMENT_SCALINGS)
        if istell == 0
        else stellarator_scalings
    ):
        if i_confinement_time == 25:
            continue
        (
            _,
            _,
            taueez,
            _,
            _,
            _,
        ) = self.calculate_confinement_time(
            m_fuel_amu=physics_variables.m_fuel_amu,
            p_alpha_total_mw=physics_variables.p_alpha_total_mw,
            aspect=physics_variables.aspect,
            b_plasma_toroidal_on_axis=physics_variables.b_plasma_toroidal_on_axis,
            nd_plasma_ions_total_vol_avg=physics_variables.nd_plasma_ions_total_vol_avg,
            nd_plasma_electrons_vol_avg=physics_variables.nd_plasma_electrons_vol_avg,
            nd_plasma_electron_line=physics_variables.nd_plasma_electron_line,
            eps=physics_variables.eps,
            hfact=1.0,
            i_confinement_time=i_confinement_time,
            i_plasma_ignited=physics_variables.i_plasma_ignited,
            kappa=physics_variables.kappa,
            kappa95=physics_variables.kappa95,
            p_non_alpha_charged_mw=physics_variables.p_non_alpha_charged_mw,
            p_hcd_injected_total_mw=current_drive_variables.p_hcd_injected_total_mw,
            plasma_current=physics_variables.plasma_current,
            pden_plasma_core_rad_mw=physics_variables.pden_plasma_core_rad_mw,
            rmajor=physics_variables.rmajor,
            rminor=physics_variables.rminor,
            temp_plasma_electron_density_weighted_kev=physics_variables.temp_plasma_electron_density_weighted_kev,
            temp_plasma_ion_density_weighted_kev=physics_variables.temp_plasma_ion_density_weighted_kev,
            q95=physics_variables.q95,
            qstar=physics_variables.qstar,
            vol_plasma=physics_variables.vol_plasma,
            zeff=physics_variables.n_charge_plasma_effective_vol_avg,
        )

        try:
            # Calculate the H-factor for the same confinement time in other scalings
            physics_variables.hfac[i_confinement_time - 1] = (
                self.find_other_h_factors(i_confinement_time)
            )
        except ValueError:
            # This is only used for a table in the OUT.DAT so if it fails
            # just write a NaN--its not worth crashing PROCESS over.
            physics_variables.hfac[i_confinement_time - 1] = np.nan

        scaling_name = ConfinementTimeModel(i_confinement_time).full_name

        po.ocmmnt(
            self.outfile,
            f"{'':>2}{scaling_name:<38}"
            f"{taueez:<28.3f}{physics_variables.hfac[i_confinement_time - 1]:.3f}",
        )

    po.oblnkl(self.outfile)
    po.ostars(self.outfile, 110)

neo_alcator_confinement_time(dene20, rminor, rmajor, qstar) staticmethod

Calculate the Nec-Alcator(NA) OH scaling confinement time

Parameters:

Name Type Description Default
dene20 float

Volume averaged electron density in units of 10**20 m**-3

required
rminor float

Plasma minor radius [m]

required
rmajor float

Plasma major radius [m]

required
qstar float

Equivalent cylindrical edge safety factor

required

Returns:

Name Type Description
float

float: Neo-Alcator confinement time [s]

References float
  • N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group, "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
Source code in process/models/physics/confinement_time.py
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
@staticmethod
def neo_alcator_confinement_time(
    dene20: float, rminor: float, rmajor: float, qstar: float
) -> float:
    """Calculate the Nec-Alcator(NA) OH scaling confinement time

    Parameters
    ----------
    dene20 :
        Volume averaged electron density in units of 10**20 m**-3
    rminor :
        Plasma minor radius [m]
    rmajor :
        Plasma major radius [m]
    qstar :
        Equivalent cylindrical edge safety factor

    Returns
    -------
    :
        float: Neo-Alcator confinement time [s]


    References:
        - N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group,
        "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
    """
    return 0.07e0 * dene20 * rminor * rmajor * rmajor * qstar

mirnov_confinement_time(rminor, kappa95, pcur) staticmethod

Calculate the Mirnov scaling (H-mode) confinement time

Parameters:

Name Type Description Default
rminor float

Plasma minor radius [m]

required
kappa95 float

Plasma elongation at 95% flux surface

required
pcur float

Plasma current [MA]

required

Returns:

Name Type Description
float

float: Mirnov scaling confinement time [s]

References float
  • N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group, "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
Source code in process/models/physics/confinement_time.py
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
@staticmethod
def mirnov_confinement_time(rminor: float, kappa95: float, pcur: float) -> float:
    """Calculate the Mirnov scaling (H-mode) confinement time

    Parameters
    ----------
    rminor :
        Plasma minor radius [m]
    kappa95 :
        Plasma elongation at 95% flux surface
    pcur :
        Plasma current [MA]

    Returns
    -------
    :
        float: Mirnov scaling confinement time [s]

    References:
        - N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group,
        "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
    """
    return 0.2e0 * rminor * np.sqrt(kappa95) * pcur

merezhkin_muhkovatov_confinement_time(rmajor, rminor, kappa95, qstar, dnla20, afuel, ten) staticmethod

Calculate the Merezhkin-Mukhovatov (MM) OH/L-mode scaling confinement time

Parameters:

Name Type Description Default
rmajor float

Plasma major radius [m]

required
rminor float

Plasma minor radius [m]

required
kappa95 float

Plasma elongation at 95% flux surface

required
qstar float

Equivalent cylindrical edge safety factor

required
dnla20 float

Line averaged electron density in units of 10**20 m**-3

required
afuel float

Fuel atomic mass number

required
ten float

Electron temperature [keV]

required

Returns:

Name Type Description
float

float: Merezhkin-Mukhovatov confinement time [s]

References float
  • N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group, "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
Source code in process/models/physics/confinement_time.py
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
@staticmethod
def merezhkin_muhkovatov_confinement_time(
    rmajor: float,
    rminor: float,
    kappa95: float,
    qstar: float,
    dnla20: float,
    afuel: float,
    ten: float,
) -> float:
    """Calculate the Merezhkin-Mukhovatov (MM) OH/L-mode scaling confinement time

    Parameters
    ----------
    rmajor :
        Plasma major radius [m]
    rminor :
        Plasma minor radius [m]
    kappa95 :
        Plasma elongation at 95% flux surface
    qstar :
        Equivalent cylindrical edge safety factor
    dnla20 :
        Line averaged electron density in units of 10**20 m**-3
    afuel :
        Fuel atomic mass number
    ten :
        Electron temperature [keV]

    Returns
    -------
    :
        float: Merezhkin-Mukhovatov confinement time [s]


    References:
        - N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group,
        "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
    """
    return (
        3.5e-3
        * rmajor**2.75e0
        * rminor**0.25e0
        * kappa95**0.125e0
        * qstar
        * dnla20
        * np.sqrt(afuel)
        / np.sqrt(ten / 10.0e0)
    )

shimomura_confinement_time(rmajor, rminor, b_plasma_toroidal_on_axis, kappa95, afuel) staticmethod

Calculate the Shimomura (S) optimized H-mode scaling confinement time

Parameters:

Name Type Description Default
rmajor float

Plasma major radius [m]

required
rminor float

Plasma minor radius [m]

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
kappa95 float

Plasma elongation at 95% flux surface

required
afuel float

Fuel atomic mass number

required

Returns:

Name Type Description
float

float: Shimomura confinement time [s]

References float
  • N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group, "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
Source code in process/models/physics/confinement_time.py
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
@staticmethod
def shimomura_confinement_time(
    rmajor: float,
    rminor: float,
    b_plasma_toroidal_on_axis: float,
    kappa95: float,
    afuel: float,
) -> float:
    """Calculate the  Shimomura (S) optimized H-mode scaling confinement time

    Parameters
    ----------
    rmajor :
        Plasma major radius [m]
    rminor :
        Plasma minor radius [m]
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    kappa95 :
        Plasma elongation at 95% flux surface
    afuel :
        Fuel atomic mass number

    Returns
    -------
    :
        float: Shimomura confinement time [s]

    References:
        - N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group,
        "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
    """
    return (
        0.045e0
        * rmajor
        * rminor
        * b_plasma_toroidal_on_axis
        * np.sqrt(kappa95)
        * np.sqrt(afuel)
    )

kaye_goldston_confinement_time(kappa95, pcur, n20, rmajor, afuel, b_plasma_toroidal_on_axis, rminor, p_plasma_loss_mw) staticmethod

Calculate the Kaye-Goldston (KG) L-mode scaling confinement time

Parameters:

Name Type Description Default
kappa95 float

Plasma elongation at 95% flux surface

required
pcur float

Plasma current [MA]

required
n20 float

Line averaged electron density in units of 10**20 m**-3

required
rmajor float

Plasma major radius [m]

required
afuel float

Fuel atomic mass number

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
rminor float

Plasma minor radius [m]

required
p_plasma_loss_mw float

Net Heating power [MW]

required

Returns:

Name Type Description
float

float: Kaye-Goldston confinement time [s]

Notes float
  • An isotope correction factor (M_i/1.5)^0.5 is added to the original scaling to reflect the fact that the empirical fits to the data were from experiments with H and D mixture, M_i = 1.5
References float
  • N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group, "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
Source code in process/models/physics/confinement_time.py
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
@staticmethod
def kaye_goldston_confinement_time(
    kappa95: float,
    pcur: float,
    n20: float,
    rmajor: float,
    afuel: float,
    b_plasma_toroidal_on_axis: float,
    rminor: float,
    p_plasma_loss_mw: float,
) -> float:
    """Calculate the Kaye-Goldston (KG) L-mode scaling confinement time

    Parameters
    ----------
    kappa95 :
        Plasma elongation at 95% flux surface
    pcur :
        Plasma current [MA]
    n20 :
        Line averaged electron density in units of 10**20 m**-3
    rmajor :
        Plasma major radius [m]
    afuel :
        Fuel atomic mass number
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    rminor :
        Plasma minor radius [m]
    p_plasma_loss_mw :
        Net Heating power [MW]

    Returns
    -------
    :
        float: Kaye-Goldston confinement time [s]

    Notes:
        - An isotope correction factor (M_i/1.5)^0.5 is added to the original scaling to reflect the fact
        that the empirical fits to the data were from experiments with H and D mixture, M_i = 1.5

    References:
        - N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group,
        "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
    """
    return (
        0.055e0
        * kappa95**0.28e0
        * pcur**1.24e0
        * n20**0.26e0
        * rmajor**1.65e0
        * np.sqrt(afuel / 1.5e0)
        / (
            b_plasma_toroidal_on_axis**0.09e0
            * rminor**0.49e0
            * p_plasma_loss_mw**0.58e0
        )
    )

iter_89p_confinement_time(pcur, rmajor, rminor, kappa, dnla20, b_plasma_toroidal_on_axis, afuel, p_plasma_loss_mw) staticmethod

Calculate the ITER Power scaling - ITER 89-P (L-mode) confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
rmajor float

Plasma major radius [m]

required
rminor float

Plasma minor radius [m]

required
kappa float

Plasma elongation

required
dnla20 float

Line averaged electron density in units of 10**20 m**-3

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
afuel float

Fuel atomic mass number

required
p_plasma_loss_mw float

Net Heating power [MW]

required

Returns:

Name Type Description
float

float: ITER 89-P confinement time [s]

References float
  • T.C.Hender et.al., 'Physics Assesment of the European Reactor Study', AEA FUS 172, 1992

  • N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group, "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.

Source code in process/models/physics/confinement_time.py
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
@staticmethod
def iter_89p_confinement_time(
    pcur: float,
    rmajor: float,
    rminor: float,
    kappa: float,
    dnla20: float,
    b_plasma_toroidal_on_axis: float,
    afuel: float,
    p_plasma_loss_mw: float,
) -> float:
    """Calculate the ITER Power scaling - ITER 89-P (L-mode) confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    rmajor :
        Plasma major radius [m]
    rminor :
        Plasma minor radius [m]
    kappa :
        Plasma elongation
    dnla20 :
        Line averaged electron density in units of 10**20 m**-3
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    afuel :
        Fuel atomic mass number
    p_plasma_loss_mw :
        Net Heating power [MW]

    Returns
    -------
    :
        float: ITER 89-P confinement time [s]


    References:
        - T.C.Hender et.al., 'Physics Assesment of the European Reactor Study', AEA FUS 172, 1992

        - N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group,
        "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
    """
    return (
        0.048e0
        * pcur**0.85e0
        * rmajor**1.2e0
        * rminor**0.3e0
        * np.sqrt(kappa)
        * dnla20**0.1e0
        * b_plasma_toroidal_on_axis**0.2e0
        * np.sqrt(afuel)
        / np.sqrt(p_plasma_loss_mw)
    )

iter_89_0_confinement_time(pcur, rmajor, rminor, kappa, dnla20, b_plasma_toroidal_on_axis, afuel, p_plasma_loss_mw) staticmethod

Calculate the ITER Offset linear scaling - ITER 89-O (L-mode) confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
rmajor float

Plasma major radius [m]

required
rminor float

Plasma minor radius [m]

required
kappa float

Plasma elongation

required
dnla20 float

Line averaged electron density in units of 10**20 m**-3

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
afuel float

Fuel atomic mass number

required
p_plasma_loss_mw float

Net Heating power [MW]

required

Returns:

Name Type Description
float

float: ITER 89-O confinement time [s]

References float
  • T.C.Hender et.al., 'Physics Assesment of the European Reactor Study', AEA FUS 172, 1992
Source code in process/models/physics/confinement_time.py
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
@staticmethod
def iter_89_0_confinement_time(
    pcur: float,
    rmajor: float,
    rminor: float,
    kappa: float,
    dnla20: float,
    b_plasma_toroidal_on_axis: float,
    afuel: float,
    p_plasma_loss_mw: float,
) -> float:
    """Calculate the ITER Offset linear scaling - ITER 89-O (L-mode) confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    rmajor :
        Plasma major radius [m]
    rminor :
        Plasma minor radius [m]
    kappa :
        Plasma elongation
    dnla20 :
        Line averaged electron density in units of 10**20 m**-3
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    afuel :
        Fuel atomic mass number
    p_plasma_loss_mw :
        Net Heating power [MW]

    Returns
    -------
    :
        float: ITER 89-O confinement time [s]

    References:
        - T.C.Hender et.al., 'Physics Assesment of the European Reactor Study', AEA FUS 172, 1992
    """
    term1 = (
        0.04e0
        * pcur**0.5e0
        * rmajor**0.3e0
        * rminor**0.8e0
        * kappa**0.6e0
        * afuel**0.5e0
    )
    term2 = (
        0.064e0
        * pcur**0.8e0
        * rmajor**1.6e0
        * rminor**0.6e0
        * kappa**0.5e0
        * dnla20**0.6e0
        * b_plasma_toroidal_on_axis**0.35e0
        * afuel**0.2e0
        / p_plasma_loss_mw
    )
    return term1 + term2

rebut_lallia_confinement_time(rminor, rmajor, kappa, afuel, pcur, zeff, dnla20, b_plasma_toroidal_on_axis, p_plasma_loss_mw) staticmethod

Calculate the Rebut-Lallia offset linear scaling (L-mode) confinement time

Parameters:

Name Type Description Default
rminor float

Plasma minor radius [m]

required
rmajor float

Plasma major radius [m]

required
kappa float

Plasma elongation at 95% flux surface

required
afuel float

Fuel atomic mass number

required
pcur float

Plasma current [MA]

required
zeff float

Effective charge

required
dnla20 float

Line averaged electron density in units of 10**20 m**-3

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
p_plasma_loss_mw float

Net Heating power [MW]

required

Returns:

Name Type Description
float

float: Rebut-Lallia confinement time [s]

References float
  • T.C.Hender et.al., 'Physics Assesment of the European Reactor Study', AEA FUS 172, 1992
Source code in process/models/physics/confinement_time.py
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
@staticmethod
def rebut_lallia_confinement_time(
    rminor: float,
    rmajor: float,
    kappa: float,
    afuel: float,
    pcur: float,
    zeff: float,
    dnla20: float,
    b_plasma_toroidal_on_axis: float,
    p_plasma_loss_mw: float,
) -> float:
    """Calculate the Rebut-Lallia offset linear scaling (L-mode) confinement time

    Parameters
    ----------
    rminor :
        Plasma minor radius [m]
    rmajor :
        Plasma major radius [m]
    kappa :
        Plasma elongation at 95% flux surface
    afuel :
        Fuel atomic mass number
    pcur :
        Plasma current [MA]
    zeff :
        Effective charge
    dnla20 :
        Line averaged electron density in units of 10**20 m**-3
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    p_plasma_loss_mw :
        Net Heating power [MW]

    Returns
    -------
    :
        float: Rebut-Lallia confinement time [s]


    References:
        - T.C.Hender et.al., 'Physics Assesment of the European Reactor Study', AEA FUS 172, 1992
    """
    rll = (rminor**2 * rmajor * kappa) ** (1.0e0 / 3.0e0)
    term1 = 1.2e-2 * pcur * rll**1.5e0 / np.sqrt(zeff)
    term2 = (
        0.146e0
        * dnla20**0.75e0
        * np.sqrt(pcur)
        * np.sqrt(b_plasma_toroidal_on_axis)
        * rll**2.75e0
        * zeff**0.25e0
        / p_plasma_loss_mw
    )
    return 1.65e0 * np.sqrt(afuel / 2.0e0) * (term1 + term2)

goldston_confinement_time(pcur, rmajor, rminor, kappa95, afuel, p_plasma_loss_mw) staticmethod

Calculate the Goldston scaling (L-mode) confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
rmajor float

Plasma major radius [m]

required
rminor float

Plasma minor radius [m]

required
kappa95 float

Plasma elongation at 95% flux surface

required
afuel float

Fuel atomic mass number

required
p_plasma_loss_mw float

Net Heating power [MW]

required

Returns:

Name Type Description
float

float: Goldston confinement time [s]

References float
  • N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group, "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
Source code in process/models/physics/confinement_time.py
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
@staticmethod
def goldston_confinement_time(
    pcur: float,
    rmajor: float,
    rminor: float,
    kappa95: float,
    afuel: float,
    p_plasma_loss_mw: float,
) -> float:
    """Calculate the Goldston scaling (L-mode) confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    rmajor :
        Plasma major radius [m]
    rminor :
        Plasma minor radius [m]
    kappa95 :
        Plasma elongation at 95% flux surface
    afuel :
        Fuel atomic mass number
    p_plasma_loss_mw :
        Net Heating power [MW]

    Returns
    -------
    :
        float: Goldston confinement time [s]

    References:
        - N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group,
        "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
    """
    return (
        0.037e0
        * pcur
        * rmajor**1.75e0
        * rminor ** (-0.37e0)
        * np.sqrt(kappa95)
        * np.sqrt(afuel / 1.5e0)
        / np.sqrt(p_plasma_loss_mw)
    )

t10_confinement_time(dnla20, rmajor, qstar, b_plasma_toroidal_on_axis, rminor, kappa95, p_plasma_loss_mw, zeff, pcur) staticmethod

Calculate the T-10 scaling confinement time

Parameters:

Name Type Description Default
dnla20 float

Line averaged electron density in units of 10**20 m**-3

required
rmajor float

Plasma major radius [m]

required
qstar float

Equivalent cylindrical edge safety factor

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
rminor float

Plasma minor radius [m]

required
kappa95 float

Plasma elongation at 95% flux surface

required
p_plasma_loss_mw float

Net Heating power [MW]

required
zeff float

Effective charge

required
pcur float

Plasma current [MA]

required

Returns:

Name Type Description
float

float: T-10 confinement time [s]

References float
  • N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group, "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
Source code in process/models/physics/confinement_time.py
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
@staticmethod
def t10_confinement_time(
    dnla20: float,
    rmajor: float,
    qstar: float,
    b_plasma_toroidal_on_axis: float,
    rminor: float,
    kappa95: float,
    p_plasma_loss_mw: float,
    zeff: float,
    pcur: float,
) -> float:
    """Calculate the T-10 scaling confinement time

    Parameters
    ----------
    dnla20 :
        Line averaged electron density in units of 10**20 m**-3
    rmajor :
        Plasma major radius [m]
    qstar :
        Equivalent cylindrical edge safety factor
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    rminor :
        Plasma minor radius [m]
    kappa95 :
        Plasma elongation at 95% flux surface
    p_plasma_loss_mw :
        Net Heating power [MW]
    zeff :
        Effective charge
    pcur :
        Plasma current [MA]

    Returns
    -------
    :
        float: T-10 confinement time [s]

    References:
        - N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group,
        "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
    """
    denfac = dnla20 * rmajor * qstar / (1.3e0 * b_plasma_toroidal_on_axis)
    denfac = min(1.0e0, denfac)
    return (
        0.095e0
        * rmajor
        * rminor
        * b_plasma_toroidal_on_axis
        * np.sqrt(kappa95)
        * denfac
        / p_plasma_loss_mw**0.4e0
        * (zeff**2 * pcur**4 / (rmajor * rminor * qstar**3 * kappa95**1.5e0))
        ** 0.08e0
    )

jaeri_confinement_time(kappa95, rminor, afuel, n20, pcur, b_plasma_toroidal_on_axis, rmajor, qstar, zeff, p_plasma_loss_mw) staticmethod

Calculate the JAERI / Odajima-Shimomura L-mode scaling confinement time

Parameters:

Name Type Description Default
kappa95 float

Plasma elongation at 95% flux surface

required
rminor float

Plasma minor radius [m]

required
afuel float

Fuel atomic mass number

required
n20 float

Line averaged electron density in units of 10**20 m**-3

required
pcur float

Plasma current [MA]

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
rmajor float

Plasma major radius [m]

required
qstar float

Equivalent cylindrical edge safety factor

required
zeff float

Effective charge

required
p_plasma_loss_mw float

Net Heating power [MW]

required

Returns:

Name Type Description
float

float: JAERI confinement time [s]

References float
  • N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group, "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
Source code in process/models/physics/confinement_time.py
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
@staticmethod
def jaeri_confinement_time(
    kappa95: float,
    rminor: float,
    afuel: float,
    n20: float,
    pcur: float,
    b_plasma_toroidal_on_axis: float,
    rmajor: float,
    qstar: float,
    zeff: float,
    p_plasma_loss_mw: float,
) -> float:
    """Calculate the JAERI / Odajima-Shimomura L-mode scaling confinement time

    Parameters
    ----------
    kappa95 :
        Plasma elongation at 95% flux surface
    rminor :
        Plasma minor radius [m]
    afuel :
        Fuel atomic mass number
    n20 :
        Line averaged electron density in units of 10**20 m**-3
    pcur :
        Plasma current [MA]
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    rmajor :
        Plasma major radius [m]
    qstar :
        Equivalent cylindrical edge safety factor
    zeff :
        Effective charge
    p_plasma_loss_mw :
        Net Heating power [MW]

    Returns
    -------
    :
        float: JAERI confinement time [s]

    References:
        - N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group,
        "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
    """
    gjaeri = (
        zeff**0.4e0
        * ((15.0e0 - zeff) / 20.0e0) ** 0.6e0
        * (3.0e0 * qstar * (qstar + 5.0e0) / ((qstar + 2.0e0) * (qstar + 7.0e0)))
        ** 0.6e0
    )
    return (
        0.085e0 * kappa95 * rminor**2 * np.sqrt(afuel)
        + 0.069e0
        * n20**0.6e0
        * pcur
        * b_plasma_toroidal_on_axis**0.2e0
        * rminor**0.4e0
        * rmajor**1.6e0
        * np.sqrt(afuel)
        * gjaeri
        * kappa95**0.2e0
        / p_plasma_loss_mw
    )

kaye_big_confinement_time(rmajor, rminor, b_plasma_toroidal_on_axis, kappa95, pcur, n20, afuel, p_plasma_loss_mw) staticmethod

Calculate the Kaye-Big scaling confinement time

Parameters:

Name Type Description Default
rmajor float

Plasma major radius [m]

required
rminor float

Plasma minor radius [m]

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
kappa95 float

Plasma elongation at 95% flux surface

required
pcur float

Plasma current [MA]

required
n20 float

Line averaged electron density in units of 10**20 m**-3

required
afuel float

Fuel atomic mass number

required
p_plasma_loss_mw float

Net Heating power [MW]

required

Returns:

Name Type Description
float

float: Kaye-Big confinement time [s]

References float
  • N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group, "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
Source code in process/models/physics/confinement_time.py
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
@staticmethod
def kaye_big_confinement_time(
    rmajor: float,
    rminor: float,
    b_plasma_toroidal_on_axis: float,
    kappa95: float,
    pcur: float,
    n20: float,
    afuel: float,
    p_plasma_loss_mw: float,
) -> float:
    """Calculate the Kaye-Big scaling confinement time

    Parameters
    ----------
    rmajor :
        Plasma major radius [m]
    rminor :
        Plasma minor radius [m]
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    kappa95 :
        Plasma elongation at 95% flux surface
    pcur :
        Plasma current [MA]
    n20 :
        Line averaged electron density in units of 10**20 m**-3
    afuel :
        Fuel atomic mass number
    p_plasma_loss_mw :
        Net Heating power [MW]

    Returns
    -------
    :
        float: Kaye-Big confinement time [s]


    References:
        - N. A. Uckan, International Atomic Energy Agency, Vienna (Austria)and ITER Physics Group,
        "ITER physics design guidelines: 1989", no. No. 10. Feb. 1990.
    """
    return (
        0.105e0
        * np.sqrt(rmajor)
        * rminor**0.8e0
        * b_plasma_toroidal_on_axis**0.3e0
        * kappa95**0.25e0
        * pcur**0.85e0
        * n20**0.1e0
        * np.sqrt(afuel)
        / np.sqrt(p_plasma_loss_mw)
    )

iter_h90_p_confinement_time(pcur, rmajor, rminor, kappa, dnla20, b_plasma_toroidal_on_axis, afuel, p_plasma_loss_mw) staticmethod

Calculate the ITER H-mode scaling - ITER H90-P confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
rmajor float

Plasma major radius [m]

required
rminor float

Plasma minor radius [m]

required
kappa float

Plasma elongation

required
dnla20 float

Line averaged electron density in units of 10**20 m**-3

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
afuel float

Fuel atomic mass number

required
p_plasma_loss_mw float

Net Heating power [MW]

required

Returns:

Name Type Description
float

float: ITER H90-P confinement time [s]

References float
  • T.C.Hender et.al., 'Physics Assesment of the European Reactor Study', AEA FUS 172, 1992
Source code in process/models/physics/confinement_time.py
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
@staticmethod
def iter_h90_p_confinement_time(
    pcur: float,
    rmajor: float,
    rminor: float,
    kappa: float,
    dnla20: float,
    b_plasma_toroidal_on_axis: float,
    afuel: float,
    p_plasma_loss_mw: float,
) -> float:
    """Calculate the ITER H-mode scaling - ITER H90-P confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    rmajor :
        Plasma major radius [m]
    rminor :
        Plasma minor radius [m]
    kappa :
        Plasma elongation
    dnla20 :
        Line averaged electron density in units of 10**20 m**-3
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    afuel :
        Fuel atomic mass number
    p_plasma_loss_mw :
        Net Heating power [MW]

    Returns
    -------
    :
        float: ITER H90-P confinement time [s]


    References:
        - T.C.Hender et.al., 'Physics Assesment of the European Reactor Study', AEA FUS 172, 1992
    """
    return (
        0.064e0
        * pcur**0.87e0
        * rmajor**1.82e0
        * rminor ** (-0.12e0)
        * kappa**0.35e0
        * dnla20**0.09e0
        * b_plasma_toroidal_on_axis**0.15e0
        * np.sqrt(afuel)
        / np.sqrt(p_plasma_loss_mw)
    )

riedel_l_confinement_time(pcur, rmajor, rminor, kappa95, dnla20, b_plasma_toroidal_on_axis, p_plasma_loss_mw) staticmethod

Calculate the Riedel scaling (L-mode) confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
rmajor float

Plasma major radius [m]

required
rminor float

Plasma minor radius [m]

required
kappa95 float

Plasma elongation at 95% flux surface

required
dnla20 float

Line averaged electron density in units of 10**20 m**-3

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
p_plasma_loss_mw float

Net Heating power [MW]

required

Returns:

Name Type Description
float

float: Riedel confinement time [s]

References float
  • T.C.Hender et.al., 'Physics Assesment of the European Reactor Study', AEA FUS 172, 1992
Source code in process/models/physics/confinement_time.py
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
@staticmethod
def riedel_l_confinement_time(
    pcur: float,
    rmajor: float,
    rminor: float,
    kappa95: float,
    dnla20: float,
    b_plasma_toroidal_on_axis: float,
    p_plasma_loss_mw: float,
) -> float:
    """Calculate the Riedel scaling (L-mode) confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    rmajor :
        Plasma major radius [m]
    rminor :
        Plasma minor radius [m]
    kappa95 :
        Plasma elongation at 95% flux surface
    dnla20 :
        Line averaged electron density in units of 10**20 m**-3
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    p_plasma_loss_mw :
        Net Heating power [MW]

    Returns
    -------
    :
        float: Riedel confinement time [s]

    References:
        - T.C.Hender et.al., 'Physics Assesment of the European Reactor Study', AEA FUS 172, 1992
    """
    return (
        0.044e0
        * pcur**0.93e0
        * rmajor**1.37e0
        * rminor ** (-0.049e0)
        * kappa95**0.588e0
        * dnla20**0.078e0
        * b_plasma_toroidal_on_axis**0.152e0
        / p_plasma_loss_mw**0.537e0
    )

christiansen_confinement_time(pcur, rmajor, rminor, kappa95, dnla20, b_plasma_toroidal_on_axis, p_plasma_loss_mw, afuel) staticmethod

Calculate the Christiansen et al scaling (L-mode) confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
rmajor float

Plasma major radius [m]

required
rminor float

Plasma minor radius [m]

required
kappa95 float

Plasma elongation at 95% flux surface

required
dnla20 float

Line averaged electron density in units of 10**20 m**-3

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
p_plasma_loss_mw float

Net Heating power [MW]

required
afuel float

Fuel atomic mass number

required

Returns:

Name Type Description
float

float: Christiansen confinement time [s]

References float
  • T.C.Hender et.al., 'Physics Assesment of the European Reactor Study', AEA FUS 172, 1992
Source code in process/models/physics/confinement_time.py
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
@staticmethod
def christiansen_confinement_time(
    pcur: float,
    rmajor: float,
    rminor: float,
    kappa95: float,
    dnla20: float,
    b_plasma_toroidal_on_axis: float,
    p_plasma_loss_mw: float,
    afuel: float,
) -> float:
    """Calculate the Christiansen et al scaling (L-mode) confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    rmajor :
        Plasma major radius [m]
    rminor :
        Plasma minor radius [m]
    kappa95 :
        Plasma elongation at 95% flux surface
    dnla20 :
        Line averaged electron density in units of 10**20 m**-3
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    p_plasma_loss_mw :
        Net Heating power [MW]
    afuel :
        Fuel atomic mass number

    Returns
    -------
    :
        float: Christiansen confinement time [s]

    References:
        - T.C.Hender et.al., 'Physics Assesment of the European Reactor Study', AEA FUS 172, 1992
    """
    return (
        0.24e0
        * pcur**0.79e0
        * rmajor**0.56e0
        * rminor**1.46e0
        * kappa95**0.73e0
        * dnla20**0.41e0
        * b_plasma_toroidal_on_axis**0.29e0
        / (p_plasma_loss_mw**0.79e0 * afuel**0.02e0)
    )

lackner_gottardi_confinement_time(pcur, rmajor, rminor, kappa95, dnla20, b_plasma_toroidal_on_axis, p_plasma_loss_mw) staticmethod

Calculate the Lackner-Gottardi scaling (L-mode) confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
rmajor float

Plasma major radius [m]

required
rminor float

Plasma minor radius [m]

required
kappa95 float

Plasma elongation at 95% flux surface

required
dnla20 float

Line averaged electron density in units of 10**20 m**-3

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
p_plasma_loss_mw float

Net Heating power [MW]

required

Returns:

Name Type Description
float

float: Lackner-Gottardi confinement time [s]

References float
  • T.C.Hender et.al., 'Physics Assesment of the European Reactor Study', AEA FUS 172, 1992
Source code in process/models/physics/confinement_time.py
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
@staticmethod
def lackner_gottardi_confinement_time(
    pcur: float,
    rmajor: float,
    rminor: float,
    kappa95: float,
    dnla20: float,
    b_plasma_toroidal_on_axis: float,
    p_plasma_loss_mw: float,
) -> float:
    """Calculate the Lackner-Gottardi scaling (L-mode) confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    rmajor :
        Plasma major radius [m]
    rminor :
        Plasma minor radius [m]
    kappa95 :
        Plasma elongation at 95% flux surface
    dnla20 :
        Line averaged electron density in units of 10**20 m**-3
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    p_plasma_loss_mw :
        Net Heating power [MW]

    Returns
    -------
    :
        float: Lackner-Gottardi confinement time [s]

    References:
        - T.C.Hender et.al., 'Physics Assesment of the European Reactor Study', AEA FUS 172, 1992
    """
    qhat = (
        (1.0e0 + kappa95**2)
        * rminor**2
        * b_plasma_toroidal_on_axis
        / (0.4e0 * pcur * rmajor)
    )
    return (
        0.12e0
        * pcur**0.8e0
        * rmajor**1.8e0
        * rminor**0.4e0
        * kappa95
        * (1.0e0 + kappa95) ** (-0.8e0)
        * dnla20**0.6e0
        * qhat**0.4e0
        / p_plasma_loss_mw**0.6e0
    )

neo_kaye_confinement_time(pcur, rmajor, rminor, kappa95, dnla20, b_plasma_toroidal_on_axis, p_plasma_loss_mw) staticmethod

Calculate the Neo-Kaye scaling (L-mode) confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
rmajor float

Plasma major radius [m]

required
rminor float

Plasma minor radius [m]

required
kappa95 float

Plasma elongation at 95% flux surface

required
dnla20 float

Line averaged electron density in units of 10**20 m**-3

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
p_plasma_loss_mw float

Net Heating power [MW]

required

Returns:

Name Type Description
float

float: Neo-Kaye confinement time [s]

References float
  • T.C.Hender et.al., 'Physics Assesment of the European Reactor Study', AEA FUS 172, 1992
Source code in process/models/physics/confinement_time.py
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
@staticmethod
def neo_kaye_confinement_time(
    pcur: float,
    rmajor: float,
    rminor: float,
    kappa95: float,
    dnla20: float,
    b_plasma_toroidal_on_axis: float,
    p_plasma_loss_mw: float,
) -> float:
    """Calculate the Neo-Kaye scaling (L-mode) confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    rmajor :
        Plasma major radius [m]
    rminor :
        Plasma minor radius [m]
    kappa95 :
        Plasma elongation at 95% flux surface
    dnla20 :
        Line averaged electron density in units of 10**20 m**-3
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    p_plasma_loss_mw :
        Net Heating power [MW]

    Returns
    -------
    :
        float: Neo-Kaye confinement time [s]


    References:
        - T.C.Hender et.al., 'Physics Assesment of the European Reactor Study', AEA FUS 172, 1992
    """
    return (
        0.063e0
        * pcur**1.12e0
        * rmajor**1.3e0
        * rminor ** (-0.04e0)
        * kappa95**0.28e0
        * dnla20**0.14e0
        * b_plasma_toroidal_on_axis**0.04e0
        / p_plasma_loss_mw**0.59e0
    )

riedel_h_confinement_time(pcur, rmajor, rminor, kappa95, dnla20, b_plasma_toroidal_on_axis, afuel, p_plasma_loss_mw) staticmethod

Calculate the Riedel scaling (H-mode) confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
rmajor float

Plasma major radius [m]

required
rminor float

Plasma minor radius [m]

required
kappa95 float

Plasma elongation at 95% flux surface

required
dnla20 float

Line averaged electron density in units of 10**20 m**-3

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
afuel float

Fuel atomic mass number

required
p_plasma_loss_mw float

Net Heating power [MW]

required

Returns:

Name Type Description
float

float: Riedel H-mode confinement time [s]

References float
  • T.C.Hender et.al., 'Physics Assesment of the European Reactor Study', AEA FUS 172, 1992
Source code in process/models/physics/confinement_time.py
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
@staticmethod
def riedel_h_confinement_time(
    pcur: float,
    rmajor: float,
    rminor: float,
    kappa95: float,
    dnla20: float,
    b_plasma_toroidal_on_axis: float,
    afuel: float,
    p_plasma_loss_mw: float,
) -> float:
    """Calculate the Riedel scaling (H-mode) confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    rmajor :
        Plasma major radius [m]
    rminor :
        Plasma minor radius [m]
    kappa95 :
        Plasma elongation at 95% flux surface
    dnla20 :
        Line averaged electron density in units of 10**20 m**-3
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    afuel :
        Fuel atomic mass number
    p_plasma_loss_mw :
        Net Heating power [MW]

    Returns
    -------
    :
        float: Riedel H-mode confinement time [s]

    References:
        - T.C.Hender et.al., 'Physics Assesment of the European Reactor Study', AEA FUS 172, 1992
    """
    return (
        0.1e0
        * np.sqrt(afuel)
        * pcur**0.884e0
        * rmajor**1.24e0
        * rminor ** (-0.23e0)
        * kappa95**0.317e0
        * b_plasma_toroidal_on_axis**0.207e0
        * dnla20**0.105e0
        / p_plasma_loss_mw**0.486e0
    )

iter_h90_p_amended_confinement_time(pcur, b_plasma_toroidal_on_axis, afuel, rmajor, p_plasma_loss_mw, kappa) staticmethod

Calculate the amended ITER H90-P confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
afuel float

Fuel atomic mass number

required
rmajor float

Plasma major radius [m]

required
p_plasma_loss_mw float

Net Heating power [MW]

required
kappa float

Plasma elongation

required

Returns:

Name Type Description
float

float: Amended ITER H90-P confinement time [s]

References float
Source code in process/models/physics/confinement_time.py
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
@staticmethod
def iter_h90_p_amended_confinement_time(
    pcur: float,
    b_plasma_toroidal_on_axis: float,
    afuel: float,
    rmajor: float,
    p_plasma_loss_mw: float,
    kappa: float,
) -> float:
    """Calculate the amended ITER H90-P confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    afuel :
        Fuel atomic mass number
    rmajor :
        Plasma major radius [m]
    p_plasma_loss_mw :
        Net Heating power [MW]
    kappa :
        Plasma elongation

    Returns
    -------
    :
        float: Amended ITER H90-P confinement time [s]

    References:
        - J. P. Christiansen et al., “Global energy confinement H-mode database for ITER,”
        Nuclear Fusion, vol. 32, no. 2, pp. 291-338, Feb. 1992,
        doi: https://doi.org/10.1088/0029-5515/32/2/i11.
    """
    return (
        0.082e0
        * pcur**1.02e0
        * b_plasma_toroidal_on_axis**0.15e0
        * np.sqrt(afuel)
        * rmajor**1.60e0
        / (p_plasma_loss_mw**0.47e0 * kappa**0.19e0)
    )

sudo_et_al_confinement_time(rmajor, rminor, dnla20, b_plasma_toroidal_on_axis, p_plasma_loss_mw) staticmethod

Calculate the Sudo et al. scaling confinement time

Parameters:

Name Type Description Default
rmajor float

Plasma major radius [m]

required
rminor float

Plasma minor radius [m]

required
dnla20 float

Line averaged electron density in units of 10**20 m**-3

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
p_plasma_loss_mw float

Net Heating power [MW]

required

Returns:

Name Type Description
float

float: Sudo et al. confinement time [s]

References float
Source code in process/models/physics/confinement_time.py
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
@staticmethod
def sudo_et_al_confinement_time(
    rmajor: float,
    rminor: float,
    dnla20: float,
    b_plasma_toroidal_on_axis: float,
    p_plasma_loss_mw: float,
) -> float:
    """Calculate the Sudo et al. scaling confinement time

    Parameters
    ----------
    rmajor :
        Plasma major radius [m]
    rminor :
        Plasma minor radius [m]
    dnla20 :
        Line averaged electron density in units of 10**20 m**-3
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    p_plasma_loss_mw :
        Net Heating power [MW]

    Returns
    -------
    :
        float: Sudo et al. confinement time [s]

    References:
        - S. Sudo et al., “Scalings of energy confinement and density limit in stellarator/heliotron devices,”
        Nuclear Fusion, vol. 30, no. 1, pp. 11-21, Jan. 1990,
        doi: https://doi.org/10.1088/0029-5515/30/1/002.
    """

    return (
        0.17e0
        * rmajor**0.75e0
        * rminor**2
        * dnla20**0.69e0
        * b_plasma_toroidal_on_axis**0.84e0
        * p_plasma_loss_mw ** (-0.58e0)
    )

gyro_reduced_bohm_confinement_time(b_plasma_toroidal_on_axis, dnla20, p_plasma_loss_mw, rminor, rmajor) staticmethod

Calculate the Gyro-reduced Bohm scaling confinement time

Parameters:

Name Type Description Default
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
dnla20 float

Line averaged electron density in units of 10**20 m**-3

required
p_plasma_loss_mw float

Net Heating power [MW]

required
rminor float

Plasma minor radius [m]

required
rmajor float

Plasma major radius [m]

required

Returns:

Name Type Description
float

float: Gyro-reduced Bohm confinement time [s]

References float
  • Goldston, R. J., H. Biglari, and G. W. Hammett. "E x B/B 2 vs. μ B/B as the Cause of Transport in Tokamaks." Bull. Am. Phys. Soc 34 (1989): 1964.
Source code in process/models/physics/confinement_time.py
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
@staticmethod
def gyro_reduced_bohm_confinement_time(
    b_plasma_toroidal_on_axis: float,
    dnla20: float,
    p_plasma_loss_mw: float,
    rminor: float,
    rmajor: float,
) -> float:
    """Calculate the Gyro-reduced Bohm scaling confinement time

    Parameters
    ----------
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    dnla20 :
        Line averaged electron density in units of 10**20 m**-3
    p_plasma_loss_mw :
        Net Heating power [MW]
    rminor :
        Plasma minor radius [m]
    rmajor :
        Plasma major radius [m]

    Returns
    -------
    :
        float: Gyro-reduced Bohm confinement time [s]

    References:
        - Goldston, R. J., H. Biglari, and G. W. Hammett. "E x B/B 2 vs. μ B/B as the Cause of Transport in Tokamaks."
        Bull. Am. Phys. Soc 34 (1989): 1964.
    """
    return (
        0.25e0
        * b_plasma_toroidal_on_axis**0.8e0
        * dnla20**0.6e0
        * p_plasma_loss_mw ** (-0.6e0)
        * rminor**2.4e0
        * rmajor**0.6e0
    )

lackner_gottardi_stellarator_confinement_time(rmajor, rminor, dnla20, b_plasma_toroidal_on_axis, p_plasma_loss_mw, q) staticmethod

Calculate the Lackner-Gottardi stellarator scaling confinement time

Parameters:

Name Type Description Default
rmajor float

Plasma major radius [m]

required
rminor float

Plasma minor radius [m]

required
dnla20 float

Line averaged electron density in units of 10**20 m**-3

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
p_plasma_loss_mw float

Net Heating power [MW]

required
q float

Edge safety factor

required

Returns:

Name Type Description
float

float: Lackner-Gottardi stellarator confinement time [s]

References float
Source code in process/models/physics/confinement_time.py
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
@staticmethod
def lackner_gottardi_stellarator_confinement_time(
    rmajor: float,
    rminor: float,
    dnla20: float,
    b_plasma_toroidal_on_axis: float,
    p_plasma_loss_mw: float,
    q: float,
) -> float:
    """Calculate the Lackner-Gottardi stellarator scaling confinement time

    Parameters
    ----------
    rmajor :
        Plasma major radius [m]
    rminor :
        Plasma minor radius [m]
    dnla20 :
        Line averaged electron density in units of 10**20 m**-3
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    p_plasma_loss_mw :
        Net Heating power [MW]
    q :
        Edge safety factor

    Returns
    -------
    :
        float: Lackner-Gottardi stellarator confinement time [s]

    References:
        - K. Lackner and N. A. O. Gottardi, “Tokamak confinement in relation to plateau scaling,”
        Nuclear Fusion, vol. 30, no. 4, pp. 767-770, Apr. 1990,
        doi: https://doi.org/10.1088/0029-5515/30/4/018.
    """
    return (
        0.17e0
        * rmajor
        * rminor**2
        * dnla20**0.6e0
        * b_plasma_toroidal_on_axis**0.8e0
        * p_plasma_loss_mw ** (-0.6e0)
        * q**0.4e0
    )

iter_93h_confinement_time(pcur, b_plasma_toroidal_on_axis, p_plasma_loss_mw, afuel, rmajor, dnla20, aspect, kappa) staticmethod

Calculate the ITER-93H scaling ELM-free confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
p_plasma_loss_mw float

Net Heating power [MW]

required
afuel float

Fuel atomic mass number

required
rmajor float

Plasma major radius [m]

required
dnla20 float

Line averaged electron density in units of 10**20 m**-3

required
aspect float

Aspect ratio

required
kappa float

Plasma elongation

required

Returns:

Name Type Description
float

float: ITER-93H confinement time [s]

References float
Source code in process/models/physics/confinement_time.py
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
@staticmethod
def iter_93h_confinement_time(
    pcur: float,
    b_plasma_toroidal_on_axis: float,
    p_plasma_loss_mw: float,
    afuel: float,
    rmajor: float,
    dnla20: float,
    aspect: float,
    kappa: float,
) -> float:
    """Calculate the ITER-93H scaling ELM-free confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    p_plasma_loss_mw :
        Net Heating power [MW]
    afuel :
        Fuel atomic mass number
    rmajor :
        Plasma major radius [m]
    dnla20 :
        Line averaged electron density in units of 10**20 m**-3
    aspect :
        Aspect ratio
    kappa :
        Plasma elongation

    Returns
    -------
    :
        float: ITER-93H confinement time [s]

    References:
        - K. Thomsen et al., “ITER H mode confinement database update,”
        vol. 34, no. 1, pp. 131-167, Jan. 1994, doi: https://doi.org/10.1088/0029-5515/34/1/i10.
    """
    return (
        0.036e0
        * pcur**1.06e0
        * b_plasma_toroidal_on_axis**0.32e0
        * p_plasma_loss_mw ** (-0.67e0)
        * afuel**0.41e0
        * rmajor**1.79e0
        * dnla20**0.17e0
        * aspect**0.11e0
        * kappa**0.66e0
    )

iter_h97p_confinement_time(pcur, b_plasma_toroidal_on_axis, p_plasma_loss_mw, dnla19, rmajor, aspect, kappa, afuel) staticmethod

Calculate the ELM-free ITER H-mode scaling - ITER H97-P confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
p_plasma_loss_mw float

Net Heating power [MW]

required
dnla19 float

Line averaged electron density in units of 10**19 m**-3

required
rmajor float

Plasma major radius [m]

required
aspect float

Aspect ratio

required
kappa float

Plasma elongation

required
afuel float

Fuel atomic mass number

required

Returns:

Name Type Description
float

float: ITER H97-P confinement time [s]

References float
  • I. C. Database and M. W. G. (presented Cordey), “Energy confinement scaling and the extrapolation to ITER,” Plasma Physics and Controlled Fusion, vol. 39, no. 12B, pp. B115-B127, Dec. 1997, doi: https://doi.org/10.1088/0741-3335/39/12b/009.
Source code in process/models/physics/confinement_time.py
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
@staticmethod
def iter_h97p_confinement_time(
    pcur: float,
    b_plasma_toroidal_on_axis: float,
    p_plasma_loss_mw: float,
    dnla19: float,
    rmajor: float,
    aspect: float,
    kappa: float,
    afuel: float,
) -> float:
    """Calculate the ELM-free ITER H-mode scaling - ITER H97-P confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    p_plasma_loss_mw :
        Net Heating power [MW]
    dnla19 :
        Line averaged electron density in units of 10**19 m**-3
    rmajor :
        Plasma major radius [m]
    aspect :
        Aspect ratio
    kappa :
        Plasma elongation
    afuel :
        Fuel atomic mass number

    Returns
    -------
    :
        float: ITER H97-P confinement time [s]

    References:
        - I. C. Database and M. W. G. (presented Cordey), “Energy confinement scaling and the extrapolation to ITER,”
        Plasma Physics and Controlled Fusion, vol. 39, no. 12B, pp. B115-B127, Dec. 1997,
        doi: https://doi.org/10.1088/0741-3335/39/12b/009.
    """
    return (
        0.031e0
        * pcur**0.95e0
        * b_plasma_toroidal_on_axis**0.25e0
        * p_plasma_loss_mw ** (-0.67e0)
        * dnla19**0.35e0
        * rmajor**1.92e0
        * aspect ** (-0.08e0)
        * kappa**0.63e0
        * afuel**0.42e0
    )

iter_h97p_elmy_confinement_time(pcur, b_plasma_toroidal_on_axis, p_plasma_loss_mw, dnla19, rmajor, aspect, kappa, afuel) staticmethod

Calculate the ELMy ITER H-mode scaling - ITER H97-P(y) confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
p_plasma_loss_mw float

Net Heating power [MW]

required
dnla19 float

Line averaged electron density in units of 10**19 m**-3

required
rmajor float

Plasma major radius [m]

required
aspect float

Aspect ratio

required
kappa float

Plasma elongation

required
afuel float

Fuel atomic mass number

required

Returns:

Name Type Description
float

float: ITER H97-P(y) confinement time [s]

References float
  • I. C. Database and M. W. G. (presented Cordey), “Energy confinement scaling and the extrapolation to ITER,” Plasma Physics and Controlled Fusion, vol. 39, no. 12B, pp. B115-B127, Dec. 1997, doi: https://doi.org/10.1088/0741-3335/39/12b/009.

  • International Atomic Energy Agency, Vienna (Austria), "Technical basis for the ITER final design report, cost review and safety analysis (FDR)", no.16. Dec. 1998.

Source code in process/models/physics/confinement_time.py
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
@staticmethod
def iter_h97p_elmy_confinement_time(
    pcur: float,
    b_plasma_toroidal_on_axis: float,
    p_plasma_loss_mw: float,
    dnla19: float,
    rmajor: float,
    aspect: float,
    kappa: float,
    afuel: float,
) -> float:
    """Calculate the ELMy ITER H-mode scaling - ITER H97-P(y) confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    p_plasma_loss_mw :
        Net Heating power [MW]
    dnla19 :
        Line averaged electron density in units of 10**19 m**-3
    rmajor :
        Plasma major radius [m]
    aspect :
        Aspect ratio
    kappa :
        Plasma elongation
    afuel :
        Fuel atomic mass number

    Returns
    -------
    :
        float: ITER H97-P(y) confinement time [s]

    References:
        - I. C. Database and M. W. G. (presented Cordey), “Energy confinement scaling and the extrapolation to ITER,”
        Plasma Physics and Controlled Fusion, vol. 39, no. 12B, pp. B115-B127, Dec. 1997,
        doi: https://doi.org/10.1088/0741-3335/39/12b/009.

        - International Atomic Energy Agency, Vienna (Austria), "Technical basis for the ITER final design report, cost review and safety analysis (FDR)",
        no.16. Dec. 1998.
    """
    return (
        0.029e0
        * pcur**0.90e0
        * b_plasma_toroidal_on_axis**0.20e0
        * p_plasma_loss_mw ** (-0.66e0)
        * dnla19**0.40e0
        * rmajor**2.03e0
        * aspect ** (-0.19e0)
        * kappa**0.92e0
        * afuel**0.2e0
    )

iter_96p_confinement_time(pcur, b_plasma_toroidal_on_axis, kappa95, rmajor, aspect, dnla19, afuel, p_plasma_loss_mw) staticmethod

Calculate the ITER-96P (= ITER-97L) L-mode scaling confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
kappa95 float

Plasma elongation at 95% flux surface

required
rmajor float

Plasma major radius [m]

required
aspect float

Aspect ratio

required
dnla19 float

Line averaged electron density in units of 10**19 m**-3

required
afuel float

Fuel atomic mass number

required
p_plasma_loss_mw float

Net Heating power [MW]

required

Returns:

Name Type Description
float

float: ITER-96P confinement time [s]

Notes float
  • The thermal energy confinement time is given below
References float
Source code in process/models/physics/confinement_time.py
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
@staticmethod
def iter_96p_confinement_time(
    pcur: float,
    b_plasma_toroidal_on_axis: float,
    kappa95: float,
    rmajor: float,
    aspect: float,
    dnla19: float,
    afuel: float,
    p_plasma_loss_mw: float,
) -> float:
    """Calculate the ITER-96P (= ITER-97L) L-mode scaling confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    kappa95 :
        Plasma elongation at 95% flux surface
    rmajor :
        Plasma major radius [m]
    aspect :
        Aspect ratio
    dnla19 :
        Line averaged electron density in units of 10**19 m**-3
    afuel :
        Fuel atomic mass number
    p_plasma_loss_mw :
        Net Heating power [MW]

    Returns
    -------
    :
        float: ITER-96P confinement time [s]

    Notes:
        - The thermal energy confinement time is given below

    References:
        - S. B. Kaye et al., “ITER L mode confinement database,”
        Nuclear Fusion, vol. 37, no. 9, pp. 1303-1328, Sep. 1997,
        doi: https://doi.org/10.1088/0029-5515/37/9/i10.
    """
    return (
        0.023e0
        * pcur**0.96e0
        * b_plasma_toroidal_on_axis**0.03e0
        * kappa95**0.64e0
        * rmajor**1.83e0
        * aspect**0.06e0
        * dnla19**0.40e0
        * afuel**0.20e0
        * p_plasma_loss_mw ** (-0.73e0)
    )

valovic_elmy_confinement_time(pcur, b_plasma_toroidal_on_axis, dnla19, afuel, rmajor, rminor, kappa, p_plasma_loss_mw) staticmethod

Calculate the Valovic modified ELMy-H mode scaling confinement time

Parameters:

Name Type Description Default
hfact

H-factor

required
pcur float

Plasma current [MA]

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
dnla19 float

Line averaged electron density in units of 10**19 m**-3

required
afuel float

Fuel atomic mass number

required
rmajor float

Plasma major radius [m]

required
rminor float

Plasma minor radius [m]

required
kappa float

Plasma elongation

required
p_plasma_loss_mw float

Net Heating power [MW]

required

Returns:

Type Description
float

float: Valovic modified ELMy-H mode confinement time [s]

Source code in process/models/physics/confinement_time.py
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
@staticmethod
def valovic_elmy_confinement_time(
    pcur: float,
    b_plasma_toroidal_on_axis: float,
    dnla19: float,
    afuel: float,
    rmajor: float,
    rminor: float,
    kappa: float,
    p_plasma_loss_mw: float,
) -> float:
    """Calculate the Valovic modified ELMy-H mode scaling confinement time

    Parameters
    ----------
    hfact :
        H-factor
    pcur :
        Plasma current [MA]
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    dnla19 :
        Line averaged electron density in units of 10**19 m**-3
    afuel :
        Fuel atomic mass number
    rmajor :
        Plasma major radius [m]
    rminor :
        Plasma minor radius [m]
    kappa :
        Plasma elongation
    p_plasma_loss_mw :
        Net Heating power [MW]

    Returns
    -------
    :
        float: Valovic modified ELMy-H mode confinement time [s]
    """
    return (
        0.067e0
        * pcur**0.9e0
        * b_plasma_toroidal_on_axis**0.17e0
        * dnla19**0.45e0
        * afuel**0.05e0
        * rmajor**1.316e0
        * rminor**0.79e0
        * kappa**0.56e0
        * p_plasma_loss_mw ** (-0.68e0)
    )

kaye_confinement_time(pcur, b_plasma_toroidal_on_axis, kappa, rmajor, aspect, dnla19, afuel, p_plasma_loss_mw) staticmethod

Calculate the Kaye PPPL Workshop April 1998 L-mode scaling confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
kappa float

Plasma elongation

required
rmajor float

Plasma major radius [m]

required
aspect float

Aspect ratio

required
dnla19 float

Line averaged electron density in units of 10**19 m**-3

required
afuel float

Fuel atomic mass number

required
p_plasma_loss_mw float

Net Heating power [MW]

required

Returns:

Name Type Description
float

float: Kaye PPPL Workshop confinement time [s]

References float
  • Kaye PPPL Workshop April 1998
Source code in process/models/physics/confinement_time.py
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
@staticmethod
def kaye_confinement_time(
    pcur: float,
    b_plasma_toroidal_on_axis: float,
    kappa: float,
    rmajor: float,
    aspect: float,
    dnla19: float,
    afuel: float,
    p_plasma_loss_mw: float,
) -> float:
    """Calculate the Kaye PPPL Workshop April 1998 L-mode scaling confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    kappa :
        Plasma elongation
    rmajor :
        Plasma major radius [m]
    aspect :
        Aspect ratio
    dnla19 :
        Line averaged electron density in units of 10**19 m**-3
    afuel :
        Fuel atomic mass number
    p_plasma_loss_mw :
        Net Heating power [MW]

    Returns
    -------
    :
        float: Kaye PPPL Workshop confinement time [s]

    References:
        - Kaye PPPL Workshop April 1998
    """
    return (
        0.021e0
        * pcur**0.81e0
        * b_plasma_toroidal_on_axis**0.14e0
        * kappa**0.7e0
        * rmajor**2.01e0
        * aspect ** (-0.18e0)
        * dnla19**0.47e0
        * afuel**0.25e0
        * p_plasma_loss_mw ** (-0.73e0)
    )

iter_pb98py_confinement_time(pcur, b_plasma_toroidal_on_axis, dnla19, p_plasma_loss_mw, rmajor, kappa, aspect, afuel) staticmethod

Calculate the ITERH-PB98P(y) ELMy H-mode scaling confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
dnla19 float

Line averaged electron density in units of 10**19 m**-3

required
p_plasma_loss_mw float

Net Heating power [MW]

required
rmajor float

Plasma major radius [m]

required
kappa float

Plasma separatrix elongation

required
aspect float

Aspect ratio

required
afuel float

Fuel atomic mass number

required

Returns:

Type Description
float

float: ITERH-PB98P(y) ELMy H-mode confinement time [s]

Source code in process/models/physics/confinement_time.py
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
@staticmethod
def iter_pb98py_confinement_time(
    pcur: float,
    b_plasma_toroidal_on_axis: float,
    dnla19: float,
    p_plasma_loss_mw: float,
    rmajor: float,
    kappa: float,
    aspect: float,
    afuel: float,
) -> float:
    """Calculate the ITERH-PB98P(y) ELMy H-mode scaling confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    dnla19 :
        Line averaged electron density in units of 10**19 m**-3
    p_plasma_loss_mw :
        Net Heating power [MW]
    rmajor :
        Plasma major radius [m]
    kappa :
        Plasma separatrix elongation
    aspect :
        Aspect ratio
    afuel :
        Fuel atomic mass number

    Returns
    -------
    :
        float: ITERH-PB98P(y) ELMy H-mode confinement time [s]
    """
    return (
        0.0615e0
        * pcur**0.9e0
        * b_plasma_toroidal_on_axis**0.1e0
        * dnla19**0.4e0
        * p_plasma_loss_mw ** (-0.66e0)
        * rmajor**2
        * kappa**0.75e0
        * aspect ** (-0.66e0)
        * afuel**0.2e0
    )

iter_ipb98y_confinement_time(pcur, b_plasma_toroidal_on_axis, dnla19, p_plasma_loss_mw, rmajor, kappa, aspect, afuel) staticmethod

Calculate the IPB98(y) ELMy H-mode scaling confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
dnla19 float

Line averaged electron density in units of 10**19 m**-3

required
p_plasma_loss_mw float

Net Heating power [MW]

required
rmajor float

Plasma major radius [m]

required
kappa float

IPB sprcific plasma separatrix elongation

required
aspect float

Aspect ratio

required
afuel float

Fuel atomic mass number

required

Returns:

Name Type Description
float

float: IPB98(y) ELMy H-mode confinement time [s]

Notes float
  • Unlike the other IPB98 scaling laws, the IPB98(y) scaling law uses the true separatrix elongation.
  • See correction paper below for more information
References float
  • I. P. E. G. on C. Transport, I. P. E. G. on C. Database, and I. P. B. Editors, “Chapter 2: Plasma confinement and transport,” Nuclear Fusion, vol. 39, no. 12, pp. 2175-2249, Dec. 1999, doi: https://doi.org/10.1088/0029-5515/39/12/302.

  • None Otto Kardaun, N. K. Thomsen, and None Alexander Chudnovskiy, “Corrections to a sequence of papers in Nuclear Fusion,” Nuclear Fusion, vol. 48, no. 9, pp. 099801-099801, Aug. 2008, doi: https://doi.org/10.1088/0029-5515/48/9/099801.

Source code in process/models/physics/confinement_time.py
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
@staticmethod
def iter_ipb98y_confinement_time(
    pcur: float,
    b_plasma_toroidal_on_axis: float,
    dnla19: float,
    p_plasma_loss_mw: float,
    rmajor: float,
    kappa: float,
    aspect: float,
    afuel: float,
) -> float:
    """Calculate the IPB98(y) ELMy H-mode scaling confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    dnla19 :
        Line averaged electron density in units of 10**19 m**-3
    p_plasma_loss_mw :
        Net Heating power [MW]
    rmajor :
        Plasma major radius [m]
    kappa :
        IPB sprcific plasma separatrix elongation
    aspect :
        Aspect ratio
    afuel :
        Fuel atomic mass number

    Returns
    -------
    :
        float: IPB98(y) ELMy H-mode confinement time [s]

    Notes:
        - Unlike the other IPB98 scaling laws, the IPB98(y) scaling law uses the true separatrix elongation.
        - See correction paper below for more information

    References:
        - I. P. E. G. on C. Transport, I. P. E. G. on C. Database, and I. P. B. Editors, “Chapter 2: Plasma confinement and transport,”
        Nuclear Fusion, vol. 39, no. 12, pp. 2175-2249, Dec. 1999, doi: https://doi.org/10.1088/0029-5515/39/12/302.

        - None Otto Kardaun, N. K. Thomsen, and None Alexander Chudnovskiy, “Corrections to a sequence of papers in Nuclear Fusion,”
        Nuclear Fusion, vol. 48, no. 9, pp. 099801-099801, Aug. 2008, doi: https://doi.org/10.1088/0029-5515/48/9/099801.
    """
    return (
        0.0365e0
        * pcur**0.97e0
        * b_plasma_toroidal_on_axis**0.08e0
        * dnla19**0.41e0
        * p_plasma_loss_mw ** (-0.63e0)
        * rmajor**1.93e0
        * kappa**0.67e0
        * aspect ** (-0.23e0)
        * afuel**0.2e0
    )

iter_ipb98y1_confinement_time(pcur, b_plasma_toroidal_on_axis, dnla19, p_plasma_loss_mw, rmajor, kappa_ipb, aspect, afuel) staticmethod

Calculate the IPB98(y,1) ELMy H-mode scaling confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
dnla19 float

Line averaged electron density in units of 10**19 m**-3

required
p_plasma_loss_mw float

Net Heating power [MW]

required
rmajor float

Plasma major radius [m]

required
kappa_ipb float

IPB specific plasma separatrix elongation

required
aspect float

Aspect ratio

required
afuel float

Fuel atomic mass number

required

Returns:

Name Type Description
float

float: IPB98(y,1) ELMy H-mode confinement time [s]

Notes float
  • See correction paper below for more information about the re-definition of the elongation used.
References float
  • I. P. E. G. on C. Transport, I. P. E. G. on C. Database, and I. P. B. Editors, “Chapter 2: Plasma confinement and transport,” Nuclear Fusion, vol. 39, no. 12, pp. 2175-2249, Dec. 1999, doi: https://doi.org/10.1088/0029-5515/39/12/302.

  • None Otto Kardaun, N. K. Thomsen, and None Alexander Chudnovskiy, “Corrections to a sequence of papers in Nuclear Fusion,” Nuclear Fusion, vol. 48, no. 9, pp. 099801-099801, Aug. 2008, doi: https://doi.org/10.1088/0029-5515/48/9/099801.

Source code in process/models/physics/confinement_time.py
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
@staticmethod
def iter_ipb98y1_confinement_time(
    pcur: float,
    b_plasma_toroidal_on_axis: float,
    dnla19: float,
    p_plasma_loss_mw: float,
    rmajor: float,
    kappa_ipb: float,
    aspect: float,
    afuel: float,
) -> float:
    """Calculate the IPB98(y,1) ELMy H-mode scaling confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    dnla19 :
        Line averaged electron density in units of 10**19 m**-3
    p_plasma_loss_mw :
        Net Heating power [MW]
    rmajor :
        Plasma major radius [m]
    kappa_ipb :
        IPB specific plasma separatrix elongation
    aspect :
        Aspect ratio
    afuel :
        Fuel atomic mass number

    Returns
    -------
    :
        float: IPB98(y,1) ELMy H-mode confinement time [s]

    Notes:
        - See correction paper below for more information about the re-definition of the elongation used.

    References:
        - I. P. E. G. on C. Transport, I. P. E. G. on C. Database, and I. P. B. Editors, “Chapter 2: Plasma confinement and transport,”
        Nuclear Fusion, vol. 39, no. 12, pp. 2175-2249, Dec. 1999, doi: https://doi.org/10.1088/0029-5515/39/12/302.

        - None Otto Kardaun, N. K. Thomsen, and None Alexander Chudnovskiy, “Corrections to a sequence of papers in Nuclear Fusion,”
        Nuclear Fusion, vol. 48, no. 9, pp. 099801-099801, Aug. 2008, doi: https://doi.org/10.1088/0029-5515/48/9/099801.
    """
    return (
        0.0503e0
        * pcur**0.91e0
        * b_plasma_toroidal_on_axis**0.15e0
        * dnla19**0.44e0
        * p_plasma_loss_mw ** (-0.65e0)
        * rmajor**2.05e0
        * kappa_ipb**0.72e0
        * aspect ** (-0.57e0)
        * afuel**0.13e0
    )

iter_ipb98y2_confinement_time(pcur, b_plasma_toroidal_on_axis, dnla19, p_plasma_loss_mw, rmajor, kappa_ipb, aspect, afuel) staticmethod

Calculate the IPB98(y,2) ELMy H-mode scaling confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
dnla19 float

Line averaged electron density in units of 10**19 m**-3

required
p_plasma_loss_mw float

Net Heating power [MW]

required
rmajor float

Plasma major radius [m]

required
kappa_ipb float

IPB specific plasma separatrix elongation

required
aspect float

Aspect ratio

required
afuel float

Fuel atomic mass number

required

Returns:

Name Type Description
float

float: IPB98(y,2) ELMy H-mode confinement time [s]

Notes float
  • See correction paper below for more information about the re-definition of the elongation used.
References float
  • I. P. E. G. on C. Transport, I. P. E. G. on C. Database, and I. P. B. Editors, “Chapter 2: Plasma confinement and transport,” Nuclear Fusion, vol. 39, no. 12, pp. 2175-2249, Dec. 1999, doi: https://doi.org/10.1088/0029-5515/39/12/302.

  • None Otto Kardaun, N. K. Thomsen, and None Alexander Chudnovskiy, “Corrections to a sequence of papers in Nuclear Fusion,” Nuclear Fusion, vol. 48, no. 9, pp. 099801-099801, Aug. 2008, doi: https://doi.org/10.1088/0029-5515/48/9/099801.

Source code in process/models/physics/confinement_time.py
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
@staticmethod
def iter_ipb98y2_confinement_time(
    pcur: float,
    b_plasma_toroidal_on_axis: float,
    dnla19: float,
    p_plasma_loss_mw: float,
    rmajor: float,
    kappa_ipb: float,
    aspect: float,
    afuel: float,
) -> float:
    """Calculate the IPB98(y,2) ELMy H-mode scaling confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    dnla19 :
        Line averaged electron density in units of 10**19 m**-3
    p_plasma_loss_mw :
        Net Heating power [MW]
    rmajor :
        Plasma major radius [m]
    kappa_ipb :
        IPB specific plasma separatrix elongation
    aspect :
        Aspect ratio
    afuel :
        Fuel atomic mass number

    Returns
    -------
    :
        float: IPB98(y,2) ELMy H-mode confinement time [s]

    Notes:
        - See correction paper below for more information about the re-definition of the elongation used.

    References:
        - I. P. E. G. on C. Transport, I. P. E. G. on C. Database, and I. P. B. Editors, “Chapter 2: Plasma confinement and transport,”
        Nuclear Fusion, vol. 39, no. 12, pp. 2175-2249, Dec. 1999, doi: https://doi.org/10.1088/0029-5515/39/12/302.

        - None Otto Kardaun, N. K. Thomsen, and None Alexander Chudnovskiy, “Corrections to a sequence of papers in Nuclear Fusion,”
        Nuclear Fusion, vol. 48, no. 9, pp. 099801-099801, Aug. 2008, doi: https://doi.org/10.1088/0029-5515/48/9/099801.
    """
    return (
        0.0562e0
        * pcur**0.93e0
        * b_plasma_toroidal_on_axis**0.15e0
        * dnla19**0.41e0
        * p_plasma_loss_mw ** (-0.69e0)
        * rmajor**1.97e0
        * kappa_ipb**0.78e0
        * aspect ** (-0.58e0)
        * afuel**0.19e0
    )

iter_ipb98y3_confinement_time(pcur, b_plasma_toroidal_on_axis, dnla19, p_plasma_loss_mw, rmajor, kappa_ipb, aspect, afuel) staticmethod

Calculate the IPB98(y,3) ELMy H-mode scaling confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
dnla19 float

Line averaged electron density in units of 10**19 m**-3

required
p_plasma_loss_mw float

Net Heating power [MW]

required
rmajor float

Plasma major radius [m]

required
kappa_ipb float

IPB specific plasma separatrix elongation

required
aspect float

Aspect ratio

required
afuel float

Fuel atomic mass number

required

Returns:

Name Type Description
float

float: IPB98(y,3) ELMy H-mode confinement time [s]

Notes float
  • See correction paper below for more information about the re-definition of the elongation used.
References float
  • I. P. E. G. on C. Transport, I. P. E. G. on C. Database, and I. P. B. Editors, “Chapter 2: Plasma confinement and transport,” Nuclear Fusion, vol. 39, no. 12, pp. 2175-2249, Dec. 1999, doi: https://doi.org/10.1088/0029-5515/39/12/302.

  • None Otto Kardaun, N. K. Thomsen, and None Alexander Chudnovskiy, “Corrections to a sequence of papers in Nuclear Fusion,” Nuclear Fusion, vol. 48, no. 9, pp. 099801-099801, Aug. 2008, doi: https://doi.org/10.1088/0029-5515/48/9/099801.

Source code in process/models/physics/confinement_time.py
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
@staticmethod
def iter_ipb98y3_confinement_time(
    pcur: float,
    b_plasma_toroidal_on_axis: float,
    dnla19: float,
    p_plasma_loss_mw: float,
    rmajor: float,
    kappa_ipb: float,
    aspect: float,
    afuel: float,
) -> float:
    """Calculate the IPB98(y,3) ELMy H-mode scaling confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    dnla19 :
        Line averaged electron density in units of 10**19 m**-3
    p_plasma_loss_mw :
        Net Heating power [MW]
    rmajor :
        Plasma major radius [m]
    kappa_ipb :
        IPB specific plasma separatrix elongation
    aspect :
        Aspect ratio
    afuel :
        Fuel atomic mass number

    Returns
    -------
    :
        float: IPB98(y,3) ELMy H-mode confinement time [s]

    Notes:
        - See correction paper below for more information about the re-definition of the elongation used.

    References:
        - I. P. E. G. on C. Transport, I. P. E. G. on C. Database, and I. P. B. Editors, “Chapter 2: Plasma confinement and transport,”
        Nuclear Fusion, vol. 39, no. 12, pp. 2175-2249, Dec. 1999, doi: https://doi.org/10.1088/0029-5515/39/12/302.

        - None Otto Kardaun, N. K. Thomsen, and None Alexander Chudnovskiy, “Corrections to a sequence of papers in Nuclear Fusion,”
        Nuclear Fusion, vol. 48, no. 9, pp. 099801-099801, Aug. 2008, doi: https://doi.org/10.1088/0029-5515/48/9/099801.
    """
    return (
        0.0564e0
        * pcur**0.88e0
        * b_plasma_toroidal_on_axis**0.07e0
        * dnla19**0.40e0
        * p_plasma_loss_mw ** (-0.69e0)
        * rmajor**2.15e0
        * kappa_ipb**0.78e0
        * aspect ** (-0.64e0)
        * afuel**0.20e0
    )

iter_ipb98y4_confinement_time(pcur, b_plasma_toroidal_on_axis, dnla19, p_plasma_loss_mw, rmajor, kappa_ipb, aspect, afuel) staticmethod

Calculate the IPB98(y,4) ELMy H-mode scaling confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
dnla19 float

Line averaged electron density in units of 10**19 m**-3

required
p_plasma_loss_mw float

Net Heating power [MW]

required
rmajor float

Plasma major radius [m]

required
kappa_ipb float

IPB specific plasma separatrix elongation

required
aspect float

Aspect ratio

required
afuel float

Fuel atomic mass number

required

Returns:

Name Type Description
float

float: IPB98(y,4) ELMy H-mode confinement time [s]

Notes float
  • See correction paper below for more information about the re-definition of the elongation used.
References float
  • I. P. E. G. on C. Transport, I. P. E. G. on C. Database, and I. P. B. Editors, “Chapter 2: Plasma confinement and transport,” Nuclear Fusion, vol. 39, no. 12, pp. 2175-2249, Dec. 1999, doi: https://doi.org/10.1088/0029-5515/39/12/302.

  • None Otto Kardaun, N. K. Thomsen, and None Alexander Chudnovskiy, “Corrections to a sequence of papers in Nuclear Fusion,” Nuclear Fusion, vol. 48, no. 9, pp. 099801-099801, Aug. 2008, doi: https://doi.org/10.1088/0029-5515/48/9/099801.

Source code in process/models/physics/confinement_time.py
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
@staticmethod
def iter_ipb98y4_confinement_time(
    pcur: float,
    b_plasma_toroidal_on_axis: float,
    dnla19: float,
    p_plasma_loss_mw: float,
    rmajor: float,
    kappa_ipb: float,
    aspect: float,
    afuel: float,
) -> float:
    """Calculate the IPB98(y,4) ELMy H-mode scaling confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    dnla19 :
        Line averaged electron density in units of 10**19 m**-3
    p_plasma_loss_mw :
        Net Heating power [MW]
    rmajor :
        Plasma major radius [m]
    kappa_ipb :
        IPB specific plasma separatrix elongation
    aspect :
        Aspect ratio
    afuel :
        Fuel atomic mass number

    Returns
    -------
    :
        float: IPB98(y,4) ELMy H-mode confinement time [s]

    Notes:
        - See correction paper below for more information about the re-definition of the elongation used.

    References:
        - I. P. E. G. on C. Transport, I. P. E. G. on C. Database, and I. P. B. Editors, “Chapter 2: Plasma confinement and transport,”
        Nuclear Fusion, vol. 39, no. 12, pp. 2175-2249, Dec. 1999, doi: https://doi.org/10.1088/0029-5515/39/12/302.

        - None Otto Kardaun, N. K. Thomsen, and None Alexander Chudnovskiy, “Corrections to a sequence of papers in Nuclear Fusion,”
        Nuclear Fusion, vol. 48, no. 9, pp. 099801-099801, Aug. 2008, doi: https://doi.org/10.1088/0029-5515/48/9/099801.
    """
    return (
        0.0587e0
        * pcur**0.85e0
        * b_plasma_toroidal_on_axis**0.29e0
        * dnla19**0.39e0
        * p_plasma_loss_mw ** (-0.70e0)
        * rmajor**2.08e0
        * kappa_ipb**0.76e0
        * aspect ** (-0.69e0)
        * afuel**0.17e0
    )

iss95_stellarator_confinement_time(rminor, rmajor, dnla19, b_plasma_toroidal_on_axis, p_plasma_loss_mw, iotabar) staticmethod

Calculate the ISS95 stellarator scaling confinement time

Parameters:

Name Type Description Default
rminor float

Plasma minor radius [m]

required
rmajor float

Plasma major radius [m]

required
dnla19 float

Line averaged electron density in units of 10**19 m**-3

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
p_plasma_loss_mw float

Net Heating power [MW]

required
iotabar float

Rotational transform

required

Returns:

Name Type Description
float

float: ISS95 stellarator confinement time [s]

References float
Source code in process/models/physics/confinement_time.py
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
@staticmethod
def iss95_stellarator_confinement_time(
    rminor: float,
    rmajor: float,
    dnla19: float,
    b_plasma_toroidal_on_axis: float,
    p_plasma_loss_mw: float,
    iotabar: float,
) -> float:
    """Calculate the ISS95 stellarator scaling confinement time

    Parameters
    ----------
    rminor :
        Plasma minor radius [m]
    rmajor :
        Plasma major radius [m]
    dnla19 :
        Line averaged electron density in units of 10**19 m**-3
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    p_plasma_loss_mw :
        Net Heating power [MW]
    iotabar :
        Rotational transform

    Returns
    -------
    :
        float: ISS95 stellarator confinement time [s]

    References:
        - U. Stroth et al., “Energy confinement scaling from the international stellarator database,”
        vol. 36, no. 8, pp. 1063-1077, Aug. 1996, doi: https://doi.org/10.1088/0029-5515/36/8/i11.
    """
    return (
        0.079e0
        * rminor**2.21e0
        * rmajor**0.65e0
        * dnla19**0.51e0
        * b_plasma_toroidal_on_axis**0.83e0
        * p_plasma_loss_mw ** (-0.59e0)
        * iotabar**0.4e0
    )

iss04_stellarator_confinement_time(rminor, rmajor, dnla19, b_plasma_toroidal_on_axis, p_plasma_loss_mw, iotabar) staticmethod

Calculate the ISS04 stellarator scaling confinement time

Parameters:

Name Type Description Default
rminor float

Plasma minor radius [m]

required
rmajor float

Plasma major radius [m]

required
dnla19 float

Line averaged electron density in units of 10**19 m**-3

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
p_plasma_loss_mw float

Net Heating power [MW]

required
iotabar float

Rotational transform

required

Returns:

Name Type Description
float

float: ISS04 stellarator confinement time [s]

References float
  • H. Yamada et al., “Characterization of energy confinement in net-current free plasmas using the extended International Stellarator Database,” vol. 45, no. 12, pp. 1684-1693, Nov. 2005, doi: https://doi.org/10.1088/0029-5515/45/12/024.
Source code in process/models/physics/confinement_time.py
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
@staticmethod
def iss04_stellarator_confinement_time(
    rminor: float,
    rmajor: float,
    dnla19: float,
    b_plasma_toroidal_on_axis: float,
    p_plasma_loss_mw: float,
    iotabar: float,
) -> float:
    """Calculate the ISS04 stellarator scaling confinement time

    Parameters
    ----------
    rminor :
        Plasma minor radius [m]
    rmajor :
        Plasma major radius [m]
    dnla19 :
        Line averaged electron density in units of 10**19 m**-3
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    p_plasma_loss_mw :
        Net Heating power [MW]
    iotabar :
        Rotational transform

    Returns
    -------
    :
        float: ISS04 stellarator confinement time [s]

    References:
        - H. Yamada et al., “Characterization of energy confinement in net-current free plasmas using the extended International Stellarator Database,”
        vol. 45, no. 12, pp. 1684-1693, Nov. 2005, doi: https://doi.org/10.1088/0029-5515/45/12/024.
    """
    return (
        0.134e0
        * rminor**2.28e0
        * rmajor**0.64e0
        * dnla19**0.54e0
        * b_plasma_toroidal_on_axis**0.84e0
        * p_plasma_loss_mw ** (-0.61e0)
        * iotabar**0.41e0
    )

ds03_confinement_time(pcur, b_plasma_toroidal_on_axis, dnla19, p_plasma_loss_mw, rmajor, kappa95, aspect, afuel) staticmethod

Calculate the DS03 beta-independent H-mode scaling confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
dnla19 float

Line averaged electron density in units of 10**19 m**-3

required
p_plasma_loss_mw float

Net Heating power [MW]

required
rmajor float

Plasma major radius [m]

required
kappa95 float

Plasma elongation at 95% flux surface

required
aspect float

Aspect ratio

required
afuel float

Fuel atomic mass number

required

Returns:

Name Type Description
float

float: DS03 beta-independent H-mode confinement time [s]

References float
  • T. C. Luce, C. C. Petty, and J. G. Cordey, “Application of dimensionless parameter scaling techniques to the design and interpretation of magnetic fusion experiments,” Plasma Physics and Controlled Fusion, vol. 50, no. 4, p. 043001, Mar. 2008, doi: https://doi.org/10.1088/0741-3335/50/4/043001.
Source code in process/models/physics/confinement_time.py
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
@staticmethod
def ds03_confinement_time(
    pcur: float,
    b_plasma_toroidal_on_axis: float,
    dnla19: float,
    p_plasma_loss_mw: float,
    rmajor: float,
    kappa95: float,
    aspect: float,
    afuel: float,
) -> float:
    """Calculate the DS03 beta-independent H-mode scaling confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    dnla19 :
        Line averaged electron density in units of 10**19 m**-3
    p_plasma_loss_mw :
        Net Heating power [MW]
    rmajor :
        Plasma major radius [m]
    kappa95 :
        Plasma elongation at 95% flux surface
    aspect :
        Aspect ratio
    afuel :
        Fuel atomic mass number

    Returns
    -------
    :
        float: DS03 beta-independent H-mode confinement time [s]

    References:
        - T. C. Luce, C. C. Petty, and J. G. Cordey, “Application of dimensionless parameter scaling techniques to the design and interpretation of magnetic fusion experiments,”
        Plasma Physics and Controlled Fusion, vol. 50, no. 4, p. 043001, Mar. 2008,
        doi: https://doi.org/10.1088/0741-3335/50/4/043001.
    """
    return (
        0.028e0
        * pcur**0.83e0
        * b_plasma_toroidal_on_axis**0.07e0
        * dnla19**0.49e0
        * p_plasma_loss_mw ** (-0.55e0)
        * rmajor**2.11e0
        * kappa95**0.75e0
        * aspect ** (-0.3e0)
        * afuel**0.14e0
    )

murari_confinement_time(pcur, rmajor, kappa_ipb, dnla19, b_plasma_toroidal_on_axis, p_plasma_loss_mw) staticmethod

Calculate the Murari H-mode energy confinement scaling time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
rmajor float

Plasma major radius [m]

required
kappa_ipb float

IPB specific plasma separatrix elongation

required
dnla19 float

Line averaged electron density in units of 10**19 m**-3

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
p_plasma_loss_mw float

Net Heating power [MW]

required

Returns:

Name Type Description
float

float: Murari confinement time [s]

Notes float
  • This scaling uses the IPB defintiion of elongation, see reference for more information.
References float
  • A. Murari, E. Peluso, Michela Gelfusa, I. Lupelli, and P. Gaudio, “A new approach to the formulation and validation of scaling expressions for plasma confinement in tokamaks,” Nuclear Fusion, vol. 55, no. 7, pp. 073009-073009, Jun. 2015, doi: https://doi.org/10.1088/0029-5515/55/7/073009.

  • None Otto Kardaun, N. K. Thomsen, and None Alexander Chudnovskiy, “Corrections to a sequence of papers in Nuclear Fusion,” Nuclear Fusion, vol. 48, no. 9, pp. 099801-099801, Aug. 2008, doi: https://doi.org/10.1088/0029-5515/48/9/099801.

Source code in process/models/physics/confinement_time.py
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
@staticmethod
def murari_confinement_time(
    pcur: float,
    rmajor: float,
    kappa_ipb: float,
    dnla19: float,
    b_plasma_toroidal_on_axis: float,
    p_plasma_loss_mw: float,
) -> float:
    """Calculate the Murari H-mode energy confinement scaling time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    rmajor :
        Plasma major radius [m]
    kappa_ipb :
        IPB specific plasma separatrix elongation
    dnla19 :
        Line averaged electron density in units of 10**19 m**-3
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    p_plasma_loss_mw :
        Net Heating power [MW]

    Returns
    -------
    :
        float: Murari confinement time [s]

    Notes:
        - This scaling uses the IPB defintiion of elongation, see reference for more information.

    References:
        - A. Murari, E. Peluso, Michela Gelfusa, I. Lupelli, and P. Gaudio, “A new approach to the formulation and validation of scaling expressions for plasma confinement in tokamaks,”
        Nuclear Fusion, vol. 55, no. 7, pp. 073009-073009, Jun. 2015, doi: https://doi.org/10.1088/0029-5515/55/7/073009.

        - None Otto Kardaun, N. K. Thomsen, and None Alexander Chudnovskiy, “Corrections to a sequence of papers in Nuclear Fusion,”
        Nuclear Fusion, vol. 48, no. 9, pp. 099801-099801, Aug. 2008, doi: https://doi.org/10.1088/0029-5515/48/9/099801.
    """
    return (
        0.0367
        * pcur**1.006
        * rmajor**1.731
        * kappa_ipb**1.450
        * p_plasma_loss_mw ** (-0.735)
        * (
            dnla19**0.448
            / (1.0 + np.exp(-9.403 * (dnla19 / b_plasma_toroidal_on_axis) ** -1.365))
        )
    )

petty08_confinement_time(pcur, b_plasma_toroidal_on_axis, dnla19, p_plasma_loss_mw, rmajor, kappa_ipb, aspect) staticmethod

Calculate the beta independent dimensionless Petty08 confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
dnla19 float

Line averaged electron density in units of 10**19 m**-3

required
p_plasma_loss_mw float

Net Heating power [MW]

required
rmajor float

Plasma major radius [m]

required
kappa_ipb float

IPB specific plasma separatrix elongation

required
aspect float

Aspect ratio

required

Returns:

Name Type Description
float

float: Petty08 confinement time [s]

Notes float
  • This scaling uses the IPB defintiion of elongation, see reference for more information.
References float
  • C. C. Petty, “Sizing up plasmas using dimensionless parameters,” Physics of Plasmas, vol. 15, no. 8, Aug. 2008, doi: https://doi.org/10.1063/1.2961043.

  • None Otto Kardaun, N. K. Thomsen, and None Alexander Chudnovskiy, “Corrections to a sequence of papers in Nuclear Fusion,” Nuclear Fusion, vol. 48, no. 9, pp. 099801-099801, Aug. 2008, doi: https://doi.org/10.1088/0029-5515/48/9/099801.

Source code in process/models/physics/confinement_time.py
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
@staticmethod
def petty08_confinement_time(
    pcur: float,
    b_plasma_toroidal_on_axis: float,
    dnla19: float,
    p_plasma_loss_mw: float,
    rmajor: float,
    kappa_ipb: float,
    aspect: float,
) -> float:
    """Calculate the beta independent dimensionless Petty08 confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    dnla19 :
        Line averaged electron density in units of 10**19 m**-3
    p_plasma_loss_mw :
        Net Heating power [MW]
    rmajor :
        Plasma major radius [m]
    kappa_ipb :
        IPB specific plasma separatrix elongation
    aspect :
        Aspect ratio

    Returns
    -------
    :
        float: Petty08 confinement time [s]

    Notes:
        - This scaling uses the IPB defintiion of elongation, see reference for more information.

    References:
        - C. C. Petty, “Sizing up plasmas using dimensionless parameters,”
        Physics of Plasmas, vol. 15, no. 8, Aug. 2008, doi: https://doi.org/10.1063/1.2961043.

        - None Otto Kardaun, N. K. Thomsen, and None Alexander Chudnovskiy, “Corrections to a sequence of papers in Nuclear Fusion,”
        Nuclear Fusion, vol. 48, no. 9, pp. 099801-099801, Aug. 2008, doi: https://doi.org/10.1088/0029-5515/48/9/099801.
    """
    return (
        0.052e0
        * pcur**0.75e0
        * b_plasma_toroidal_on_axis**0.3e0
        * dnla19**0.32e0
        * p_plasma_loss_mw ** (-0.47e0)
        * rmajor**2.09e0
        * kappa_ipb**0.88e0
        * aspect ** (-0.84e0)
    )

lang_high_density_confinement_time(plasma_current, b_plasma_toroidal_on_axis, nd_plasma_electron_line, p_plasma_loss_mw, rmajor, rminor, q, qstar, aspect, afuel, kappa_ipb) staticmethod

Calculate the high density relevant confinement time

Parameters:

Name Type Description Default
plasma_current float

Plasma current [MA]

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
nd_plasma_electron_line float

Line averaged electron density [m**-3]

required
p_plasma_loss_mw float

Net Heating power [MW]

required
rmajor float

Plasma major radius [m]

required
rminor float

Plasma minor radius [m]

required
q float

Safety factor

required
qstar float

Equivalent cylindrical edge safety factor

required
aspect float

Aspect ratio

required
afuel float

Fuel atomic mass number

required
kappa_ipb float

Plasma elongation at 95% flux surface

required

Returns:

Name Type Description
float

float: High density relevant confinement time [s]

References float
Source code in process/models/physics/confinement_time.py
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
@staticmethod
def lang_high_density_confinement_time(
    plasma_current: float,
    b_plasma_toroidal_on_axis: float,
    nd_plasma_electron_line: float,
    p_plasma_loss_mw: float,
    rmajor: float,
    rminor: float,
    q: float,
    qstar: float,
    aspect: float,
    afuel: float,
    kappa_ipb: float,
) -> float:
    """Calculate the high density relevant confinement time

    Parameters
    ----------
    plasma_current :
        Plasma current [MA]
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    nd_plasma_electron_line :
        Line averaged electron density [m**-3]
    p_plasma_loss_mw :
        Net Heating power [MW]
    rmajor :
        Plasma major radius [m]
    rminor :
        Plasma minor radius [m]
    q :
        Safety factor
    qstar :
        Equivalent cylindrical edge safety factor
    aspect :
        Aspect ratio
    afuel :
        Fuel atomic mass number
    kappa_ipb :
        Plasma elongation at 95% flux surface

    Returns
    -------
    :
        float: High density relevant confinement time [s]

    References:
        - P. T. Lang, C. Angioni, R. M. M. Dermott, R. Fischer, and H. Zohm, “Pellet Induced High Density Phases during ELM Suppression in ASDEX Upgrade,”
        24th IAEA Conference Fusion Energy, 2012, Oct. 2012,
        Available: https://www.researchgate.net/publication/274456104_Pellet_Induced_High_Density_Phases_during_ELM_Suppression_in_ASDEX_Upgrade
    """
    qratio = q / qstar
    n_gw = 1.0e14 * plasma_current / (np.pi * rminor * rminor)
    nratio = nd_plasma_electron_line / n_gw
    return (
        6.94e-7
        * plasma_current**1.3678e0
        * b_plasma_toroidal_on_axis**0.12e0
        * nd_plasma_electron_line**0.032236e0
        * (p_plasma_loss_mw * 1.0e6) ** (-0.74e0)
        * rmajor**1.2345e0
        * kappa_ipb**0.37e0
        * aspect**2.48205e0
        * afuel**0.2e0
        * qratio**0.77e0
        * aspect ** (-0.9e0 * np.log(aspect))
        * nratio ** (-0.22e0 * np.log(nratio))
    )

hubbard_nominal_confinement_time(pcur, b_plasma_toroidal_on_axis, dnla20, p_plasma_loss_mw) staticmethod

Calculate the Hubbard 2017 I-mode confinement time scaling - nominal

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
dnla20 float

Line averaged electron density in units of 10**20 m**-3

required
p_plasma_loss_mw float

Net Heating power [MW]

required

Returns:

Name Type Description
float

float: Hubbard confinement time [s]

References float
  • A. E. Hubbard et al., “Physics and performance of the I-mode regime over an expanded operating space on Alcator C-Mod,” Nuclear Fusion, vol. 57, no. 12, p. 126039, Oct. 2017, doi: https://doi.org/10.1088/1741-4326/aa8570.
Source code in process/models/physics/confinement_time.py
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
@staticmethod
def hubbard_nominal_confinement_time(
    pcur: float,
    b_plasma_toroidal_on_axis: float,
    dnla20: float,
    p_plasma_loss_mw: float,
) -> float:
    """Calculate the Hubbard 2017 I-mode confinement time scaling - nominal

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    dnla20 :
        Line averaged electron density in units of 10**20 m**-3
    p_plasma_loss_mw :
        Net Heating power [MW]

    Returns
    -------
    :
        float: Hubbard confinement time [s]

    References:
        - A. E. Hubbard et al., “Physics and performance of the I-mode regime over an expanded operating space on Alcator C-Mod,”
        Nuclear Fusion, vol. 57, no. 12, p. 126039, Oct. 2017, doi: https://doi.org/10.1088/1741-4326/aa8570.
    """
    return (
        0.014e0
        * pcur**0.68e0
        * b_plasma_toroidal_on_axis**0.77e0
        * dnla20**0.02e0
        * p_plasma_loss_mw ** (-0.29e0)
    )

hubbard_lower_confinement_time(pcur, b_plasma_toroidal_on_axis, dnla20, p_plasma_loss_mw) staticmethod

Calculate the Hubbard 2017 I-mode confinement time scaling - lower

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
dnla20 float

Line averaged electron density in units of 10**20 m**-3

required
p_plasma_loss_mw float

Net Heating power [MW]

required

Returns:

Name Type Description
float

float: Hubbard confinement time [s]

References float
  • A. E. Hubbard et al., “Physics and performance of the I-mode regime over an expanded operating space on Alcator C-Mod,” Nuclear Fusion, vol. 57, no. 12, p. 126039, Oct. 2017, doi: https://doi.org/10.1088/1741-4326/aa8570.
Source code in process/models/physics/confinement_time.py
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
@staticmethod
def hubbard_lower_confinement_time(
    pcur: float,
    b_plasma_toroidal_on_axis: float,
    dnla20: float,
    p_plasma_loss_mw: float,
) -> float:
    """Calculate the Hubbard 2017 I-mode confinement time scaling - lower

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    dnla20 :
        Line averaged electron density in units of 10**20 m**-3
    p_plasma_loss_mw :
        Net Heating power [MW]

    Returns
    -------
    :
        float: Hubbard confinement time [s]

    References:
        - A. E. Hubbard et al., “Physics and performance of the I-mode regime over an expanded operating space on Alcator C-Mod,”
        Nuclear Fusion, vol. 57, no. 12, p. 126039, Oct. 2017, doi: https://doi.org/10.1088/1741-4326/aa8570.
    """
    return (
        0.014e0
        * pcur**0.60e0
        * b_plasma_toroidal_on_axis**0.70e0
        * dnla20 ** (-0.03e0)
        * p_plasma_loss_mw ** (-0.33e0)
    )

hubbard_upper_confinement_time(pcur, b_plasma_toroidal_on_axis, dnla20, p_plasma_loss_mw) staticmethod

Calculate the Hubbard 2017 I-mode confinement time scaling - upper

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
dnla20 float

Line averaged electron density in units of 10**20 m**-3

required
p_plasma_loss_mw float

Net Heating power [MW]

required

Returns:

Name Type Description
float

float: Hubbard confinement time [s]

References float
  • A. E. Hubbard et al., “Physics and performance of the I-mode regime over an expanded operating space on Alcator C-Mod,” Nuclear Fusion, vol. 57, no. 12, p. 126039, Oct. 2017, doi: https://doi.org/10.1088/1741-4326/aa8570.
Source code in process/models/physics/confinement_time.py
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
@staticmethod
def hubbard_upper_confinement_time(
    pcur: float,
    b_plasma_toroidal_on_axis: float,
    dnla20: float,
    p_plasma_loss_mw: float,
) -> float:
    """Calculate the Hubbard 2017 I-mode confinement time scaling - upper

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    dnla20 :
        Line averaged electron density in units of 10**20 m**-3
    p_plasma_loss_mw :
        Net Heating power [MW]

    Returns
    -------
    :
        float: Hubbard confinement time [s]

    References:
        - A. E. Hubbard et al., “Physics and performance of the I-mode regime over an expanded operating space on Alcator C-Mod,”
        Nuclear Fusion, vol. 57, no. 12, p. 126039, Oct. 2017, doi: https://doi.org/10.1088/1741-4326/aa8570.
    """
    return (
        0.014e0
        * pcur**0.76e0
        * b_plasma_toroidal_on_axis**0.84e0
        * dnla20**0.07
        * p_plasma_loss_mw ** (-0.25e0)
    )

menard_nstx_confinement_time(pcur, b_plasma_toroidal_on_axis, dnla19, p_plasma_loss_mw, rmajor, kappa_ipb, aspect, afuel) staticmethod

Calculate the Menard NSTX ELMy H-mode scaling confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
dnla19 float

Line averaged electron density in units of 10**19 m**-3

required
p_plasma_loss_mw float

Net Heating power [MW]

required
rmajor float

Plasma major radius [m]

required
kappa_ipb float

IPB specific plasma separatrix elongation

required
aspect float

Aspect ratio

required
afuel float

Fuel atomic mass number

required

Returns:

Name Type Description
float

float: Menard NSTX ELMy H-mode confinement time [s]

Notes float
  • "The leading NSTX confinement scaling coefficient is chosen such that the ITER and ST energy confinement times are identical for a reference NSTX scenario"
  • Assumes IPB98(y,2) exponents are applicable where the ST exponents are not yet determined, i.e. the species mass, major radius, inverse aspect ratio and elongation. Hence here we use the IPB98(y,2) definition of elongation.
References float
  • J. E. Menard, “Compact steady-state tokamak performance dependence on magnet and core physics limits,” Philosophical Transactions of the Royal Society A, vol. 377, no. 2141, pp. 20170440-20170440, Feb. 2019, doi: https://doi.org/10.1098/rsta.2017.0440.
Source code in process/models/physics/confinement_time.py
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
@staticmethod
def menard_nstx_confinement_time(
    pcur: float,
    b_plasma_toroidal_on_axis: float,
    dnla19: float,
    p_plasma_loss_mw: float,
    rmajor: float,
    kappa_ipb: float,
    aspect: float,
    afuel: float,
) -> float:
    """Calculate the Menard NSTX ELMy H-mode scaling confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    dnla19 :
        Line averaged electron density in units of 10**19 m**-3
    p_plasma_loss_mw :
        Net Heating power [MW]
    rmajor :
        Plasma major radius [m]
    kappa_ipb :
        IPB specific plasma separatrix elongation
    aspect :
        Aspect ratio
    afuel :
        Fuel atomic mass number

    Returns
    -------
    :
        float: Menard NSTX ELMy H-mode confinement time [s]

    Notes:
        - "The leading NSTX confinement scaling coefficient is chosen such that the ITER and ST energy confinement times are
        identical for a reference NSTX scenario"
        - Assumes IPB98(y,2) exponents are applicable where the ST exponents are not yet determined, i.e.
        the species mass, major radius, inverse aspect ratio and elongation. Hence here we use the IPB98(y,2) definition
        of elongation.

    References:
        - J. E. Menard, “Compact steady-state tokamak performance dependence on magnet and core physics limits,”
        Philosophical Transactions of the Royal Society A, vol. 377, no. 2141, pp. 20170440-20170440, Feb. 2019,
        doi: https://doi.org/10.1098/rsta.2017.0440.
    """
    return (
        0.095e0
        * pcur**0.57e0
        * b_plasma_toroidal_on_axis**1.08e0
        * dnla19**0.44e0
        * p_plasma_loss_mw ** (-0.73e0)
        * rmajor**1.97e0
        * kappa_ipb**0.78e0
        * aspect ** (-0.58e0)
        * afuel**0.19e0
    )

menard_nstx_petty08_hybrid_confinement_time(pcur, b_plasma_toroidal_on_axis, dnla19, p_plasma_loss_mw, rmajor, kappa_ipb, aspect, afuel) classmethod

Calculate the Menard NSTX-Petty hybrid confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
dnla19 float

Line averaged electron density in units of 10**19 m**-3

required
p_plasma_loss_mw float

Net Heating power [MW]

required
rmajor float

Plasma major radius [m]

required
kappa_ipb float

IPB specific plasma separatrix elongation

required
aspect float

Aspect ratio

required
afuel float

Fuel atomic mass number

required

Returns:

Name Type Description
float

float: Menard NSTX-Petty hybrid confinement time [s]

Notes float
  • Assuming a linear interpolation in (1/aspect) between the two scalings
References float
  • J. E. Menard, “Compact steady-state tokamak performance dependence on magnet and core physics limits,” Philosophical Transactions of the Royal Society A, vol. 377, no. 2141, pp. 20170440-20170440, Feb. 2019, doi: https://doi.org/10.1098/rsta.2017.0440.
Source code in process/models/physics/confinement_time.py
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
@classmethod
def menard_nstx_petty08_hybrid_confinement_time(
    cls,
    pcur: float,
    b_plasma_toroidal_on_axis: float,
    dnla19: float,
    p_plasma_loss_mw: float,
    rmajor: float,
    kappa_ipb: float,
    aspect: float,
    afuel: float,
) -> float:
    """Calculate the Menard NSTX-Petty hybrid confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    dnla19 :
        Line averaged electron density in units of 10**19 m**-3
    p_plasma_loss_mw :
        Net Heating power [MW]
    rmajor :
        Plasma major radius [m]
    kappa_ipb :
        IPB specific plasma separatrix elongation
    aspect :
        Aspect ratio
    afuel :
        Fuel atomic mass number

    Returns
    -------
    :
        float: Menard NSTX-Petty hybrid confinement time [s]

    Notes:
        - Assuming a linear interpolation in (1/aspect) between the two scalings

    References:
        - J. E. Menard, “Compact steady-state tokamak performance dependence on magnet and core physics limits,”
        Philosophical Transactions of the Royal Society A, vol. 377, no. 2141, pp. 20170440-20170440, Feb. 2019,
        doi: https://doi.org/10.1098/rsta.2017.0440.
    """
    # Equivalent to A > 2.5, use Petty scaling
    if (1.0e0 / aspect) <= 0.4e0:
        return cls.petty08_confinement_time(
            pcur,
            b_plasma_toroidal_on_axis,
            dnla19,
            p_plasma_loss_mw,
            rmajor,
            kappa_ipb,
            aspect,
        )

    #  Equivalent to A < 1.7, use NSTX scaling
    if (1.0e0 / aspect) >= 0.6e0:
        return cls.menard_nstx_confinement_time(
            pcur,
            b_plasma_toroidal_on_axis,
            dnla19,
            p_plasma_loss_mw,
            rmajor,
            kappa_ipb,
            aspect,
            afuel,
        )
    return (((1.0e0 / aspect) - 0.4e0) / (0.6e0 - 0.4e0)) * (
        cls.menard_nstx_confinement_time(
            pcur,
            b_plasma_toroidal_on_axis,
            dnla19,
            p_plasma_loss_mw,
            rmajor,
            kappa_ipb,
            aspect,
            afuel,
        )
    ) + ((0.6e0 - (1.0e0 / aspect)) / (0.6e0 - 0.4e0)) * (
        cls.petty08_confinement_time(
            pcur,
            b_plasma_toroidal_on_axis,
            dnla19,
            p_plasma_loss_mw,
            rmajor,
            kappa_ipb,
            aspect,
        )
    )

nstx_gyro_bohm_confinement_time(pcur, b_plasma_toroidal_on_axis, p_plasma_loss_mw, rmajor, dnla20) staticmethod

Calculate the NSTX gyro-Bohm confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
p_plasma_loss_mw float

Net Heating power [MW]

required
rmajor float

Plasma major radius [m]

required
dnla20 float

Line averaged electron density in units of 10**20 m**-3

required

Returns:

Name Type Description
float

float: NSTX gyro-Bohm confinement time [s]

References float
  • P. F. Buxton, L. Connor, A. E. Costley, Mikhail Gryaznevich, and S. McNamara, “On the energy confinement time in spherical tokamaks: implications for the design of pilot plants and fusion reactors,” vol. 61, no. 3, pp. 035006-035006, Jan. 2019, doi: https://doi.org/10.1088/1361-6587/aaf7e5.
Source code in process/models/physics/confinement_time.py
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
@staticmethod
def nstx_gyro_bohm_confinement_time(
    pcur: float,
    b_plasma_toroidal_on_axis: float,
    p_plasma_loss_mw: float,
    rmajor: float,
    dnla20: float,
) -> float:
    """Calculate the NSTX gyro-Bohm confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    p_plasma_loss_mw :
        Net Heating power [MW]
    rmajor :
        Plasma major radius [m]
    dnla20 :
        Line averaged electron density in units of 10**20 m**-3

    Returns
    -------
    :
        float: NSTX gyro-Bohm confinement time [s]

    References:
        - P. F. Buxton, L. Connor, A. E. Costley, Mikhail Gryaznevich, and S. McNamara,
        “On the energy confinement time in spherical tokamaks: implications for the design of pilot plants and fusion reactors,”
        vol. 61, no. 3, pp. 035006-035006, Jan. 2019, doi: https://doi.org/10.1088/1361-6587/aaf7e5.
    """
    return (
        0.21e0
        * pcur**0.54e0
        * b_plasma_toroidal_on_axis**0.91e0
        * p_plasma_loss_mw ** (-0.38e0)
        * rmajor**2.14e0
        * dnla20 ** (-0.05e0)
    )

itpa20_confinement_time(pcur, b_plasma_toroidal_on_axis, dnla19, p_plasma_loss_mw, rmajor, triang, kappa_ipb, eps, aion) staticmethod

Calculate the ITPA20 Issue #3164 confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
dnla19 float

Central line-averaged electron density in units of 10**19 m**-3

required
p_plasma_loss_mw float

Thermal power lost due to transport through the LCFS [MW]

required
rmajor float

Plasma major radius [m]

required
triang float

Triangularity

required
kappa_ipb float

IPB specific plasma separatrix elongation

required
eps float

Inverse aspect ratio

required
aion float

Average mass of all ions (amu)

required

Returns:

Name Type Description
float

float: ITPA20 confinement time [s]

Notes float
  • Mass term is the effective mass of the plasma, so we assume the total ion mass here
  • This scaling uses the IPB defintiion of elongation, see reference for more information.
References float
  • G. Verdoolaege et al., “The updated ITPA global H-mode confinement database: description and analysis,” Nuclear Fusion, vol. 61, no. 7, pp. 076006-076006, Jan. 2021, doi: https://doi.org/10.1088/1741-4326/abdb91.
Source code in process/models/physics/confinement_time.py
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
@staticmethod
def itpa20_confinement_time(
    pcur: float,
    b_plasma_toroidal_on_axis: float,
    dnla19: float,
    p_plasma_loss_mw: float,
    rmajor: float,
    triang: float,
    kappa_ipb: float,
    eps: float,
    aion: float,
) -> float:
    """Calculate the ITPA20 Issue #3164 confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    dnla19 :
        Central line-averaged electron density in units of 10**19 m**-3
    p_plasma_loss_mw :
        Thermal power lost due to transport through the LCFS [MW]
    rmajor :
        Plasma major radius [m]
    triang :
        Triangularity
    kappa_ipb :
        IPB specific plasma separatrix elongation
    eps :
        Inverse aspect ratio
    aion :
        Average mass of all ions (amu)

    Returns
    -------
    :
        float: ITPA20 confinement time [s]

    Notes:
        - Mass term is the effective mass of the plasma, so we assume the total ion mass here
        - This scaling uses the IPB defintiion of elongation, see reference for more information.

    References:
        - G. Verdoolaege et al., “The updated ITPA global H-mode confinement database: description and analysis,”
        Nuclear Fusion, vol. 61, no. 7, pp. 076006-076006, Jan. 2021, doi: https://doi.org/10.1088/1741-4326/abdb91.
    """
    return (
        0.053
        * pcur**0.98
        * b_plasma_toroidal_on_axis**0.22
        * dnla19**0.24
        * p_plasma_loss_mw ** (-0.669)
        * rmajor**1.71
        * (1 + triang) ** 0.36
        * kappa_ipb**0.8
        * eps**0.35
        * aion**0.2
    )

itpa20_il_confinement_time(pcur, b_plasma_toroidal_on_axis, p_plasma_loss_mw, dnla19, aion, rmajor, triang, kappa_ipb) staticmethod

Calculate the ITPA20-IL Issue #1852 confinement time

Parameters:

Name Type Description Default
pcur float

Plasma current [MA]

required
b_plasma_toroidal_on_axis float

Toroidal magnetic field [T]

required
p_plasma_loss_mw float

Thermal power lost due to transport through the LCFS [MW]

required
dnla19 float

Central line-averaged electron density in units of 10**19 m**-3

required
aion float

Average mass of all ions (amu)

required
rmajor float

Plasma major radius [m]

required
triang float

Triangularity

required
kappa_ipb float

IPB specific plasma separatrix elongation

required

Returns:

Name Type Description
float

float: ITPA20-IL confinement time [s]

Notes float
  • Mass term is the effective mass of the plasma, so we assume the total ion mass here
  • This scaling uses the IPB defintiion of elongation, see reference for more information.
References float
  • T. Luda et al., “Validation of a full-plasma integrated modeling approach on ASDEX Upgrade,” Nuclear Fusion, vol. 61, no. 12, pp. 126048-126048, Nov. 2021, doi: https://doi.org/10.1088/1741-4326/ac3293.
Source code in process/models/physics/confinement_time.py
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
@staticmethod
def itpa20_il_confinement_time(
    pcur: float,
    b_plasma_toroidal_on_axis: float,
    p_plasma_loss_mw: float,
    dnla19: float,
    aion: float,
    rmajor: float,
    triang: float,
    kappa_ipb: float,
) -> float:
    """Calculate the ITPA20-IL Issue #1852 confinement time

    Parameters
    ----------
    pcur :
        Plasma current [MA]
    b_plasma_toroidal_on_axis :
        Toroidal magnetic field [T]
    p_plasma_loss_mw :
        Thermal power lost due to transport through the LCFS [MW]
    dnla19 :
        Central line-averaged electron density in units of 10**19 m**-3
    aion :
        Average mass of all ions (amu)
    rmajor :
        Plasma major radius [m]
    triang :
        Triangularity
    kappa_ipb :
        IPB specific plasma separatrix elongation

    Returns
    -------
    :
        float: ITPA20-IL confinement time [s]

    Notes:
        - Mass term is the effective mass of the plasma, so we assume the total ion mass here
        - This scaling uses the IPB defintiion of elongation, see reference for more information.

    References:
        - T. Luda et al., “Validation of a full-plasma integrated modeling approach on ASDEX Upgrade,”
        Nuclear Fusion, vol. 61, no. 12, pp. 126048-126048, Nov. 2021, doi: https://doi.org/10.1088/1741-4326/ac3293.
    """

    return (
        0.067
        * pcur**1.29
        * b_plasma_toroidal_on_axis**-0.13
        * p_plasma_loss_mw ** (-0.644)
        * dnla19**0.15
        * aion**0.3
        * rmajor**1.19
        * (1 + triang) ** 0.56
        * kappa_ipb**0.67
    )