-
-
May 14, 2025 at 1:02 pm
hari.shrestha
SubscriberHi All,
I have a modal run of a sector model in ANSYS workbench. I am trying to post process the rst file using dpf post. I am using following code to extract nodal equivalent von mises stress and total displacement. However, node ids are not matching with the results exported from workbench results.
from ansys.dpf import postimport pandas as pdÂrst_file = "file.rst"# to automatically detect the simulation type, use:simulation = post.load_simulation(rst_file)Â# to enable auto-completion, use the equivalent:simulation = post.ModalMechanicalSimulation(rst_file)Â#All FrequenciesÂFreq = simulation.time_freq_support.time_frequencies.datamode_1 = round(float(Freq[0]),2)Â#Get all node IDsmesh = simulation.meshnode_ids = mesh.node_idsÂ#Using ANSYS postac_vals_df = simulation.stress_eqv_von_mises_nodal(set_ids=1,node_ids = node_ids)ac_stress = ac_vals_df.select().arrayac_nodes = ac_vals_df.index.node_ids.valuesÂ# Create a Pandas DataFrameac_data = {'node_id': ac_nodes, 'Eqv_stress': ac_stress}ac_combined_df = pd.DataFrame(ac_data)Â# Find the row with the maximum Alternating Stressif not ac_combined_df.empty:Â Â max_ac_row = ac_combined_df.loc[ac_combined_df['Eqv_stress'].idxmax()]Â Â max_ac_node = int(max_ac_row['node_id'])Â Â max_ac_value = max_ac_row['Eqv_stress']Â Â print("Node with maximum Eqv Stress:")Â Â print(f"Â Node ID: {max_ac_node}")Â Â print(f"Â Maximum Equivalent Stress Value: {max_ac_value}")Â Â Âelse:Â Â print("No equivalent stress data found.")Â Â Â##############################################Â Â Âdisp_df = simulation.displacement(set_ids = 1, norm = True, node_ids = node_ids,external_layer=True)disp_vals = disp_df.select().arraydisp_nodes = disp_df.index.node_ids.valuesIs there a way to match the node ids using dpf post to the data exported from workbench?
Thank you.
-
May 15, 2025 at 6:01 am
Dennis Chen
SubscriberHi Hari, I am very interested in looking at this problem a little closer.  I am not exactly sure why node IDs would not match unless simulation.mesh.node_ids is not giving you what you need.
I know something like this I can do directly using python scripting and pymechanical, which basically opens the workbench session, solve the model, load result, and then postprocess based on whatever requirement you have. Â
However, I have not used dpf to do this. Are you willing to share your model with me (if it's a simple enough model) I can also try to create a dummy blade sector and try it myself but with your model it would be more direct. If you can share, my email is zchen6@gatech.edu.  If not, it's ok.  Can you describe a little bit more about what your postprocessing goals are other than finding max alternating stress?
I like this problem and I like to look at it more basically.Â
-
May 15, 2025 at 11:55 am
hari.shrestha
SubscriberHi Dennis,
Thanks for quick response. I won't be able to share rst file here. However to reiterate the issue, this node ids mis-matching happens only on a sector model. When I tried the similar approach I explained above on a full 360 model, node IDs match. The ultimate goal of this is to extract stress and displacement data for a named selection, and examine how they change over different time stamps.
Thank you.
Â
-
-
- You must be logged in to reply to this topic.
-
3134
-
1002
-
917
-
858
-
792
© 2025 Copyright ANSYS, Inc. All rights reserved.