Skip to content

Commit

Permalink
fix plasma_lumped_resistance function
Browse files Browse the repository at this point in the history
  • Loading branch information
orso82 committed Dec 13, 2024
1 parent f923f89 commit e9257e3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/physics/currents.jl
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,12 @@ Returns equivalent plasma lumped resistance in ohms
function plasma_lumped_resistance(dd::IMAS.dd)
cp1d = dd.core_profiles.profiles_1d[]
eqt = dd.equilibrium.time_slice[]
Pohm = dd.core_sources.source[:ohmic].profiles_1d[].electrons.power_inside[end]
Ini = Ip_non_inductive(cp1d, eqt)
Ip = Ip(cp1d)
Iohm = Ip - Ini
Rp = Pohm / (Ip * Iohm)
return Rp
P_ohm = dd.core_sources.source[:ohmic].profiles_1d[].electrons.power_inside[end]
I_ni = Ip_non_inductive(cp1d, eqt)
I_p = Ip(cp1d)
I_ohm = I_p - I_ni
R_p = P_ohm / (I_p * I_ohm)
return R_p
end

@compat public plasma_lumped_resistance
Expand Down

0 comments on commit e9257e3

Please sign in to comment.