General Mechanical

General Mechanical

Change jobname of a harmonic analysis which is inside a modal analysis with APDL

    • Adrien
      Subscriber

      Hello,

      I built a modal analysis in ANSYS workbench with an APDL command inside the Solution branch that runs a harmonic analysis, so the harmonic files (rst, mode, full, etc..) are written inside the modal analysis directory.

      To separate files generated by both analysis (modal and harmonic), I want to name files generated by the harmonic apdl command with something different than the actuel jobname of the modal analysis (the default name is "file", so for example i want to rename as "fileh", h for "harmonic").

      Here is my APDL command (which is inside the "Solution" branch of my modal analysis) :

      RESUME ! load the .db file 

      /com,*********** Defining Loadings ***********
      /com,*********** Create Base Excitation**********

      *DIM,_loadvari6528z,TABLE,1,1,1,TIME
      *TAXIS,_loadvari6528z(1),1,1.
      _loadvari6528z(1,1,1) = magnitude

      *DIM,_loadvari6528zi,TABLE,1,1,1,TIME
      *TAXIS,_loadvari6528zi(1),1,1.
      _loadvari6528zi(1,1,1) = phase

      FINISH

      /GOPR

      /SOLU

      ANTYPE, MODAL, RESTART    ! restarting the modal analysis
      MODCONT, ON, ON ! enforced motion turned on

      /NOPR

      /SOLU

      /COM,*********** Defining Base Excitation ***********

      [Selection of my base excitation]

      D,all,uz,1

      ALLSEL,all
      SOLVE
      FINISH

      /com,*********** Performing MSUP Harmonic Solve ***********
      /SOLU

      ANTYPE, HARM

      HROPT, MSUP, , , YES ! I want to get the mcf file of the harmonic analysis
      [Settings for my harmonic analysis]

      /com,*********** Applying Base Excitation(s) ***********

      DVAL,1,acc,%_loadvari6528z%,%_loadvari6528zi%

      EXPASS,off

      SOLVE
      FINISH

      /EXIT

      I don't know where to put my "FILNAME" command, because if I put it on the session level, it says "fileh.mode and fileh.full doesn't exist", as if "fileh" was my modal analysis jobname...

      Do you have any idea of how changing the harmonic files names ?

      Thank you,

      Adrien

    • Chandra Sekaran
      Ansys Employee

      From this input it looks like the modal analysis is already done. You are doing a restart of the modal analysis to create load vectors. Did you do the modal analysis in this same directory? The modal restart as well as the mode sup harmonic requires files from your modal analysis.  I would just copy all the files from the original modal analysis to the directory where you are running the harmonic analysis. In this case there is no need to change the jobname.

       

      • Adrien
        Subscriber

         

         

        Thank you for your reply.

        Indeed, my modal analysis is already done before the execution of the APDL command, because the APDL command is in the “Solution” branch. I’m doing a restart of the modal analysis to create load vectors, yes. I did the modal analysis in the same directory, yes : in the default directory of the modal analysis, and I want to make the harmonic analysis in the same directory.

        I want to avoid copying files because that’s the reason why the harmonic analysis make so much time to perform (i guess, maybe i’m mistaking ?) – the rst and mode files are pretty heavy. So i want ansys to write directly the harmonic files in the same directory as the modal one. In reality, it works but the harmonic files overwrite the modal files in this directory (rst, mode, full, out), so every time I want to re-perform the harmonic analysis (for any reason like changing some analysis parameters), I have to perform both modal and harmonic analyses (because ANSYS can not find the .rst, .mode and .full files of the modal analysis to perform the harmonic because they correspond to the previous harmonic files), which can take unnecessary time. I want to avoid that and treat hamonic analysis separatly from the modal one.

         

         

    • Chandra Sekaran
      Ansys Employee

      To avoid copying the modal analysis files you can use the MODDIR command to point to the modal files . A typical sequence is shown below. This way you can run your harmonic analysis in a different directory but use the files from the modal anlaysis without copying them over.

      /solu
      antype,modal,restart    ! restarting the modal analysis
      modd,on,'C:\Users\cs\AppData\Local\Temp\WB_cs_19460_2\wbnew_files\dp0\SYS-2\MECH\',file
      modcontrol,on
      thexpand,off     ! ignore thermal strains
      mxpand,,,,yes,,no,  ! expand element results, but not write them to file.mode
      outres,erase 

       

Viewing 2 reply threads
  • You must be logged in to reply to this topic.