General Mechanical

General Mechanical

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

Mass distribution along an axis in ACP or mechanical

TAGGED: , ,

    • pnoever
      Subscriber

      Hello everyone,

      I am looking for a way to get a mass distribution of my complete ACP model along an axis. Is there any way to get this somehow easily in ACP or Mechanical?

      My second thought would be to do scripting in APDL or PyMAPDL by selecting elements by ranges in a z-direction, get mass, divide by the range length to get the specific mass. Then continue to next range until covering all the model.

      Is there a way to export this to a table in Workbench?

       

      Any thoughts or suggestions are welcome.

       

      Best wishes

      Pablo

    • Raman Babu
      Ansys Employee

      You can try with below APDL script

      /prep7
      ESEL,S,ENAME,,Solsh190 
      *get,emin,element,,num,min
      *GET,noelems,ELEM,0,count,
      !e=emin
      e=76271
      *DIM,data,ARRAY,noelems,4
      mass=0
      *do,i,1,1,1
          *GET,volu1,ELEM,e,VOLU, 
          *GET,sec1,ELEM,e,ATTR,SECN
          *GET,thickness,SHEL,sec1,PROP,TTHK,
          *GET,nooflayer,SHEL,sec1,PROP,NLAY,
          thick=0
          emass=0
          *do,j,1,nooflayer,1
              *GET,lay%j%,SHEL,sec1,LAYD,j,THIC
              *GET,laymat%j%,SHEL,sec1,LAYD,j,MAT,
              *GET,density%j%,DENS,laymat%j%,TEMP, ,
              emass=emass+volu1*density%j%*(lay%j%/thickness)
          *enddo
          data(i,1)=e
          data(i,2)=thickness
          data(i,3)=volu1
          data(i,4)=emass
          e=elnext(e)
          !*GET,e,ELEM,e,NXTH,
          mass=mass+emass
      *enddo
      my_mass=mass
      allsel,all
      /post1

      It is a sample script that calculates the mass. You can modify it as per your needs.

      Regards,

      Raman Babu

       

Viewing 1 reply thread
  • You must be logged in to reply to this topic.