-
transform direction stresses to a different coordinate system node for node
for rotating the stress tensor I use the dpf.operators.geo.rotate function with an op.inputs.fields_container and an op.inputs.coordinate_system for an rotation field the problem is, the rotation is just performt for the first entry in the rotation field, not used as a field as I expected. Use case is getting stress in a…
-
DPF Install issue
I used the Ansys Python Manager to download python and relevant libraries. When I do that and then try to run dpf in with the following command from ansys.dpf import core as dpf in Jupyter notebook I get the following error. `---------------------------------------------------------------------------AttributeError…
-
How to get a safety factor result in a model with a custom yield limit for specific elements?
We want to get a safety factor result based on Von Mises stresses in a model where tensile yield strength must be based on elemental named selection.
-
Mechanical 2022R2 DPF VTK Export of Assembly & Plotting Parts.
Can we add something to the Mechanical DPF "VTK Export" operation so that it is easy to plot individual parts if wanted. For example if we were using PyVista.
-
faces nodes connectivity property error
Hello, I'm new to dpf. How do I resolve this error? "ValueError: faces_nodes_connectivity property is not supported" Thank you
-
How to create a result in DPF with deformed mesh whose scaling is different for each axis ?
Hello, As the title suggests, I want to create a result in DPF with deformed mesh whose scaling is different for each axis. When you normally create a result in ansys mechanical, you can adjust the scaling : But I want the scaling to be different for each axis, for example 1 in X, 3 in Y and 10 in Z. Does anyone know how…
-
Filter elements with deformation above a value and change their material properties
How can I find elements that have a deformation value above a specified threshold and change their material properties for a subsequent analysis?
-
How can I filter all nodes / elements above a certain result threshold using DPF / PyDPF?
How can I filter all nodes / elements above a certain result threshold using DPF / PyDPF?
-
Heat passed through contact surface with the use of PyDPF
How to calculate the heat that has passed through a contact surface with the use of PyDPF?
-
DPF Operator C++
Hey everyone, I have a question about creating a custom operator in C++. Can this created operator be called in a DPF script in IronPython? Could someone please provide me with an example of creating such an operator and how to call it? Thank you in advance!
-
DPF operators like NSEL/ESEL
Does DPF have any operators that work like the NSEL APDL commands? Specifically I want to point to a CS in Mechanical and get all nodes within a certain radius to the cyl system axis (filter by its local X). I am looking for an efficient solution to work on large meshes with potentially thousands of these CSs.
-
Example throws DPFServerException
Hi, I would like to use DPF for one of my tasks. I have installed ansys-dpf- core version 0.8.1and tried the example according to the documentation from ansys.dpf.core import Model from ansys.dpf.core import examples model = Model(examples.find_simple_bar()) print(model) But when I get to print line it raises this error:…
-
Error with DPF operator: stl_export
I am getting an error with stl export operator. Any ideas why? The mesh region is found fine with the mesh_provider op, but the stl export fails with: Could not find the specified Output Type import mech_dpf import Ans.DataProcessing as dpf my_file_path=r'C:\Users\mthompso\MyData\test.stl' dataSource =…
-
How to extract a frequency response of a node from a harmonic response analysis using DPF ?
Extracting Real,Imaginary,Amplitude and Phase
-
How to get stress tensors on edge of a shell in python results, by defining position and layer
-
How do I fetch Angular Velocity and Angular Acceleration using PyDPF from a Transient Analysis?
How do I fetch Angular Velocity and Angular Acceleration using PyDPF from a Transient Analysis??
-
How to move Element Table Data to Nodal in DPF
Element table data is per element, but often stored per node (i.e results at node I , J , K , L). How can use DPF to get this data as "Nodal" values. I suppose going the other way would work if it is easier, average the nodal values and get 1 value per element. What I am trying to do is create a plot of contact gap-volume.…
-
Get max stress values at the nodes instead of averaged
Hi, I am currently working on developing a Python script model in which an rst file will be read through dpf reader (dpf.Model(rst_file)) and get the nodal stress values. But, the problem here is that the nodal stress values should not be the averaged ones but the maximum among the element contributions. I mean let's say…
-
How to merge workflow ?
Hello, I wrote a python result code to plot with dpf the total stiffness energy of named selection with name "R_" + number ("R_1", "R_2", "R_3", etc...). The user has to select his named selection in the property provider, and the plot appears as a result. My code is : def post_started(sender, analysis):# Do not edit this…
-
Plot field Vectors on a Named Selection in PyDPF
How to plot field vectors on a named selection in PyDPF?
-
Extracting results from a Path in Transient analysis and creating a 3D Surface Plot in PyDPF
How to extract results from a path in a Transient analysis and create a spatiotemporal 3D surface plot in PyDPF?
-
How to implement Utilization factor procedure in IPython DPF (Mechanical)
Hi, I'm trying to plot utilization factor based on Von Mises stress and arbitrary yield value. My similar script works in CPython, however in Mechanical Python Rsult I'm getting 0s. Von Mises Elemental Mean is plotting correc, but next step is not yielding results def define_dpf_workflow(analysis): import mech_dpf import…
-
How do I get the centroid of my contact elements
I want to save the centroid of the contact elements in all my contacts in a CSV. How would I do that in Mechanical?
-
How do i extract h5 results using DPF?
Hello Ansys developers: I'am trying to extract some results from an h5 file to plot them using Python Result, but i couldn't found how to read the h5 file and extract my fields. is it even possible ? Thank you in advance
-
[DPF] An unexpected error occurred - rst file used by another program
Hello, I'm writing some codes in DPF in a python result inside my modal analysis, so I need to read the rst file with the dataSource accessed with the "dpf.DataSources(analysis.ResultFileName)" command. My code works well, but when I want to resolve my modal analysis, it shows this error : An unexpected error occurred :…
-
How to plot within a Python result the total stiffness energy in a named selection with ansys dpf ?
Hello everyone, As the title suggest, I want to plot within a Python result the total stiffness energy in a named selection with ansys dpf. I made something that plot the stiffness energy by element on a given named selection, and I think I have to use fields operators to plot the total stiffness energy on the named…
-
Maximum tensile and compressive stress in XY plane
I want to plot the maximum tensile stress in the xy-plane and the maximum compressive stress in the xy-plane. I am able to extract the x and y stress using the python result snippet inside Mechanical, however I'm struggling to perform the math using logic and for loops to evaluate each element: If the stress in both…
-
How to assess the maximum stress range for a fatigue assessment when there are several load cases?
This might be a trivial task if there is a manageable number of load cases. Once the load case number is increasing and/or the data is sitting in different result files the effort for doing it may get time consuming.