akasasbt Posted March 19, 2021 Posted March 19, 2021 (edited) I have searched all over the internet and could not find any workable autolisp file to output the First moment of area (Plastic section modulus) for a region. Any of you guys have such a file? I have a autolisp which can output area, second moment of inertia and elastic modulus as attached. I would like to find a way to add two lines, which include the Plastic section modulus for x and y direction. Even an independent autolisp for Plastic section modulus would be great! Thanks! Edited March 19, 2021 by akasasbt Quote
BIGAL Posted March 20, 2021 Posted March 20, 2021 (edited) You will need to research for the mathematics involved in Plastic section modulus if you find the theory then a lisp calc can maybe be done. Edited March 20, 2021 by BIGAL Quote
akasasbt Posted March 24, 2021 Author Posted March 24, 2021 The general formula for any shape is as follows (from wiki): Quote
lrm Posted March 24, 2021 Posted March 24, 2021 You can calculate the first moment of an area in AutoCAD using the massprop command to find the centroid of the entire shape and then for the first moment, massprop could be used to find the centroid and area for the shape above the specified axis. For example, the image below shows an approximation of the shape you posted. I traced it in AutoCAD and then scaled it appropriately. Using the boundary command a region was created. Massprop was used to find the centroid of the region. The shape was then moved so that its centroid was at 0,0. As a check, the massprop command was given again with the centroid at 0,0 with the following results: ---------------- REGIONS ---------------- Area: 3080.9986 Perimeter: 416.0200 Bounding box: X: -39.9689 -- 31.7054 Y: -37.3475 -- 37.8655 Centroid: X: 0.0000 Y: 0.0000 Moments of inertia: X: 1064408.6042 Y: 996193.9994 Product of inertia: XY: -49931.6816 Radii of gyration: X: 18.5870 Y: 17.9815 Principal moments and X-Y directions about centroid: I: 1090770.1442 along [0.8843 -0.4669] J: 969832.4594 along [0.4669 0.8843] These values of the approximate shape agree closely to the values in your drawing (multiplying your numbers by the 1000 for cm^3 or 10000 for cm^4) A rectangular region is then added over the top half of the shape. Applying a Boolean intersect yields just the top half of the shape. The massprop command is used again to compute the centroid (blue point below) of the top half shape and its area which yields the y coordinate of the centroid as 16.2917 and the area of 1514.0829. The first moment for the horizontal axis is the product of the distance to the centroid and the area. d * A = (16.2917) * (1514.0829) = 24,667 mm^3 A similar approach could be used for the vertical axis first moment. I think this approach could be used in the vlisp program you are using for the mass properties. Quote
SLW210 Posted March 25, 2021 Posted March 25, 2021 I have moved your thread to the AutoLISP, Visual LISP & DCL Forum. Quote
akasasbt Posted March 29, 2021 Author Posted March 29, 2021 @BIGAL Ix/Cx would return elastic modulus instead of plastic modulus (or first moment of area). @lrm The method you suggested (area above centroid) would be a reasonable approximation, I believe. If possible, I would like to have a more exact output using the half area concept though. From your output, the area of the whole region is 3080.9986 (half of this is 1540.4993) and the area above centroid is 1514.0829, where there is a 1.7% difference in area. Maybe the tough part is to form the half area of a region with a line parallel to the axis I want....... any lisp to do exactly that? Quote
akasasbt Posted March 30, 2021 Author Posted March 30, 2021 Regarding the half area splitting, I have looked at the following post: https://www.cadtutor.net/forum/topic/48442-area-split-equal/ I have also tried the lisp in the post. The result is that it only works on certain shapes (for example, does not work on a hollow region). Maybe a lisp doing what lrm suggested above is the best, with a loop adjusting the Boolean intersect area. The flow of the program might be this: 1. read the initial area (Ai), bounding box and the centroid location of the section from massprop. 2. To get first moment for the horizontal axis, first create a rectangular region over the top half of the shape, using the bounding box data from 1. 3. do a Boolean intersect and a temporary region would be created. Read the area of temporary region (At). If the area is larger than half of (Ai), return back to 2 but create a bounding box with slightly downward bottom line. If the area is smaller than half of (Ai), return back to 2 but create a bounding box with slightly upward bottom line. 4. repeat 3 until the difference between (Ai) & (At) is less then, say, 0.1% of Ai) 5. find the centroid of the top half shape and bottom half shape and get the absolute distance from the centroid to their respective bounding box, d_top and d_bottom. 6. The first moment for the horizontal axis is (Ai)*(d_top+d_bottom) 7. Do similar for the first moment for the vertical axis. I think the hard part is 3: how to create a loop that would converge. Quote
lrm Posted March 30, 2021 Posted March 30, 2021 @akasasbt You stated "From your output, the area of the whole region is 3080.9986 (half of this is 1540.4993) and the area above centroid is 1514.0829, where there is a 1.7% difference in area." Note, a centroid does not necessarily define a cutting plane where half the area is on either side. It is a measure of how an area is distributed. Consider a "T" shaped area. 1 Quote
akasasbt Posted March 30, 2021 Author Posted March 30, 2021 The first moment for the horizontal axis should be (0.5Ai)*(d_top+d_bottom) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.