ifemm 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ifemm-0.2.0/.github/workflows/publish.yml +33 -0
- ifemm-0.2.0/.gitignore +11 -0
- ifemm-0.2.0/.pylintrc +18 -0
- ifemm-0.2.0/LICENSE +21 -0
- ifemm-0.2.0/PKG-INFO +120 -0
- ifemm-0.2.0/README.md +79 -0
- ifemm-0.2.0/cSpell.json +73 -0
- ifemm-0.2.0/docs/CHANGELOG.md +44 -0
- ifemm-0.2.0/docs/CONTRIBUTORS.md +22 -0
- ifemm-0.2.0/docs/attributes.pdf +0 -0
- ifemm-0.2.0/docs/raws/attributes.tex +170 -0
- ifemm-0.2.0/docs/readme.md +35 -0
- ifemm-0.2.0/docs/references/FEMM_format.pdf +0 -0
- ifemm-0.2.0/examples/dipole.ans +13447 -0
- ifemm-0.2.0/examples/dipole.py +33 -0
- ifemm-0.2.0/media/planar_llc_b_field.png +0 -0
- ifemm-0.2.0/pyproject.toml +40 -0
- ifemm-0.2.0/src/ifemm/__init__.py +10 -0
- ifemm-0.2.0/src/ifemm/constants.py +62 -0
- ifemm-0.2.0/src/ifemm/core/__init__.py +2 -0
- ifemm-0.2.0/src/ifemm/core/deserialization.py +92 -0
- ifemm-0.2.0/src/ifemm/core/states.py +19 -0
- ifemm-0.2.0/src/ifemm/core/syntax.py +181 -0
- ifemm-0.2.0/src/ifemm/interpreter/__init__.py +2 -0
- ifemm-0.2.0/src/ifemm/interpreter/attributes.py +33 -0
- ifemm-0.2.0/src/ifemm/interpreter/magnetic/__init__.py +2 -0
- ifemm-0.2.0/src/ifemm/interpreter/magnetic/definitions.py +127 -0
- ifemm-0.2.0/src/ifemm/interpreter/magnetic/schema.py +180 -0
- ifemm-0.2.0/src/ifemm/parser.py +126 -0
- ifemm-0.2.0/src/ifemm/utilities/__init__.py +2 -0
- ifemm-0.2.0/src/ifemm/utilities/errors.py +62 -0
- ifemm-0.2.0/src/tests/readme.md +3 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: publish FEMMInterpreter
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*.*.*'
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
deploy:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
permissions:
|
|
13
|
+
id-token: write
|
|
14
|
+
|
|
15
|
+
environment:
|
|
16
|
+
name: pypi
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.x"
|
|
25
|
+
|
|
26
|
+
- name: Install build tools
|
|
27
|
+
run: python -m pip install --upgrade pip build
|
|
28
|
+
|
|
29
|
+
- name: Build package
|
|
30
|
+
run: python -m build
|
|
31
|
+
|
|
32
|
+
- name: Publish package to PyPI
|
|
33
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
ifemm-0.2.0/.gitignore
ADDED
ifemm-0.2.0/.pylintrc
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# .pylintrc
|
|
2
|
+
|
|
3
|
+
[MESSAGES CONTROL]
|
|
4
|
+
disable =
|
|
5
|
+
R0903, # Too few public methods
|
|
6
|
+
R0911, # Too many return statements
|
|
7
|
+
C0321, # Multiple Statements (More than one statement on a single line)
|
|
8
|
+
R0902, # Too many instance attributes
|
|
9
|
+
E1101, # Instance has no member
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
[MASTER]
|
|
13
|
+
ignore-paths=
|
|
14
|
+
^.*\.pyi$,
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
[FORMAT]
|
|
18
|
+
max-line-length=100 # Maximum number of characters on a single line.
|
ifemm-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 William Bowley
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
ifemm-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: ifemm
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: A python library for interpreting FEMM solution files
|
|
5
|
+
Project-URL: Homepage, https://github.com/wgbowley/ifemm
|
|
6
|
+
Project-URL: Bug Tracker, https://github.com/wgbowley/ifemm/issues
|
|
7
|
+
Author-email: William Bowley <wgrantbowley@gmail.com>
|
|
8
|
+
Maintainer-email: William Bowley <wgrantbowley@gmail.com>
|
|
9
|
+
License: MIT License
|
|
10
|
+
|
|
11
|
+
Copyright (c) 2026 William Bowley
|
|
12
|
+
|
|
13
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
14
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
15
|
+
in the Software without restriction, including without limitation the rights
|
|
16
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
17
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
18
|
+
furnished to do so, subject to the following conditions:
|
|
19
|
+
|
|
20
|
+
The above copyright notice and this permission notice shall be included in all
|
|
21
|
+
copies or substantial portions of the Software.
|
|
22
|
+
|
|
23
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
24
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
25
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
26
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
27
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
28
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
29
|
+
SOFTWARE.
|
|
30
|
+
License-File: LICENSE
|
|
31
|
+
Keywords: FEM,FEMM,Parsing,format
|
|
32
|
+
Classifier: Intended Audience :: Developers
|
|
33
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
34
|
+
Classifier: Operating System :: OS Independent
|
|
35
|
+
Classifier: Programming Language :: Python :: 3
|
|
36
|
+
Classifier: Topic :: Scientific/Engineering
|
|
37
|
+
Requires-Python: >=3.10
|
|
38
|
+
Requires-Dist: numpy>=1.24.0
|
|
39
|
+
Requires-Dist: scipy>=1.10.0
|
|
40
|
+
Description-Content-Type: text/markdown
|
|
41
|
+
|
|
42
|
+
<!--
|
|
43
|
+
Color Palette:
|
|
44
|
+
#FFFFFF - pure white
|
|
45
|
+
#00FFFF - pure, highly saturated shade of Cyan
|
|
46
|
+
|
|
47
|
+
It's a simple piece of kit, but being able to integrate
|
|
48
|
+
FEMM solutions directly into the pipeline is extremely
|
|
49
|
+
useful.
|
|
50
|
+
|
|
51
|
+
- William Bowley, 2026-08-17
|
|
52
|
+
|
|
53
|
+
P.S: Thanks for downloading the ifemm repository `▽`ʃ♡
|
|
54
|
+
-->
|
|
55
|
+
|
|
56
|
+
### Overview
|
|
57
|
+
|
|
58
|
+

|
|
59
|
+

|
|
60
|
+

|
|
61
|
+
[](https://pepy.tech/projects/femminterpreter)
|
|
62
|
+
|
|
63
|
+
A Python library for interpreting Finite Element Method Magnetic (FEMM) files and exposing FEMM solution data
|
|
64
|
+
through a Python attribute-based interface. `ifemm` exposes the `A-field` as `A(x,y)`, independent of planar or axisymmetric coordinate systems.
|
|
65
|
+
|
|
66
|
+
#### Proposed Integration
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
FEMM Setup & Solve → FEMM (.ans) → ifemm → Reduced Order Models / Analytical Models
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
### Example
|
|
75
|
+
|
|
76
|
+
An example of a dipole being plotted can be found in [/examples](examples/) with `.ans` and `.py` files.
|
|
77
|
+
|
|
78
|
+
<div align="center">
|
|
79
|
+
<img
|
|
80
|
+
src="https://raw.githubusercontent.com/wgbowley/FEMMInterpreter/refs/heads/main/media/planar_llc_b_field.png"
|
|
81
|
+
alt="B-field of transformer"
|
|
82
|
+
style="max-width: 600px"
|
|
83
|
+
>
|
|
84
|
+
<p>
|
|
85
|
+
<em> B-field of a planar LLC transformer from FEMM (.ans) </em>
|
|
86
|
+
</p>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
### Quick Start
|
|
92
|
+
|
|
93
|
+
```py
|
|
94
|
+
from ifemm import Parser
|
|
95
|
+
|
|
96
|
+
# Imports the parser and parses the .ans file
|
|
97
|
+
PATH = "examples/magnetostatic.ans"
|
|
98
|
+
data = Parser.open(PATH)
|
|
99
|
+
|
|
100
|
+
# Result as a float with implicit unit of wb/length_unit
|
|
101
|
+
a_potential = data.point_potential(0, 0)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
### Installation
|
|
107
|
+
|
|
108
|
+
To install,
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
pip install ifemm
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
### Documentation
|
|
117
|
+
|
|
118
|
+
Full documentation is available in the [`docs/`](https://github.com/wgbowley/ifemm/tree/main/docs) folder, including API reference, changelog, and contributors.
|
|
119
|
+
|
|
120
|
+
---
|
ifemm-0.2.0/README.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Color Palette:
|
|
3
|
+
#FFFFFF - pure white
|
|
4
|
+
#00FFFF - pure, highly saturated shade of Cyan
|
|
5
|
+
|
|
6
|
+
It's a simple piece of kit, but being able to integrate
|
|
7
|
+
FEMM solutions directly into the pipeline is extremely
|
|
8
|
+
useful.
|
|
9
|
+
|
|
10
|
+
- William Bowley, 2026-08-17
|
|
11
|
+
|
|
12
|
+
P.S: Thanks for downloading the ifemm repository `▽`ʃ♡
|
|
13
|
+
-->
|
|
14
|
+
|
|
15
|
+
### Overview
|
|
16
|
+
|
|
17
|
+

|
|
18
|
+

|
|
19
|
+

|
|
20
|
+
[](https://pepy.tech/projects/femminterpreter)
|
|
21
|
+
|
|
22
|
+
A Python library for interpreting Finite Element Method Magnetic (FEMM) files and exposing FEMM solution data
|
|
23
|
+
through a Python attribute-based interface. `ifemm` exposes the `A-field` as `A(x,y)`, independent of planar or axisymmetric coordinate systems.
|
|
24
|
+
|
|
25
|
+
#### Proposed Integration
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
FEMM Setup & Solve → FEMM (.ans) → ifemm → Reduced Order Models / Analytical Models
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
### Example
|
|
34
|
+
|
|
35
|
+
An example of a dipole being plotted can be found in [/examples](examples/) with `.ans` and `.py` files.
|
|
36
|
+
|
|
37
|
+
<div align="center">
|
|
38
|
+
<img
|
|
39
|
+
src="https://raw.githubusercontent.com/wgbowley/FEMMInterpreter/refs/heads/main/media/planar_llc_b_field.png"
|
|
40
|
+
alt="B-field of transformer"
|
|
41
|
+
style="max-width: 600px"
|
|
42
|
+
>
|
|
43
|
+
<p>
|
|
44
|
+
<em> B-field of a planar LLC transformer from FEMM (.ans) </em>
|
|
45
|
+
</p>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
### Quick Start
|
|
51
|
+
|
|
52
|
+
```py
|
|
53
|
+
from ifemm import Parser
|
|
54
|
+
|
|
55
|
+
# Imports the parser and parses the .ans file
|
|
56
|
+
PATH = "examples/magnetostatic.ans"
|
|
57
|
+
data = Parser.open(PATH)
|
|
58
|
+
|
|
59
|
+
# Result as a float with implicit unit of wb/length_unit
|
|
60
|
+
a_potential = data.point_potential(0, 0)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
### Installation
|
|
66
|
+
|
|
67
|
+
To install,
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
pip install ifemm
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
### Documentation
|
|
76
|
+
|
|
77
|
+
Full documentation is available in the [`docs/`](https://github.com/wgbowley/ifemm/tree/main/docs) folder, including API reference, changelog, and contributors.
|
|
78
|
+
|
|
79
|
+
---
|
ifemm-0.2.0/cSpell.json
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.2",
|
|
3
|
+
"language": "en-US",
|
|
4
|
+
"words": [
|
|
5
|
+
"acsolver",
|
|
6
|
+
"axisymmetric",
|
|
7
|
+
"bdry",
|
|
8
|
+
"bdryname",
|
|
9
|
+
"bdryprops",
|
|
10
|
+
"bdrytype",
|
|
11
|
+
"beginbdry",
|
|
12
|
+
"beginblock",
|
|
13
|
+
"begincircuit",
|
|
14
|
+
"bhpoints",
|
|
15
|
+
"blockname",
|
|
16
|
+
"blockprops",
|
|
17
|
+
"Bowley",
|
|
18
|
+
"cbar",
|
|
19
|
+
"circuitname",
|
|
20
|
+
"circuitprops",
|
|
21
|
+
"circuittype",
|
|
22
|
+
"cmap",
|
|
23
|
+
"coercivity",
|
|
24
|
+
"colorbar",
|
|
25
|
+
"conductorprops",
|
|
26
|
+
"contourf",
|
|
27
|
+
"Descoped",
|
|
28
|
+
"endbdry",
|
|
29
|
+
"endcircuit",
|
|
30
|
+
"fdb_latexmk",
|
|
31
|
+
"FEMMInterpreter",
|
|
32
|
+
"Femm",
|
|
33
|
+
"figsize",
|
|
34
|
+
"fontsize",
|
|
35
|
+
"griddata",
|
|
36
|
+
"h_cangle",
|
|
37
|
+
"innerangle",
|
|
38
|
+
"isort",
|
|
39
|
+
"lamfill",
|
|
40
|
+
"lamtype",
|
|
41
|
+
"lengthunits",
|
|
42
|
+
"magnetostatic",
|
|
43
|
+
"magnetostatics",
|
|
44
|
+
"minangle",
|
|
45
|
+
"neighbour",
|
|
46
|
+
"nstrands",
|
|
47
|
+
"numblocklabels",
|
|
48
|
+
"numpoints",
|
|
49
|
+
"numsegments",
|
|
50
|
+
"numpy",
|
|
51
|
+
"outerangle",
|
|
52
|
+
"pointprops",
|
|
53
|
+
"PrevSoln",
|
|
54
|
+
"prevtype",
|
|
55
|
+
"problemtype",
|
|
56
|
+
"pypa",
|
|
57
|
+
"pypi",
|
|
58
|
+
"pylint",
|
|
59
|
+
"scipy",
|
|
60
|
+
"tkpoints",
|
|
61
|
+
"tokei",
|
|
62
|
+
"totalamps_im",
|
|
63
|
+
"totalamps_re",
|
|
64
|
+
"viridis",
|
|
65
|
+
"xlabel",
|
|
66
|
+
"ylabel",
|
|
67
|
+
"numarcsegments",
|
|
68
|
+
"numholes",
|
|
69
|
+
"beginpoint",
|
|
70
|
+
"ifemm",
|
|
71
|
+
"pylintrc"
|
|
72
|
+
]
|
|
73
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
### Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to ifemm will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
*(ISO-DATE is used for all updates)*
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
[0.1.1] - 2026-08-18
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
- Namespace problem with 0.1.0
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
[0.1.2] - 2026-08-30
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
- Namespace is now `ifemm`
|
|
23
|
+
- Extra constants to the constant files "numarcsegments" & "beginpoint"
|
|
24
|
+
- Updated referencing in `__init__.py` files to `ifemm` instead of `FEMMInterpreter`
|
|
25
|
+
- Improved the readme and /docs file.
|
|
26
|
+
- Returns the interpolated B field from vector potential A for graphing.
|
|
27
|
+
- Returns the point B field for calculations using finite differences.
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
- Missing constants extra when loading solutions that used arc segments
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
[0.1.2] - 2026-09-21
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
- Namespace on pypi is `ifemm` & github is `ifemm`
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
- Fixed `axisymmetric` b-field & a-field graphs.
|
|
40
|
+
|
|
41
|
+
### Removed
|
|
42
|
+
- Removed `point_b(x, y)` for now. As it needs to be reimplemented.
|
|
43
|
+
|
|
44
|
+
---
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
## Contributors
|
|
3
|
+
|
|
4
|
+
`ifemm` is developed using:
|
|
5
|
+
- `pylint` as the linter
|
|
6
|
+
- `radon` as the complexity analyzer
|
|
7
|
+
- `coverage` to check test coverage
|
|
8
|
+
- `tokei` as the code statistics analyzer
|
|
9
|
+
- `CSpell` for spell checking (Code Spell Checker, Bundled Dictionaries)
|
|
10
|
+
|
|
11
|
+
> [!note]
|
|
12
|
+
> Ensure that you add words to `ifemm` cSpell.json, not your personal dictionary.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
My personal VS Code workflow also includes:
|
|
17
|
+
- `Pylance`
|
|
18
|
+
- `Python`
|
|
19
|
+
- `Python Debugger`
|
|
20
|
+
- `Python Environments`
|
|
21
|
+
- `isort`
|
|
22
|
+
- `Python Indent`
|
|
Binary file
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
\documentclass[11pt,a4paper]{article}
|
|
2
|
+
\usepackage[margin=0.8in]{geometry}
|
|
3
|
+
\usepackage{hyperref}
|
|
4
|
+
\usepackage{enumitem}
|
|
5
|
+
\usepackage{titlesec}
|
|
6
|
+
\usepackage{tabularx}
|
|
7
|
+
\usepackage{array}
|
|
8
|
+
\usepackage{booktabs}
|
|
9
|
+
\usepackage{ragged2e}
|
|
10
|
+
|
|
11
|
+
% Better section formatting
|
|
12
|
+
\titleformat{\section}{\large\bfseries}{}{0em}{}[\titlerule]
|
|
13
|
+
|
|
14
|
+
% Fix spacing after section titles
|
|
15
|
+
\titlespacing{\section}{0pt}{12pt}{6pt}
|
|
16
|
+
|
|
17
|
+
% Fix hyperref formatting
|
|
18
|
+
\hypersetup{
|
|
19
|
+
colorlinks=true,
|
|
20
|
+
linkcolor=blue,
|
|
21
|
+
urlcolor=blue,
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
\begin{document}
|
|
25
|
+
|
|
26
|
+
% Header
|
|
27
|
+
\begin{center}
|
|
28
|
+
{\LARGE \textbf{ifemm}} \\[4pt]
|
|
29
|
+
{\large Output Class Attributes} \\[4pt]
|
|
30
|
+
{\footnotesize\textbf{Version 0.1-alpha} --- August 18, 2026}
|
|
31
|
+
\end{center}
|
|
32
|
+
|
|
33
|
+
\section*{Attributes}
|
|
34
|
+
|
|
35
|
+
\vspace{0.5cm}
|
|
36
|
+
\noindent\textbf{Top-Level}
|
|
37
|
+
|
|
38
|
+
\begin{table}[h]
|
|
39
|
+
\centering
|
|
40
|
+
\renewcommand{\arraystretch}{1.3}
|
|
41
|
+
\footnotesize
|
|
42
|
+
\begin{tabularx}{\textwidth}{>{\raggedright\arraybackslash}p{3.5cm}
|
|
43
|
+
>{\raggedright\arraybackslash}p{2.5cm}
|
|
44
|
+
>{\raggedright\arraybackslash}X}
|
|
45
|
+
\toprule
|
|
46
|
+
\textbf{Attribute} & \textbf{Type} & \textbf{Description} \\
|
|
47
|
+
\midrule
|
|
48
|
+
format\_version & float & Format version of the file. \\
|
|
49
|
+
frequency\_hz & float & Frequency for harmonic problems. \\
|
|
50
|
+
solver\_precision & float & Computing precision within FEMM\@. \\
|
|
51
|
+
min\_angle\_deg & float & Angle restriction for the triangulation. \\
|
|
52
|
+
model\_depth & float & Typical length in z-direction (for 2D planar). \\
|
|
53
|
+
length\_unit & str & Unit used for lengths (e.g., `millimeters', `inches'). \\
|
|
54
|
+
problem\_type & str & The 2D problem is either planar or axisymmetric. \\
|
|
55
|
+
coordinate\_system & str & Definition of the coordinate system. \\
|
|
56
|
+
comment\_text & str & Problem description. \\
|
|
57
|
+
vector\_x & list[float] & X-coordinates of the solution points. \\
|
|
58
|
+
vector\_y & list[float] & Y-coordinates of the solution points. \\
|
|
59
|
+
vector\_a & list[float] & Magnetic vector potential values at each point. \\
|
|
60
|
+
\bottomrule
|
|
61
|
+
\end{tabularx}
|
|
62
|
+
\end{table}
|
|
63
|
+
|
|
64
|
+
\vspace{0.5cm}
|
|
65
|
+
\noindent\textbf{Materials}
|
|
66
|
+
|
|
67
|
+
\begin{table}[h]
|
|
68
|
+
\centering
|
|
69
|
+
\renewcommand{\arraystretch}{1.3}
|
|
70
|
+
\footnotesize
|
|
71
|
+
\begin{tabularx}{\textwidth}{>{\raggedright\arraybackslash}p{3.5cm}
|
|
72
|
+
>{\raggedright\arraybackslash}p{2.5cm}
|
|
73
|
+
>{\raggedright\arraybackslash}X}
|
|
74
|
+
\toprule
|
|
75
|
+
\textbf{Attribute} & \textbf{Type} & \textbf{Description} \\
|
|
76
|
+
\midrule
|
|
77
|
+
name & str & Name of the material. \\
|
|
78
|
+
permeability & tuple[float, float] & Permeability in x and y directions. \\
|
|
79
|
+
coercive\_force & float & Coercive force in A/m. \\
|
|
80
|
+
coercive\_angle & float & Angle of coercive force in degrees. \\
|
|
81
|
+
current\_density & tuple[float, float] & Real and imaginary current density. \\
|
|
82
|
+
conductivity & float & Electrical conductivity in S/m. \\
|
|
83
|
+
lamination\_thickness & float & Lamination thickness in mm. \\
|
|
84
|
+
hysteresis\_angle & float & Hysteresis angle for AC analysis. \\
|
|
85
|
+
hysteresis\_angle\_x & float & Hysteresis angle in x-direction. \\
|
|
86
|
+
hysteresis\_angle\_y & float & Hysteresis angle in y-direction. \\
|
|
87
|
+
lamination\_type & int & Type of lamination. \\
|
|
88
|
+
lamination\_fill & float & Lamination fill factor. \\
|
|
89
|
+
num\_strands & int & Number of strands in a stranded conductor. \\
|
|
90
|
+
wire\_diameter & float & Wire diameter in mm. \\
|
|
91
|
+
bh\_curve & list[tuple] & B-H curve data points (H, B). \\
|
|
92
|
+
\bottomrule
|
|
93
|
+
\end{tabularx}
|
|
94
|
+
\end{table}
|
|
95
|
+
|
|
96
|
+
\newpage
|
|
97
|
+
|
|
98
|
+
\vspace{0.5cm}
|
|
99
|
+
\noindent\textbf{Boundaries}
|
|
100
|
+
|
|
101
|
+
\begin{table}[h]
|
|
102
|
+
\centering
|
|
103
|
+
\renewcommand{\arraystretch}{1.3}
|
|
104
|
+
\footnotesize
|
|
105
|
+
\begin{tabularx}{\textwidth}{>{\raggedright\arraybackslash}p{3.5cm}
|
|
106
|
+
>{\raggedright\arraybackslash}p{2.5cm}
|
|
107
|
+
>{\raggedright\arraybackslash}X}
|
|
108
|
+
\toprule
|
|
109
|
+
\textbf{Attribute} & \textbf{Type} & \textbf{Description} \\
|
|
110
|
+
\midrule
|
|
111
|
+
name & str & Name of the boundary condition. \\
|
|
112
|
+
boundary\_type & int & Boundary type \\
|
|
113
|
+
prescribed\_a & float & Prescribed A value. \\
|
|
114
|
+
prescribed\_a\_x & float & Prescribed A x-component. \\
|
|
115
|
+
prescribed\_a\_y & float & Prescribed A y-component. \\
|
|
116
|
+
phase\_angle & float & Phase angle in degrees for AC analysis (Phi). \\
|
|
117
|
+
mixed\_c0 & float & Mixed boundary C0 coefficient real part. \\
|
|
118
|
+
mixed\_c0\_imag & float & Mixed boundary C0 coefficient imaginary part. \\
|
|
119
|
+
mixed\_c1 & float & Mixed boundary C1 coefficient real part. \\
|
|
120
|
+
mixed\_c1\_imag & float & Mixed boundary C1 coefficient imaginary part. \\
|
|
121
|
+
mu\_ssd & float & Relative permeability for Small Skin Depth boundary (Mu). \\
|
|
122
|
+
sigma\_ssd & float & Conductivity in MS/m for Small Skin Depth boundary (Sig). \\
|
|
123
|
+
inner\_angle & float & Inner angle for periodic boundary (degrees). \\
|
|
124
|
+
outer\_angle & float & Outer angle for periodic boundary (degrees). \\
|
|
125
|
+
\bottomrule
|
|
126
|
+
\end{tabularx}
|
|
127
|
+
\end{table}
|
|
128
|
+
|
|
129
|
+
\vspace{0.5cm}
|
|
130
|
+
\noindent\textbf{Circuits}
|
|
131
|
+
|
|
132
|
+
\begin{table}[h]
|
|
133
|
+
\centering
|
|
134
|
+
\renewcommand{\arraystretch}{1.3}
|
|
135
|
+
\footnotesize
|
|
136
|
+
\begin{tabularx}{\textwidth}{>{\raggedright\arraybackslash}p{3.5cm}
|
|
137
|
+
>{\raggedright\arraybackslash}p{2.5cm}
|
|
138
|
+
>{\raggedright\arraybackslash}X}
|
|
139
|
+
\toprule
|
|
140
|
+
\textbf{Attribute} & \textbf{Type} & \textbf{Description} \\
|
|
141
|
+
\midrule
|
|
142
|
+
name & str & Name of the circuit. \\
|
|
143
|
+
total\_amps\_real & float & Total current (real component) in amps. \\
|
|
144
|
+
total\_amps\_imag & float & Total current (imaginary component) in amps. \\
|
|
145
|
+
circuit\_type & int & Type of circuit. \\
|
|
146
|
+
\bottomrule
|
|
147
|
+
\end{tabularx}
|
|
148
|
+
\end{table}
|
|
149
|
+
|
|
150
|
+
\vspace{0.5cm}
|
|
151
|
+
\noindent\textbf{Methods}
|
|
152
|
+
|
|
153
|
+
\begin{table}[h]
|
|
154
|
+
\centering
|
|
155
|
+
\renewcommand{\arraystretch}{1.3}
|
|
156
|
+
\footnotesize
|
|
157
|
+
\begin{tabularx}{\textwidth}{>{\raggedright\arraybackslash}p{3.5cm}
|
|
158
|
+
>{\raggedright\arraybackslash}p{3cm}
|
|
159
|
+
>{\raggedright\arraybackslash}X}
|
|
160
|
+
\toprule
|
|
161
|
+
\textbf{Method} & \textbf{Parameters} & \textbf{Description} \\
|
|
162
|
+
\midrule
|
|
163
|
+
point\_potential & x: float, y: float & Returns A at point (x, y). \\
|
|
164
|
+
field\_potential & resolution: int = 300 & Returns (x\_space, y\_space, a\_grid). \\
|
|
165
|
+
field\_b & resolution: int = 300 & Returns (x\_space, y\_space, bx, by). \\
|
|
166
|
+
\bottomrule
|
|
167
|
+
\end{tabularx}
|
|
168
|
+
\end{table}
|
|
169
|
+
|
|
170
|
+
\end{document}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
### Documentation
|
|
2
|
+
|
|
3
|
+
The changelog can be found here: [CHANGELOG.md](./CHANGELOG.md)
|
|
4
|
+
|
|
5
|
+
The FEMM file format specification can be found [here](references/FEMM_format.pdf),
|
|
6
|
+
and the output attribute class documentation can be found [here](attributes.pdf).
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
### Mathematical
|
|
11
|
+
*Work in progress*
|
|
12
|
+
|
|
13
|
+
> The `point_potential` method uses nearest-neighbour interpolation to
|
|
14
|
+
> calculate the vector potential at a point. <br>
|
|
15
|
+
|
|
16
|
+
> The `field_potential` method uses linear interpolation to construct the
|
|
17
|
+
> `A-field` space for graphing.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
### Internal Documentation
|
|
22
|
+
|
|
23
|
+
Internal documentation can be found within this repo's [issues](https://github.com/wgbowley/FEMMInterpreter/issues).
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
#### Tags
|
|
27
|
+
```
|
|
28
|
+
LX -> Documentation and project structure
|
|
29
|
+
L0 -> Requirements and Objectives
|
|
30
|
+
L1 -> Architecture and implementation
|
|
31
|
+
L2 -> Validation of the codebase
|
|
32
|
+
DS -> Descoped Feature, Descoped Analysis
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
Binary file
|