Skip to content

Commit

Permalink
Merge pull request #234 from mabarnes/refactor-composition
Browse files Browse the repository at this point in the history
Refactor composition and species inputs
  • Loading branch information
johnomotani authored Sep 5, 2024
2 parents 8c82357 + 2c6452d commit cc3a2d9
Show file tree
Hide file tree
Showing 109 changed files with 3,746 additions and 3,576 deletions.
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

0 comments on commit cc3a2d9

Please sign in to comment.