Skip to content

One-dimensional plasma-neutral simulation for SOL and divertor studies

License

Notifications You must be signed in to change notification settings

boutproject/SD1D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Warning

SD1D is no longer actively maintained. Contributions are welcome, but users are strongly advised to migrate to using Hermes-3 instead.

SD1D

SOL and Divertor in 1D. Simulates a plasma fluid in one dimension (along the magnetic field), interacting with a neutral gas fluid.

  • Evolves the density, momentum and pressure (internal energy) of both plasma and neutrals.
  • Includes exchange of particles, momentum and energy through ionisation, recombination and charge exchange
  • Several different numerical methods are implemented, both upwind and central differencing

Released under the GPL license

Installing with CMake

This is probably the most straightforward method to use now. First configure BOUT++ and SD1D. To use the default options and minimal dependencies just run:

$ cmake . -B build

Alternatively the CMake build can be customised: See the BOUT++ documentation for examples of using cmake arguments, or edit the compile options interactively before building:

$ ccmake . -B build

It is highly recommended to enable SUNDIALS, by setting USE_SUNDIALS to ON.

During configuration BOUT++ will be automatically downloaded as a submodule, together with some dependencies (NetCDF and FFTW are assumed to be installed already, along with optional dependencies like SUNDIALS and PETSc if they are requested). Once configured, run build to compile BOUT++ and then SD1D:

$ cmake --build build

Installing with Autotools

To compile with the Makefile system, first install BOUT++. This version of SD1D works with BOUT++ v5, the next branch at time of writing (August 2022):

git clone -b next https://github.com/boutproject/BOUT-dev.git
cd BOUT-dev

To run this model, preconditioning is strongly recommended, and requires the CVODE solver, part of SUNDIALS. Tested with version 2.6.0. To enable CVODE, BOUT++ should be configured using

./configure --with-cvode

or

./configure --with-sundials

(which then also enables the IDA solver). Compile BOUT++ with

make

Once BOUT++ is configured and compiled, checkout a copy of SD1D

git clone https://github.com/boutproject/SD1D.git

then compile SD1D, specifying the path to BOUT-dev

cd SD1D
make BOUT_TOP=/path/to/BOUT-dev/

Running examples

Once compiled, with either CMake or Autotools, launch an MPI job to run the examples

mpirun -np 4 ./sd1d -d case-01

where "-d case-01" specifies the directory to use for inputs and outputs.

About

One-dimensional plasma-neutral simulation for SOL and divertor studies

Resources

License

Stars

Watchers

Forks

Packages

No packages published