Skip to content

Commit f55e941

Browse files
committed
Extrapolate chi_neo_e and V_neo_ware_e
1 parent 5477b9a commit f55e941

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

torax/_src/neoclassical/transport/angioni_sauter.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,14 @@ def _calculate_angioni_sauter_transport(
284284

285285
# Q_e = - chi_e * n_e * dT/drho = B_e2 * T_e / dpsi/drho
286286
# Q_i = - chi_i * n_i * dT/drho = B_i2 * T_i / dpsi/drho
287-
chi_neo_e = -Be2 / (
288-
core_profiles.n_e.face_value()
289-
* dlnte_dpsi
290-
* (dpsi_drhon / geometry.rho_b) ** 2
287+
chi_neo_e_bulk = -Be2[1:] / (
288+
core_profiles.n_e.face_value()[1:]
289+
* dlnte_dpsi[1:]
290+
* (dpsi_drhon[1:] / geometry.rho_b) ** 2
291291
+ constants.CONSTANTS.eps
292292
)
293+
chi_neo_e_axis = jnp.atleast_1d(chi_neo_e_bulk[0])
294+
chi_neo_e = jnp.concatenate([chi_neo_e_axis, chi_neo_e_bulk])
293295
chi_neo_i = -Bi2 / (
294296
core_profiles.n_i.face_value()
295297
* dlnti_dpsi
@@ -320,16 +322,18 @@ def _calculate_angioni_sauter_transport(
320322

321323
# Ware pinch term component of particle convection
322324
# V_ware*n*dpsi/rho = L02*<E_parallel * B>/<B^2>
323-
V_neo_ware_e = (
324-
Lmn_e[:, 0, 2]
325-
* E_parallel
325+
V_neo_ware_e_bulk = (
326+
Lmn_e[1:, 0, 2]
327+
* E_parallel[1:]
326328
/ (
327329
geometry.B_0
328-
* (dpsi_drhon / geometry.rho_b)
329-
* core_profiles.n_e.face_value()
330+
* (dpsi_drhon[1:] / geometry.rho_b)
331+
* core_profiles.n_e.face_value()[1:]
330332
+ constants.CONSTANTS.eps
331333
)
332334
)
335+
V_neo_ware_e_axis = jnp.atleast_1d(V_neo_ware_e_bulk[0])
336+
V_neo_ware_e = jnp.concatenate([V_neo_ware_e_axis, V_neo_ware_e_bulk])
333337

334338
return base.NeoclassicalTransport(
335339
chi_neo_i=chi_neo_i,

torax/examples/step_flattop_bgb.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,6 @@
164164
"transport": {
165165
"model_name": "angioni_sauter",
166166
"use_shaing_ion_correction": True,
167-
"V_e_min": -1e-6,
168-
"V_e_max": 1e-6,
169167
},
170168
},
171169
"numerics": {

0 commit comments

Comments
 (0)