diff --git a/makie_post_processing/makie_post_processing/src/makie_post_processing.jl b/makie_post_processing/makie_post_processing/src/makie_post_processing.jl index 65a9ab301..00ccbe3fd 100644 --- a/makie_post_processing/makie_post_processing/src/makie_post_processing.jl +++ b/makie_post_processing/makie_post_processing/src/makie_post_processing.jl @@ -1004,6 +1004,10 @@ function plots_for_variable(run_info, variable_name; plot_prefix, has_rdim=true, all(ri.collisions.krook_collisions_option == "none" for ri ∈ run_info) # No Krook collisions active, so do not make plots. return nothing + elseif variable_name ∈ union(electron_moment_variables, electron_source_variables, electron_dfn_variables) && + all(ri.composition.electron_physics ∈ (boltzmann_electron_response, boltzmann_electron_response_with_simple_sheath) + for ri ∈ run_info) + return nothing end println("Making plots for $variable_name") diff --git a/moment_kinetics/src/electron_fluid_equations.jl b/moment_kinetics/src/electron_fluid_equations.jl index 1ddc44046..1b92038c5 100644 --- a/moment_kinetics/src/electron_fluid_equations.jl +++ b/moment_kinetics/src/electron_fluid_equations.jl @@ -111,6 +111,11 @@ function calculate_electron_upar_from_charge_conservation!(upar_e, updated, dens # convert from parallel particle flux to parallel particle density upar_e[iz,ir] /= dens_e[iz,ir] end + else + begin_r_z_region() + @loop_r_z ir iz begin + upar_e[iz,ir] = upar_i[iz,ir,1] + end end updated[] = true end diff --git a/moment_kinetics/src/initial_conditions.jl b/moment_kinetics/src/initial_conditions.jl index 2549e07f4..ea9fc5f92 100644 --- a/moment_kinetics/src/initial_conditions.jl +++ b/moment_kinetics/src/initial_conditions.jl @@ -281,7 +281,7 @@ function initialize_electrons!(pdf, moments, fields, geometry, composition, r, z # Not restarting, so create initial profiles # initialise the electron thermal speed profile - init_electron_vth!(moments.electron.vth, moments.ion.vth, composition.T_e, composition.me_over_mi, z.grid) + init_electron_vth!(moments.electron.vth, moments.ion.vth, composition, z.grid) begin_r_z_region() # calculate the electron temperature from the thermal speed @loop_r_z ir iz begin @@ -1063,14 +1063,18 @@ initialise the electron thermal speed profile. for now the only initialisation option for the temperature is constant in z. returns vth0 = sqrt(2*Ts/Te) """ -function init_electron_vth!(vth_e, vth_i, T_e, me_over_mi, z) +function init_electron_vth!(vth_e, vth_i, composition, z) begin_r_z_region() - # @loop_r_z ir iz begin - # vth_e[iz,ir] = sqrt(T_e) - # end - @loop_r_z ir iz begin - vth_e[iz,ir] = vth_i[iz,ir,1] / sqrt(me_over_mi) - #vth_e[iz,ir] = exp(-5*(z[iz]/z[end])^2)/sqrt(me_over_mi) + if composition.electron_physics ∈ (boltzmann_electron_response, + boltzmann_electron_response_with_simple_sheath) + @loop_r_z ir iz begin + vth_e[iz,ir] = sqrt(composition.T_e / composition.me_over_mi) + end + else + @loop_r_z ir iz begin + vth_e[iz,ir] = vth_i[iz,ir,1] / sqrt(composition.me_over_mi) + #vth_e[iz,ir] = exp(-5*(z[iz]/z[end])^2)/sqrt(composition.me_over_mi) + end end end