TAGGED: -Ansys-Maxwell-electronics, area, e-field, mesh, meshed-volumes
-
-
April 25, 2024 at 3:17 pm
c-milke
SubscriberWithin an Ansys Maxwell python macro, I want to identify the Electric Field strength of a named object (be it a surface or volume object) on a per-element basis. Specifically, for a given named object, I want to obtain a list of each mesh element, in which I have the average E-field for that element and the area/volume of that element.
Â
I have determined how to decode an aedtplt file to achieve this goal, but this requires manually aggregating individual nodes to create a shape, then calculating the area/volume of that shape. Given the wide variety of shapes that the meshes can take (and the esoteric way they are defined) I would much rather just use an API call to directly obtain the area of the mesh element. I'm sure one must exist, but I have been unable to find documentation for this is the Ansys scripting guide.
Â
To reiterate, the python script API functions I need are:
- A way to select a named object and retrieve a list of mesh elements from that object (be it a volume or surface object)
- For each element, a function to retrieve the electric field strength of the element
- And also for each element, a function to retrieve the area/volume of the element
Â
-
April 29, 2024 at 6:51 pm
GLUO
Ansys EmployeeHi,
We do not provide scripting information here. But for 1 and 2, you can do it directly in Maxwell field calculator and record a script. In field calculator, Quantity>>E, Geometry>>object, Output>>Value>>Write. It exports a .fld/txt that lists the mesh node positions and E field of the object.Â
GL
-
April 30, 2024 at 3:58 pm
c-milke
SubscriberHello,
Thank you for the response. This seems helpful, but still leaves a problem: the individual points provided in the output from this command have no "area" information associated with them. I had hoped I could assume they were spaced uniformly, but some quick testing has shown that this does not seem to be true. Is there a way to output this information alongside the relative area of each data point?
I am also confused about your statement that this fld file produces a list of the mesh node positions. From my earlier decoding of the mesh aedtplt file it is clear that there are only 9121 mesh nodes, yet the fld file produced lists 26,484 points. The field calculator is clearly performing an interpolation over the mesh, rather than providing the mesh itself.
Clarity on both these points would be deeply appreciated.
Regards,
Chris
-
May 9, 2024 at 3:29 pm
GLUO
Ansys EmployeeHi,
- Is there a way to output this information alongside the relative area of each data point?
No, field calculator cannot do that. This requires post processing of the data out of Maxwell.
2. The field calculator is clearly performing an interpolation over the mesh, rather than providing the mesh itself.
For 2D Maxwell FEA is second order, there are nodes on the mid points of the edge of each triangle mesh element. It is not interpolation.
GL
Â
-
May 9, 2024 at 3:35 pm
c-milke
SubscriberHello,
I'm looking more closely at the output file and I see what you mean. For my surface mesh there are 6 nodes per mesh element. The reason I saw a mismatch in node count is because the mesh elements share nodes and the nodes are listed per mesh. Apologies for my confusion, and thank you for the clarification. It is unfortunate that there is no way to get element area within Ansys, but I can work with this. Thank you for you help!
Chris
-
- The topic ‘Ansys Maxwell Mesh Element Access’ is closed to new replies.
-
2918
-
970
-
852
-
599
-
591
© 2025 Copyright ANSYS, Inc. All rights reserved.