-
pyvista package
Hi, I am facing issue "cannot import name 'VTK9' from 'pyvista._vtk' (C:\Users\breddy4\AppData\Roaming\Python\Python310\site-packages\pyvista\_vtk.py)" even after pip install pyvista.
-
How to Upload a vtk binary file ?
Hi all, I would like to use a component like dcc.Upload() to be able to upload vtk files (ascii and binary). However, this component only manages csv or excel files. I tried to use base64.b64decode but it doesn't work :/ Does somebody knows which component to use in case of binary file ? or How to decode the ' contents'…
-
How do I get the skin mesh nodes from an assembly body?
How to get the skin mesh nodes from an assembly body instead of every part's surface. I used the following snippet: model = dpf.Model(file) mesh = model.metadata.meshed_region skin_mesh = dpf.operators.mesh.skin(mesh) skin_nodes = skin_mesh.outputs.nodes_mesh_scoping()
-
How to call csharp from Ansys plugin(IRON PYHTON) .
Is it possible to call c# from IRON Python plugin. If yes kindly share the details.
-
Need help updating python result property upon changing another property.
Hi again Was wondering if someone would know how to setup a python result property that updates another property upon change. For example, when I change the Weaker plate material field, I would like the weld strength to be updated with it to what ever value I have associated to the plate. You can assume that I am using…
-
Cannot update python result plot with custom values on node IDs on a path.
Hi guys Will try to make this as elaborative as possible. I am doing a custom weld throat thickness calculator ACT. The premise: I have a model containing only shells representing welded sheets/plates. I have shared typologies where the shells terminate with each other representing welds. Construction geometries in the…
-
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…
-
set bigge fonts for label, axis values and legend
Hi, ihave to plots, 1 for |s1j| and another for phase different between ports 2 and 3. I need to have a bigger font for axis labels, values, legend, and line width. May you help to find the correct instruction? I have attached the related code to adjust.…
-
How to multiply all elements of a field
Dear all To get the total probability of survival (one scalar) I need to multiply the probality of survival of each element. This data I have in a dpf field. What would be the easiest way to this? Do I need to loop over the entries or is there some kind of vector operation? Regards Lorenz
-
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…
-
Changing field mesh scoping
I have created a field in DPF and now I would like to limit to a subset of the mesh on which it was originally created without recomputing it. I have tried: ns_scope = dpf.mesh_scoping_factory.named_selection_scoping('BLADE_N', model) subset_op = dpf.operators.scoping.rescope() # operator instantiation…
-
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…
-
DPF mesh.mesh_get_attribute error
Code: from ansys.dpf import core as dpf dpf.__version__ mesh_attr_op = dpf.operators.mesh.mesh_get_attribute() '0.8.1' Returns: '0.8.1' --------------------------------------------------------------------------- KeyError Traceback (most recent call last) Cell In[8], line 1 ----> 1 mesh_attr_op =…
-
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
-
finding adjacent nodes (or elements) to a known nodeID.
Hi Would like to know if there is an easier way of getting all the adjacent nodes to a node with a known ID. I rather not loop through all the nodes in the model and check against coordinates as it will take long. If I could get the elements that the node belongs to that would also give me enough to work with. Appreciate…
-
Is there any documentation for the Ansys.UI.Toolkit?
With only the helper comments that come up with the autocomplete, it is very difficult. For example, adding a RadioButton to a UI does not follow the same protocols as a Button
-
Results - GetResultsData() and GetNodeValues()?
How do we look at imaginary and real part of displacement in a harmonic response when using GetResultsData(), and GetNodeValues?
-
System Coupling - Fluent and Mechanical
Hi everyone! I'm working on system coupling (Fluent and Mechanical at the moment) with pySystemCoupling. I managed to write a script that uses .scp, .dat and .cas files generated by the 'System Coupling' Component System in Workbench. (see the attached picture) My objective is to eliminate the need to work with Workbench.…
-
Need help defining a "Python Result" custom plot for a path.
Hi again :) Would anyone have a sample "Python Result" code for drawing stresses on a path? (Similar to user defined plots on a path) Don't quite know where to look or where to begin. Thanks
-
Does anyone know how to delete a results folder?
When I use the following: ExtAPI.DataModel.Tree.Group.DeleteTreeGroupAndChildren() I get an error saying that there is no attribute 'DeleteTreeGroupAndChildren' This is confusing, since I am using the autocomplete.
-
Creating and populating an external data in workbench using ACT
Does anyone know if we have access to the api to interact with the external data component system in Workbench? I have a large number of csv files and would like to create, populate, and attach the data automatically. I've been looking through ExtAPI and haven't found a way to interact with the main workbench page. Thank…
-
Issues with changing the coordinate system in a "user define results" plot.
Hi guys :) I am looking into changing the CoordinateSystem field of a User defined plot in a script from "Global coordinate system" to "Solution Coordinate System" but have hit a wall. The macro recorder does not record any changes and the Plot.CoordinateSystem parameter can only accept objects of type coordinate system!…
-
How to change back color of mechanical tree xml properties in an ACT Extension
I've been looking to see if it's possible to access the backcolor property of cells in the mechanical tree when developing an act extension. For example a cell will turn yellow automatically when it needs attention or red when it is invalid or gray when it is read only. The grid editor shows this method being used, but its…
-
Result retrieval
Hi, I am using the following code to retrieve elemental result for total current density in Ansys WB 2022R2 in a coupled field module. Model=ExtAPI.DataModel.Project.Model result=Model.Analyses[0].Solution.Children[1] result.PlotData Does anyone know how can i access the value for a specific (let's say the first one)…
-
How to find the ID of the parent objects that define an edge path Construction geometry?
Hi guys First time using this forum. Could someone tell me if it is possible to find the part that was used to create a path? i notices that the path can retain reference to the edge that it was created form but when going through all the properties associated with the path for the life of me I could not find a clue to he…
-
How to open Workbench ACT and launch a wizard by script
Is there any way to launch a ACT wizard by script?
-
Export equivalent circuit for not nominal design does not work
Using the example provided on the PyAnsys website to simulate striplines with Q2D, I cannot export the equivalent circuit for design variations that are not nominal. The example is on this page I am just adding the following command q.export_equivalent_circuit(file_name='test.ckt', sweep='sweep1',…
-
How to prevent WBEX file from unpacking after installation?
When I create a WBEX using any of the below mentioned security options, the installed WBEX unpacks itself in the %appdata%\Ansys\v211\ACT\extensions folder and anyone using the WBEX can see the whole source code, which defeats the purpose of encryption. How can I encrypt the source code and prevent it from unpacking?
-
How to retrieve WB extensions Log Output as a String in ACT console?
How to retrieve WB extensions Log Output as a String in ACT console?