-
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 calculate signed von mises in PyDPF?
I want to calculate signed von mises in Python Result. I see there is a long winded way.
-
Activate/deactivate boundary conditions through scripting
Using ACT, how can I define a displacement boundary condition through tabular data values and activate/deactivate this boundary condition for one step?
-
PyAnsys Example - modal analysis of a cylinder in stiff ground
This example was built during the PyANSYS 2025 at Lyon with the help of R.LIBERT (JE) and F.GOMEZ (JE). In this example we build an circular cylinder fixed on stiff ground, mesh, perform a modal analysis and display results using PyAnsys and ansys products in headless mode. The project is built with: * main.py => python…
-
Get Node Ids for a face index on a particular element ID
Get Node Ids for a face index on a particular element ID
-
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.…
-
Ansys DPF - Mapping to Coordinates
I am writing a script using DPF to map results to coordinates along a path. For a given path, I am discritizing it by 49 points. I then use these coordinates with FieldsFactory.Create3DVectorField to create the field. Then, using this field, I pass it to dpf.operators.mapping.on_coordinates() (see picture below,…
-
How to assign a property provider to a Pyhton Result?
Hello kind people, I'm trying to create a python file that creates a Python Result in the Mechanical Tree, when executed from the "Run Macro..." in the automation tab. But when I run my file, I get a Python Result that has the right script behind it, But it shows the standard property provider. However I do have the option…
-
Start configuration unit system
Hi I'm using Ansys Mechanical 2023 R2 on Windows 11, and I’d like it to automatically start with the unit system (mm, t, N) instead of the default (m, kg, N). Now I have to manually switch to millimeters and i want to skip that. Is there a way to make Ansys always start in mm by default? Thanks in advance for the help
-
Getting started with DPF in Mechanical
Can you provide a quick Getting Started with DPF in Mechanical?
-
PyMAPDL exits intermittently when run in a loop
Hi, I'm currently running a PyMAPDL script in a for loop. During each iteration, the script makes slight modifications to the mesh and performs a pre-stressed modal analysis. However, I'm encountering an intermittent issue where PyMAPDL exits with the following error message after few iterations: CRITICAL - pymapdl_global…
-
load_table command
In the official documentation website of pyansys the following minimum working example is published: my_conv = np.array([[0, 0.001], [120, 0.001], [130, 0.005], [700, 0.005], [710, 0.002], [1000, 0.002]]) mapdl.load_array('MY_ARRAY', my_conv) mapdl.parameters['MY_ARRAY'] It works fine BUT if you insert a negative value in…
-
How to set the S=intfor command line option in the run_dyna function
Hi there I am running simulations from Python scripts and need to output the intfor file of the simulation to the results directory. When I run the input.k file from LS-Run, manually, I get the warning that I must add the S=intfor option to the command line expression. When I do so, the intfor file is created along with…
-
How to create a new Contact and scope it to user-provided Named Selections?
Assume I have two Named Selections that I want to use as scoping for a new Contact (one would be contact side, and the other the target side). How do I approach this using scripting?
-
How to merge Named Selections with the same name prefix?
Assume I have some Named Selections with the same name prefix, for example 'CONT_1', 'CONT_2', etc. How can I merge them into a new Named Selection using Mechanical Scripting?
-
How to add beams for faces in named selections ?
If i have 2 named selections created through scripting, i need to create a beam between one face of first named selection and one face of the second named selection when the faces are below/above each other representing a bolted connection.
-
Help using the fields calculator in Maxwell 2D design
Hello all, I'm interested in creating named expressions in PyAEDT and then evaluating them within the fields calculator. I'm running Maxwell 2D simulations, and as a starting point into learning these capabilities of PyAEDT, I'm trying to do something straightforward, which is the find the max B field in a non-model sheet…
-
How to export node coordinate locations from a Named Selection
This is how you can export a list of node locations to a .csv file from a named selection.
-
How to change the default mechanical window title to include the project name?
Currently, the default Mechanical window title does not include the project name. In my opinion, it would be much more useful if it did, especially when managing multiple Mechanical windows in the Windows taskbar, or when working with similar models that have identical default window titles. The goal is to add the project…
-
Error in example for PyMechanical
I am trying to run the example https://embedding.examples.mechanical.docs.pyansys.com/examples/02_technology_showcase/contact_wear_simulation.html#sphx-glr-examples-02-technology-showcase-contact-wear-simulation-py in Visual Studio Code but am getting errors as shown below: In my opinion they are all related to the imports…
-
STK 4.2: Associated records returned from `bulk_fetch_associated_records` have the wrong `.table`
I am working on a script that bulk fetches associated records, and later on I attempt to use the table property from one of those associated records for something else, but I've realized that the table property is incorrect. It is the table that I called bulk_fetch_associated_records on, not the target_table that was…
-
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 to find out the bodies the contact and target faces belong to from a contact ?
If i have a contact defined by some faces - now from contact and target faces, how to identify the bodies they belong to ?
-
Working with Linearizations defined by scripts
Hey everyone, I'm working on a project which requires quite a few linearizations. I'm working to automate my workflow within 2024R2 Mechanical, but keep wanting all sorts of improvements that would be useful, but not necessarily easy to incorporate. I've looked around a bit, and found some similar discussions and adjacent…
-
Read Imported Load h5 created by DPF
DPF creates an h5 file when I add an Imported Temperature condition in Mechanical. How do I read the data out of that file?
-
How do I read custom results from an h5dpf file?
How do I read custom results from an h5dpf file? If I have an h5dpf file where there are custom results added (not from the RST file), see an example here
-
Ansys Workbench stuck when updating DesignPoints via GUI
Hello everyone, I'm writing a clr GUI in Ironpython to fill and update DesignPoints but when calling the UpdateAllDesignPoints() command, Ansys Workbench get's stuck at some point. No error message or crash. I also tried passing the DesignPoints by name to the function but it didn't make a difference. Can someone help me…
-
How do I add custom results to an h5dpf file?
How do I add custom results to an h5dpf file?
-
Please remove PyFluent cheat sheet from this site
https://developer.ansys.com/blog/pyfluent-cheat-sheet. It is inevitably out of date as it is not actively maintained. An up to date cheat sheet exists at https://fluent.docs.pyansys.com/version/stable/_static/cheat_sheet.pdf.
-
How can we automatically replace all solid bodies with free standing point masses using scripting?
Say we have some 3D solid parts and we want to automatically replace them all with free standing point masses using scripting?
-
PyAnsys - How can I figure out which AWB version was used to solve a .wbpj file?
A folder contains different .wbpj files with results. They were solved using different Ansys versions. How can I find out, by opening a file with PyAnsys, what AWB version was used to solve the file?