General Mechanical

General Mechanical

Nodal displacement using in ANSYS Mechanical

    • dj_45516
      Subscriber
      Hi I am performing a static structural analysis on a simple curved beam. I'm applying a Load on a specific node which is on the tip of the beam. The load I am applying is using APDL command language which is given below. I am trying to retrieve the displacement of this node for all the load steps and the corresponding load steps also in a output text file or anywhere explicitly as result.n/SOLU ! Enter the SOLUTION processornANTYPE,STATIC ! Static (steady-state) analysisnKBC,0 ! Apply load in steps, not rampnSNODE=745 ! Start node index in blade tipnNSEL,S,,,SNODE ! Select nodesnF,ALL,FY,-10. ! Force in y-directionnOUTPR,NSOL,1nOUTRES,NSOL,1 ! Write node solutions to the result filenOUTPR,NLOAD,1nOUTRES,NLOAD,1 ! Write forces to the result filenNSUBST,10 ! Number of substeps for forcenSOLVEnSAVEnFINISH nI believe this should be straight forward and I'm making it quite complicated. The APDL command writes it into the result file but I want it in a text file. nI have no prior ANSYS experience, this is the first time working with ANSYS so all the help would be greatly appreciated.nThanks!
    • Catilina
      Subscriber
      Hello,nIf I understood well you just want to retrieve the node displacement with the associated LS in a formatted list in text format ?nYou can create a 2-column array in which you store the substep number in the first column and the value of the displacement in the second, by using *get command (*get,disp,node,snode,u,y or disp=uy(snode)) and looping through every substep.nAfter you write this array in a txt file with the *vwrite command.nHoping it helps you.nn
    • dj_45516
      Subscriber
      Hi @Catilina, thank you for the instructions. I wrote the following code based on the instructions provided: n/post1nset,LIST,2nSNODE = 745n*dim,disp,array,10,1n*cfopen,'myfile','txt'n*DO,i,1,10,1n*get,disp(1),NODE,SNODE,U,Yn*ENDDOn*vwrite,disp(1)n(F9.4)n*cfclosenBut I am not getting the result I am expecting. It does generate a text file 'myfile', but inside it is just zeros and nothing else.nArrayI've attached the text file to show how it looks like. n
    • Mike Rife
      Ansys Employee
      Hi - first on the solution set up node 745 is selected, but then the whole model is not selected (allsel) prior to issuing the solve command. Was that the entire command listing? nThen in the post processing the set command is reading the results from the result file. In the *do loop the results are not updated via the set command, so it is *get(ing) the same data 10 times.nn
    • Catilina
      Subscriber
      Hi, nmrife is right. If you posted the whole command listing you forgot to reselect all the entities prior solving but I suppose you did it otherwise you may have had an insufficient constraint model error.nBesides, as I said, you have to loop through every substep if you want to get the correct results and you must specify the iterator as an index of your array. Here you overwrite ten times the same value on the first index of disp(). So your do-loop should looks like this ;n*do,i,1,10nset,1,i ! retrieves the data set for substep in*get,dispy,NODE,SNODE,U,Y !I prefer not to get the value directly in the array because I had some problems with that back in timesndisp(i,1)=dispy n*enddon*cfopen,'myfile','txt'n*vwrite,disp(1,1) !writes all the lines of the array disp() from the first linen(F9.4)n*cfclosenn
Viewing 4 reply threads
  • You must be logged in to reply to this topic.