-
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 set Path and Geometry scoping when defining Result object with Path as the scoping method
How to set Path and Geometry scoping when defining Result object with Path as the scoping method
-
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 can i implement a new material ?
I have programmed a composite material in Python, where I calculated the stiffness and mass matrices, and I want to run it through ansys for modal analysis. I have seen it in PyMAPDL, but could not find anything helpful. Is there a way to have a subroutine to program my own Stiffness and mas matrix and implement it into…
-
How to use the <filter> XML tag in ACT Extension?
Hi! How can i implement a visibility filter using the <filter> XML tag under the <interface> node of an XML extension file (see image below)? I would like to be able to filter some default Mechanical buttons for a custom ACT solver I'm developing. I managed to find some some 'ButtonVisibility.xml' examples from other Ansys…
-
How can I filter Analysis loads/results for custom ACT Solver in Ansys Mechanical?
Hi! I'm implementing a custom ACT solver for the ACT extension I am developing in Ansys Mechanical during my Ph.D. My custom ACT solver connects to a Static Structural system (just like nCode DesignLife, see image below) and implements a custom analysis routine I developed. Up to now, I managed to implement my custom…
-
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…
-
is there a way to get solver data for point masses?
solver_data = solution.SolverData data=solver_data.GetObjectData(body) i noticed that if I try to put a point mass where "body" is written, that options is not supported. anyone know how else I can get this info for point masses?
-
PathAnalysis package for ANSYS Mechanical
Extension package in python for ANSYS Mechanical for computing and exporting stress and temperature analyses along linear paths to produce analyses necessary for licensing pressure vessels under some regulations: https://github.com/tplobo/path-analysis.git
-
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…
-
PyDPF version of CYCPHASE
Is there a PyDPF equivalent of the CYCPHASE command? I looked all through the documentation and examples, and wasn't able to find anything. Can specify a specific phase angle, which is nice. But most stress and life type evaluations happen on CYCPHASE type output.
-
[PyAEDT][PyAnsys] How to use submit_job function to work with Ansys Cloud
Hello, I am looking for some help regarding submitting jobs via PyAEDT/PyAnsys to the Ansys Cloud. There is an issue with the command Hfss.submit_job (found here). Firstly, the arguments are not well defined (for example clustername is only defined as string, not the correct inputs for this string, any one know what…
-
How can be a custom button with some UI can be added to Ansys Workbench
I want to customize the Ansys Workbench UI to add a tab and button as shown below : When I click to Custom Button it should open another custom window as shown below and I can able to provide some action to button click : How this can be done ?
-
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…
-
Python SpaceClaim API: Setting object visibility from selection
Greetings, I am trying to "check the box" for a number of parts in the structure tree. Using the recording feature of the API, I get the ViewHelper.SetObjectVisibility class/method. Trying to apply this to my existing selection yields nothing though - code below. How can I toggle the parts based on my existing selection?…
-
How to create a custom material in Ansys Workbench programmatically ? By using APIs/ACT
System Information Application : Ansys Workbench Version : 2022 R2 Problem Statement To create a material manually user can add material name in below option After entering name a blank material is created From the left side pallet, user can add material properties manually, and material object will be created with some…
-
[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…
-
Python Code object to change objects Before Solve in R2021.2
I want to run a script that updates pressure objects before Solve (as a workaround to some bug in R2021.2 related to not correctly updating the Y-Axis data when opening the WB). But it seems the Python Code object can only read properties in R2021.2, when it is called as 'Before Solve'. When trying to modify a pressure…
-
Question regarding changing user defined charts' time steps using a python result script.
Hi I have a python result file that I am trying to get some custom result files evaluated in different time steps. for some reason I cannot find a method under a user plot object that would be similar to "Retrieve this result" as opposed to "Evaluate all results. In any case the application does not perform a "Evaluate all…
-
Ansys Mechanical Scrpting (Python): How to set direction of directional shear force?
Hello, I am trying to create a beam result for a directional shear force (in y- & z-axis). But this options seems not to exist as a method (at least I can't find it in the API Reference Guide). For directional bending moments, it is easily possible: yMoment = mySolution.AddDirectionalBendingMoment()…
-
Microsoft Authentication Library support for Ansys Plugin
Need help regarding Microsoft Authentication Library support for Ansys Plugin.