Skip to content

Commit

Permalink
Merge branch 'master' into cross-species-collisions
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhardman committed Apr 30, 2024
2 parents cc91689 + c0880a5 commit 959cb63
Show file tree
Hide file tree
Showing 110 changed files with 5,658 additions and 4,192 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/debug_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: mpi4py/setup-mpi@v1
with:
mpi: 'openmpi'
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@latest
with:
version: '1.10'
arch: x64
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@latest
with:
version: '1.10'
arch: x64
- uses: julia-actions/cache@v1
- name: Test examples
run: |
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/longtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@latest
with:
version: '1.10'
arch: x64
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/parallel_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: mpi4py/setup-mpi@v1
with:
mpi: 'openmpi'
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@latest
with:
version: '1.10'
arch: x64
Expand Down Expand Up @@ -49,14 +49,14 @@ jobs:
- uses: mpi4py/setup-mpi@v1
with:
mpi: 'openmpi'
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@latest
with:
version: '1.10'
arch: x64
- uses: julia-actions/cache@v1
- run: |
MPILIBPATH=$(find /opt/homebrew/Cellar/open-mpi/ -name libmpi.dylib)
touch Project.toml
julia --project -O3 --check-bounds=no -e 'import Pkg; Pkg.add(["MPI", "MPIPreferences"]); using MPIPreferences; MPIPreferences.use_system_binary()'
julia --project -O3 --check-bounds=no -e 'import Pkg; Pkg.add(["MPI", "MPIPreferences"]); using MPIPreferences; MPIPreferences.use_system_binary(library_names="/opt/homebrew/Cellar/open-mpi/5.0.3/lib/libmpi.dylib")'
julia --project -O3 --check-bounds=no -e 'import Pkg; Pkg.add(["NCDatasets", "Random", "SpecialFunctions", "Test"]); Pkg.develop(path="moment_kinetics/")'
julia --project -O3 --check-bounds=no -e 'import Pkg; Pkg.precompile()'
# Need to use openmpi so that the following arguments work:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@latest
with:
version: '1.10'
arch: x64
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ makie_postproc.so
plots_postproc.so
precompile-temp
post_processing_input.toml
.DS_Store
4 changes: 2 additions & 2 deletions docs/src/external_sources_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ S_n &= A_n(r,z) \frac{1}{(\pi)^{3/2} (2 T_{\mathrm{source},n} / m_n)^{3/2}} \exp
or in 1V simulations that do not include $v_\perp$, $v_\zeta$, $v_r$ dimensions
```math
\begin{align}
S_i &= A_i(r,z) \frac{1}{sqrt{\pi} \sqrt{2 T_{\mathrm{source},i} / m_i}} \exp\left( -\frac{v_\perp^2}{T_{\mathrm{source},i}} \right) \\
S_n &= A_n(r,z) \frac{1}{sqrt{\pi} \sqrt{2 T_{\mathrm{source},n} / m_n}} \exp\left( -\frac{v_z^2}{T_{\mathrm{source},n}} \right)
S_i &= A_i(r,z) \frac{1}{\sqrt{\pi} \sqrt{2 T_{\mathrm{source},i} / m_i}} \exp\left( -\frac{v_\perp^2}{T_{\mathrm{source},i}} \right) \\
S_n &= A_n(r,z) \frac{1}{\sqrt{\pi} \sqrt{2 T_{\mathrm{source},n} / m_n}} \exp\left( -\frac{v_z^2}{T_{\mathrm{source},n}} \right)
\end{align}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/src/moment_kinetic_equations.md
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ and for neutrals where several of the ionization terms cancel
& \qquad-\frac{w_{\|,n}}{2}\frac{1}{p_{\|,n}}\left(-\frac{\partial q_{\|,n}}{\partial z}
- R_{in}\left(n_{i}p_{\|,n} - n_{n}p_{\|,i}
- n_{n}n_{i}\left(u_{n} - u_{i}\right)^{2}\right)
+ \int dv_\parallel S_{n} + u_{n}^2\int dv_\parallel v_\parallel^2 S_{n}
+ \int dv_\parallel v_\parallel^2 S_{n} + u_{n}^2\int dv_\parallel S_{n}
+ v_{\mathrm{th},n}w_{\|,n}\frac{\partial p_{\|,n}}{\partial z}\right) \\
& \qquad\left. + \frac{w_{\parallel,n}}{2}\frac{1}{n_{n}}\int dv_\parallel S_{n}
+ \frac{w_{\|,n}^{2}}{2}\frac{v_{\mathrm{th},n}}{n_{n}}\frac{\partial n_{n}}{\partial z}\right]\frac{\partial g_{n}}{\partial w_{\|,n}} \\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ vperp_discretization = "gausslegendre_pseudospectral"
#vzeta_bc = "periodic"
#vzeta_discretization = "chebyshev_pseudospectral"

#[numerical_dissipation]
#[ion_numerical_dissipation]
#vpa_dissipation_coefficient = 0.0
#vperp_dissipation_coefficient = 0.0
#z_dissipation_coefficient = 0.1
Expand Down
2 changes: 1 addition & 1 deletion examples/geometry/1D-mirror.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ vz_L = 18.0
vz_bc = "both_zero"
vz_discretization = "chebyshev_pseudospectral"

[numerical_dissipation]
[ion_numerical_dissipation]
vpa_dissipation_coefficient = 1.0e-3 #1.0e-2 #1.0e-1
vperp_dissipation_coefficient = 1.0e-3 #1.0e-2 #1.0e-1
force_minimum_pdf_value = 0.0
Expand Down
16 changes: 10 additions & 6 deletions examples/gk-ions/2D-periodic-gk.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,19 @@ vz_L = 18.0
vz_bc = "both_zero"
vz_discretization = "chebyshev_pseudospectral"

[numerical_dissipation]
vpa_dissipation_coefficient = 1.0e-3 #1.0e-2 #1.0e-1
vperp_dissipation_coefficient = 1.0e-3 #1.0e-2 #1.0e-1
#r_disspipation_coefficient = 1.0e-3
#force_minimum_pdf_value = 0.0

[geometry]
#option="1D-mirror"
DeltaB=0.0
option="constant-helical"
pitch=0.1
rhostar= 0.1

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

[neutral_numerical_dissipation]
moment_dissipation_coefficient = 0.0001
vz_dissipation_coefficient = 0.01
2 changes: 1 addition & 1 deletion examples/numerical-dissipation/num-diss-relaxation.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ nwrite = 2000
nwrite_dfns = 2000
split_operators = false

[numerical_dissipation]
[ion_numerical_dissipation]
vpa_dissipation_coefficient = 0.1
vperp_dissipation_coefficient = 0.1
z_dissipation_coefficient = -1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,14 @@ z_width = 0.125
source_strength = 2.0
source_T = 2.0

[numerical_dissipation]
[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

[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
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,14 @@ z_width = 0.125
source_strength = 2.0
source_T = 2.0

[numerical_dissipation]
[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

[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
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,14 @@ z_width = 0.125
source_strength = 2.0
source_T = 2.0

[numerical_dissipation]
[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

[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
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,14 @@ z_width = 0.125
source_strength = 2.0
source_T = 2.0

[numerical_dissipation]
[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

[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
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ source_strength = 2.0
source_T = 2.0

[numerical_dissipation]
#vpa_dissipation_coefficient = 1.0e-1
#vpa_dissipation_coefficient = 1.0e-2
#vpa_dissipation_coefficient = 1.0e-3
#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: 5 additions & 1 deletion examples/wall-bc/wall-bc_cheb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ dt = 1.0e-5
nwrite = 1000
split_operators = false

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

[neutral_numerical_dissipation]
#vz_dissipation_coefficient = 1.0e-3 #1.0e-2 #1.0e-1
force_minimum_pdf_value = 0.0
6 changes: 5 additions & 1 deletion examples/wall-bc/wall-bc_cheb_split1.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ dt = 1.0e-5
nwrite = 1000
split_operators = false

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

[neutral_numerical_dissipation]
#vz_dissipation_coefficient = 1.0e-3 #1.0e-2 #1.0e-1
force_minimum_pdf_value = 0.0
6 changes: 5 additions & 1 deletion examples/wall-bc/wall-bc_cheb_split2.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ dt = 1.0e-5
nwrite = 1000
split_operators = false

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

[neutral_numerical_dissipation]
#vz_dissipation_coefficient = 1.0e-3 #1.0e-2 #1.0e-1
force_minimum_pdf_value = 0.0
6 changes: 5 additions & 1 deletion examples/wall-bc/wall-bc_cheb_split3.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ dt = 1.0e-5
nwrite = 1000
split_operators = false

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

[neutral_numerical_dissipation]
#vz_dissipation_coefficient = 1.0e-3 #1.0e-2 #1.0e-1
force_minimum_pdf_value = 0.0
2 changes: 1 addition & 1 deletion examples/wall-bc/wall-bc_no-neutrals.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ z_width = 0.125
source_strength = 8.0
source_T = 1.0

[numerical_dissipation]
[ion_numerical_dissipation]
#vpa_dissipation_coefficient = 1.0e-1
#vpa_dissipation_coefficient = 1.0e-2
#vpa_dissipation_coefficient = 1.0e-3
Expand Down
2 changes: 1 addition & 1 deletion examples/wall-bc/wall-bc_no-neutrals_split1.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ z_width = 0.125
source_strength = 8.0
source_T = 1.0

[numerical_dissipation]
[ion_numerical_dissipation]
#vpa_dissipation_coefficient = 1.0e-1
#vpa_dissipation_coefficient = 1.0e-2
#vpa_dissipation_coefficient = 1.0e-3
Expand Down
2 changes: 1 addition & 1 deletion examples/wall-bc/wall-bc_no-neutrals_split2.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ z_width = 0.125
source_strength = 8.0
source_T = 1.0

[numerical_dissipation]
[ion_numerical_dissipation]
#vpa_dissipation_coefficient = 1.0e-1
#vpa_dissipation_coefficient = 1.0e-2
#vpa_dissipation_coefficient = 1.0e-3
Expand Down
2 changes: 1 addition & 1 deletion examples/wall-bc/wall-bc_no-neutrals_split3.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ z_width = 0.125
source_strength = 8.0
source_T = 1.0

[numerical_dissipation]
[ion_numerical_dissipation]
#vpa_dissipation_coefficient = 1.0e-1
#vpa_dissipation_coefficient = 1.0e-2
#vpa_dissipation_coefficient = 1.0e-3
Expand Down
8 changes: 7 additions & 1 deletion examples/wall-bc/wall-bc_volumerecycle.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,18 @@ active = true
source_type = "recycling"
recycling_controller_fraction = 0.25

[numerical_dissipation]
[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

[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

[krook_collisions]
use_krook = true
frequency_option = "reference_parameters"
8 changes: 7 additions & 1 deletion examples/wall-bc/wall-bc_volumerecycle_split1.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,18 @@ active = true
source_type = "recycling"
recycling_controller_fraction = 0.25

[numerical_dissipation]
[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

[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

[krook_collisions]
use_krook = true
frequency_option = "reference_parameters"
8 changes: 7 additions & 1 deletion examples/wall-bc/wall-bc_volumerecycle_split2.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,18 @@ active = true
source_type = "recycling"
recycling_controller_fraction = 0.25

[numerical_dissipation]
[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

[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

[krook_collisions]
use_krook = true
frequency_option = "reference_parameters"
8 changes: 7 additions & 1 deletion examples/wall-bc/wall-bc_volumerecycle_split3.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,18 @@ active = true
source_type = "recycling"
recycling_controller_fraction = 0.25

[numerical_dissipation]
[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

[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

[krook_collisions]
use_krook = true
frequency_option = "reference_parameters"
Loading

0 comments on commit 959cb63

Please sign in to comment.