-
How to run functions that are defined in an ACT extension or Mechanical Add-on from a script?
I have an ACT extension installed for Mechanical. I want to run an Mechanical script that will leverage some of the automation that is defined in the ACT extension. How can I do that?
-
Error: attribute 'FieldsFactory' of 'namespace#' object is read-only
Hi, I am referring to a previous post on this forum which explained how we can convert a field to scalar values. https://discuss.ansys.com/discussion/2150/how-do-you-transform-direction-stresses-to-a-different-coordinate-system-in-dpf I am trying to use the same syntax in my code, but I am getting an error that says Please…
-
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…
-
How to automaticly open workbench and import a geometry file (e.g.spacecliam) to mechiancal
I want to use pyansys to automatic run workbench and import a geoemtry file (generated by spaceclaim) in a local folder ?
-
Retrieve parameters and values
Is it possible to retrieve information on the parameters defined in the Parameter Set of a WB project schematic?
-
How can I read a legend settings from a file from a script?
I have saved many Legends settings in xml files. I can access them interactively using the "Manage Named Legends" RMC on the results legend -> Named Legends -> Manage -> Import Also once the legends settings are loaded. How do I pick one from the list in my mechanical script? Thanks a lot
-
How to get the "analysis" from pre solve commands on a general ACT object
Hello! I am currently working on an extension that uses a custom object in the Tree. The object is not a load object, but it does create apdl commands before the solve. For some context the tree looks like this, where I create a custom folder, and then a custom object. The custom Tree object then writes apdl commands using…
-
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…
-
How to delete corrupt static structural systems from WB Project page?
I see that one of the system in my WB project is corrupted and I cannot either delete it (when I delete it, the entire project is gone)
-
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
-
DPF: time scoping in non-linear plastic structural analysis
I am new to the pyANSYS framework. Using ANSYS 2023 R2. I am running DPF in ANSYS Mechanical and post processing a structural non-linear plastic analysis with 200 substeps. I'm trying to scope my results in the time domain to the specific time that my max plasticity occurs. I do this with the following function and it kind…
-
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…
-
Can we get the PID or Process name for an launch: ExtAPI.DataModel.Project.Model.Solve()
I have some basic script to follow the CPU and RAM useage during a solve but it would be more focused if I could get the actual usage for the given analysis. To do that I need to know what PID or Process gets started when a solve is started. Any ideas
-
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,…
-
Cyclic Symmetry with Multiple Cyclic Index (Angles)
Hi, it would be appreciated, if any one can clarify for the below query. 1) Can we use different sector angles for each component of an Assembly in cyclic symmetry analysis? For example, we are providing 36 (1/10th) degrees of sector angle to Component A and 72 (1/5th) degrees to Component B of sector angle in the…
-
How do I communicate with the Project Page from within Mechanical?
Using Workbench Mechanical scripting how can I get information from the project page? How can I make changes to the project page?
-
In WB Mechanical scripting, how can I change the transformation angles of an external data file?
Here is my project page schematic: I want to change the Rigid Transformation angles: From the Mechanical model where it is use:
-
In Workbench Mechanical scripting, how can I get the location of an external data file?
Here is my project page schematic: I want to get this file location: From the Mechanical model where it is use:
-
How to get the total number of design points in Workbench via script?
Do we have any ACT API to count the total number of design points present in the parameter set?
-
Example: How to use different geometry files parametrically in Workbench/Mechanical
This is an example of how to use totally independent geometry files as a parametric input in Workbench. This is done via script parameters in Discovery where the different geometry files are given a numeric value (i.e. a python dictionary of {1:Path1, 2:Path2, etc..}) These values can be used in conjunction with Named…
-
How to get stress tensors on edge of a shell in python results, by defining position and layer
-
Cyclic symmetry with Bonded Contacts
Hi, it would be appreciated, if any one can clarify for the below query. 1) Do cyclic symmetry work with open joints and the contacts between them being bonded? (Figure). 2) Furthermore, do the hoop continuity stress affects both the components due to the bonded contacts (as it behaves as a continuous component) in Cyclic…
-
How to read total deformation results for harmonic analysis in MAPDL?
At a particular frequency and particular phase angle, I get one total deformation result in WB Mechanical. I read the same .rst file in MAPDL and I see the results for the same frequency and phase angle, to my dismay, I observe a different result in MAPDL. For example, for 73.859Hz and 20°, I used SET,,,1,3,73.859,20,, in…
-
How does WB Mechanical calculates total deformation for harmonic results?
At a particular frequency and particular phase angle, I get one total deformation result in WB Mechanical. I read the same .rst file in MAPDL and I see the results for the same frequency and phase angle, to my dismay, I observe a different result in MAPDL. For example, for 73.852Hz and 20°, I used SET,,,1,3,73.859,20,, in…