Skip to content

Commit ec5b7c6

Browse files
committed
Update analytic_turbulence_actor.jl
fix pinch term
1 parent 920fd13 commit ec5b7c6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/actors/transport/analytic_turbulence_actor.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ function _step(actor::ActorAnalyticTurbulence{D,P}) where {D<:Real,P<:Real}
8888
bax = eqt.global_quantities.magnetic_axis.b_field_tor
8989
q_profile = IMAS.interp1d(rho_eq, eqt1d.q).(rho_cp)
9090
volume = IMAS.interp1d(rho_eq, eqt1d.volume).(rho_cp)
91+
dvoldrho = IMAS.interp1d(rho_eq, eqt1d.dvolume_drho_tor).(rho_cp)*eqt1d.rho_tor[end]
9192
vprime_miller = IMAS.interp1d(rho_eq, GACODE.volume_prime_miller_correction(eqt)).(rho_cp)
9293
surf = IMAS.interp1d(rho_eq, eqt1d.surface).(rho_cp)
9394

@@ -116,7 +117,7 @@ function _step(actor::ActorAnalyticTurbulence{D,P}) where {D<:Real,P<:Real}
116117
χi = @. actor.par.αBgB * (actor.par.χiB_coefficient * χiB + actor.par.χiGB_coefficient * χiGB)
117118

118119
Dp = @. (A1 + (A2 - A1) * rho_cp) * χe * χi / (χe + χi)
119-
vin = @. 0.5 * Dp * (surf ^ 2 / volume) / vprime_miller
120+
vin = @. 0.5 * Dp * (surf ^ 2 / volume) / dvoldrho
120121
vin[1] = 0.0
121122
Γe = @. (Dp * dlnnedr - vin) * ne
122123

0 commit comments

Comments
 (0)