Introduction
Welcome to the steam-pysigma repository! This repository is designed to facilitate the creation of COMSOL models for multipoles in the steam_sdk using Python. By utilizing a .jar file generated from the steam-sigma repository, steam-pysigma empowers users to build output Java files that can be seamlessly read into COMSOL through steam-pysigma.
Requirements:
To use steam-pysigma you need the following requirements:
1. Computer with Windows 10 64-bit
2. Python version 3.11.8 64-bit AMD
3. Comsol version 5.3a or 6.0
4. Java Development Kit (JDK) version 1.8.281
5. STEAM Materials Library with .dll files
- NOTE: in order for COMSOL to be allowed to open .dll libraries, the following should be appended to security.prefs (typically empty except a date):
```
security.comsol.allowapplications=on
security.comsol.allowbatch=on
security.comsol.allowexternallibraries=on
security.comsol.allowexternalmatlab=off
security.comsol.allowexternalprocess=off
security.comsol.allowmethods=on
security.external.enable=on
security.external.filepermission=full
security.external.netpermission=off
security.external.propertypermission=off
security.external.reflectpermission=off
security.external.runtimepermission=off
security.external.securitypermission=off
security.external.socketpermission=off
```
- Python requirements specified in requirements.txt
Getting Started
To get started with steam-pysigma, follow below steps. We recomend using a python virtual environment for the project.
- Clone or pip install the steam-pysigma to your local machine.
- Ensure that you have the required dependencies installed.
- Make a copy of settings.MP_WIN_02.yaml ..\steam_pysigma\tests and name it as settings.username.yaml where username is your windows login name. Edit the paths inside this text file to match your instalation paths for the three dependencies specified.
- Edit run_pysigma.py by adding your windows username to the elif statement and specifying magnet name that you want to use. Some example magnets are available in steam_pysigma\tests\input
- Run run_pysigma.py with python and check steam_pysigma\tests\output as there shoudl be a Comsol model created.
- Make a copy of a folder in steam_pysigma\tests and edit the folder and file name to match the magnet name you want to use. Edit entries in the yaml file and edit run_pysigma magnet name to use that magnet.
- Repeat step 5 with the new magnet.
- Have fun!