-
How to create a result in DPF with deformed mesh whose scaling is different for each axis ?
Hello, As the title suggests, I want to create a result in DPF with deformed mesh whose scaling is different for each axis. When you normally create a result in ansys mechanical, you can adjust the scaling : But I want the scaling to be different for each axis, for example 1 in X, 3 in Y and 10 in Z. Does anyone know how…
-
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…
-
is there a way to get solver data for point masses?
solver_data = solution.SolverData data=solver_data.GetObjectData(body) i noticed that if I try to put a point mass where "body" is written, that options is not supported. anyone know how else I can get this info for point masses?
-
Ansys mechanical scripting. How to get Element type ID's using mechanical scripting?
This figure is taken from the worksheet tab. I'm trying to use mechanical scripting to get the element type ids for element names I'm interested in. For example, if im interested in SOLID 187, I'd like to get the element type ID's for all solid187 using mechanical scripting.
-
How can I get the node and element range for bodies in Mechanical Scripting?
I'd like to know min and max node numbers or element numbers for specific bodies in Mechanical. I could obviously select bodies, convert to node and elements and find some related information. Yet scripting would likely be more efficient.
-
Filter elements with deformation above a value and change their material properties
How can I find elements that have a deformation value above a specified threshold and change their material properties for a subsequent analysis?
-
How to calculate contact surface and heat flow with the use of PyDpf
How to calculate contact surface and heat flow with the use of PyDpf
-
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…
-
Heat passed through contact surface with the use of PyDPF
How to calculate the heat that has passed through a contact surface with the use of PyDPF?
-
DPF operators like NSEL/ESEL
Does DPF have any operators that work like the NSEL APDL commands? Specifically I want to point to a CS in Mechanical and get all nodes within a certain radius to the cyl system axis (filter by its local X). I am looking for an efficient solution to work on large meshes with potentially thousands of these CSs.
-
Setting up Harmonic Excitation from Modal Results via Scripting
This is an example of using python code to automatically setup a resonant excitation from a modal result. It uses "after Solve" callback in the modal to update the harmonic excitation per the modal result object. It also does some helpful things like dynamically rename modal results per the calc. freq. and auto-suppress…
-
Error with DPF operator: stl_export
I am getting an error with stl export operator. Any ideas why? The mesh region is found fine with the mesh_provider op, but the stl export fails with: Could not find the specified Output Type import mech_dpf import Ans.DataProcessing as dpf my_file_path=r'C:\Users\mthompso\MyData\test.stl' dataSource =…
-
PathAnalysis package for ANSYS Mechanical
Extension package in python for ANSYS Mechanical for computing and exporting stress and temperature analyses along linear paths to produce analyses necessary for licensing pressure vessels under some regulations: https://github.com/tplobo/path-analysis.git
-
How do I fetch Angular Velocity and Angular Acceleration using PyDPF from a Transient Analysis?
How do I fetch Angular Velocity and Angular Acceleration using PyDPF from a Transient Analysis??
-
Working with Mesh/FE Data in Mechanical
Ever wanted to know how to get, sort, and write mesh information to a file? How about know what mesh nodes/elements are attached to geometry selections. All of this and more in the example attached. #imports import csv from os.path import join #Gather basic data SM = ExtAPI.SelectionManager…
-
How to create the shaft geometry in Ansys Motion using scripting?
-
Import Heat Flow tabular load using Python script
I have a Heat Flow table in .csv format, with the timesteps in the first column and the load values in the second column. How can I import this load and apply it to a Face in Mechanical using Python?
-
Mechanical ACT - "expected int, got str" error
-
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 do I get the geometry unit in Mechanical?
The geometry dimensions will not returned in active unit system. How do I check the unit system for geometry parameters?
-
How can I plot deformed and undeformed mesh ( with result) together using PyDPF?
I would like to plot result having deformed mesh and undeformed mesh after getting results from PyDPF. The plot should looks something similar to Mechanical, like below.
-
Unable to read cdb file in PyPrimeMesh.
I am unable to read a cdb file exported from 2023R1 Mechanical or APDL solver. The PyPrimeMesh server throws below error.
-
How Do I automate the toolbar options for convert and extend
I am looking for script which can Automate the manual conversion and extension of selected entities.
-
Import Materials in PyMechanical
-
Getting a Mechanical.Body from a Geometry.GeoBodyWrapper
-
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…
-
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…
-
Create multi-line comment in Mechanical tree ?
Looking for a way to write comments on multiple lines in a single comment object in Mechanical. I have tried: commentObj = ExtAPI.DataModel.Project.Model.Geometry.AddComment() commentObj.Name = 'NewName' commentObj.Text = " comment1 \n comment2 \n comment3" print commentObj.Text When executing the above script, the…