-
How to map results data into different geometries?
Here's an example which maps the results from an assembly to a specific part of the assembly. The result calculated is the max principal elastic strain. Following the script from the mapping data post, the updated script calculates the difference between the elastic strains of the part and the elastic strains of the…
-
How to plot stress results on specific coordinates in Mechanical?
Hello, Is it possible to plot the stress values of my model at certain coordinates (theoretical weld transition) in Mechanical? The coordinates result from the joint lines of two plates and a defined evaluation distance to the joint lines. Thus, they usually do not lie exactly on a node, but can also lie in the middle of…
-
Are stresses extracted from DPF global or local to the element orientation
When using DPF to extract stresses are the values returned in the global system, or the local element system?
-
transform direction stresses to a different coordinate system node for node
for rotating the stress tensor I use the dpf.operators.geo.rotate function with an op.inputs.fields_container and an op.inputs.coordinate_system for an rotation field the problem is, the rotation is just performt for the first entry in the rotation field, not used as a field as I expected. Use case is getting stress in a…
-
How can I perform a parametric analysis through PyMechanical?
Here is an example code to perform a parametric analysis through PyMechanical with parameters that are not parametrized by Mechanical itself.
-
How to make a UI side-panel of user inputs in Mechanical
This is an example of how to make an embedded side-panel of user controls for inputs, geometry selections, tree object selections, file selection etc.. You can then take these inputs to run routines on this user-defined data via buttons.
-
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
-
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 to get a safety factor result in a model with a custom yield limit for specific elements?
We want to get a safety factor result based on Von Mises stresses in a model where tensile yield strength must be based on elemental named selection.
-
Extract information on boundary conditions in Mechanical
Is there a script to get boundary conditions defined in Mechanical, know the values of the applied forces and the unit system that is used to define these conditions ?
-
Is there an API call to Quit mechanical
What is the api script to close mechanical from Mechanical?
-
How can I add options to a drop-down menu?
How can I add options to a drop down menu? Property is defined as: <property name="MyProp" caption="MyValues" control="select"> <attributes options="Value 1,Value 2"/> <callbacks> <onvalidate>OnValidateSelection</onvalidate> </callbacks> </property>
-
Mechanical 2022R2 DPF VTK Export of Assembly & Plotting Parts.
Can we add something to the Mechanical DPF "VTK Export" operation so that it is easy to plot individual parts if wanted. For example if we were using PyVista.
-
How to set Path and Geometry scoping when defining Result object with Path as the scoping method
How to set Path and Geometry scoping when defining Result object with Path as the scoping method
-
How do I define a Pull(Extrude) Mesh Edit in Mechanical?
How do I create this object in Mechanical, through scripting?
-
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:
-
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…
-
Create coordinate system with vector components
If I know the vector components of the principal coordinate axes, how should I go about creating a coordinate system using Mechanical scripting?
-
How do I export average values of all results in a folder to a CSV file in Mechanical?
How do I export average values of all results in a folder to a CSV file in Mechanical?
-
how to get elements based on element name IDs using ansys mechanical scripting?
for example, if I want to get all the elements of CONTAC174 of ename, how do I get it?
-
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…
-
Getting the body ID from a node ID in Mechanical scripting
Just wanted to share a quick snippet that allows one to get the body ID (and potentially select the body and get information about the body) from a node ID using Mechanical scripting: Happy scripting!
-
How to use the <filter> XML tag in ACT Extension?
Hi! How can i implement a visibility filter using the <filter> XML tag under the <interface> node of an XML extension file (see image below)? I would like to be able to filter some default Mechanical buttons for a custom ACT solver I'm developing. I managed to find some some 'ButtonVisibility.xml' examples from other Ansys…
-
How can I filter Analysis loads/results for custom ACT Solver in Ansys Mechanical?
Hi! I'm implementing a custom ACT solver for the ACT extension I am developing in Ansys Mechanical during my Ph.D. My custom ACT solver connects to a Static Structural system (just like nCode DesignLife, see image below) and implements a custom analysis routine I developed. Up to now, I managed to implement my custom…
-
How can I get the moments of inertia on a body?
How can I get the moments of inertia on a body through scripting?