Hello everyone. I’m just getting into Rhinoscript and kindly ask you to be patient when reading this. I’m trying to write a script that would turn solid bodies, mainly plates and profiles, into surfaces that are viable for a FEM analysis.
I’ll try and get a rundown of what I’m trying to do, and since I don’t know all the methods available in rhinoscriptsyntax, I’m not quite sure whether I’m asking the impossible or not.
The bottom line is, I’m using a software that’s amazing at quickly modelling vessel structure, a ship’s hull and inner frames, plates and profiles, but an export is only possible as solid bodies or closed polysurfaces in Rhino. To do a finite element analysis on volume bodies requires a huge amount of computational power, extremely detailed meshing and the results are not very resemblant to the actual real life answer, due to the rigidity of volume elements meshing. The method so far was to use the exported model and remodel the entire structure by using surfaces, which is tedious and takes a lot of time. What I have in mind is:
-all plates, profiles and stiffeners are exported as closed polysurfaces. For a global FEM analysis, many of the smaller elements, like brackets and small plates are not required, thus, these can be eliminated from the model. I have already done that, probably not in the most effective way (print statements all over the place as a beginner should)
objlist = rs.ObjectsByType(16, False) print objlist for i in range (0, len(objlist) -1 ): surfacevolume = rs.SurfaceVolume(objlist[i]) print surfacevolume if surfacevolume < 100000: print "surfacevolume" rs.DeleteObject(objlist[i])
-I would like that in the end all resulting surfaces to belong to a layer stating the initial thickness of the closed polysurface from which they resulted, making it easier to do the meshing in the desired FEM software, since the material properties are the same. I’m not exactly sure how this could be done. For a planar plate, it would be the distance between the two largest surfaces, by area? Or perhaps the smaller side of a transverse section?
-Once that is done, I need to either retain one of the surfaces that made the closed polysurface, offset one at the middle of the distance between the two, or generate a “midsurface”. The midsurface option actually exists in a number of FEM softwares, but it fails on anything but planar surfaces.
-Keep in mind that we’re doing this for an entire vessel model. Either way we’d go, gaps will emerge between solids that initially had common points. A vertical plate that stopped in a horizontal plate, now has no point of contact with the latter. I don’t actually know how to solve this. The vertical surface would have to be extended as such that it stops at the intersection with the horizontal surface. Perhaps extend curve, or use control points, or pull curve. I don’t really know how to handle this, because the next step is
-Once everything is turned into a surface and connected, everything has to be split. Wherever there is a surface to surface connection, there has to be an edge, this way an automatic meshing would have no chance of failing. Perhaps, this is not as big of an issue because it can be manually handled either by model adjustments or by detail meshing, but it would be a great point.
-And the worst part is, bulb profiles. Bulb profiles are not planar, nice plates. They have a specific transverse section and, as such, react differentely in a structural test than simple plates or L profiles or anything else. I’ve thought of several things I might try (for everything I say, you can check the attached model and you’ll understand):1. I would also like to analyze the profile, mainly to know it’s height and it’s thickness, so I can assign them to different layers or, in case I try to replace them by an L profile that has almost the same characteristics, I would be able to do the calculations for the equivalency. 2, try to extract just the intersection of the bulb profile with the surface it’s connected on, or, if it’s not connected anymore, pull a curve that has the same curvature as the profile, and use the curve to generate beam elements in the FEM profile, however, all FEM softwares I’ve tried assign the neutral axis of the profile where the generating curve is (I hope I’m specific enough). So a FEM software would recognize an L profile, for example, as if it were embedded right in the middle of the surface. So, I’d preffer more if I could analyze the closed polysurface of the profile, run some moment of inertia calculations, and replace it with an L profile of close characteristics.
I hope I can get some guidance since I don’t really know if this is feasible or where to start.
Sorry for taking up your time and thanks for reading through it.
grup de test.3dm (13.3 MB)