Export E-field from a line-object with pyaedt
Hi everyone,
im looking for a pyaedt code that allow to export the e-field on an object (for example a line) in a txt file.
Thank you!
Answers
-
Dear Davide, thank you for your question. Which tool are you using exactly? Maxwell or HFSS?
In any case you may find some inspiration in these examples:https://aedt.docs.pyansys.com/version/stable/examples/02-HFSS/index.html
https://aedt.docs.pyansys.com/version/stable/examples/03-Maxwell/Maxwell2D_Electrostatic.html
Best Regards,
Tiziana0 -
Dear Tiziana,
thank you for your reply.
I am working on HFSS and my purpose is to export the electric field from different objects to different txt files.Best regards
Davide0 -
Hi @Davide Guarnera ,
Thanks for your request.
In order to export a field plot you could do so by using:- export_field_plot(plotname=your_plot_name, filepath=file_path, filename=your_file_name, file_format=your_file_format)
- plot_field_from_fieldplot() -> to see an example please have a look at the Nissan Leaf example on PyAEDT page: https://aedt.docs.pyansys.com/version/stable/examples/03-Maxwell/Maxwell2D_NissanLeaf.html#sphx-glr-examples-03-maxwell-maxwell2d-nissanleaf-py that exports a field plot to an image file (JPG or PNG) using Python PyVista but also exports the plot as a .case file.
Hopefully this helps!
Kind regards
0