Skip to content

Python extensions for HiFiMagnet simulation setup

Notifications You must be signed in to change notification settings

jermuzet/python_magnetsetup

 
 

Repository files navigation

Basic usage

To get a magnet from the magnetdb:

python -m python_magnetdb.app --displaymagnet HL-34

or use option --magnet when running magnetsetup

💡 This requires that the magnetdb is up and running See magnetdb for details See settings.env for default configuration

This will create a json file holding geometrical and material data for magnet HL-34. You can use this file to create a setup for Axi Fully coupled model, using

python -m python_magnetsetup.cli \
   --wd data --datafile HL-34-data.json \
   --method cfpdes --time static --geom Axi --model thmagel [--nonlinear] --cooling mean

💡 To run simulation with Feelpp, you need to create:

  • a mesh file ( see magnetgeo)
  • a cfg file for Feelpp
  • and json model files

You can also use directly the magnetdb. To do so:

python -m python_magnetsetup.cli --magnet HL-test --method cfpdes --time static --geom Axi --model thmagel  --cooling mean
python -m python_magnetsetup.cli --magnet HL-test --method cfpdes --time static --geom Axi --model thmagel  --cooling mean --nonlinear
python -m python_magnetsetup.cli --magnet M9Bitters --method cfpdes --time static --geom Axi --model thmagel  --cooling mean
python -m python_magnetsetup.cli --msite MTest --method cfpdes --time static --geom Axi --model thmagel  --cooling mean

💡 To use the magnetdb directly, you shall update environment variables in settings.env to reflect your configuration.

URL_API = 'http://localhost:8000/api'
MATGNETSETUP_PATH = "/usr/share/magnetsetup/magnetsetup.json"
DATA_REPO = "/data"
COMPUTE_SERVER = kelvin
VISU_SERVER = kelvin

About

Python extensions for HiFiMagnet simulation setup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 54.1%
  • Mustache 42.7%
  • Dockerfile 1.3%
  • Shell 1.1%
  • Makefile 0.8%