September 17, 2020 at 7:04 pmGurraSubscriberHi,nI am working in Static Structural in Ansys Workbench. I want to write the displacements and rotations for all nodes in a named selection for all time steps to a file. I am aware that similar questions exist here, and as I understand I should use a command object under /post and using *vget and *vwrite commands. However, I need a little more information than this because I do not manage to sort it out. Does anyone have an example of a script solving this task?.Thanks.n
September 17, 2020 at 11:35 pmKaiAnsys EmployeeHi Array, nFirst of all, I would like clarify that rotation DOFs only exists for beam and shell elements. Node of solid elements only have 3 translational DOFs. Below is a sample of command snippet that can be used do what your want. I also commented the script to help you understand syntax.nresume !please set save MAPDL db Yesnset,lastn*get,total_sets,active,0,set,nsett!get total number of result sets tnncmsel,s,surface,nodettttttn*get,nmax,node,,num,max ! max node ID of selected noden*dim,narray,array,nmax,total_sets+1tt ! define a matrix that will contain node ID and uy at all result setsttnn*dim,node_vmask,array,nmax !define mask vectorn*vget,node_vmask(1),node,,nselnnnsel,s,node,,1,nmax !retrieve node ID and skip nodes that are not in named selection surfacen*vmask,node_vmask(1n*vget,narray(1,1),node,,nlistnn*do,i,1,total_sets !use *do loop to retrieve uy at all result setsnset,,,,,,,in*vmask,node_vmask(1n*vget,narray(1,i+1),node,,u,yn*enddonn*vmask,node_vmask(1n*mwrite,narray,my_uy,txttt!writes out a 2D matrix with 1st column node ID and 2nd to 11th columns are uy for set 1 to 10 n(F10.0,TL1,30(F20.nThanks,nKain
September 18, 2020 at 9:22 amGurraSubscriberArray Thanks for your answer. I inserted this code in a command object just as it is written here under Solution (A6). No previous commands. I looked in the Solver Files Directory, but no file named my_uy appears. Is it saved somewhere else? nAnd also, the cmsel command, I guess this should be change if I would like to study only the nodes in a named selection? Or is this done with a other command? How should this line look?.Again thanks.n
September 18, 2020 at 5:32 pmKaiAnsys EmployeeArray, please note cmsel, s, surface, node. I have a named selection called surface and I selected nodes on that named selection. You may want to change surface to the name of your named selection. The command snippet probably didn't work out for some reason in your model. One way to check is to look at the post.out file saved in model directory and see if you have any warning or error messages. If you didn't save MAPDL db file, (by default db file is not saved), you will need to clear results and rerun the model together with the commands to make it work.nn
September 20, 2020 at 7:03 pmGurraSubscriberArraySorry, I did miss that surface was your named selection. Now I get a file, but I get print out for all nodes in the model (not only for those in the named selection) and besides some node numbers that do not even exist in the model and then many rows with the node number set to zero. And on top of that the results printed out for a specific node number do not match the results inside Mechanical. But the rows with node number zero contains results which seem to belong to nodes in my named selection.nSorry for this, but can perhaps it be something wrong with the mask commands?n
- You must be logged in to reply to this topic.
Simulation World 2022
Check out more than 70 different sessions now available on demand. Get inspired as you hear from visionary companies, leading researchers and educators from around the globe on a variety of topics from life-saving improvements in healthcare, to bold new realities of space travel. Take a leap of certainty and check out a session today here.
Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- How to calculate the residual stress on a coating by Vickers indentation?
- An Unknown error occurred during solution. Check the Solver Output…..
- Saving & sharing of Working project files in .wbpz format
- Solver Pivot Warning in Beam Element Model
- Understanding Force Convergence Solution Output
- Colors and Mesh Display
- whether have the difference between using contact and target bodies
- The solver engine was unable to converge on a solution for the nonlinear problem as constrained.
- What is the difference between bonded contact region and fixed joint
- Massive amount of memory (RAM) required for solve
© 2022 Copyright ANSYS, Inc. All rights reserved.