-
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…
-
Running R2023R2 using Python Script on HPC using PBS Scheduler
Hello Awesome Community!, Just wondering if there is anyone out there running per above and if you could kindly share an example of a PBS script for launching Fluent with python script. I am old school using TUI but keen to move across. Thanks!
-
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?
-
How to create a coordinate system based on direction vectors and a specific origin?
I have principal axis vectors and center of gravity of a body. Now I want to create a coordinate system based on these vectors and center. But, Mechanical doesn't let me input vector information.
-
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,…
-
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 to export Fluent msh file from Mechanical via scripting?
How to export Fluent msh file from Mechanical via Scripting? One can export it via GUI in Mechanical --> File --> Export
-
How to access results of Motion - Function Expression using scripting?
Hi all, is it possible to access results of Function Expression using scripting in Mechanical?
-
Integrate results over a subsection of a surface
I have a surface on which I have calculated a direction heat flux solution. I would like to add a script that then takes a region of interest of that surface and integrates the directional heat flux in that region.
-
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…
-
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…
-
In Mechanical scripting, how do I export results as an .avz file?
I want to loop over all result objects in Mechanical, create a 3D AVZ file (.avz) for each, and save them in the user directory.
-
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…
-
Centroid of elements
I have 11 elements after meshing, I need the centroid location of each element in a list or file format for using it later. Can someone provide me with the APDL code?
-
Check for mesh connectivity between two bodies
How to check whether there is mesh connectivity between two bodies using scripting? for example, manually I can use mesh connection option in Display settings to verify: upon observation, I can confirm whether it has mesh connectivity or not. but, if I have to verify the same using scripting, is there any way?
-
How to get the total length of an edge (from mesh) in Mechanical via Scripting?
I would like to extract length of an edge. Not from Geometry but from Mesh, as geometric length and length based on summing up individual element edge lengths is different.
-
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…
-
Creating section plane with script
Hi, I would like to create section plane with scripting in Ansys Mechanics. I did a research but did not found anything or forum nor it worked. How I could do that? Thanks.
-
How do you pass arguments to Mechanical stand-alone script from command line?
This other post describes passing args to a journal run in runwb2.exe, is there a way to do the same thing with a script in Mechanical stand-alone? AnsysWBU.exe -DSApplet -AppModeMech -nosplash -notabctrl -script script.py (I did try the -E flag, but no luck).
-
In Mechanical scripting, how can I run APDL using the same license as Mechanical?
In Mechanical scripting, I am using the RunAnsys() to do some custom post-processing in MAPDL. However RunAnsys() is looking for a license that I do not have.
-
How to create an Origin (Coordinate System) at the middle of an Edge in SpaceClaim?
I would like to create an Origin at the midpoint of each Edge included in a Group. How can I do that with SpaceClaim Scripting?
-
Is there an example of how to use ansysli_util.exe?
I want to get information about Ansys license usage, license availability, and/or the license server. How can I utilize the Ansys license utility (ansysli_util.exe )?
-
Transfer convection coefficient and ambient temperature data from csv to Mechanical via PyMechanical
I have data in csv and want to replace the convection coeff and ambient temperatures of convection boundary conditions in my mechanical model with the values in csv. How can I do this in PyMechanical?
-
How to export Time History tabular data of Force Reaction in Mechanical as a csv file?
I have several Force reaction objects in Mechanical and I want to export the time history for each Force Reaction object as a separate csv file which should have the columns Time, Fx, Fy and F_Total
-
In Mechanical (stand-alone), how do you start a new model or clear the existing model?
Is there a command in Mechanical stand-alone to reset/clear a model completely (similar to the "File -> New" menu command)? Was hoping for something like: ExtAPI.Application.New()
-
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)
-
How to export the information of all the convection loads in my Mechanical to a csv?
I want to export the below information as a csv file directly from Mechanical via scripting. 1. Convection load Name 2. Film Coefficient 3. Film Coefficient unit 4. Ambient Temperature 5. Ambient Temperature unit
-
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…
-
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