General Mechanical

General Mechanical

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

Modal PF table query

    • phoenix098
      Subscriber

      a)     The participation factor summary under the solution output list doesnt come when the solver type becomes PCG LANCZOS(iterative solver type, even if program controlled utilizes iterative solver) because by default, .FULL file is not written for PCG solver. So, participation factor table is NOT computed and participation factor summary is NOT available on solve.out file.

      Below snapshot from WB

    • Erik Kostson
      Ansys Employee
      - after some more investigation, we can actually request the participation factor summary under the solution output list when using iterative solver. Below is the setting needed:
      All the best

      Erik
    • phoenix098
      Subscriber
      Erik,
      This definitely solves the purpose. But i wanted to leave solver type to "program controlled" but still get that PFACT table using APDL command when Ansys choses Iterative solver internally. I want Ansys to chose solver but still provide PFACT using /POST1 command whenever PF summary is available in solve.out for iterative solver.
      You might ask, why do you want that?
      I am creating an ACT extension that can read PFACT from PFACT table and write into dictionary. So, if PFACT table is not available, i will write /POST1 command and still get PFACT tabel after solve is completed.
      This definitely assumes that solve.out has PFACT summary.

      I compared ds.dat file for both "iterative solver type" and "iterative solver type with PFACT set to YES" as you showed above. The only difference is below additional APDL /POST1 command. Why dont I get the table when i insert this command manually.?
      /post1
      /nopr
      *dim,_direction,CHAR,6,1
      _direction(1) = 'X'
      _direction(2) = 'Y'
      _direction(3) = 'Z'
      _direction(4) = 'ROTX'
      _direction(5) = 'ROTY'
      _direction(6) = 'ROTZ'
      *get,_lastLS,active,0,set,LSTP
      *get,_beginset,active,0,set,nset,first,_lastLS
      *get,_endset,active,0,set,nset,last,_lastLS
      _nummodes = 0
      *if,_endset,gt,0,then
      _nummodes = _endset - _beginset + 1
      *endif
      *do,i_mode,1,_nummodes
      *do,j_component,1,6
      *get,PFACT_%i_mode%_%j_component%,MODE,%i_mode%,PFACT,,DIREC,_direction(%j_component%)
      *enddo
      *enddo
      *dim,_tmdirection,CHAR,6,1
      _tmdirection(1) = 'X'
      _tmdirection(2) = 'Y'
      _tmdirection(3) = 'Z'
      _tmdirection(4) = 'X'
      _tmdirection(5) = 'Y'
      _tmdirection(6) = 'Z'
      *do,j_component,1,6
      *if,j_component,gt,3,then
      *get,TOTALMASS_%j_component%,ELEM,0,IOR,_tmdirection(%j_component%)
      *else
      *get,TOTALMASS_%j_component%,ELEM,0,MTOT,_tmdirection(%j_component%)
      *endif
      *enddo
      /gopr
    • Erik Kostson
      Ansys Employee
      One way if you doing an ACT extension add these commands as snippet (you can calculate everything you need from the *get, and PFACT or EFECM or MTOT), and then write these to file. Finally read them in to the array or dictionary.
      For instance to save the participation factors (similar syntax for effective mass - and ratio of effective mass to total mass is just a ratio which we can calculate once we have effective mass and the total mass (*GET with MTOT)).

      --PYTHON FOR SCRIPT TO READ IN DATA--
      PFX = []
      PFY = []
      PFZ = []
      EMX = []
      EMY = []
      EMZ = []
      MRX = []
      with open('C:\PF.txt', "r") as f:
      for line in f:
      a=line.strip b=a.split PFX.append(float(b[0]))
      PFY.append(float(b[1]))
      PFZ.append(float(b[2]))
      EMX.append(float(b[3]))
      EMY.append(float(b[4]))
      EMZ.append(float(b[5]))
      MRX.append(float(b[6]))


      --APDL SNIPPET--

      *GET,NRMODES,ACTIVE,0,SOLU,NCMSS

      *DIM,MODAL_PF,ARRAY,NRMODES,3
      *DIM,MODAL_EM,ARRAY,NRMODES,3
      *DIM,MODAL_RAT,ARRAY,NRMODES,1

      *DO,i,1,NRMODES

      SET,1,i

      *GET,MODAL_PF(i,1),MODE,i,PFACT,,DIREC,X

      *GET,MODAL_PF(i,2),MODE,i,PFACT,,DIREC,Y

      *GET,MODAL_PF(i,3),MODE,i,PFACT,,DIREC,Z

      *GET,MODAL_EM(i,1),MODE,i,EFFM,,DIREC,X

      *GET,MODAL_EM(i,2),MODE,i,EFFM,,DIREC,Y

      *GET,MODAL_EM(i,3),MODE,i,EFFM,,DIREC,Z

      *get,totmassx,ELEM,0,MTOT,X
      MODAL_RAT(i,1)=MODAL_EM(i,1)/totmassx

      *ENDDO

      *CFOPEN,PF,txt,'C:\\'

      *VWRITE,MODAL_PF(1,1), MODAL_PF(1,2), MODAL_PF(1,3), MODAL_EM(1,1), MODAL_EM(1,2) ,MODAL_EM(1,3), MODAL_RAT(1,1)
      (F15.6,F15.6,F15.6,F15.6,F15.6,F15.6,F15.6)

      *CFCLOS

      All the best

      Erik


Viewing 3 reply threads
  • The topic ‘Modal PF table query’ is closed to new replies.