Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug located in assign_matrix #5690

Open
2 tasks done
Beanhum opened this issue Jan 23, 2025 · 0 comments
Open
2 tasks done

Bug located in assign_matrix #5690

Beanhum opened this issue Jan 23, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@Beanhum
Copy link

Beanhum commented Jan 23, 2025

Before submitting the issue

  • I have searched among the existing issues
  • I am using a Python virtual environment

Description of the bug

I’m running the example of assign_matrix on https://aedt.docs.pyansys.com/version/stable/API/_autosummary/ansys.aedt.core.maxwell.Maxwell2d.assign_matrix.html Set matrix in a Maxwell magnetostatic analysis. And the following error occured:

  • PyAEDT ERROR: File "d:\A\test.py", line 14, in
    PyAEDT ERROR: L = m2d.assign_matrix(assignment=selection,matrix_name="Test2",turns=turns,group_sources=group_sources)
    PyAEDT ERROR: File "", line 2, in GetChildObject
    PyAEDT ERROR: (-2147352567, 'exception occurred.', (0, none, none, none, 0, -2147024382), none) on _get_args
    PyAEDT ERROR: Last Electronics Desktop Message - [error] script macro error: parameters is not a child name of maxwell 2d_v6a. (4:53:58 pm jan 23, 2025)

  • PyAEDT ERROR: File "d:\A\test.py", line 14, in
    PyAEDT ERROR: L = m2d.assign_matrix(assignment=selection,matrix_name="Test2",turns=turns,group_sources=group_sources)
    PyAEDT ERROR: File "", line 2, in GetChildObject
    PyAEDT ERROR: (-2147352567, 'exception occurred.', (0, none, none, none, 0, -2147024382), none) on _get_args
    PyAEDT ERROR: Last Electronics Desktop Message - [error] script macro error: parameters is not a child name of maxwell 2d_v6a. (4:53:58 pm jan 23, 2025)

  • PyAEDT ERROR: File "d:\A\test.py", line 14, in
    PyAEDT ERROR: L = m2d.assign_matrix(assignment=selection,matrix_name="Test2",turns=turns,group_sources=group_sources)
    PyAEDT ERROR: File "", line 2, in AssignMatrix
    PyAEDT ERROR: (-2147352567, 'exception occurred.', (0, none, none, none, 0, -2147024887), none) on create
    PyAEDT ERROR: Last Electronics Desktop Message - [error] script macro error: output data type conversion error. (4:53:58 pm jan 23, 2025)

I've tried the other examples of assign_matrix(), and the results are all the same as mentioned above. Here are some version information:
PyAEDT INFO: Python version 3.11.9 (tags/v3.11.9:de54cf5, Apr 2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)]
PyAEDT INFO: PyAEDT version 0.13.2.

AEDT 2022 R2

Steps To Reproduce

from ansys.aedt.core import Maxwell2d
m2d = Maxwell2d(solution_type="MagnetostaticXY",version="2022.1",close_on_exit=True)
coil1 = m2d.modeler.create_rectangle([0, 1.5, 0], [8, 3], is_covered=True, name="Coil_1")
coil2 = m2d.modeler.create_rectangle([8.5, 1.5, 0], [8, 3], is_covered=True, name="Coil_2")
coil3 = m2d.modeler.create_rectangle([16, 1.5, 0], [8, 3], is_covered=True, name="Coil_3")
coil4 = m2d.modeler.create_rectangle([32, 1.5, 0], [8, 3], is_covered=True, name="Coil_4")
current1 = m2d.assign_current(assignment="Coil_1",amplitude=1,swap_direction=False,name="Current1")
current2 = m2d.assign_current(assignment="Coil_2",amplitude=1,swap_direction=True,name="Current2")
current3 = m2d.assign_current(assignment="Coil_3",amplitude=1,swap_direction=True,name="Current3")
current4 = m2d.assign_current(assignment="Coil_4",amplitude=1,swap_direction=True,name="Current4")
group_sources = {"Group1_Test": ["Current1", "Current3"], "Group2_Test": ["Current2", "Current4"]}
selection = ['Current1', 'Current2', 'Current3', 'Current4']
turns = [5, 1, 2, 3]
L = m2d.assign_matrix(assignment=selection,matrix_name="Test2",turns=turns,group_sources=group_sources)

Which Operating System are you using?

Windows

Which Python version are you using?

3.11

Installed packages

aiohappyeyeballs==2.4.4
aiohttp==3.11.11
aiosignal==1.3.2
annotated-types==0.7.0
ansys-pythonnet==3.1.0rc5
ansys-tools-visualization-interface==0.6.2
anyio==4.8.0
asttokens==3.0.0
attrs==24.2.0
blosc2==3.0.0
certifi==2024.12.14
cffi==1.17.1
charset-normalizer==3.4.1
clr_loader==0.2.7.post0
colorama==0.4.6
comm==0.2.2
contourpy==1.3.1
cycler==0.12.1
debugpy==1.8.11
decorator==5.1.1
defusedxml==0.7.1
et_xmlfile==2.0.0
executing==2.1.0
fast_simplification==0.1.9
fonttools==4.55.3
fpdf2==2.8.2
frozenlist==1.5.0
geopandas==1.0.1
h11==0.14.0
httpcore==1.0.7
httpx==0.28.1
idna==3.10
imageio==2.36.1
ipykernel==6.29.5
ipython==8.31.0
jedi==0.19.2
joblib==1.4.2
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
jupyter_client==8.6.3
jupyter_core==5.7.2
kiwisolver==1.4.8
markdown-it-py==3.0.0
matplotlib==3.9.4
matplotlib-inline==0.1.7
mdurl==0.1.2
meshio==5.3.5
more-itertools==10.5.0
msgpack==1.1.0
multidict==6.1.0
ndindex==1.9.2
nest-asyncio==1.6.0
networkx==3.4.2
numexpr==2.10.2
numpy==2.2.1
openpyxl==3.1.5
osmnx==2.0.1
packaging==24.2
pandas==2.2.3
parso==0.8.4
pillow==11.1.0
platformdirs==4.3.6
plumbum==1.9.0
pooch==1.8.2
prompt_toolkit==3.0.48
propcache==0.2.1
psutil==6.1.1
pure_eval==0.2.3
py-cpuinfo==9.0.0
pyaedt==0.13.2
pycparser==2.22
pydantic==2.9.2
pydantic_core==2.23.4
pyedb==0.34.3
Pygments==2.19.1
pyogrio==0.10.0
pyparsing==3.2.1
pyproj==3.7.0
python-dateutil==2.9.0.post0
pytz==2024.2
pyvista==0.44.2
pywin32==308
PyYAML==6.0.2
pyzmq==26.2.0
referencing==0.35.1
requests==2.32.3
rich==13.9.4
rpds-py==0.22.3
rpyc==6.0.1
Rtree==1.3.0
scikit-learn==1.6.0
scikit-rf==1.5.0
scipy==1.15.0
scooby==0.10.0
shapely==2.0.6
six==1.17.0
sniffio==1.3.1
SRTM.py==0.3.7
stack-data==0.6.3
tables==3.10.2
threadpoolctl==3.5.0
toml==0.10.2
tomli_w==1.1.0
tornado==6.4.2
traitlets==5.14.3
trame==3.7.6
trame-client==3.5.1
trame-server==3.2.7
trame-vtk==2.8.14
trame-vuetify==2.8.0
typing_extensions==4.12.2
tzdata==2024.2
urllib3==2.3.0
utm==0.7.0
vtk==9.3.1
wcwidth==0.2.13
websockets==14.1
wslink==2.2.2
yarl==1.18.3

@Beanhum Beanhum added the bug Something isn't working label Jan 23, 2025
@Beanhum Beanhum changed the title Bug located in ... Bug located in assign_matrix Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant