Replies: 1 comment 5 replies
-
Hi @chuankaia just so we are on the same page; none of the volume areas were meshed so the value of the shell thickness does not matter in this example. Also the example is not enough to show the issue - there is only one volume, which is missing R2 in its definition, and so any comment may not actually address the issue. So here is an example that does show that two different cylinders of the same height and outer radius, but different inner radius, does result in differing moments of inertial: import os
from ansys.mapdl.core import launch_mapdl
path = os.getcwd()
mapdl = launch_mapdl(run_location=path)
mapdl.clear()
mapdl.prep7()
v0 = mapdl.cylind(1, 2, z1=0, z2=5)
v1 = mapdl.cylind(1.5, 2, z1=0, z2=5)
mapdl.vsel('s', 'volu', '', v0)
mapdl.vsum(lab='fine')
volume = mapdl.get('volume', 'VOLU', v0, "VOLU")
cent = mapdl.get('volume', 'VOLU', v0, 'CENT', 'z')
imc_x = mapdl.get('volume', 'VOLU', v0, 'IMC', 'x')
imc_y = mapdl.get('volume', 'VOLU', v0, 'IMC', 'y')
imc_z = mapdl.get('volume', 'VOLU', v0, 'IMC', 'z')
mapdl.vsel('s', 'volu', '', v1)
mapdl.vsum(lab='fine')
volume1 = mapdl.get('volume', 'VOLU', v1, "VOLU")
cent1 = mapdl.get('volume', 'VOLU', v1, 'CENT', 'z')
imc_x1 = mapdl.get('volume', 'VOLU', v1, 'IMC', 'x')
imc_y1 = mapdl.get('volume', 'VOLU', v1, 'IMC', 'y')
imc_z1 = mapdl.get('volume', 'VOLU', v1, 'IMC', 'z')
print(f"{volume}")
print(f"{cent}")
print(f"{imc_x} {imc_y} {imc_z}")
print("")
print(f"{volume1}")
print(f"{cent1}")
print(f"{imc_x1} {imc_y1} {imc_z1}") Mike |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wrote a piece of code to test the calculation of mass related information.
mapdl = launch_mapdl()
mapdl.clear()
mapdl.prep7()
mapdl.et(1, "SHELL181")
mapdl.sectype(1, "SHELL")
mapdl.secdata(0.2, 1)
mapdl.mp('DENS', 1, 7800)
v0 = mapdl.cylind(2, z1=0, z2=5)
mapdl.vatt(1, 1)
mapdl.vsum(lab='fine')
volume = mapdl.get('volume', 'VOLU', 0, "VOLU")
cent = mapdl.get('volume', 'VOLU', 0, 'CENT', 'z')
imc_x = mapdl.get('volume', 'VOLU', 0, 'IMC', 'x')
imc_y = mapdl.get('volume', 'VOLU', 0, 'IMC', 'y')
imc_z = mapdl.get('volume', 'VOLU', 0, 'IMC', 'z')
print(f"{volume}")
print(f"{cent}")
print(f"{imc_x} {imc_y} {imc_z}")
When I changed the value of the thickness, I found that it had no effect on the result of the moment of inertia. What is the reason for this
Best wishes
Beta Was this translation helpful? Give feedback.
All reactions