Issues using the collector.SetValues() command in ACT Mechanical Scripting
Hi, I am using ACT (xml/IPython) scripting to create plots of equivalent stress, temperature gradient, and Yield Margin (via calcs). I used dpf.operators to call all my results opposed to the reader method that a lot of these ACT examples give, because I want to find my values and perform calculations at the nodes. I believe this has led to a disconnect when going to plot because it looks like when others use the collector.SetValues(x,y) command that x is usually an array of element IDs opposed to nodal IDs. Is that correct thinking? And if so is there any way around this to replot using nodal IDs and values? Thank you for any help you all can give.
Comments
-
This is controlled by the location attribute in the XML file, which can be set to node, element, or elemnode. For example:
<result name="NodalResults" version="1" caption="MyNodalResults" unit="Stress" icon="result" location="node" type="scalar">
See the XML reference guide https://storage.ansys.com/api-a/v241/ACTReferenceHTML/Mechanical/index.html#XmlTag.A160AF84EBEF5A57DDB028F9F73A830C.html for more details:
1 -
@Landon Mitchell Kanner I still must be missing a component/idea with the plotting because I did include that in my xml. I'll provide an example of the equivalent stress plot I should expect vs. what I am getting. As well as my xml snippet and python if you would be willing to look over it and let me know if I have any glaring issues.
0 -
0
-
I believe that what's happening is that the result you obtain in vm.outputs does not follow the same order as the node ids in mesh_ids. Please see this post for reference and solution: https://discuss.ansys.com/discussion/comment/1370#Comment_1370?utm_source=community-search&utm_medium=organic-search&utm_term=rescope
0