Skip to content

Commit f3a791e

Browse files
jcitrinTorax team
authored andcommitted
Update default _MIN_RHO_NORM for constant extrapolation in toroidal current conversions.
Present value was too large and led to unnecessary extrapolation in idx=1 values with a 25 point grid. Minor O(1e-4) sim test differences due to slightly different Ohmic power. PiperOrigin-RevId: 853172258
1 parent 1859a36 commit f3a791e

File tree

50 files changed

+154
-154
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+154
-154
lines changed

torax/_src/physics/psi_calculations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
# pylint: disable=invalid-name
4949

5050
# TODO(b/434175938): Make this configurable from numerics.
51-
_MIN_RHO_NORM: Final[array_typing.FloatScalar] = 0.025
51+
_MIN_RHO_NORM: Final[array_typing.FloatScalar] = 0.015
5252

5353

5454
def _extrapolate_cell_profile_to_axis(

torax/_src/test_utils/references.json

Lines changed: 153 additions & 153 deletions
Original file line numberDiff line numberDiff line change
@@ -1,169 +1,169 @@
11
{
22
"circular_references": {
33
"psi": [
4-
0.052075935679795585,
5-
0.46107540251620427,
6-
1.2617072832747063,
7-
2.4320682084819345,
8-
3.9456675770905676,
9-
5.772130400318666,
10-
7.880442799294381,
11-
10.253452936284548,
12-
12.921509833705963,
13-
15.975062793025932,
14-
19.479594016251376,
15-
23.35416974109693,
16-
27.39333777119788,
17-
31.40911561805146,
18-
35.30346983552488,
19-
39.038812744300536,
20-
42.597958315611315,
21-
45.9694615525798,
22-
49.145516085201194,
23-
52.12220164659882,
24-
54.89971012978842,
25-
57.482285204564484,
26-
59.87785956723729,
27-
62.0973874595632,
28-
64.15385651807875
4+
0.05207593567631846,
5+
0.4610754024949945,
6+
1.2617072832372929,
7+
2.432068208434063,
8+
3.9456675770353664,
9+
5.772130400258007,
10+
7.8804427992295105,
11+
10.25345293621636,
12+
12.921509833635124,
13+
15.975062792952954,
14+
19.479594016176662,
15+
23.3541697410208,
16+
27.393337771120592,
17+
31.40911561797322,
18+
35.30346983544585,
19+
39.03881274422086,
20+
42.5979583155311,
21+
45.969461552499126,
22+
49.14551608512012,
23+
52.1222016465174,
24+
54.89971012970669,
25+
57.48228520448248,
26+
59.87785956715503,
27+
62.097387459480714,
28+
64.15385651799608
2929
],
3030
"psi_face_grad": [
3131
0.0,
32-
10.22498667091022,
33-
20.015797018962544,
34-
29.2590231301807,
35-
37.83998421521584,
36-
45.66157058070245,
37-
52.70780997439287,
38-
59.32525342475411,
39-
66.7014224355355,
40-
76.33882398299916,
41-
87.61328058063602,
42-
96.864393121139,
43-
100.97920075252374,
44-
100.39444617133934,
45-
97.35885543683543,
46-
93.3835727193916,
47-
88.9786392827694,
48-
84.28758092421232,
49-
79.40136331553475,
50-
74.41713903494052,
51-
69.43771207973992,
52-
64.56437686940178,
53-
59.88935906682004,
54-
55.48819730814795,
55-
51.41172646288879,
32+
10.224986670466903,
33+
20.015797018557453,
34+
29.25902312991925,
35+
37.8399842150326,
36+
45.66157058056601,
37+
52.70780997428758,
38+
59.3252534246712,
39+
66.70142243546921,
40+
76.33882398294568,
41+
87.61328058059263,
42+
96.86439312110365,
43+
100.97920075249469,
44+
100.39444617131564,
45+
97.3588554368157,
46+
93.38357271937542,
47+
88.97863928275589,
48+
84.28758092420077,
49+
79.4013633155248,
50+
74.41713903493181,
51+
69.4377120797323,
52+
64.56437686939486,
53+
59.88935906681365,
54+
55.48819730814227,
55+
51.41172646288399,
5656
47.64848792277505
5757
],
5858
"psidot": [
59-
0.06157968950636744,
60-
0.07677768629628907,
61-
0.09146457302093412,
62-
0.10582902761599242,
63-
0.12094883944086698,
64-
0.1561079768603547,
65-
0.42872775364809623,
66-
2.096594348027421,
67-
7.358753710062982,
68-
14.503959083204832,
69-
15.468523079061766,
70-
8.906915789000466,
71-
2.855548599376935,
72-
0.6330434454848467,
73-
0.23088970841702355,
74-
0.18458117528386056,
75-
0.16917726877144393,
76-
0.15139603053984288,
77-
0.12976689934252691,
78-
0.10497191797683016,
79-
0.07828380198427867,
80-
0.05164758157442768,
81-
0.02777525007402016,
82-
0.009900331167176158,
83-
-0.014056923759500607
59+
0.06157968381004883,
60+
0.07677768629524108,
61+
0.09146457302088659,
62+
0.10582902761600664,
63+
0.12094883944088844,
64+
0.15610797686037947,
65+
0.4287277536481171,
66+
2.096594348027393,
67+
7.3587537100628415,
68+
14.50395908320462,
69+
15.46852307906161,
70+
8.906915789000422,
71+
2.855548599376963,
72+
0.6330434454848843,
73+
0.23088970841708312,
74+
0.1845811752839259,
75+
0.16917726877149775,
76+
0.15139603053986211,
77+
0.12976689934259528,
78+
0.10497191797688243,
79+
0.07828380198440321,
80+
0.05164758157450277,
81+
0.027775250074114643,
82+
0.009900331167301423,
83+
-0.014056923757322511
8484
],
8585
"j_total": [
86-
2627032.5709193726,
87-
2627032.5709193726,
88-
2573850.466329537,
89-
2498523.7697890555,
90-
2402432.36559497,
91-
2296951.348102065,
92-
2234687.916997712,
93-
2341511.687035073,
94-
2682259.3714620047,
95-
2980698.0709524183,
96-
2793408.800529158,
97-
2132939.696989248,
98-
1453183.2573647522,
99-
1025984.3630676522,
100-
787800.3842037008,
101-
620358.5733065568,
102-
477726.74579173763,
103-
352953.7659514801,
104-
246929.47522163758,
105-
160759.93089926144,
106-
94756.55491627773,
107-
48233.31183273149,
108-
19348.7455418059,
109-
4888.408668855004,
110-
-4503.904616803576
86+
2666775.8002804862,
87+
2627032.570885922,
88+
2573850.466329216,
89+
2498523.7697898466,
90+
2402432.365595642,
91+
2296951.348102666,
92+
2234687.9169982867,
93+
2341511.6870355885,
94+
2682259.371462478,
95+
2980698.070952847,
96+
2793408.800529539,
97+
2132939.6969895638,
98+
1453183.2573650626,
99+
1025984.3630678669,
100+
787800.3842039326,
101+
620358.5733067215,
102+
477726.74579184415,
103+
352953.765951566,
104+
246929.47522169465,
105+
160759.9308993143,
106+
94756.55491629572,
107+
48233.31183272814,
108+
19348.74554184244,
109+
4888.408668925427,
110+
-4503.904616112872
111111
],
112112
"q": [
113-
0.6513628467172836,
114-
0.6513628467172836,
115-
0.6654920030714391,
116-
0.6828843597386254,
117-
0.7040358566462865,
118-
0.7292977815819035,
119-
0.7581619986312561,
120-
0.7858581681139403,
121-
0.7988047249873484,
122-
0.7852044962579248,
123-
0.7601788657463387,
124-
0.7563351023124905,
125-
0.7914710802989482,
126-
0.8624211481297285,
127-
0.9577194548988817,
128-
1.0698096407636168,
129-
1.1976225268079768,
130-
1.3432939704033182,
131-
1.5098377490645873,
132-
1.7004597828892871,
133-
1.9183167838139712,
134-
2.166267401925496,
135-
2.446576213980644,
136-
2.7606601983904167,
137-
3.1091006898986584,
113+
0.6513628467455241,
114+
0.6513628467455241,
115+
0.6654920030849076,
116+
0.6828843597447275,
117+
0.7040358566496958,
118+
0.7292977815840828,
119+
0.7581619986327708,
120+
0.7858581681150385,
121+
0.7988047249881424,
122+
0.7852044962584749,
123+
0.7601788657467151,
124+
0.7563351023127665,
125+
0.7914710802991758,
126+
0.8624211481299321,
127+
0.9577194548990757,
128+
1.069809640763802,
129+
1.1976225268081584,
130+
1.343293970403502,
131+
1.5098377490647765,
132+
1.7004597828894863,
133+
1.918316783814182,
134+
2.166267401925728,
135+
2.4465762139809053,
136+
2.760660198390699,
137+
3.109100689898949,
138138
3.4944322033915616
139139
],
140140
"s": [
141141
-0.0,
142-
0.01061557185431628,
143-
0.04716064620387996,
144-
0.0842666906402854,
145-
0.13122491603369266,
146-
0.18488223507286594,
147-
0.22446393490117106,
148-
0.18458330229468287,
149-
-0.003384803440840118,
150-
-0.22475896767152687,
151-
-0.18476785955925526,
152-
0.21635274198227342,
153-
0.7723442339723204,
154-
1.2294667889709003,
155-
1.506937012007249,
156-
1.6782061711058838,
157-
1.8233280678433044,
158-
1.9714865968477144,
159-
2.124737292561183,
160-
2.2782906902873736,
161-
2.425763655776657,
162-
2.5601743752334745,
163-
2.6748532071161315,
164-
2.7651531193258507,
165-
2.8378379929658513,
166-
3.098416165362778
142+
0.010615571843002863,
143+
0.04716064616924587,
144+
0.08426669061693275,
145+
0.13122491602167236,
146+
0.1848822350656815,
147+
0.2244639348963448,
148+
0.18458330229111602,
149+
-0.00338480344367522,
150+
-0.22475896767377937,
151+
-0.18476785956090339,
152+
0.21635274198115542,
153+
0.7723442339715509,
154+
1.2294667889703381,
155+
1.506937012006805,
156+
1.6782061711054952,
157+
1.8233280678430073,
158+
1.971486596847484,
159+
2.124737292560998,
160+
2.278290690287228,
161+
2.4257636557765494,
162+
2.560174375233438,
163+
2.6748532071160867,
164+
2.7651531193257006,
165+
2.8378379929647326,
166+
3.0984161653601534
167167
]
168168
},
169169
"chease_references_Ip_from_chease": {
@@ -223,7 +223,7 @@
223223
50.41748508435972
224224
],
225225
"psidot": [
226-
0.018996073169088933,
226+
0.018996072254309097,
227227
0.02500202031296846,
228228
0.031338773378838725,
229229
0.03868328280898349,
@@ -250,7 +250,7 @@
250250
0.6046308208780878
251251
],
252252
"j_total": [
253-
884353.6628799367,
253+
813160.9908847061,
254254
884353.6628799367,
255255
940038.685990217,
256256
1004231.0472487136,
@@ -390,7 +390,7 @@
390390
64.25482269382653
391391
],
392392
"psidot": [
393-
0.02404839439970875,
393+
0.024048393241628024,
394394
0.03165563353561174,
395395
0.03967773134427994,
396396
0.04897536898024741,
@@ -417,7 +417,7 @@
417417
0.7656480809377397
418418
],
419419
"j_total": [
420-
1127069.0656605966,
420+
1036337.1993547073,
421421
1127069.0656605966,
422422
1198037.1292334993,
423423
1279847.4135834873,
3.37 KB
Binary file not shown.
1.42 KB
Binary file not shown.
457 Bytes
Binary file not shown.
-506 Bytes
Binary file not shown.
-64 Bytes
Binary file not shown.
3.65 KB
Binary file not shown.
-126 Bytes
Binary file not shown.
-1.08 KB
Binary file not shown.

0 commit comments

Comments
 (0)