-
Is it possible to consider temperature dependent strength data for safety factor calculation?
Is it possible to consider temperature dependent strength data for safety factor calculation within the stress tool?
-
Displaying values from a python code object on the geometry
I have a result I've calculated on a set of nodes in a python code object. I'm aware that there's a way to set the contour using dpf, but as I need individual node positions and a custom function to calculate my result, I'd rather use my existing values rather than figure out how to do it all again using dpf. Is there a…
-
pygem
I want to run a script in SpaceClaim using run_discovery_script_file, but I'm unsure what to include in script_args. I have reviewed the original documentation, but it did not provide guidance on how to manage this. from ansys.geometry.core import launch_modeler_with_spaceclaim modeler_discovery =…
-
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,…
-
DPF Crashes Workbench with large result files
I've noticed an issue when using DPF with large result files in my ACT scripts (currently using version 2023R2), essentially whenever the result file gets large enough (25+GB) all of my post processing scripts crash workbench a few seconds after starting to run. I reduced the size of mesh and resolved to get a smaller…
-
Multi-threading with DPF post evaluations In Mechanical
Hi all, Has anybody experimented with using the iron python threading module to start an async thread that does DPF post calculations? Use case is this could be called immediately after the solve is done since the results file is available. Users can still interact with Mechanical since the call after the solve is simply…
-
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…
-
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…
-
Ansys pyDPF Logical statements
Hi, I am new to the world of PyDPF and was wondering if there was an if statement or something equivalent as a operator in PyDPF. I'm looking to compare stresses on a node by node basis against a critical value and if the stress at the node exceeds a value I would like to set that value to 0. I noticed that there was an…
-
Read data from txt with apdl commands inserted in tree
Hello everyone! I'm working in workbench mechanical (2022r2) in a coupled field module. I want to insert apdl commands in the tree to read a table and interpolate to get some results. I have a file (txt with values separated by comma)with element ids and for each element i have temperature and two parameters defined.…
-
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?
-
How to see which ACT Extensions are loaded with Workbench Journaling
Is there a way to check if a particular extension is already loaded (in 2023 R2)? I have tried to do a try: except catch with Extensions.LoadExtensions but that isn't working for some reason: try: Extensions.LoadExtension( Id="04a2fd24-d76b-45c8-8553-be985906c975", Version="232.12", Format="Scripted" )except Exception as…
-
Increasing Speed of DPF in Extensions
I am looking into using DPF to drive the results in extensions instead of using the legacy results reader. While DPF is much faster than the legacy reader for getting things like nodal von mises stress, I am finding that the extensions performance is still substantially worse than the hard coded von-mises available in…
-
How can I call a ironpython script inside an another script
I am working on a 2D model of a transformer in Ansys Maxwell. I have created multiple IronPython scripts for assigning excitations, defining materials, creating a mesh, creating a simulation setup, etc. I want to call these scripts inside a script which will be my main script. how can I do that? if someone can provide an…
-
Select target elements using Point in Polygon Ray Casting Algorithm.
Components 1, 2 and 3 are connected to the base plate as bonded contacts. How can I select the element faces on the base plate which are attached to the component base? Geometry Output
-
Is there an API call to Quit mechanical
What is the api script to close mechanical from Mechanical?
-
How to work with .csv data in Mechanical: Export, Import and plot
There is often a need to work with data in a .csv format (comma delimited text file). You can store results, import conditions etc… This attached analysis uses python code and results objects to: Automatically export displacements to a .csv file on solve Import from a .csv file to create a displacement condition for each…
-
Configuring MS Visual Studio to Develop IronPython for ANSYS Scripting
Hi ANSYS Developer Community: I would like to be able to develop IronPython code in Microsoft Visual Studio for scripting applications in ANSYS Spaceclaim, ANSYS Discovery, ANSYS Electronics Desktop, etc. Right now, it is unclear to me how to properly configure Microsoft Visual Studio to work with IronPython as oppsed to…
-
ANSYS Mechanical Embedded API - Vector Principal Stress Coordinate System Creation
Folks, I have a vector principal stress direction scoped to a single node within a solution combination result. Is it possible to automate the creation of the aligned coordinate system? Thanks, Stu P.S. What is the best way to hone my ANSYS API programming skills? I know it predominately IronPython. If I studied…
-
Importing library os in Mechanical
I want to import the library os in Mechanical, but i always get this error message. I have this on two different computers with different Ansys versions (2022R1, 2023R1). I am sure that it worked in the past and in this forum the library is often used aswell.
-
How to change text style and size in Ansys Mechanical ?
Hello everyone, do you think we can change the Tree objects text style or size in Ansys Mechanical using scripting? I can manipulate the graphic labels using javascript, so i think it should exist something similar to do the same with text in Ansys Mechanical using javascirpt or Python. I'am talking about this text , i can…
-
[DPF] An unexpected error occurred - rst file used by another program
Hello, I'm writing some codes in DPF in a python result inside my modal analysis, so I need to read the rst file with the dataSource accessed with the "dpf.DataSources(analysis.ResultFileName)" command. My code works well, but when I want to resolve my modal analysis, it shows this error : An unexpected error occurred :…
-
Edit legends with a UI box in Mechanical
It has come to my attention that several users have issues editing the legend in the Mechanical UI due to a graphical defect with certain NVIDIA GPUs. How can I create a python button in Mechanical that allows me to edit the upper/lower bounds?
-
How to plot within a Python result the total stiffness energy in a named selection with ansys dpf ?
Hello everyone, As the title suggest, I want to plot within a Python result the total stiffness energy in a named selection with ansys dpf. I made something that plot the stiffness energy by element on a given named selection, and I think I have to use fields operators to plot the total stiffness energy on the named…
-
Question regarding changing user defined charts' time steps using a python result script.
Hi I have a python result file that I am trying to get some custom result files evaluated in different time steps. for some reason I cannot find a method under a user plot object that would be similar to "Retrieve this result" as opposed to "Evaluate all results. In any case the application does not perform a "Evaluate all…
-
Microsoft Authentication Library support for Ansys Plugin
Need help regarding Microsoft Authentication Library support for Ansys Plugin.
-
How do I export pictures for multiple design points?
I am running a simulation for which I create figures for various results. I want to export them for each design point. How can I do this?
-
Robust Example of Python Result Property Provider and Script
Hi all, This is just an example of some advanced implementations for python result objects. There are some more properties, helper methods and general how-to information in the code.
-
How to call csharp from Ansys plugin(IRON PYHTON) .
Is it possible to call c# from IRON Python plugin. If yes kindly share the details.
-
Export data from a chart object to text or csv using Python
Hello, I am able to access the chart object using Python, but I am not sure what function will export it to a text or csv file. I checked the list of attributes, and none of them offer the "Export" of chart data. I am guessing since the chart object has a table, there should be some way to access it. Can someone point me…