General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

using *get command

    • Md_Salem
      Subscriber

      I am doing modal analysis for some structure using Workbench 21R2.

      I need to extract the value of the first (Fd) frequency to a text file (MODE_F.txt) on my computer desk top, so  I used the next  APDL commands in the solution box :

      *GET,Fd,MODE,1,FREQ

      *CFOPEN,MODE_F,TXT,C:\Users\MD\Desktop

      *VWRITE,Fd

      (F18.10)

      *CFCLOSE

      Unfortunately, the file was created at the required location, but the value inside it was (0.0000000000), despite the deformation of the target modes in the solution box with their frequency values. What would be the reason for that ?

      Another issue .... if i need to make a text file contain more than one frequency , what would be the APDL command format?

      thanks

    • Chandra Sekaran
      Ansys Employee

      can you do a SET,LIST to list the frequencies (example commands below) just to see what the frequencies are. The responses to these commands will be in the solution information or solve.out file.

      /post1

      set,list

      *get,f1,mode,1,freq 

      You can use C format which is sometimes easier. For example to print 3 frequencies f1,f2,f3 you can use

      *vwrite,f1,f2,f3

      %e, %e, %e

    • mrife
      Ansys Employee

      Hi Md_Salem

      Getting the Mode with that method is possible when MAPDL is in the Solution module but after the solve.  When post processing the style of the *GET command is different.  Instead use the SET command to read in the specific mode, then get the frequency of the result set.  Like so:

      set,1

      *get,Fd,active,0,set,freq

      Continue on with opening and writing to the file.

      Mike

      • Md_Salem
        Subscriber

        Hi Mike,

        I used next command just as you suggested 

        set,1
        *get,Fd,active,0,set,freq
        *CFOPEN,MODE_F,TXT,C:\Users\MD\Desktop
        *VWRITE,Fd
        (F18.10)
        *CFCLOSE

        Unfortunately the file named "MODE_F.txt" wasn't created at all.

        when Itried my old code it was created but with Null value (0.00000000)

    • mrife
      Ansys Employee

       

      What does the output file for the post processing commands object show for the file opening/writing/closing?  Try right-clicking the Solution object and clearing the generated data.  Then running the solve again.  Does this result in the file being created?

       

Viewing 3 reply threads
  • The topic ‘using *get command’ is closed to new replies.