Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
17cecea
Fix input for recent parsing update
dschwoerer May 4, 2021
448dd5d
Only iterate over valid regions
dschwoerer May 5, 2021
34699e1
add regions to parallel slices
dschwoerer May 5, 2021
753270c
Merge remote-tracking branch 'panhu/fci-bd' into fci-bd
dschwoerer May 5, 2021
257ca79
only set BOUT_TOP if it is not set
dschwoerer May 5, 2021
ad4fa21
Update printing to fmt
dschwoerer May 6, 2021
7e97d0a
Update gitignore
dschwoerer May 6, 2021
9ab5740
Communicate only once
dschwoerer May 7, 2021
020d661
Directly apply parallel boundary
dschwoerer May 7, 2021
d887fe2
apply boundaries
dschwoerer May 7, 2021
3e058c6
Fix case for options
dschwoerer Aug 19, 2021
304fa4d
Mark some sections conditionally used
dschwoerer Aug 19, 2021
7be4b92
switch to bout-config
dschwoerer Aug 19, 2021
fc3fe5d
update json
dschwoerer Aug 19, 2021
16793de
Revert "update json"
dschwoerer Aug 19, 2021
b058111
add cmake file
dschwoerer Aug 20, 2021
ffb26a6
Making simulation more stable
dschwoerer Oct 27, 2021
1233d8b
Do not rely on DC values
dschwoerer Oct 27, 2021
02c264c
cmake: Set c++ standard
dschwoerer Oct 27, 2021
16fac7b
Avoid deprecation warning
dschwoerer Oct 28, 2021
1fb3513
initialise parallel fields properly
dschwoerer Oct 28, 2021
05832b5
Don't take DC component but full field
dschwoerer Oct 28, 2021
ce83784
Some changes
dschwoerer Oct 28, 2021
fe4eef0
Don't try to delete a shared_ptr
dschwoerer Nov 17, 2021
c988f4c
fix diffusion2d for FCI
dschwoerer Nov 17, 2021
eeda252
Add new input file
dschwoerer Nov 18, 2021
746a9f2
Fix parallel slices
dschwoerer Nov 18, 2021
6438e0e
Remove debugging vars
dschwoerer Nov 18, 2021
9c1e502
minor cleanup
dschwoerer Nov 18, 2021
457a86f
More communcations removed
dschwoerer Nov 18, 2021
b38fda3
Start switching to outer loops
dschwoerer Nov 18, 2021
6203eaf
Fix typo in input file
dschwoerer Nov 18, 2021
0d00e9b
Switch to BOUT_FOR in diffusion2d
dschwoerer Nov 19, 2021
b67a286
Improvements from my STORM version
dschwoerer Nov 19, 2021
2cc4f40
less communications
dschwoerer Nov 19, 2021
5c66239
Try to write better omp code
dschwoerer Nov 19, 2021
adef384
minor optimisation
dschwoerer Dec 3, 2021
e964595
Add faster mul_all
dschwoerer Dec 3, 2021
5de9c50
Move to outer loops
dschwoerer Dec 3, 2021
04d7527
Fix DO_ALL
dschwoerer Dec 9, 2021
753e2a9
more outer loop
dschwoerer Dec 9, 2021
3dd8522
one more outer loop
dschwoerer Dec 9, 2021
ee8cc1f
simplify parallel boundary conditions
dschwoerer Feb 24, 2022
c5d2eb7
Only apply sheath BC to outer boundaries
dschwoerer Feb 25, 2022
31850fc
Change solver
dschwoerer Feb 28, 2022
6b501df
Add CI workflow
dschwoerer Mar 4, 2022
b0d1d5f
Update input files
dschwoerer Mar 4, 2022
6d01910
use custom checkout
dschwoerer Mar 4, 2022
8366927
Update to bout enum class
dschwoerer Mar 4, 2022
11676e3
Add grids via subrepository
dschwoerer Mar 4, 2022
7f7e60c
CI: run only short
dschwoerer Mar 4, 2022
d5c3bb0
fix grid to tracked grid
dschwoerer Mar 4, 2022
70ab686
Ensure field is allocated for copying
dschwoerer Mar 4, 2022
b7a3f22
Merge pull request #2 from dschwoerer/ci
dschwoerer Mar 7, 2022
8feaf46
Input cleanup
dschwoerer Mar 7, 2022
e0f3aea
more conditionally used
dschwoerer Mar 7, 2022
93abe26
Merge branch 'fci-ds' of github.com:dschwoerer/hermes-2 into changes
dschwoerer Mar 7, 2022
30d4af7
Merge pull request #3 from dschwoerer/changes
dschwoerer Mar 9, 2022
7293a28
more conditionally used
dschwoerer Mar 8, 2022
4da7526
apply fci boundaries
dschwoerer Mar 8, 2022
0253a3d
Move flux boundary conditions to separate function
dschwoerer Mar 8, 2022
0c57207
Remove ion viscosity code
dschwoerer Mar 8, 2022
746ec27
Apply more parallel boundaries
dschwoerer Mar 8, 2022
e4b9826
Remove non fci code: sheath BC
dschwoerer Mar 8, 2022
c5a90ef
Remove non-fci code
dschwoerer Mar 9, 2022
37e0459
Merge pull request #4 from dschwoerer/cleanup
dschwoerer Nov 2, 2022
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
55 changes: 55 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Test
on: [push]

jobs:
standard_tests:
name: Tests with ${{ matrix.config.name }}
timeout-minutes: 60
runs-on: ubuntu-latest
container:
image: oi4ai/bout3d:db-outer-${{ matrix.config.mode }}
strategy:
fail-fast: true
matrix:
config:
- name: debugging
mode: debug
- name: optimisations
mode: opt
steps:
- name: Job information
run: |
echo Build: ${{ matrix.config.name }}, ${{ matrix.config.os }}
echo CMake options: ${{ matrix.config.cmake_options }}
cat /etc/os-release

- name: Setup dependencies
run: |
sudo dnf install -y git-lfs

- name: Checkout hermes-2
run: |
cd /home/boutuser/
git clone ${{ github.server_url }}/${{ github.repository }} -b ${{ github.ref_name }} hermes-2
cd hermes-2
git checkout ${{ github.sha }}
git submodule update --init --recursive

- name: Build
run: |
cd /home/boutuser/hermes-2
cmake --version
cmake -S . -B build -Dbout++_DIR=/home/boutuser/BOUT-dev/build
make -C build -j 2

- name: Run
run: |
cd /home/boutuser/hermes-2
# Run only shortly
sed -e 's/nout = .*/nout = 1/' -i */BOUT.inp
sed -e 's/timestep = 100/timestep = 1/' -i */BOUT.inp
# Change solver type - beuler is quite heavy on setup, but we want
# to run only short
sed -e 's/type = beuler/type = pvode/' -i */BOUT.inp
build/hermes-2 -d 1-lowres
build/hermes-2 -d 3-medium
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
*.o
*.nc
BOUT.log.*

.BOUT.pid.*
BOUT.settings
/atomicpp.a
/doc/hermes-2-manual.aux
/doc/hermes-2-manual.log
/doc/hermes-2-manual.out
/doc/hermes-2-manual.pdf
/hermes-2
/core*
/Makefile
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "grids"]
path = grids
url = https://github.com/dschwoerer/hermes-grids.git
73 changes: 42 additions & 31 deletions 1-lowres/BOUT.inp
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@

NOUT = 100
TIMESTEP = 10
nout = 10
timestep = 100

TwistShift = false # use twist-shift condition?
twistshift = false # use twist-shift condition?
ballooning = false # ballooning transformation?
shiftinitial = false
ShiftWithoutTwist=false
ShiftWithoutTwist = false

MYG=1
MXG=2
MYG = 1
MXG = 2

grid = "rotating-ellipse-36x8x32-ix20.fci.nc"
grid = "grids/rotating-ellipse-36x8x32-ix20.fci.nc"

NXPE=1
NXPE = 1

dump_format = nc

[restart]
init_missing=true # initialize missing variables on restart?
[restart_files]
init_missing = true # initialize missing variables on restart?

[mesh]
symmetricGlobalX = true
Expand All @@ -30,19 +30,19 @@ type = fci
##################################################
# derivative methods

[ddx]
[mesh:ddx]

first = C2
second = C2
upwind = W3

[ddy]
[mesh:ddy]

first = C2
second = C2
upwind = W3

[ddz]
[mesh:ddz]

first = C2
second = C2
Expand All @@ -55,10 +55,11 @@ upwind = W3

# Note: If evolving neutrals, need preconditioning
# type = cvode
type = beuler
# use_precon = true

ATOL = 1.0e-10 # absolute tolerance
RTOL = 1.0e-5 # relative tolerance
atol = 1.0e-10 # absolute tolerance
rtol = 1.0e-5 # relative tolerance
mxstep = 1000000 # Maximum internal steps per output

cvode_max_order = 2
Expand All @@ -72,7 +73,7 @@ nonuniform = true
# Electrostatic potential solver

[phiSolver]
type = petsc # Needed if Boussinesq = false
type = petsc # Needed if Boussinesq = false
ksptype = gmres # Linear iterative method
pctype = lu # Preconditioner. Direct "lu" or "ilu"; iterative "jacobi", "sor"

Expand Down Expand Up @@ -115,7 +116,8 @@ nonuniform = true
# general settings for the model
[input]

transform_from_field_aligned=False
transform_from_field_aligned = false
error_on_unused_options = false

[Hermes]
loadmetric = false
Expand All @@ -140,7 +142,7 @@ resistivity_boundary_width = 0
# Numerical dissipation

vepsi_dissipation = false # Parallel dissipation on Ve-Vi
vort_dissipation = false
vort_dissipation = true # false # Changed 2021-10-25
numdiff = 0.01
hyperpar = -1

Expand Down Expand Up @@ -171,16 +173,18 @@ split_n0_psi = false
j_diamag = false # Diamagnetic current: Vort <-> Pe
j_par = false # Parallel current: Vort <-> Psi

evolve_te = false
evolve_te = true
evolve_ti = false

evolve_vort = false

pe_par = true # Parallel pressure gradient: Pe <-> Psi
resistivity = true # Resistivity: Psi -> Pe
thermal_flux = false
thermal_force = false
electron_ion_transfer = false
electron_viscosity = false
ion_viscosity = false # Ion parallel viscosity
ion_viscosity = false # Ion parallel viscosity
thermal_conduction = false

frecycle = 0.0 # Neutral gas recycling fraction
Expand All @@ -199,16 +203,16 @@ drift_wave = false
# Transport coefficients
classical_diffusion = false # Collisional diffusion

anomalous_D = -1 # Anomalous density diffusion [m^2/s]
anomalous_chi = -1 # Anomalous thermal diffusion [m^2/s]
anomalous_D = 0.2 # Anomalous density diffusion [m^2/s]
anomalous_chi = 0.6 # Anomalous thermal diffusion [m^2/s]
anomalous_nu = -1 # Anomalous viscosity

poloidal_flows = false

magnetic_drift = true
ion_velocity = true

ion_neutral = 0.0
ion_neutral = false
neutral_friction = false # Friction between plasma and neutrals

boussinesq = true # Use Boussinesq approximation
Expand All @@ -229,6 +233,7 @@ sheath_ydown = true
sheath_allow_supersonic = false
sheath_gamma_e = 4 # Electron sheath heat transmission
sheath_gamma_i = 2.5 # Ion sheath heat transmission
parallel_sheaths = true
neutral_gamma = 0.0

startprofiles = false
Expand All @@ -254,18 +259,21 @@ AA = 1 # Atomic mass. 1 = Hydrogen, 2 = Deuterium
type = none # Neutral model: none, diffusion2d, recycling, fullvelocity, mixed
viscosity = 1 # Dynamic viscosity
bulk = 0 # Bulk (volume) viscosity
conduction = 1
conduction = 1
neutral_gamma = 0.0

nn_floor = 1e-2 # Floor applied when calculating Vn = NVn / Nn
low_n_equilibriate = -1e-4 # If n < nn_floor, evolve Tn and Vn towards plasma values

[All]
[all]
scale = 0.0

bndry_all = neumann_o2
bndry_xin = neumann_o2
bndry_xout = neumann_o2
# Maybe not documented?
bndry_par_all = parallel_neumann


[Ne] # Electron density
scale = 1
Expand All @@ -275,9 +283,11 @@ function = 0.1 + 0.01*gauss(x,0.21)
#function = 1 + 0.1*gauss(x-0.5, 0.14)*gauss(z-pi/2.,0.14/2.) + 0.1*gauss(x-0.5, 0.14)*gauss(z-pi,0.14/2.) + 0.1*gauss(x-0.5, 0.14)*gauss(z,0.14/2.) + 0.1*gauss(x-0.5, 0.14)*gauss(z-3*pi/2.,0.14/2.)

source = 2.8e3*gauss(x, 0.21)
bndry_xin = neumann_o2
#dirichlet(0.1)

[Vort]
scale=0
scale = 0
function = sin(7*z)*sin(3*x-z)*gauss(-x,0.21)*(1+sin(y))#mixmode(y)
bndry_all = dirichlet_o2

Expand All @@ -291,20 +301,22 @@ scale = 1
function = 0.1 + 0.01*cos(z)*(sin(8*pi*x - 30*z)+sin(7*z)+0.5*sin(13*z - 2*pi*x))*gauss(-x,0.21)
#function = 1 + 1.2*(Ne:function-1)
source = Ne:source
# bndry_par_all = parallel_free

[Pi]
scale = 1
#function = 1 + 1.2*(Ne:function-1)
function = 0.1 + 0.01*cos(z)*(sin(8*pi*x - 30*z)+sin(7*z)+0.5*sin(13*z - 2*pi*x))*gauss(-x,0.21)
source = Ne:source
# bndry_xin = dirichlet(1)

[Ve]
parallel_bndry_yup=1
parallel_bndry_ydown=-1
parallel_bndry_yup = 1
parallel_bndry_ydown = -1

[Jpar]
parallel_bndry_yup=1
parallel_bndry_ydown=-1
parallel_bndry_yup = 1
parallel_bndry_ydown = -1

[phi]
# Radial boundaries determined by Laplacian inversion
Expand Down Expand Up @@ -348,4 +360,3 @@ bndry_all = neumann_o2

[NVn]
bndry_all = dirichlet_o2

Loading