Skip to content

Commit

Permalink
Merge branch 'master' into final_transfer_version
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasMontoya4 committed Jan 14, 2025
2 parents 124a715 + 973c638 commit a227169
Show file tree
Hide file tree
Showing 24 changed files with 2,106 additions and 1,272 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/longtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
matrix:
os: [ubuntu-latest, macOS-latest]
fail-fast: false
timeout-minutes: 90
timeout-minutes: 120

steps:
- uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
[r]
ngrid = 1
nelement = 1

[evolve_moments]
parallel_pressure = true
density = true
moments_conservation = true
parallel_flow = true

[reactions]
electron_ionization_frequency = 0.0
ionization_frequency = 0.5
charge_exchange_frequency = 0.75

[vz]
ngrid = 6
discretization = "gausslegendre_pseudospectral"
nelement = 31
L = 36.0
element_spacing_option = "coarse_tails"
bc = "zero"

[ion_species_1]
initial_temperature = 0.1
initial_density = 1.0

[krook_collisions]
use_krook = true

[vpa]
ngrid = 6
discretization = "gausslegendre_pseudospectral"
nelement = 31
L = 30.0
element_spacing_option = "coarse_tails"
bc = "zero"

[z]
ngrid = 5
discretization = "gausslegendre_pseudospectral"
nelement = 32
nelement_local = 4
bc = "wall"
element_spacing_option = "sqrt"

[vpa_IC_ion_species_1]
initialization_option = "gaussian"
density_amplitude = 1.0
temperature_amplitude = 0.0
density_phase = 0.0
upar_amplitude = 0.0
temperature_phase = 0.0
upar_phase = 0.0

[z_IC_neutral_species_1]
initialization_option = "gaussian"
temperature_amplitude = 0.0
density_amplitude = 0.001
density_phase = 0.0
upar_amplitude = -1.0
temperature_phase = 0.0
upar_phase = 0.0

[composition]
T_wall = 0.1
T_e = 0.2
electron_physics = "kinetic_electrons"
recycling_fraction = 0.5
n_ion_species = 1
n_neutral_species = 1

[vz_IC_neutral_species_1]
initialization_option = "gaussian"
density_amplitude = 1.0
temperature_amplitude = 0.0
density_phase = 0.0
upar_amplitude = 0.0
temperature_phase = 0.0
upar_phase = 0.0

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

[neutral_species_1]
initial_temperature = 1.0
initial_density = 1.0

[timestepping]
type = "KennedyCarpenterARK324"
implicit_electron_advance = false
implicit_electron_time_evolving=true
implicit_electron_ppar = false
implicit_ion_advance = false
implicit_vpa_advection = false
nstep = 1000000
dt = 1.0e-5
nwrite = 10000
nwrite_dfns = 10000
steady_state_residual = true
converged_residual_value = 1.0e-3

#write_after_fixed_step_count = true
#nstep = 1
#nwrite = 1
#nwrite_dfns = 1

[electron_timestepping]
nstep = 5000000
#nstep = 1
dt = 1.0e-5
maximum_dt = 2.0e-5
nwrite = 10000
nwrite_dfns = 100000
#type = "SSPRK4"
type = "Fekete4(3)"
rtol = 1.0e-3
atol = 1.0e-14
minimum_dt = 1.0e-9
decrease_dt_iteration_threshold = 50
increase_dt_iteration_threshold = 20
cap_factor_ion_dt = 10.0
initialization_residual_value = 2.5
converged_residual_value = 1.0e-2
include_wall_bc_in_preconditioner = true

#debug_io = 1

[nonlinear_solver]
nonlinear_max_iterations = 100
rtol = 1.0e-6 #1.0e-8
atol = 1.0e-14 #1.0e-16
linear_restart = 5
preconditioner_update_interval = 25
total_its_soft_limit = 30
adi_precon_iterations = 3

[ion_source_1]
active = true
z_profile = "gaussian"
z_width = 0.125
source_strength = 2.0
source_T = 2.0

[ion_numerical_dissipation]
#vpa_dissipation_coefficient = 1.0e-1
#vpa_dissipation_coefficient = 1.0e-2
#vpa_dissipation_coefficient = 1.0e-3
force_minimum_pdf_value = 0.0

[electron_numerical_dissipation]
vpa_dissipation_coefficient = 2.0
force_minimum_pdf_value = 0.0

[neutral_numerical_dissipation]
#vz_dissipation_coefficient = 1.0e-1
#vz_dissipation_coefficient = 1.0e-2
#vz_dissipation_coefficient = 1.0e-3
force_minimum_pdf_value = 0.0
6 changes: 3 additions & 3 deletions machines/generic-batch-template/compile_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ if [[ $BUILDHDF5 == "y" && -d hdf5-build ]]; then
fi

if [[ $BUILDHDF5 == "y" ]]; then
HDF5=hdf5-1.14.5
HDF5=hdf5-1.14.3
# Download and extract the source
wget -O ${HDF5}.tar.gz https://support.hdfgroup.org/releases/hdf5/v1_14/v1_14_5/downloads/hdf5-1.14.5.tar.gz
tar xjf ${HDF5}.tar.gz
wget -O ${HDF5}.tar.bz2 https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.14/hdf5-1.14.3/src/hdf5-1.14.3.tar.bz2
tar xjf ${HDF5}.tar.bz2

cd $HDF5

Expand Down
6 changes: 3 additions & 3 deletions machines/generic-pc/compile_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ else
fi

if [[ $BUILDHDF5 == "y" ]]; then
HDF5=hdf5-1.14.5
HDF5=hdf5-1.14.3
# Download and extract the source
wget -O ${HDF5}.tar.gz https://support.hdfgroup.org/releases/hdf5/v1_14/v1_14_5/downloads/hdf5-1.14.5.tar.gz
tar xzf ${HDF5}.tar.gz
wget -O ${HDF5}.tar.bz2 https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.14/hdf5-1.14.3/src/hdf5-1.14.3.tar.bz2
tar xjf ${HDF5}.tar.bz2

cd $HDF5

Expand Down
6 changes: 3 additions & 3 deletions machines/marconi/compile_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ if [ -d hdf5-build ]; then
fi

if [ $BUILDHDF5 -eq 0 ]; then
HDF5=hdf5-1.14.5
HDF5=hdf5-1.14.3
# Download and extract the source
wget -O ${HDF5}.tar.gz https://support.hdfgroup.org/releases/hdf5/v1_14/v1_14_5/downloads/hdf5-1.14.5.tar.gz
tar xjf ${HDF5}.tar.gz
wget -O ${HDF5}.tar.bz2 https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.14/hdf5-1.14.3/src/hdf5-1.14.3.tar.bz2
tar xjf ${HDF5}.tar.bz2

cd $HDF5

Expand Down
13 changes: 6 additions & 7 deletions machines/shared/add_dependencies_to_project.jl
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,7 @@ if mk_preferences["use_system_mpi"] == "y"
local_hdf5_install_dir = realpath(local_hdf5_install_dir)
# We have downloaded and compiled HDF5, so link that
hdf5_dir = local_hdf5_install_dir
hdf5_lib = joinpath(local_hdf5_install_dir, "libhdf5.so")
hdf5_lib_hl = joinpath(local_hdf5_install_dir, "libhdf5_hl.so")
hdf5_lib, hdf5_lib_hl = get_hdf5_lib_names(local_hdf5_install_dir)
elseif !prompt_for_lib_paths
hdf5_dir = mk_preferences["hdf5_dir"]
if hdf5_dir != "default"
Expand All @@ -207,9 +206,10 @@ if mk_preferences["use_system_mpi"] == "y"
global hdf5_dir, hdf5_lib, hdf5_lib_hl
hdf5_dir = get_input_with_path_completion(
"\nAn HDF5 installation compiled with your system MPI is required to use\n"
* "parallel I/O. Enter the directory where the libhdf5.so and libhdf5_hl.so are\n"
* "located (enter 'default' to use the Julia-provided HDF5, which does not\n"
* "support parallel I/O): [$default_hdf5_dir]")
* "parallel I/O. Enter the directory where the libhdf5.so and\n"
* "libhdf5_hl.so (or libhdf5.dylib and libhdf5_hl.dylib on macOS)\n"
* "are located (enter 'default' to use the Julia-provided HDF5, which\n"
* "is not compatible with using the system MPI): [$default_hdf5_dir]")

if hdf5_dir == ""
hdf5_dir = default_hdf5_dir
Expand All @@ -222,8 +222,7 @@ if mk_preferences["use_system_mpi"] == "y"
if isdir(hdf5_dir)
hdf5_dir = realpath(hdf5_dir)
end
hdf5_lib = joinpath(hdf5_dir, "libhdf5.so")
hdf5_lib_hl = joinpath(hdf5_dir, "libhdf5_hl.so")
hdf5_lib, hdf5_lib_hl = get_hdf5_lib_names(hdf5_dir)
if isfile(hdf5_lib) && isfile(hdf5_lib_hl)
break
else
Expand Down
Loading

0 comments on commit a227169

Please sign in to comment.