Skip to content

Commit 387aa99

Browse files
committed
Update analytic_turbulence_actor.jl
Add pinch term to BgB model
1 parent d938291 commit 387aa99

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

src/actors/transport/analytic_turbulence_actor.jl

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ end
2727
Evaluates analytic turbulent transport models including GyroBohm and Bohm+gyro-Bohm (BgB) models.
2828
2929
The actor supports two transport models:
30-
- `:GyroBohm`: Simple gyro-Bohm scaling returning unit fluxes
31-
- `:BgB`: Detailed Bohm + gyro-Bohm model calculating electron and ion energy diffusivities (χe, χi)
32-
and particle flux (Γe) based on local plasma parameters, pressure gradients, and magnetic geometry
30+
31+
- `:GyroBohm`: Simple gyro-Bohm scaling returning unit fluxes
32+
- `:BgB`: Detailed Bohm + gyro-Bohm model calculating electron and ion energy diffusivities (χe, χi)
33+
and particle flux (Γe) based on local plasma parameters, pressure gradients, and magnetic geometry
3334
3435
The BgB model computes transport coefficients using local temperature and density gradients,
35-
safety factor profiles, and magnetic field geometry. Results are normalized to gyro-Bohm
36+
safety factor profiles, and magnetic field geometry. Results are normalized to gyro-Bohm
3637
and stored in `dd.core_transport` as anomalous transport fluxes.
3738
"""
3839
function ActorAnalyticTurbulence(dd::IMAS.dd, act::ParametersAllActors; kw...)
@@ -54,11 +55,12 @@ end
5455
Runs the selected analytic turbulent transport model on specified radial grid points.
5556
5657
For the BgB model, calculates:
57-
- χeB, χeGB: Bohm and gyro-Bohm electron heat diffusivities
58-
- χiB, χiGB: Bohm and gyro-Bohm ion heat diffusivities
59-
- Γe: Electron particle flux based on density gradients
6058
61-
All transport coefficients are scaled by user-specified coefficients and stored as
59+
- χeB, χeGB: Bohm and gyro-Bohm electron heat diffusivities
60+
- χiB, χiGB: Bohm and gyro-Bohm ion heat diffusivities
61+
- Γe: Electron particle flux based on density gradients
62+
63+
All transport coefficients are scaled by user-specified coefficients and stored as
6264
FluxSolution objects normalized to gyro-Bohm units.
6365
"""
6466
function _step(actor::ActorAnalyticTurbulence{D,P}) where {D<:Real,P<:Real}
@@ -84,7 +86,9 @@ function _step(actor::ActorAnalyticTurbulence{D,P}) where {D<:Real,P<:Real}
8486

8587
bax = eqt.global_quantities.magnetic_axis.b_field_tor
8688
q_profile = IMAS.interp1d(rho_eq, eqt1d.q).(rho_cp)
89+
volume = IMAS.interp1d(rho_eq, eqt1d.volume).(rho_cp)
8790
vprime_miller = IMAS.interp1d(rho_eq, GACODE.volume_prime_miller_correction(eqt)).(rho_cp)
91+
surf = IMAS.interp1d(rho_eq, eqt1d.surface).(rho_cp)
8892

8993
rmin = GACODE.r_min_core_profiles(eqt1d, rho_cp)
9094
Te = cp1d.electrons.temperature
@@ -107,9 +111,13 @@ function _step(actor::ActorAnalyticTurbulence{D,P}) where {D<:Real,P<:Real}
107111
χiB = 2.0 * χeB
108112
χiGB = 0.5 * χeGB
109113

110-
χe = @. actor.par.αBgB * (actor.par.χeB_coefficient * χeB + actor.par.χeGB_coefficient * χeGB)
114+
χe = @. actor.par.αBgB * (actor.par.χeB_coefficient * χeB + actor.par.χeGB_coefficient * χeGB)
111115
χi = @. actor.par.αBgB * (actor.par.χiB_coefficient * χiB + actor.par.χiGB_coefficient * χiGB)
112-
Γe = @. (A1 + (A2 - A1) * rho_cp) * χe * χi / (χe + χi) * dlnnedr * ne
116+
117+
Dp = @. (A1 + (A2 - A1) * rho_cp) * χe * χi / (χe + χi)
118+
vin = @. 0.5 * Dp .* (surf .^ 2 ./ volume) ./ vprime_miller
119+
vin[1] = 0.0
120+
Γe = @. Dp * dlnnedr * ne .- vin * ne
113121

114122
gridpoint_cp = [argmin_abs(cp1d.grid.rho_tor_norm, ρ) for ρ in par.rho_transport]
115123

0 commit comments

Comments
 (0)