@@ -284,52 +284,63 @@ 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_i = - Bi2 / (
294- core_profiles .n_i .face_value ()
295- * dlnti_dpsi
296- * (dpsi_drhon / geometry .rho_b ) ** 2
293+ chi_neo_e_axis = jnp .array ([chi_neo_e_bulk [0 ]])
294+ chi_neo_e = jnp .concatenate ([chi_neo_e_axis , chi_neo_e_bulk ])
295+
296+ chi_neo_i_bulk = - Bi2 [1 :] / (
297+ core_profiles .n_i .face_value ()[1 :]
298+ * dlnti_dpsi [1 :]
299+ * (dpsi_drhon [1 :] / geometry .rho_b ) ** 2
297300 + constants .CONSTANTS .eps
298301 )
302+ chi_neo_i_axis = jnp .array ([chi_neo_i_bulk [0 ]])
303+ chi_neo_i = jnp .concatenate ([chi_neo_i_axis , chi_neo_i_bulk ])
299304
300305 # Decomposition of particle flux Be1 = Gamma * dpsi_drho. Page 1232+1233.
301306
302307 # Diffusive part of particle flux
303308 # D_e * dn_e/drho = - L00 *dlog(n_e)/dpsi / dpsi/drho
304- D_neo_e = - Lmn_e [:, 0 , 0 ] / (
305- core_profiles .n_e .face_value () * (dpsi_drhon / geometry .rho_b ) ** 2
309+ D_neo_e_bulk = - Lmn_e [1 :, 0 , 0 ] / (
310+ core_profiles .n_e .face_value ()[ 1 :] * (dpsi_drhon [ 1 :] / geometry .rho_b ) ** 2
306311 + constants .CONSTANTS .eps
307312 )
313+ D_neo_e_axis = jnp .array ([D_neo_e_bulk [0 ]])
314+ D_neo_e = jnp .concatenate ([D_neo_e_axis , D_neo_e_bulk ])
308315
309316 # Convective part of particle flux, apart from the Ware Pinch term
310317 # V*n*dpsi/rho = (L00+L01)*dlog(Te)/dpsi + (1-Rpe)/Rpe*L00*dlog(ni)/dpsi +
311318 # (1-Rpe)/Rpe * (L00+alpha*L03) *dlog(Ti)/dpsi
312- V_neo_e = (
313- (Lmn_e [:, 0 , 0 ] + Lmn_e [:, 0 , 1 ]) * dlnte_dpsi
314- + (1 - Rpe ) / Rpe * Lmn_e [:, 0 , 0 ] * dlnni_dpsi
315- + (1 - Rpe ) / Rpe * (Lmn_e [:, 0 , 0 ] + alpha * Lmn_e [:, 0 , 3 ]) * dlnti_dpsi
319+ V_neo_e_bulk = (
320+ (Lmn_e [1 :, 0 , 0 ] + Lmn_e [1 :, 0 , 1 ]) * dlnte_dpsi [ 1 :]
321+ + (1 - Rpe [ 1 :] ) / Rpe [ 1 :] * Lmn_e [1 :, 0 , 0 ] * dlnni_dpsi [ 1 :]
322+ + (1 - Rpe [ 1 :] ) / Rpe [ 1 :] * (Lmn_e [1 :, 0 , 0 ] + alpha [ 1 :] * Lmn_e [1 :, 0 , 3 ]) * dlnti_dpsi [ 1 :]
316323 ) / (
317- dpsi_drhon / geometry .rho_b * core_profiles .n_e .face_value ()
324+ dpsi_drhon [ 1 :] / geometry .rho_b * core_profiles .n_e .face_value ()[ 1 :]
318325 + constants .CONSTANTS .eps
319326 )
327+ V_neo_e_axis = jnp .array ([V_neo_e_bulk [0 ]])
328+ V_neo_e = jnp .concatenate ([V_neo_e_axis , V_neo_e_bulk ])
320329
321330 # Ware pinch term component of particle convection
322331 # V_ware*n*dpsi/rho = L02*<E_parallel * B>/<B^2>
323- V_neo_ware_e = (
324- Lmn_e [:, 0 , 2 ]
325- * E_parallel
332+ V_neo_ware_e_bulk = (
333+ Lmn_e [1 :, 0 , 2 ]
334+ * E_parallel [ 1 :]
326335 / (
327336 geometry .B_0
328- * (dpsi_drhon / geometry .rho_b )
329- * core_profiles .n_e .face_value ()
337+ * (dpsi_drhon [ 1 :] / geometry .rho_b )
338+ * core_profiles .n_e .face_value ()[ 1 :]
330339 + constants .CONSTANTS .eps
331340 )
332341 )
342+ V_neo_ware_e_axis = jnp .atleast_1d (V_neo_ware_e_bulk [0 ])
343+ V_neo_ware_e = jnp .concatenate ([V_neo_ware_e_axis , V_neo_ware_e_bulk ])
333344
334345 return base .NeoclassicalTransport (
335346 chi_neo_i = chi_neo_i ,
0 commit comments