Nodal displacement using in ANSYS Mechanical

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.

/SOLU         ! Enter the SOLUTION processor

ANTYPE,STATIC   ! Static (steady-state) analysis

KBC,0          ! Apply load in steps, not ramp

SNODE=745      ! Start node index in blade tip

NSEL,S,,,SNODE ! Select nodes

F,ALL,FY,-10.  ! Force in y-direction

OUTPR,NSOL,1

OUTRES,NSOL,1  ! Write node solutions to the result file

OUTPR,NLOAD,1

OUTRES,NLOAD,1 ! Write forces to the result file

NSUBST,10      ! Number of substeps for force

SOLVE

SAVE

FINISH

I 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.

I have no prior ANSYS experience, this is the first time working with ANSYS so all the help would be greatly appreciated.

Thanks!

Comments

  • Hello,

    If I understood well you just want to retrieve the node displacement with the associated LS in a formatted list in text format ?

    You 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.

    After you write this array in a txt file with the *vwrite command.

    Hoping it helps you.

  • Hi @Catilina thank you for the instructions. I wrote the following code based on the instructions provided:

    /post1

    set,LIST,2

    SNODE = 745

    *dim,disp,array,10,1

    *cfopen,'myfile','txt'

    *DO,i,1,10,1

    *get,disp(1),NODE,SNODE,U,Y

    *ENDDO

    *vwrite,disp(1)

    (F9.4)

    *cfclose

    But 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.

    I've attached the text file to show how it looks like.

  • mrifemrife PHLForum Coordinator

    @dj_45516 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?

    Then 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.

  • Hi,

    mrife 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.

    Besides, 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 ;

    *do,i,1,10

    set,1,i ! retrieves the data set for substep i

    *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 times

    disp(i,1)=dispy

    *enddo

    *cfopen,'myfile','txt'

    *vwrite,disp(1,1) !writes all the lines of the array disp() from the first line

    (F9.4)

    *cfclose

Sign In or Register to comment.