Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add input parameter zero_electric_field to permit testing of scaling … #269

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions moment_kinetics/src/em_fields.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions moment_kinetics/src/input_structs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion moment_kinetics/src/species_input.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down