diff --git a/moment_kinetics/src/em_fields.jl b/moment_kinetics/src/em_fields.jl index 462d23959..1e94a4df8 100644 --- a/moment_kinetics/src/em_fields.jl +++ b/moment_kinetics/src/em_fields.jl @@ -156,6 +156,15 @@ function update_phi!(fields, fvec, vperp, z, r, composition, collisions, moments z_spectral,z) end end + + # zero out electric field if user wishes to remove acceleration physics + zeroE = composition.zero_electric_field + if zeroE + @loop_r_z ir iz begin + fields.Ez[iz,ir] = 0.0 + fields.Er[iz,ir] = 0.0 + end + end # get gyroaveraged field arrays for distribution function advance gkions = composition.gyrokinetic_ions diff --git a/moment_kinetics/src/input_structs.jl b/moment_kinetics/src/input_structs.jl index c4fffaaec..f2b4dfbdd 100644 --- a/moment_kinetics/src/input_structs.jl +++ b/moment_kinetics/src/input_structs.jl @@ -279,6 +279,8 @@ Base.@kwdef struct species_composition # gyrokinetic_ions = true -> use gyroaveraged fields at fixed guiding centre and moments of the pdf computed at fixed r # gyrokinetic_ions = false -> use drift kinetic approximation gyrokinetic_ions::Bool + # zero_electric_field = true -> force Ez = Er = 0 + zero_electric_field::Bool # array of structs of parameters for each ion species ion::Vector{ion_species_parameters} # array of structs of parameters for each neutral species diff --git a/moment_kinetics/src/species_input.jl b/moment_kinetics/src/species_input.jl index 59d7043fe..d5e830bfd 100644 --- a/moment_kinetics/src/species_input.jl +++ b/moment_kinetics/src/species_input.jl @@ -46,7 +46,9 @@ function get_species_input(toml_input) recycling_fraction = 1.0, # gyrokinetic_ions = True -> use gyroaveraged fields at fixed guiding centre and moments of the pdf computed at fixed r # gyrokinetic_ions = False -> use drift kinetic approximation - gyrokinetic_ions = false) + gyrokinetic_ions = false, + # if zero_electric_field = true, set Ez = Er = 0. + zero_electric_field = false) nspec_ion = composition_section["n_ion_species"] nspec_neutral = composition_section["n_neutral_species"]