TAGGED: psd, random-vibration
-
-
February 12, 2021 at 9:21 am
deltav
SubscriberHi,nI ran a random vibration analysis in Workbench and I need to export the acceleration response PSD for a number of nodes automatically via APDL.nSo far I always right clicked on the table results and exported the table manually.nHow would the equivalent APDL code look like?nI tried to adapt similar code snippets but only received zero vectors in my written output file.nHelp would be really appreciated!n -
February 12, 2021 at 3:52 pm
Chandra Sekaran
Ansys EmployeeIn APDL you would use POST26 to calculate the response PSD. Typical commands to calculate response PSD are:n/post26nstore,psd,10nnsol,2,199,u,y ! store UY displacement at node 199. store it as variable 2n ! you would use ESOL for element quantities such as stresses, RSOL for reactions and so forthnrpsd,3,2,2,.... ! calculate the response PSD of UY at node 199 . store it in variable 3. n ! you can calculate displacement, velocity or acceleration. Also you can calculate relative or absolute response PSDnnOnce the above rpsd is executed and the result stored in a variable like 3 above then you can use simple PRVAR command to print this to a file like below:nnLINES,1e6 ! this command just removes headers that come up every 50 lines n/output,d:\rpsd3,dat ! send output of subsequent commands to file rpsd3.dat on d:\ foldernPRVAR,3 ! print variable 3n/output ! reset the output to screeYou can also look at VGET command (along with *DIM command ) to get the variable 3 value into an array and then use *VWRITE to write the array to a file. However PRVAR is the simplest approach. -
February 15, 2021 at 4:14 pm
deltav
SubscriberThanks a lot for the quick answer, it works like a charm. Now, I would like to choose the nodes from a component cm1 created in mechanical and export the psd for all those nodes. I tried the following but can't get it to run. Is there maybe an even easier solution with VGET and VWRITE? n/POST26nstore,psd,10ncmsel,s,cm1,node               ! get nodes in component cm1n*get,currn,node,0,num,min      ! get node with lowest idn*get,num_of_nodes,node,0,count ! get number of all selected nodesn*do,I,1,num_of_nodes           ! iterate over selected nodesn nsol,2,currn,u,y           ! get nodal resultn rpsd,3,2,,3,1              ! get psd resultsn LINES,1e6                  ! removes headern /output,c:
psd4,dat,,append   ! append to rpsd4 filen PRVAR,3n /outputn *get,currn,node,currn,nxth ! get node with next higher idn*enddon
-
Viewing 2 reply threads
- The topic ‘How to export response PSDs with APDL’ is closed to new replies.
Ansys Innovation Space
Trending discussions
Top Contributors
-
3190
-
1025
-
962
-
859
-
798
Top Rated Tags
© 2025 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.