-
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 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…
-
Getting started with DPF in Mechanical
Can you provide a quick Getting Started with DPF in Mechanical?
-
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?
-
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
-
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?
-
How to activate a toolbar button only when the current tab (view) is Engineering Data?
For example: "Test button 2" should only be active (enabled) if "Engineering Data" view is active. The button should be inactive in "Project Schematic" view.
-
How to set imported load (e.g., convection) to ramped in Mechanical using scripting?
Say we have some external data (convection data), and we want to automate the convection load set up inside mechanical. How to set imported load (e.g., convection) to ramped in Mechanical using scripting?
-
Pyfluent with slurm scheduler
Hello All, I was trying to run a script with pyfluent using the slurm scheduler. My goal is to run simulation on HPC clusters. I could execute my simulation on the local machine, but then i failed with the slurm scheduler. I tried to initiate a session based on the docs: Then i tried to retrieve the solver session, but i…
-
How to get all the parameters from Mechanical
This is a way to get all the parameterized properties and their values from mechanical. """Find all parameters in the mechancial model tree Write them to a .csv file"""#---------------------------------------------------------------------------------------#user inputs:output_path =r'C:\Users\mthompso\MyData\DeleteThis\Mech…
-
Optislang with Pyfluent on HPC cluster
Hello All, I am trying to run a simple Optislang workflow with a couple of python nodes where I use pyfluent to run the mesher and then the solver. I have problems with launching the fluent session with the slurm scheduler option. On my local machine, without the scheduler, the workflow runs fine. If anybody has experience…
-
How to get the currently selected material in Ansys Engineering Data with ACT scripting?
Is it possible with ACT to get the currently selected 'Polyethylene' material from the list of materials?
-
PyFluent unable to connect to running Fluent server
Hi, I already have a Fluent HPC server running on my cluster. I would like to connect and send commands to it using PyFluent, but when I try to do so, I get the following error: RuntimeError: failed to connect to all addresses; last error: UNIMPLEMENTED: ipv4:127.0.0.1:50000: Trying to connect an http1.x server (HTTP…
-
PyANSYS - Dynamicreporting to offline html
I tried to export a 3D representation of my results (ANSYS v252) with ansys-dynamicreporting-core (0.10.1). `import ansys.dynamicreporting.core as adr ansys_loc = r"C:\Program Files\ANSYS Inc\v252" db_dir = r"D:\Recent\ReportingTest" adr_service = adr.Service(ansys_installation=ansys_loc, db_directory=db_dir) session_guid…
-
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?
-
How can I define a named selection which contains all faces included in contacts?
The idea is to generate a named selection with conta and target areas included in all contacts.
-
How can I get the total mass of bodies contained in a Named Selection using Scripting in Mechanical?
Let's assume I have selected a set of bodies of interest and placed those in a Named Selection (e.g. "MySelection").
-
Pymechanical Solution fail, but .out file looks fine
Hello, I'm trying to use Pymechanical to run a DOE with different parameter sets, below is my function to run the model, when I solve the model, the analysis.Solution.get_Status() is not "done", and I cannot get the result. If I import the .mechdb into GUI, it shows the red flash, and an error message But When I checked…
-
How do I calculate the average axial force or Average Axial force/Length for REINF264/265?
How do I calculate sum of average axial force or Average Axial force/Length for Reinforcement elements (REINF 264/265) using SMISC1 through DPF?
-
How can I access the WB system name from Mechanical ?
I'd like to get the System ID: and the Directory Name: of all WB components, from Mechanical.