-
Update the mesh in PyAnsys
Hello, I would like to update one mesh with another mesh using a PyMAPDL command. Specifically, I have a .db file that I'll load using the PyMAPDL command mapdl.resume(). After loading it, I save the mesh as a new parameter, let's call it original_mesh. Next, I make some modifications to node locations using the mapdl.n()…
-
How to use libGLTFWriter.lib static c++ library in python to create .avz file ?
I have integrated the Ansys Viewer into one of the Ansys web application, and it is using OptisLang as a flagship product. Now I have FMOP data to visualize my CAD file in the Python 3D viewer, but I want to visualize it in the Ansys viewer. As Statics of Structure (OptisLang tool) does not have the facility to convert…
-
Can I interact with SpaceClaim or Ansys Discovery from outside the application ?
Hello there. I want to interact with either SpaceClaim or Discovery programmatically, create geometries, and save files, without interacting with the software's UI. Very similar to the Pyfluent library to interact with Ansys Fluent with a Python script. How can it be done?
-
faces nodes connectivity property error
Hello, I'm new to dpf. How do I resolve this error? "ValueError: faces_nodes_connectivity property is not supported" Thank you
-
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…
-
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…
-
Change Inflation Mesh via PyMechanical
Hey everyone, I am trying to control the inflation layer on a mesh via a python script and got two problems. I try to address everything via NameSelection, since I have already defined them in advance and my current code looks like this: Rotor_Inflation = mesh.AddInflation() Rotor_Inflation.ScopingMethod =…
-
dpf.FieldsContainer item access by label name
I've explored the capabilities of Data Processing Framework (DPF) in getting and processing data of Mechanical analysis for possible application in ACT-extension. dpf.FieldsContainer is the object that stores results data for particular entity and time scoping. Target entity is a 'Location', result set is 'time…
-
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.
-
Import Materials in PyMechanical
-
[PyAEDT][PyAnsys] How to use submit_job function to work with Ansys Cloud
Hello, I am looking for some help regarding submitting jobs via PyAEDT/PyAnsys to the Ansys Cloud. There is an issue with the command Hfss.submit_job (found here). Firstly, the arguments are not well defined (for example clustername is only defined as string, not the correct inputs for this string, any one know what…
-
How do i extract h5 results using DPF?
Hello Ansys developers: I'am trying to extract some results from an h5 file to plot them using Python Result, but i couldn't found how to read the h5 file and extract my fields. is it even possible ? Thank you in advance
-
[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 :…
-
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…
-
how to plot Axial Ratio from pyaedt?
Hi, i can plot S11 plot from pyaedt with simple instructions but I'm not able to plot axial ratio. I use this "raw" code: ################# PLOT SETTING ################## import matplotlib.pyplot as plt from cycler import cycler size=30 params = {'legend.fontsize':size*0.60 , 'legend.facecolor':'ghostwhite',…
-
Calling object generator within ansys script
Hi, Is it possible to call the object generator tool within an IronPython script? I am trying to use Python code to automate creating repetitive contacts and the object generator is great at doing that with just a few named selections. I would like to pass the named selections through the script and have the object…
-
change power/ground nets to signal net in edb api
Hi, I want to change the power nets to signal nets in edb api. I could not find a method in the documentation for this. I would appreciate if anyone knows how to do it. Thanks
-
How to install/use PyAnsys in Mechanical CPython console?
How to install/use PyAnsys in Mechanical CPython console?
-
Assign perfect E to an object in pyaedt
Hi, i drew this stepped cone. After unites all parts how to assign a Perfect E Boundary condition to the cn1 object? hfss.modeler.create_cone(cs_axis='Z', position=["-l", 0,"-ty/2+h2+h3+h4+h5"], bottom_radius="r1", top_radius=0, height="h1", name="cn1", matname="pec") hfss.modeler.create_cone(cs_axis='Z', position=["-l",…
-
pyFluent - Returns zone names while meshing
Hi! I have been trying to construct a 'smart' meshing process which would query label/zone names and issue surface refinement depending on said names. Is there a command whose output would be all the zone names in a table or something? Same question at but for the solver instead of the mesher. Thanks you for your time!…
-
PyDPF - Remove midside nodes
Hi guys, Can I remove midside nodes from the extracted nodes, using Pydpf?
-
Identify elements that has atleast one face on the surface
Greetings! My objective is to retrieve elements that feature at least one surface face. To achieve this, I attempted using the following instructions: skinOp = dpf.operators.mesh.skin(mesh) skin_mesh = skinOp.outputs.mesh() However, the above commands yield surface elements that have been converted to 2D elements. The…
-
Identifying element IDs with discrepancies in number of stress tensors and connected nodes
Dear Team, I am using dpf to read an .rst file and extract elementalNodal stresses. However, I have encountered an issue with some elements in the model. Specifically, when I try to obtain the stress tensor for certain elements, dpf outputs stresses at 8 nodes (model.results.stress.eval()[0].get_entity_data(x)), whereas…
-
Get elemental nodal stress array along with corresponding node ids
Dear Team, I am reaching out for help with organizing stress tensors for all elemental nodes using the API call (self.model.results.stress.eval()[0].data). This API call generates an array of stress tensors (elementalNodal) for all the elements, and I need to create another array with the corresponding node IDs for each…
-
PyDPF - Select Surface nodes
Hi guys, Is there an method to extract all the surface nodes from a rst file? For the moment, I create a new component on mechanical with all the surface nodes, and I extract it during the postprocess. But I cannot always modify the model on mechanical. Thanks, Tommaso
-
Export results to VTK format
I am trying to export each time step of my analysis (available as rst file) into the VTK format using a python script and ansys.dpf.core. I don't want to save the whole model, but only a selection of elements, which I have as named_selection. This seems to work in general with my script (see below). The problem I have is…