Skip to content

Trophime/python_magnetgmsh

Repository files navigation

title
Python Magnet Gmsh

image

image

Documentation Status

Updates

Python Magnet Geometry contains magnet geometrical models

Features

  • Load/Create CAD and Mesh with Gmsh
  • Create Gmsh mesh from Salome XAO format

INSTALL

To install in a python virtual env

python -m venv --system-site-packages magnetgmsh-env
source ./magnetgmsh-env/bin/activate
pip install -r requirements.txt

Examples

Use Gmsh API to create a msh file from a magnetgeo yaml file:

python3 -m python_magnetgmsh.cli --wd /data/geometries test.yaml [--thickslit] --mesh [--lc] --show

Use Gmsh API to create a 2D msh file for a Bitter sector:

python -m python_magnetgmsh.Bitter2D --wd data/geometries M9_Bi.yaml --mesh --lc 20 --show

Create a gmsh msh file from Salome xao file:

python3 -m python_magnetgmsh.xao2msh --wd /data/geometries test-Axi.xao --geo test.yaml mesh --group CoolingChannels
python3 -m python_magnetgmsh.xao2msh --wd /data/geometries M9_HLtest-Axi.xao --geo M9_HLtest.yaml mesh --group CoolingChannels
python3 -m python_magnetgmsh.xao2msh --wd /data/geometries Pancakes-pancake-Axi.xao --geo HTS-pancake-test.yaml [mesh []]

Caution

group/hide options is not implement in python_magnetgmsh.cli

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

About

Python helpers to create CAD and mesh using Gmsh

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published