-
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…
-
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.
-
Where do I find SpaceClaim Python API description?
Hello, I am new in SpaceClaim scripting and would like to get a guide to classes and methods that turned out in Scripting Panel during script record. From Help: Refer to the Class Library for a detailed description of the API. A copy of the Class Library compiled help file (.chm) is included in the installation. The path…
-
Getting Path of an external Component
Hello everyone, I'm trying to create an script for a customer and I need to get every path of all external components. As you can see, this is a very simple script where I get components on tree, then I do a count to ensure the number is correct and then I try to get the path of each one: Python Script, API Version = V252…
-
How to include custom rotation angle within pymapdl legacy function plot_principal_nodal_stress( )
I would like to rotate the default view after plotting stress plot , by 30 Deg ,using the initial cpos returned value stored in cam_pos variable as shown below using ansys legacy reader rst = pymapdl_reader.read_binary(result_file) cam_pos=rst.plot_principal_nodal_stress( 0, "SEQV", window_size=[500,500], background="w",…
-
PyAnsys Installation/Configuration
Thank you greatly everyone, I am trying to use PyAnsys for my first time. For simplicity I just want to start by being able to run the simple PyAnsys Geometry example in the following website : https://geometry.docs.pyansys.com/version/stable/user_guide/index.html On terminal I had used the following two commands: Pip…
-
Directional Contact Sliding Distance Plots using Python of a DPF
Hi, is it possible to generate directional contact sliding distance contour plots using Python code or a DPF? The contact tool in Workbench Mechanical is only able to plot the magnitude of accumulated sliding. It would be useful to get a plot of the direction the sliding occurs as sometimes it is unclear in the contact…
-
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…
-
Call a variable from one script file into another in Extension Builder
Is there a way to call a variable from one script file in the Extension Builder in another script? For example, I want workdir to be available to me in other Extension Builder tabs/scripts.
-
"nodes_in_coordinate_system" not working
other operations. Initially I was retrieving the coordinates of my nodes with respecto to the general coordinate system through the command: nodes_coo=mapdl.mesh.nodes Which in fact works perfectly and provide and array of #nodes (rows) x 3 (columns correspond to x,y and z coordinates) Nevertheless I realized later that I…
-
How to split a face by a plane in PyAnsys Geometry
Hello, I'm trying to use PyAnsys Geometry to build a model. Now I want to spilt the face like shown below. I checked the document, it seems only mentioned the body spilt. Is there any function can spilt the face? from ansys.geometry.core import launch_modelerfrom ansys.geometry.core.math import Point2D, Point3Dfrom…
-
Export Static Structural Solutions Tabular Data
Hi everyone, I'm looking for a good way to access or export the content of the Tabular Data from my Static Structural Solutions with Ansys Mechanical Scripting. So far I was only able to get the Data content of the set Display Time or the whole Tabular Data via the ExtAPI.UserInterface. Is there no better way to get the…
-
DPFServerException: ResultInfoProvider:2<-Data sources not defined
Hello, When I run simple python script using the file download ''\GitHub\transient.rst". import matplotlib.pyplot as plt import numpy as np from ansys.dpf import core as dpf path = "transient.rst" model = dpf.Model(path) print(model) after print() line , error reported, Exception has occurred: DPFServerException…
-
Why does the start angle of a cut part affect Cyclic Symmetry results?
Hello, TL;DR: I'd like to understand what I'm doing wrong here, either in the program or conceptually. I have a part with 4-way cyclic symmetry and have applied a basic structural analysis and structural optimization to it. However, results differ according to the angle that I cut the geometry. Shouldn't results be the…
-
Node ID Maximum value
Hey, I have a quick question about using Ansys Mechanical. When you're using the Max probe to find the node with the maximum value, how can you check what ID number that node has?
-
Computing Strain Rate using DPF inside Mechanical
Hi, I want to investigate the strain rates of a body of a transient analysis. I try to use dpf to compute the strain rates, however, it doesnt work so far. Basic ideas: 1. Using math.time_derivation operator Problems: * usually we use ansys version 23r1. the operator doesnt yet exist in that version * still, I tried out…
-
How can I get the "offending faces" in a failed mesh with scripting?
When you have a failed mesh, there is a message "Automatic source selection failed for MultiZone Mesh Method. Select the source and target faces manually. Right click the message and click Show Problematic Geometry to view the face(s) selected automatically." How can I get the faces ids with scripting?
-
How to send commands to Mechanical from Workbench?
I have a script that can be executed in Mechanical Scripting. How can I execute the same Mechanical script from Workbench without having an interactive Mechanical session open?
-
How to loop over only the result objects using Mechanical Scripting?
As part of the script I'm developing, I want to loop over only the result objects under the Solution of my analysis. How can I do that?
-
How can I export the maximum and average Temperature results from several Named Selections automatic
In my Mechanical Model I have several Named Selections for which I want to get some temperature quantities. Specifically, from the thermal analysis I want to extract the maximum and average temperatures for each of the Named Selections. How can I automate this process?
-
How to change the Identifier field of an External Data system using Workbench Commands?
I want to change the text shown in the Identifier field of my imported data source in the External Data system using Workbench Scripting. How can I do this?
-
How to get the Source and Type information of a Geometry Import object with Mechanical Scripting?
I have a Geometry Import object in Mechanical and want to get the Source and Type information as shown in the Details of the object. How can I do this with Mechanical Scripting?
-
How to get the geometry type scoping of a Named Selection?
I have some Named Selections and want to know what type of Geometry scoping each of them has; for example, body, face, edge, or vertex? How can I do this with Mechanical Scripting?
-
How to calculate the distance between two Remote Points with DPF?
Assume I have two Remote Points in my Model called 'Remote Point 1' and 'Remote Point 2'. How can I calculate the distance between the two across all timesets using DPF?