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

Refactor composition and species inputs #234

Merged
merged 51 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
de707a3
Test script to explore refactoring of species inputs.
mrhardman Aug 1, 2024
acf4f7a
Refactor composition and species input. N.B. file i/o fails due to el…
mrhardman Aug 2, 2024
546c68a
Workaround for file i/o error, make electron physics determined by St…
mrhardman Aug 2, 2024
8340491
Comment out print statements.
mrhardman Aug 2, 2024
1c70e11
Update post processing functions.
mrhardman Aug 2, 2024
c4afb3c
Script showing how to define function to merge arbitrary Dicts of Dic…
mrhardman Aug 2, 2024
3dd6d9c
Refactor tests to match new input structure. Gyroaverage tests failin…
mrhardman Aug 4, 2024
68270f3
Modify set_defaults_and_check_section!() to explicitly create and mer…
mrhardman Aug 4, 2024
1db6b71
Remove reference to electron_physics_type in post processing script.
mrhardman Aug 5, 2024
001b676
Update example/ .toml files.
mrhardman Aug 5, 2024
1a31ca8
Make sure n_neutral_species = 0 in gyroaverage_tests.jl
mrhardman Aug 5, 2024
6a66a11
Update debug test inputs.
mrhardman Aug 5, 2024
3870268
Correct typos.
mrhardman Aug 5, 2024
5fc4c21
Correct typo.
mrhardman Aug 6, 2024
fc19039
Correct typo.
mrhardman Aug 6, 2024
09a1bdd
Merge branch 'fokker-planck-vperp-bc-experiment' into refactor-compos…
mrhardman Aug 6, 2024
30f9e58
Function `options_to_TOML()` adds special handling for `Enum`
johnomotani Aug 7, 2024
812540d
Handle `Enum` variables in `set_defaults_and_check_section!()`
johnomotani Aug 8, 2024
6cbce08
Merge branch 'master' into TOML-print-enum2
johnomotani Aug 8, 2024
e471a2b
Update moment_kinetics/src/species_input.jl
mrhardman Aug 8, 2024
1a04765
Update moment_kinetics/src/species_input.jl
mrhardman Aug 8, 2024
1f3c555
Update moment_kinetics/src/species_input.jl
mrhardman Aug 8, 2024
cca4ac3
Update moment_kinetics/src/species_input.jl
mrhardman Aug 8, 2024
29d4b52
Update moment_kinetics/src/species_input.jl
mrhardman Aug 8, 2024
512a4a2
Update moment_kinetics/src/species_input.jl
mrhardman Aug 8, 2024
8a8913a
Update moment_kinetics/src/species_input.jl
mrhardman Aug 8, 2024
07d9df8
Update moment_kinetics/src/species_input.jl
mrhardman Aug 8, 2024
23e94f2
Update moment_kinetics/src/species_input.jl
mrhardman Aug 8, 2024
ea64dc3
Update moment_kinetics/test/gyroaverage_tests.jl
mrhardman Aug 9, 2024
8cc9292
Update moment_kinetics/src/input_structs.jl
mrhardman Aug 9, 2024
81abb0c
Merge branch 'TOML-print-enum2' into refactor-composition
mrhardman Aug 9, 2024
e56433d
Refactor inputs for tests following addition of kinetic electron feat…
mrhardman Aug 9, 2024
ed691d1
Delete old test scripts used to design refactor of inputs.
mrhardman Aug 9, 2024
da389b0
Refactor restart_interpolation_tests.jl.
mrhardman Aug 9, 2024
e2770e5
Remove get_composition() function as redundant.
mrhardman Aug 9, 2024
c6532f0
Refactor geometry_input function.
mrhardman Aug 9, 2024
bab300e
Add OptionsDict type to avoid further bugs where Dict() is not passed…
mrhardman Aug 9, 2024
d93ec84
Merge branch 'master' into refactor-composition
mrhardman Aug 9, 2024
5db7ba0
Modify collision struct setup functions to only take scan_input as an…
mrhardman Aug 9, 2024
be6cfb4
Update precompile files to reflect refactor of composition inputs.
mrhardman Aug 11, 2024
2a25a27
Merge branch 'master' into refactor-composition
mrhardman Aug 11, 2024
22f8435
Correct typo.
mrhardman Aug 12, 2024
4056978
Update kinetic electron examples are remove presumed outdated example…
mrhardman Aug 12, 2024
536e5f5
Correct typo
mrhardman Aug 12, 2024
67cfd2b
Correct typo
mrhardman Aug 12, 2024
13a2bd3
Add some checks to detect old input files to provide a warning to the…
mrhardman Aug 13, 2024
9028b0e
Catch incorrectly placed "electron_physics" option.
mrhardman Aug 13, 2024
e95c7c8
Potential fix of DebugMPISharedArray shape mismatch.
mrhardman Aug 13, 2024
bc825f0
Add functions for merging dicts of dicts, both in place and with a re…
mrhardman Aug 14, 2024
6c53851
Fix too-long output dir names for 'long' tests
johnomotani Sep 4, 2024
2c6452d
Fix regression in inputs for 'recycling fraction' debug tests
johnomotani Sep 4, 2024
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
Original file line number Diff line number Diff line change
@@ -1,47 +1,11 @@
#use_manufactured_solns_for_init = true
#use_manufactured_solns_for_advance = false
n_ion_species = 1
n_neutral_species = 0
electron_physics = "boltzmann_electron_response"
#electron_physics = "boltzmann_electron_response_with_simple_sheath"
evolve_moments_density = false
evolve_moments_parallel_flow = false
evolve_moments_parallel_pressure = false
evolve_moments_conservation = false
#force_Er_zero_at_wall = false #true
#epsilon_offset = 0.1
#use_vpabar_in_mms_dfni = true
T_e = 1.0
T_wall = 1.0
initial_density1 = 0.5
initial_temperature1 = 1.0
initial_density2 = 0.5
initial_temperature2 = 1.0
z_IC_option1 = "sinusoid"
z_IC_density_amplitude1 = 0.001
z_IC_density_phase1 = 0.0
z_IC_upar_amplitude1 = 0.0
z_IC_upar_phase1 = 0.0
z_IC_temperature_amplitude1 = 0.0
z_IC_temperature_phase1 = 0.0
z_IC_option2 = "sinusoid"
z_IC_density_amplitude2 = 0.001
z_IC_density_phase2 = 0.0
z_IC_upar_amplitude2 = 0.0
z_IC_upar_phase2 = 0.0
z_IC_temperature_amplitude2 = 0.0
z_IC_temperature_phase2 = 0.0
charge_exchange_frequency = 0.0
ionization_frequency = 1.0
constant_ionization_rate = true

nstep = 200
dt = 1.0e-4
nwrite = 1000
nwrite_dfns = 1000
use_semi_lagrange = false
n_rk_stages = 4
split_operators = false
z_ngrid = 5
z_nelement = 16
#z_nelement_local = 2
Expand All @@ -67,31 +31,34 @@ vperp_L = 3.0
#vperp_discretization = "chebyshev_pseudospectral"
vperp_discretization = "gausslegendre_pseudospectral"

#vz_ngrid = 17
#vz_nelement = 4
#vz_L = 12.0
#vz_bc = "periodic"
#vz_discretization = "chebyshev_pseudospectral"

#vr_ngrid = 17
#vr_nelement = 4
#vr_L = 12.0
#vr_bc = "periodic"
#vr_discretization = "chebyshev_pseudospectral"
[composition]
n_ion_species = 1
n_neutral_species = 0
electron_physics = "boltzmann_electron_response"
#electron_physics = "boltzmann_electron_response_with_simple_sheath"
T_e = 1.0
T_wall = 1.0

#vzeta_ngrid = 17
#vzeta_nelement = 4
#vzeta_L = 12.0
#vzeta_bc = "periodic"
#vzeta_discretization = "chebyshev_pseudospectral"
[ion_species_1]
initial_density = 0.5
initial_temperature = 1.0

#[ion_numerical_dissipation]
#vpa_dissipation_coefficient = 0.0
#vperp_dissipation_coefficient = 0.0
#z_dissipation_coefficient = 0.1
#r_dissipation_coefficient = 0.0
[z_IC_ion_species_1]
initialization_option = "sinusoid"
density_amplitude = 0.001
density_phase = 0.0
upar_amplitude = 0.0
upar_phase = 0.0
temperature_amplitude = 0.0
temperature_phase = 0.0

[fokker_planck_collisions]
use_fokker_planck = true
nuii = 1.0
frequency_option = "manual"

[timestepping]
nstep = 50
dt = 1.0e-4
nwrite = 10
nwrite_dfns = 10
Original file line number Diff line number Diff line change
@@ -1,31 +1,8 @@
# cheap input file for a 0D2V relaxation to a collisional Maxwellian distribution with self-ion collisions.
n_ion_species = 1
n_neutral_species = 0
electron_physics = "boltzmann_electron_response"
evolve_moments_density = false
evolve_moments_parallel_flow = false
evolve_moments_parallel_pressure = false
evolve_moments_conservation = false
T_e = 1.0
T_wall = 1.0
initial_density1 = 0.5
initial_temperature1 = 1.0
initial_density2 = 0.5
initial_temperature2 = 1.0
z_IC_option1 = "sinusoid"
z_IC_density_amplitude1 = 0.001
z_IC_density_phase1 = 0.0
z_IC_upar_amplitude1 = 0.0
z_IC_upar_phase1 = 0.0
z_IC_temperature_amplitude1 = 0.0
z_IC_temperature_phase1 = 0.0
z_IC_option2 = "sinusoid"
z_IC_density_amplitude2 = 0.001
z_IC_density_phase2 = 0.0
z_IC_upar_amplitude2 = 0.0
z_IC_upar_phase2 = 0.0
z_IC_temperature_amplitude2 = 0.0
z_IC_temperature_phase2 = 0.0
charge_exchange_frequency = 0.0
ionization_frequency = 0.0
constant_ionization_rate = false
Expand Down Expand Up @@ -53,6 +30,27 @@ vperp_bc = "zero"
# Fokker-Planck operator requires the "gausslegendre_pseudospectral
# options for the vpa and vperp grids

[composition]
n_ion_species = 1
n_neutral_species = 0
electron_physics = "boltzmann_electron_response"
T_e = 1.0
T_wall = 1.0

[ion_species_1]
initial_density = 0.5
initial_temperature = 1.0

[z_IC_ion_species_1]
initialization_option = "sinusoid"
density_amplitude = 0.001
density_phase = 0.0
upar_amplitude = 0.0
upar_phase = 0.0
temperature_amplitude = 0.0
temperature_phase = 0.0


[fokker_planck_collisions]
use_fokker_planck = true
# nuii sets the normalised input C[F,F] Fokker-Planck collision frequency
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,9 @@
# cheap input file for a 0D2V relaxation to a collisional Maxwellian distribution with self-ion collisions and collisions with fixed Maxwellian background of cold ions and electrons.
n_ion_species = 1
n_neutral_species = 0
electron_physics = "boltzmann_electron_response"
evolve_moments_density = false
evolve_moments_parallel_flow = false
evolve_moments_parallel_pressure = false
evolve_moments_conservation = false
T_e = 1.0
T_wall = 1.0
initial_density1 = 1.0
initial_temperature1 = 1.0
z_IC_option1 = "sinusoid"
z_IC_density_amplitude1 = 0.0
z_IC_density_phase1 = 0.0
z_IC_upar_amplitude1 = 0.0
z_IC_upar_phase1 = 0.0
z_IC_temperature_amplitude1 = 0.0
z_IC_temperature_phase1 = 0.0
vpa_IC_option1 = "isotropic-beam"
vpa_IC_v01 = 1.0
vpa_IC_vth01 = 0.1
#vpa_IC_option1 = "directed-beam"
#vpa_IC_vpa01 = -1.5
#vpa_IC_vperp01 = 0.0

charge_exchange_frequency = 0.0
ionization_frequency = 0.0
constant_ionization_rate = false
Expand Down Expand Up @@ -90,3 +71,31 @@ nstep = 50000
dt = 2.5e-4
nwrite = 100
nwrite_dfns = 100

[composition]
n_ion_species = 1
n_neutral_species = 0
electron_physics = "boltzmann_electron_response"
T_e = 1.0
T_wall = 1.0

[ion_species_1]
initial_density = 0.5
initial_temperature = 1.0

[z_IC_ion_species_1]
initialization_option = "sinusoid"
density_amplitude = 0.0
density_phase = 0.0
upar_amplitude = 0.0
upar_phase = 0.0
temperature_amplitude = 0.0
temperature_phase = 0.0

[vpa_IC_ion_species_1]
initialization_option = "isotropic-beam"
#initialization_option = "directed-beam"
v0 = 1.0
vth0 = 0.1
#vpa0 = -1.5
#vperp0 = 0.0

This file was deleted.

44 changes: 21 additions & 23 deletions examples/fokker-planck/fokker-planck-relaxation-slowing-down.toml
Original file line number Diff line number Diff line change
@@ -1,31 +1,8 @@
# cheap input file for a 0D2V relaxation to a collisional Maxwellian distribution with self-ion collisions.
n_ion_species = 1
n_neutral_species = 0
electron_physics = "boltzmann_electron_response"
evolve_moments_density = false
evolve_moments_parallel_flow = false
evolve_moments_parallel_pressure = false
evolve_moments_conservation = false
T_e = 1.0
T_wall = 1.0
initial_density1 = 0.5
initial_temperature1 = 1.0
initial_density2 = 0.5
initial_temperature2 = 1.0
z_IC_option1 = "sinusoid"
z_IC_density_amplitude1 = 0.001
z_IC_density_phase1 = 0.0
z_IC_upar_amplitude1 = 0.0
z_IC_upar_phase1 = 0.0
z_IC_temperature_amplitude1 = 0.0
z_IC_temperature_phase1 = 0.0
z_IC_option2 = "sinusoid"
z_IC_density_amplitude2 = 0.001
z_IC_density_phase2 = 0.0
z_IC_upar_amplitude2 = 0.0
z_IC_upar_phase2 = 0.0
z_IC_temperature_amplitude2 = 0.0
z_IC_temperature_phase2 = 0.0
charge_exchange_frequency = 0.0
ionization_frequency = 0.0
constant_ionization_rate = false
Expand All @@ -51,6 +28,27 @@ vperp_discretization = "gausslegendre_pseudospectral"
# Fokker-Planck operator requires the "gausslegendre_pseudospectral
# options for the vpa and vperp grids

[composition]
n_ion_species = 1
n_neutral_species = 0
electron_physics = "boltzmann_electron_response"
T_e = 1.0
T_wall = 1.0

[ion_species_1]
initial_density = 0.5
initial_temperature = 1.0

[z_IC_ion_species_1]
initialization_option = "sinusoid"
density_amplitude = 0.001
density_phase = 0.0
upar_amplitude = 0.0
upar_phase = 0.0
temperature_amplitude = 0.0
temperature_phase = 0.0


[fokker_planck_collisions]
# nuii sets the normalised input C[F,F] Fokker-Planck collision frequency
nuii = 1.0
Expand Down
Loading
Loading