Commit 66cc5ed
InnerLayer.SLAYER - BUGFIX - Use the shear magnitude in the layer timescales and widths
slayer_parameters took sval_r with its sign in five places that are magnitudes: the
parallel diffusivity chi_par_lmfp (twice), the island width Wd, the :lar critical-Delta,
and the Alfven time tau_h. On a reverse-shear surface tau_h came out negative, hence a
negative Lundquist number, and tauk = lu^(1/3)*tau_h threw a DomainError before any layer
quantity was produced. The two sqrt() sites would have thrown on the same surface.
Found while scanning DIII-D reconstructions: shot 153072_3415 has q dipping to 1.855
off-axis, giving two q = 2 surfaces, and the inner one is on the negative-shear branch.
Rational-surface finding is already reverse-shear-safe, so the layer build is handed
exactly those surfaces.
The layer timescales and widths depend on |dq/dr|, not its sign -- the module's own
diffusive-resistive width derivation states the convention as (n|s|). abs(s) == s wherever
the shear is positive, so no currently-working surface changes value; this only turns a
crash into a result.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent d7e6e6f commit 66cc5ed
1 file changed
Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
| 150 | + | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
301 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
302 | 304 | | |
303 | 305 | | |
304 | 306 | | |
| |||
0 commit comments