-
Get nodal stresses while incorporating power/full graphics
Hello, I'm currently attempting to retrieve nodal stresses from a model utilizing PyMAPDL. My approach involves employing both mapdl.result.nodal_stress and mapdl.post_processing.nodal_component_stress commands. While these commands successfully fetch stress values at the nodes, I aim to integrate the options 'power…
-
How to export all reaction forces and moments in a file ?
Hi, Here is my problem : I would like to : (i) create in Mechanical all the reaction forces and moments ; (ii) export all these data in a file (.csv for example). For the first point, I have writen a Python script, and I get a folder containing subfoler with reaction forces and moments for my boundary conditions, joints,…
-
mapping.on_coordinates operator on tetrahedrons mesh
Hello, I have a question regarding the "mapping.on_coordinates" operator. To test my code I use a simple ANSYS model consisting of a beam, meshed with volume elements, fixed on one side and loaded with a lateral force on the other side. My aim is to determine the stresses along the outside-surface node normals. I have the…
-
How to get plate thickness based on element id?
Hi everyone, I have a plate model with several plates of different thicknesses. In postprocessing I'd like to know the thickness of an element based on its id. Does anybody know how to calculate/retrieve it? from ansys.dpf import postsimulation = post.load_simulation('file.rst')elemental_stress =…
-
How do I convert LS-Dyna results to USD format?
How do I convert LS-Dyna results to USD format?
-
ERP calculation using dpf-core
Hi, I am trying to calculate the Equivalent Radiated Power of a given surface, based on a named selection. I have performed a harmonic analysis using MSUP, and have created a named selection called "LARGE". The code has a number of blocks: 1) Time Here the time scoping is obtained 2) NS Here a mesh scoping is obtained from…
-
Getting "MapdlConnectionError" often when runnung PyMAPDL
Hi Team, We have developed a PyMAPDL script. When we run the script we get frequently the following error: " Error using mapdl_grpc>_multi_connect Python Error: MapdlConnectionError: Unable to connect to MAPDL gRPC instance at 127.0.0.1:50053. Reached either maximum amount of connection attempts (5) or timeout (45 s).The…
-
Is there a way to set up a virtual Environment for VSCode ?
Hello Developers, I just started working with ACT Scripting in Mechanical. I have been doing all my programming projects with Microsoft VSCode for years now, thus I am searching for a workflow that would allow me to use the full potential of VSCode like Syntax Checking and Intellisense. Since VSCode does not know anything…
-
problem while importing forces from Ansys Maxwell to harmonic response.
First, I had a problem while importing forces from Ansys Maxwell to harmonic response. Then, I read an article on customer support portal which instructed me to download a python script an then run it, which will generate an excel sheet containing all the moments and…
-
How to run a function up on activating (Clicking on ) a python result file. for instance OnActivate
I have written a code that updates the tabular data of a python result. The tabular data are populated from the information in the properties section of the python result file so I need it to execute after the properties are loaded. At the moment I have a property that on_property_change, performs the task. Is there a way…
-
How to get stresses from cut mesh
Hi All, I would like to cut up the mesh of a large ANSYS model into more manageable parts. To do that, I’m using the “mesh_plan_clip” mesh operator to cut the main-mesh at the location of a plane. To test my code, I use a simple beam model that is fixed on one side and is loaded with a lateral force on the other side. In…
-
Scripting surfaces in SpaceClaim 2023 R2 getting slow
Hello, I wrote a script for creating a geometry of beams and surfaces in space claim 2021 R1. Now I'm testing it in 2023 R2 and I am getting several problems: -The script is 10x slower and it seems that the surfaces are the problem. -sometimes lines are not solidified and are not converted into beams, it seems to happen…
-
ANSYS workbench and python integration
I currently have a few scripts which automate the generation of a performance plot in CFX. These scripts automate the creation of design point parameters inside of workbench. Currently, I initialize the automation scripts via the GUI or windows command line. I was wondering how I could interact with workbench from an…
-
How to select active object ?
Hi, I have a script for the creation of an APDL command on object : joint_33 = DataModel.GetObjectById(33) command_snippet_37 = joint_33.AddCommandSnippet() command_snippet_37.Input = r"""toto""" I would like my script to be more robust and change the first command line. Is there a way to select the object not by the ID…
-
In Mechanical how to rename analysis based on names in Workbench ?
Hi, In Workbench, I renamed my analysis. In Mechanical, I have to rename all the analysis. Is there a way with a Python script (or other) to automaticly rename analysis in Mechanical, based on names in Workbench ? Thanks, Jean
-
How to create a named selection of nodes which have equivalent stress above a certain limit?
I have an equivalent stress result in Mechanical. I want to create a nodal named selection which has nodes corresponding to equivalent stress above a certain value
-
Discovery Pull Helix revolve creates wrong height
Hi all, I have taken scripting of the Pull with helix revolve tool and want to parameterise. For some reason, the "height" of Pull is not being respected, e.g. creating a height of 34mm instead of the requested 31.9mm. This seems random, as for other dimensions the too works properly. Dscript file also attached. Can you…
-
How to export results (SMISC - axial forces and moments) for all the beam connections in Mechanical?
I have lots of beam connections in the model. I want to export the data in the below format into a csv. beam element type id, Beam name in Mechanical, Fx, My_i, My_j, Mz_i , Mz_j
-
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…
-
Contour Plots on Changed Mesh (NLAD) using Python Result object (DPF) in Mechanical
How could I generate contour plots of custom results on a changed mesh (NLAD) during the solution in Mechanical?
-
Tabular load implemented from Python scripting
Hello everyone I am working in Ansys Workbench 2022R2 in a coupled field module. I am adding loads from scripting. With a single value works easily, but I want to use tabular data for the load. Can i read tabular data for a load from scripting? Can i set the step end time in analysis settings with input from csv?
-
PyMAPDL exits intermittently while running in a loop when mapdl.input() command is used
Hello, I'm encountering an issue while running a PyMAPDL script in a for-loop for a large number of iterations (approximately 8000). In each iteration, I modify the node locations using an input file and then solve the problem. To change the node locations, I utilize the "mapdl.input(update_nodes.inp)" command, which…
-
PyMAPDL exits intermittently while running in a loop when mapdl.input() command is used
Hello, I'm encountering an issue while running a PyMAPDL script in a for-loop for a large number of iterations (approximately 8000). In each iteration, I modify the node locations using an input file and then solve the problem. To change the node locations, I utilize the "mapdl.input(update_nodes.inp)" command, which…
-
Modify multiple node positions in PyMAPDL
Hi, I need to modify multiple node positions for a particular model. For this currently, I'm using the command mapdl.n() (also tried mapdl.ngen()) in a loop. This works fine but takes a longer time appx. 70 seconds (since the number of nodes to be modified is large). Whereas when I perform the same task through…
-
Rename reaction forces base on definition
Hello everyone, I encounter a problem while creating a script to extract the Force reactions Fx, Fy and Fz at all boundary conditions. The thing I want to do is to extract them and then rename them base on their definitions to be able to quickly see which reaction forces correspond to which boundary conditions. Therefore,…
-
Modify multiple node positions in PyMAPDL
Hi, I need to modify multiple node positions for a particular model. For this currently, I'm using the command mapdl.n() (also tried mapdl.ngen()) in a loop. This works fine but takes a longer time appx. 70 seconds (since the number of nodes to be modified is large). Whereas when I perform the same task through…