TAGGED: acp, mass, mechanical
-
-
February 20, 2025 at 11:50 am
pnoever
SubscriberHello 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
-
February 24, 2025 at 6:24 pm
Raman Babu
Ansys EmployeeYou 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
/post1It is a sample script that calculates the mass. You can modify it as per your needs.
Regards,
Raman Babu
Â
-
- You must be logged in to reply to this topic.
- The legend values are not changing.
- LPBF Simulation of dissimilar materials in ANSYS mechanical (Thermal Transient)
- Convergence error in modal analysis
- How to model a bimodular material in Mechanical
- APDL, memory, solid
- Meaning of the error
- Simulate a fan on the end of shaft
- Nonlinear load cases combinations
- Real Life Example of a non-symmetric eigenvalue problem
- How can the results of Pressures and Motions for all elements be obtained?
-
3892
-
1414
-
1256
-
1118
-
1015
© 2025 Copyright ANSYS, Inc. All rights reserved.