Skip to content

Parametric 3D CAD model of a stellarator fusion device

License

Notifications You must be signed in to change notification settings

FusionSandwich/parastell

 
 

Repository files navigation

ParaStell

Parametric 3-D CAD modeling toolset for stellarator fusion devices. This open-source Python package uses plasma equilibrium VMEC data and CadQuery to model in-vessel components of varying thickness in low-fidelity from a user-specified radial build. Furthermore, coil filament point-locus data and Coreform Cubit are used to model magnet coils of user-specified cross-section. Additional neutronics support includes the use of VMEC data and MOAB to generate tetrahedral neutron source definitions and Coreform Cubit to generate DAGMC geometries for use in Monte Carlo radiation transport software.

Dependencies

ParaStell depends on:

Install Python Dependencies

This guide will use the conda package manager to install Python dependencies. Conda provides straight-forward installation of Python packages and switching between different collections of Python packages through the use of environments.

If you have not already installed conda, you can use one of the following installers to do so:

A working conda environment with all ParaStell Python dependencies can be found in this repository's environment.yml file. To create the corresponding parastell_env conda environment on your machine, create the environment from the environment.yml file and activate the new environment:

conda env create -f environment.yml
conda activate parastell_env

Alternatively, view INSTALL.md for instructions on manually installing these Python dependencies using mamba.

Install Coreform Cubit

Download and install version 2023.11 from Coreform's Website, then add the /Coreform-Cubit-2023.11/bin/ directory to your PYTHONPATH by adding a line similar to the following to your .bashrc file:

export PYTHONPATH=$PYTHONPATH:$HOME/Coreform-Cubit-2023.11/bin/

Replace $HOME with the path to the Coreform Cubit directory on your system. Additional information about adding modules to your PYTHONPATH can be found here. While it is possible to use ParaStell with older versions of Cubit, additional steps not in this guide may be required.

If you do not have a Coreform Cubit license, you may be able to get one through Cubit Learn at no cost.

Install ParaStell

Download and extract the ParaStell repository:

git clone [email protected]:svalinn/parastell.git

or download the ZIP file from the repository home page. Once extracted, add the repository directory to your PYTHONPATH.

Executing ParaStell Scripts with YAML Input

While ParaStell can imported as a module to make use of its Python API, each ParaStell class has a corresponding command-line executable to alternatively call ParaStell functionality via command line. These executables use a YAML configuration file as a command-line argument to define input parameters.

To make use of this feature, add the ParaStell executables directory to your PATH by adding a line similar to the following to your .bashrc file:

export PATH = $PATH:$HOME/parastell/executables/

Replace $HOME with the path to the ParaStell repository directory on your system. Information about adding directories to your PATH can be found here.

Next, give each file in the executables directory file execution permission:

chmod -R u+x $HOME/parastell/executables/

Now, each executable can be run from command line with a corresponding YAML file argument. For example, for the Stellarator class:

stellarator config.yaml

See each executable's help message for more details.

About

Parametric 3D CAD model of a stellarator fusion device

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.7%
  • Dockerfile 1.3%