Pop quiz! Do you know the answer to this simple PyMAPDL meshing question?

Options
James Derrick
James Derrick Administrator, Employee Posts: 379
Ancient Membership 100 Comments 100 Likes 25 Answers
admin
edited July 3 in Announcements

Without checking the documentation, just from reading the following code snippet, how many elements of each material type will be meshed? And why?

from ansys.mapdl.core import launch_mapdl

mapdl = launch_mapdl()
mapdl.clear()
mapdl.prep7()
mapdl.et(1, 'SOLID185')
mapdl.mp("EX", 1, 210e9)   # Young's modulus for steel
mapdl.mp("NUXY", 1, 0.3)
mapdl.mat(1)
mapdl.block(0, 1, 1, 2, 2, 3)
mapdl.mp("EX", 2, 70e9)    # Young's modulus for aluminum
mapdl.mp("NUXY", 2, 0.33)
mapdl.mat(2)
mapdl.block(1, 2, 2, 3, 3, 4)
mapdl.vmesh('ALL')
mapdl.exit()

Will it be...

A - 27 with material type 1 and 27 with material type 2
B - 0 with material type 1 and 54 with material type 2
C - 54 with material type 1 and 27 with material type 2
D - Other...

This question was generated using ansys-mapdl-core==0.70.1