-
Calling an IronPython Recorded Script in Python
Hello, I am writing a script to automate a Maxwell3d design using python. I have an already recorded script in maxwell and was wondering if I can call this script using "Run Script" command or other methods while I am in python?
-
From model to pyAEDT script
Are there ways to generate a pyAEDT script based on a defined model in Ansys Maxwell? In a similar way as when recording a vbs-script?
-
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…
-
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…
-
PYANSYS-geometry Timeout error
I encountered a timeout error when running the Simple interactive example case in PyAnsys Geometry. My running environment is Windows 10, the python version used is 3.8.18, Python environment installed directly via "pip install ansys-geometry-core", (spyder and jupyterlab were pip installed after this step, then…
-
Extract PointData from d3plot files
Hi, I would like to understand the correct method for extracting LSDyna results from our d3plot files and adapting them for a web application. Specifically, we are attempting to extract PointData and create VTK objects to display in our Dash app. Currently, we have successfully extracted the FieldsContainer, but we are…
-
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…
-
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…
-
Unable to connect Pyprimemesh server.
Hello All, Can anyone guide me, How to launch Ansys pyprimemesh library and connect to server? Rightnow I have ansys 2023R1 licensed version and python 3.9 version. Also installed pyprimemesh file from Github. then afterthat how to use and connect? I am already taking help of pyansys documentary.…
-
Minimum requirements to include enums in embedded instance
Hey everyone, I am currently using an embedded instance of Mechanical in Python. I use the following code to include access to global variables: from ansys.mechanical.core import App, global_variablesapp = mech.App(version=231)globals().update(global_variables(app)) Then I discovered, that enums are still not available…
-
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…
-
pymapdl jupyter notebook example
I used the old training example and brought it into jupyternotebook/pymapdl: https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v231/en/ans_tut/structural_cb.html The jupyternotebook file is in the attached zip.
-
How to process topology optimizations on different geometries automatically?
Hey everyone, my goal is to perform a topology optimization (TO) on 50+ geometries in ANSYS. For a single simulation my current plan is pretty straightforward: I open a new Workbench file, create a static-structural module, connect a topology optimization module to it and basically do all the neccessary steps in ANSYS…
-
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…
-
Unable to solve .inp file using pymapdl
Hi, I am trying to access a mechanical model and change the co-eff of friction for contact. But while doing so I am not able to solve the .inp file which I created from mechanical. Can anyone help me with this. The error says "SOLVE is not a recognized BEGIN command" My code is as below: from ansys.mapdl.core import…
-
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…
-
How to use libGLTFWriter.lib static c++ library in python to create .avz file ?
I have integrated the Ansys Viewer into one of the Ansys web application, and it is using OptisLang as a flagship product. Now I have FMOP data to visualize my CAD file in the Python 3D viewer, but I want to visualize it in the Ansys viewer. As Statics of Structure (OptisLang tool) does not have the facility to convert…
-
Update the mesh in PyAnsys
Hello, I would like to update one mesh with another mesh using a PyMAPDL command. Specifically, I have a .db file that I'll load using the PyMAPDL command mapdl.resume(). After loading it, I save the mesh as a new parameter, let's call it original_mesh. Next, I make some modifications to node locations using the mapdl.n()…
-
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…
-
Can I interact with SpaceClaim or Ansys Discovery from outside the application ?
Hello there. I want to interact with either SpaceClaim or Discovery programmatically, create geometries, and save files, without interacting with the software's UI. Very similar to the Pyfluent library to interact with Ansys Fluent with a Python script. How can it be done?
-
faces nodes connectivity property error
Hello, I'm new to dpf. How do I resolve this error? "ValueError: faces_nodes_connectivity property is not supported" Thank you
-
Error extracting nodal forces from beam connection
I am working on building a script to pull forces from beam connections in a model. In my test model I have 2 shells with holes cut in each and a beam connection between them. In the UI I can place a 'Beam Probe' and get all the data I need, but I cannot seem to get it through DPF. I get the same error with Output Controls…
-
How can i implement a new material ?
I have programmed a composite material in Python, where I calculated the stiffness and mass matrices, and I want to run it through ansys for modal analysis. I have seen it in PyMAPDL, but could not find anything helpful. Is there a way to have a subroutine to program my own Stiffness and mas matrix and implement it into…
-
Change Inflation Mesh via PyMechanical
Hey everyone, I am trying to control the inflation layer on a mesh via a python script and got two problems. I try to address everything via NameSelection, since I have already defined them in advance and my current code looks like this: Rotor_Inflation = mesh.AddInflation() Rotor_Inflation.ScopingMethod =…