-
What do you think of the forum? We want to hear from you!
Hello Everyone! The Ansys Developer Forum has been in operation for some time now and we want to hear what you (non-Ansys users) think of it. If you have any feedback on how things could be developed further, areas you think could be improved and how useful the site has otherwise been for you and your company please please…
-
Is your scripting up to scratch?
We want to hear from you! What's the most useful Ansys scripting tip you've found? It could be on the forum, in documentation, or anywhere else. It just has to be... * About Ansys * A developer tool tip (to do with coding or PyAnsys) * Something small, like a specific command or tool you noticed We'd love if you could…
-
Simulation is pretty *cool* but how *cool* is it really?
Back in 2024 I presented a little introduction to simulation at PyCon. Introduction to Simulation And in that presentation I asked a fundamental physics question. If a heavy cat sits on a bridge of ice. Does that bridge break? But in that situation everything was simply two dimensional (to save time). But what if it…
-
Welcome! Please Read Before Posting
Welcome to the Ansys Developer community! If you are using the developer tool packages with Ansys simulation tools then this is your community space. This community has been created to ask questions of your peers, exchange ideas, and converse about developer issues within an Ansys context. Here are some guidelines: Keep…
-
New search functionality for the Ansys dev portal
Hello to our forum and portal users! We are very excited to be on the verge of rolling out our new unified search for the Ansys Developer Portal and Forums. This search will bring together the documentation and articles from the dev portal and posts and information on the forum into a new single search. Over time we will…
-
How to create a Section Plane via PyMechanical?
I am trying to create a Section Plane in PyMechanical. The following code works when I run it in the Scripting window of standalone Mechanical. But when I run it via VS code, it keeps running for 20-30 min. It never showed any error, but I had to terminate it because it shouldn't take more than a few seconds to run it.…
-
Is it possible to expand a field to a bigger scoping?
Hi people, I am trying to expand a field with only 1 value on one node from the min_max operator. To the same scoping of FieldA. def ones_like(field): """Creates a field with values 1 scoped over the original field""" zeros = scale(field, 0.0) ones = ops.math.add_constant(zeros, 1.0) return ones.outputs.getfield()def…
-
STK 4.2: Handling of Pure Line Breaks in LTXT Attributes
Hi Guys, First of all a happy new you to all of you! :smile: I just stumpled across some weird behavior of MI, but I'm not absolutely sure whether to blame MI oder STK for it =D Let's have some long text attribut containing just a line break without anything else. It'll will look pretty inconspicuous in MI Viewer: However,…
-
PyAnsys - How to get node deformations/displacements fast?
Hello, is there a way to access node displacements with PyAnsys without querying each node individually? For large models it takes a very long time due to the loop. Does Ansys offer the option of querying the displacements of all nodes directly , e.g. as array or list? Or are there other suggestions to speed up the…
-
How to extract all nodes on a specific body face in Mechanical?
I'd like to extract the full list of nodes and its information from a specfici Face in Ansys Mechanical
-
How can I know the alignment chosen in a MAC Calculator Object?
When using NVH toolkit, I'd like to know how to extract the alignment options chosen in the object MAC Calculator
-
Convert PlotData of User Defined Result to a DPF field and plot it
In Mechanical scripting, how can I retrieve the data from a user-defined result and plot it as a Python Result ?
-
How do I create a Warning message in the Workbench message window using ACT?
I would like to create a warning message in the Workbench Messages window. How can I do that using ACT?
-
Change number of significant digits in legend in figure.
Hello everyone. Number of significant digits in legends of results can be modified like this: legend = Ansys.Mechanical.Graphics.Tools.CurrentLegendSettings() legend.Digits = 2 However, when I try to do something similar with the legend in a Figure that is a children of a result, I get the following error: Current legend…
-
error in pymapdl plotting
trying to follow the PyMAPDL example: Overview of PyMAPDL | Ansys Innovation Courses (exact course: Overview of Ansys PyMAPDL — Lesson 1) have downloaded the jupyter notebook. I see an error with regard to plotting. local python: 3.11.8 (and 3.13.9) pyansys 2025.2.5 ansys.mapdl.core 0.70.2 (and 0.71.3) jupyterlab 4.5.1…
-
How can I create probe labels on figure objects?
Let's assume you are trying to add a probe to a figure for one of your result objects: The Graphics.LabelManager.CreateProbeLabel( ) does not support figure objects as input:
-
Boussinesq
Hello friends, I need help with a project I received. I am designing air flow in a thermosyphon loop where a section of the right wall is a heat source and a section of the left wall is a sink. The rest of the walls are adiabatic. The goal of the project is to validate the Boussinesq model against an ideal gas model for…
-
How to calculate signed von mises in PyDPF?
I want to calculate signed von mises in Python Result. I see there is a long winded way.
-
How to activate CPython in Ansys Mechanical V241?
I activated Beta feature in Scritping to perform Python Result using Cpython. But it did not compile the code and not thrown any error. The Python Result snippet just showed "red bolt" in the model tree. I installed PyAnsys modules using Ansys Python Manager. Now, I see the CPython is installed in the ProgramFiles/Ansys…
-
How to perform Blend with Guide Curves in PyAnsys Geometry?
I would like to create a single solid object in PyAnsys Geometry by smoothly connecting (blending) faces that have slightly different shapes. In SpaceClaim, I typically achieve this by connecting the vertices of the faces with lines and using them as guides (guide curves) for the blend operation to create a solid object.…
-
Granta MI Python STK Unit Tests
What is the best way to create unit tests for scripts using the MI Python STK, without accessing external databases? Unit tests should be able to run without a live connection to a database required, and shouldn't rely on a database's state to pass. But if a script makes extensive use of the MI STK then it is challenging…
-
How to reset the Mechanical GUI layout using scripting?
If my scripted workflow requires having Mechanical GUI open, how can I reset the layout of the GUI window before graphics export?
-
Problem with PyAEDT installation
Hello everyone. I have a question regarding the PyAEDT installation. It seems to have installed successfully, but the PyAEDT console icon is missing. Could anyone suggest what the problem might be and how to resolve it?
-
SpaceClaim script to list component/body suppress-for-physics status
Hello, I'm trying to make a script to list all the components / bodies and their suppress-for-physics status (true or false) in a SpaceClaim model. But the suppressed body still shows suppressed = false status. Would somebody be able to point out what's wrong about my script? # Python Script, API Version = V242document =…
-
Fluent 2025 R2: solve/execute-commands/add-edit fails with “api-set-var: the object is not active” (
In Fluent 2020 R2, the following command worked correctly: solve/execute-commands/add-edit command-101 40 "iteration" "report/system/sys-stats" However, in Fluent 2025 R2, the command no longer works. Error message: solve/execute-commands/add-edit command-101 Adding command-101 40 "iteration" "report/system/sys-stats"…
-
Exporting Fatigue Tool Results (Rainflow and Damage Matrix;Sensitivity & Hysteresis) in PyMechanical
I am looking for options to export Rainflow, Damage Matrix, fatigue sensitivity and hysteresis results using PyMechanical. Currently, there is no option to export to a text file using an API in PyMechanical.
-
How to make SN fatigue material properties dependent on flow stress values in Ansys nCode DesignLife
Assuming that my fatigue material properties are calculated by some relationships with UTS (ultimate tensile strength), I would like to update UTS based on nodal stress values given by a text file and then calculate fatigue damage based on updated fatigue material properties.
-
How do I do a Fourier Transform of a Signal using DPF?
How do I do a Fourier Transform of a Signal using DPF?
-
Nonlinear adaptive meshing for Archard contact wear simulation is not working
I am following this example here: (https://ansyshelp.ansys.com/public/account/secured?returnurl=///Views/Secured/corp/v242/en/wb_wbtec/WBtecwear.html). I am trying to simulate fretting wear for a polymer pin and a metal flat using a 2D Archard wear model. I have scaled the wear coefficient to simulate wear for 10 million…
-
How can we calculate the distance between 2 nodes or vertices using scripting?
We have a named selection called here 'test_ns', that has either 2 nodes or 2 vertices. How can we then calculate the distance between 2 nodes or vertices using scripting?
-
Fluent Meshing changes working directory after geometry import
Hello everyone, I am facing an interesting issue in Fluent Meshing 2024R1 standalone for CFD purpose. I use it on Windows and Linux (HPC) os, thus I launch Fluent in batch mode and I feed it with a journal that contains TUI commands. In the batch script, I define the directory that contains the batch script AND the journal…
-
Get surface area where the electric field is above a certain value
We would like to get the surface area where the electric field is above a certain value max Electric_field_x * 0.9. How can that be done using say dpf in mechanical?
-
Issue with mapping.on_coordinates operator
I am using dpf.core to facilitate the post process of simulation for the nuclear domain. I have developed some python code to create objects like node and segment where I want to map the nodal stress. Getting the stress tensor on segments allows me to linearize the stress in a python environment which can be then used in a…
-
How to plot on a Named Selection of Nodes in PyDPF core
I want to create a plot like this: Where the mesh not associated with the results is translucent or trans parent. All I can get with DPFPlotter is this: It should not be so difficult to plot results scoped to a named selection
-
Is there a bug in dpf.operators.mapping.on_coordinates() in Ansys 2025 R1?
The documentation indicates that an input pin exists to modify the default tolerance value (5e-5). However, attempting to use this input in the script results in an error. Moreover, when inspecting the operator inputs using dir, the tolerance parameter does not appear to be available.