You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to simulate with a self-defined material I have saved as an .amat file (Only containing this single material). Working manually in Maxwell it directly shows up in the material list as
Here is a more detailed view on the material properties.
I used the automatic calculation of the core loss properties, so the original dataset is also saved in the .amat:
If I try to create a box of my self-defined material by maxwell_3d.modeler.create_box([x_ferr,l_wind+d_wc,z_ferr],[l_core,w_core_a,h_core],name="rightleg",material="Fair-Rite_67")
I get this messages:
PyAEDT ERROR: Method arguments:
PyAEDT ERROR: matname = Fair-Rite_67
PyAEDT ERROR: **************************************************************
PyAEDT WARNING: Material Fair-Rite_67 does not exists. Assigning default material
PyAEDT ERROR: **************************************************************
So I assumed I have to import the material data first. But if I do: maxwell_3d.materials.import_materials_from_file(r"C:\...\Ansoft\PersonalLib\Ferrite_Materials.amat")
I get the following bunch of PyAEDT Errors:
PyAEDT INFO: Parsing C:\...\Ansoft\PersonalLib\Ferrite_Materials.amat.
PyAEDT INFO: File C:\...\Ansoft\PersonalLib\Ferrite_Materials.amat correctly loaded. Elapsed time: 0m 0sec
PyAEDT INFO: Adding new material to the Project Library: Fair-Rite_67
PyAEDT ERROR: **************************************************************
PyAEDT ERROR: File "C:\...\miniforge3\envs\py312\Lib\runpy.py", line 198, in _run_module_as_main
PyAEDT ERROR: return _run_code(code, main_globals, None,
PyAEDT ERROR: File "C:\...\miniforge3\envs\py312\Lib\runpy.py", line 88, in _run_code
PyAEDT ERROR: exec(code, run_globals)
PyAEDT ERROR: File "C:\...\miniforge3\envs\py312\Lib\asyncio\base_events.py", line 645, in run_forever
PyAEDT ERROR: self._run_once()
PyAEDT ERROR: File "C:\...\miniforge3\envs\py312\Lib\asyncio\base_events.py", line 1999, in _run_once
PyAEDT ERROR: handle._run()
PyAEDT ERROR: File "C:\...\miniforge3\envs\py312\Lib\asyncio\events.py", line 88, in _run
PyAEDT ERROR: self._context.run(self._callback, *self._args)
PyAEDT ERROR: File "C:\...\AppData\Local\Temp\ipykernel_23356\2394046071.py", line 1, in <module>
PyAEDT ERROR: get_ipython().run_line_magic('debugfile', 'C:/.../main_simulation.py --wdir')
PyAEDT ERROR: File "C:\...\AppData\Local\miniforge3\envs\py312\Lib\bdb.py", line 627, in run
PyAEDT ERROR: exec(cmd, globals, locals)
PyAEDT ERROR: File "c:\...\main_simulation.py", line 101, in <module>
PyAEDT ERROR: maxwell_3d.materials.import_materials_from_file(r"C:\...\Ansoft\PersonalLib\Ferrite_Materials.amat")
PyAEDT ERROR: File "C:\...\miniforge3\envs\py312\Lib\bdb.py", line 100, in trace_dispatch
PyAEDT ERROR: return self.dispatch_line(frame)
PyAEDT ERROR: File "C:\...\miniforge3\envs\py312\Lib\bdb.py", line 124, in dispatch_line
PyAEDT ERROR: self.user_line(frame)
PyAEDT ERROR: File "C:\...\AppData\Local\miniforge3\envs\py312\Lib\pdb.py", line 329, in user_line
PyAEDT ERROR: self.interaction(frame, None)
PyAEDT ERROR: File "C:\...\miniforge3\envs\py312\Lib\pdb.py", line 428, in interaction
PyAEDT ERROR: self._cmdloop()
PyAEDT ERROR: File "C:\...\AppData\Local\miniforge3\envs\py312\Lib\pdb.py", line 537, in onecmd
PyAEDT ERROR: return cmd.Cmd.onecmd(self, line)
PyAEDT ERROR: File "
C:\...\AppData\Local\miniforge3\envs\py312\Lib\cmd.py", line 206, in onecmd
PyAEDT ERROR: return self.default(line)
PyAEDT ERROR: File "<stdin>", line 1, in <module>
PyAEDT ERROR: 'red' on _aedmattolibrary
PyAEDT ERROR: Last Electronics Desktop Message - [error] 'red' on _aedmattolibrary
PyAEDT ERROR: Method arguments:
PyAEDT ERROR: matname = Fair-Rite_67
PyAEDT ERROR: **************************************************************
I started to try out a few things like maxwell_3d.materials.mat_names_aedt
which gives me a list of about 5700 materials also containing Fair-Rite_67. But if I try to check if the material exists by maxwell_3d.materials.exists_material('Fair-Rite_67')
I also get Errors instead of just false:
PyAEDT ERROR: **************************************************************
PyAEDT ERROR: File "C:\...\AppData\Local\miniforge3\envs\py312\Lib\runpy.py", line 198, in _run_module_as_main
PyAEDT ERROR: return _run_code(code, main_globals, None,
PyAEDT ERROR: File "C:\...\AppData\Local\miniforge3\envs\py312\Lib\runpy.py", line 88, in _run_code
PyAEDT ERROR: exec(code, run_globals)
PyAEDT ERROR: File "C:\...\AppData\Local\miniforge3\envs\py312\Lib\asyncio\base_events.py", line 645, in run_forever
PyAEDT ERROR: self._run_once()
PyAEDT ERROR: File "C:\...\AppData\Local\miniforge3\envs\py312\Lib\asyncio\base_events.py", line 1999, in _run_once
PyAEDT ERROR: handle._run()
PyAEDT ERROR: File "C:\...\AppData\Local\miniforge3\envs\py312\Lib\asyncio\events.py", line 88, in _run
PyAEDT ERROR: self._context.run(self._callback, *self._args)
PyAEDT ERROR: File "C:\...\AppData\Local\Temp\ipykernel_23204\1304294527.py", line 1, in <module>
PyAEDT ERROR: maxwell_3d.materials.exists_material('Fair-Rite_67')
PyAEDT ERROR: 'red' on _aedmattolibrary
PyAEDT ERROR: Last Electronics Desktop Message - [error] 'red' on _aedmattolibrary
PyAEDT ERROR: Method arguments:
PyAEDT ERROR: matname = Fair-Rite_67
PyAEDT ERROR: **************************************************************
Out[5]: False
So now I'm a little at a loss as to how to deal with the problem. Thanks in Advance :)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am trying to simulate with a self-defined material I have saved as an .amat file (Only containing this single material). Working manually in Maxwell it directly shows up in the material list as

Here is a more detailed view on the material properties.

I used the automatic calculation of the core loss properties, so the original dataset is also saved in the .amat:

If I try to create a box of my self-defined material by
maxwell_3d.modeler.create_box([x_ferr,l_wind+d_wc,z_ferr],[l_core,w_core_a,h_core],name="rightleg",material="Fair-Rite_67")
I get this messages:
So I assumed I have to import the material data first. But if I do:
maxwell_3d.materials.import_materials_from_file(r"C:\...\Ansoft\PersonalLib\Ferrite_Materials.amat")
I get the following bunch of PyAEDT Errors:
I started to try out a few things like
maxwell_3d.materials.mat_names_aedt
which gives me a list of about 5700 materials also containing Fair-Rite_67. But if I try to check if the material exists by
maxwell_3d.materials.exists_material('Fair-Rite_67')
I also get Errors instead of just false:
So now I'm a little at a loss as to how to deal with the problem. Thanks in Advance :)
Best regards
Nikolai
Beta Was this translation helpful? Give feedback.
All reactions