Transforming solid bodies into FEM analysis viable surfaces

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[0] < 100000:
        print "surfacevolume"

-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)

Good luck with what you are seeking. I ran into similar situation about 10 years ago on a big door (45’ x 10’) in the side of a yacht to the tender compartment. A verbatim closed polysurface model had been imported from ShipConstructor and I did my additional work in Rhino. We had farmed out the first FEA analysis and Lloyds had approved the four hinges on the door, but a year later wanted us to add a fifth hinge to withstand G-loads from the vessel rolling when the door was open. I think we spent $20,000 on the initial FEA and the boss was convinced we cold spend that much to invest in the software if we had to do it again. I must have gotten demos of 5 or 6 FEA packages and had to convert back to mid-plate to ever get any results. The support people though we were nuts working with solids and polysurfs and eventually gave up trying to educate us and ran the analysis for us. $15,000 earned us a lot of support at the time!

Hi Kinsasa04,

I’ve been reading your question with great interest!

Most of the functionality you describe I have already implemented for our company, yet for the purpose of producing a complete ship building kit. We work with solid models of ship structures as well, our toolset analyses all parts and automatically sorts them into plates by thickness and profiles by type, including finding mid-surfaces, profile lengths, their base-curves and end-details. In addition all part connections are found to annotate onto the plates for engraving or printing. So maybe we can even help out providing the conversions you need but I leave that up to you.

So my answer to you would be: yes this is possible, with a side note that it will take a lot of time and effort to refine initial prototypes into a workable solution. :wink:

It do have a few questions specific for your FEM purpose:

Do you mean the FEM software fails, or does Rhino fail here. So in other words: Would you need to distinguish between planar and non-planar plates when finding midsurfaces?

A related question: do you want to feed the FEM Software meshes or nurbs-breps?

Can you elaborate on the need for this edge. Does the FEM software recognize these edges and assumes a 3way connection or would you have to provide a non-manifold joined mesh. In other words, would it suffice to split the midsurface with the extended perpendicular plate, or would an additional step be needed where the 3 midsurfaces get joined?

How does the FEM software know the orientation of such a profile when only a curve is provided. I assume there needs to be additional information about the rotation of the profile section around that curve. Or is a connection assumed onto the hull surface?

Like I already wrote, I know from my own experience that this is feasible. Do you have previous programming or scripting experiences? As you just started with rhinoscript you will have a long adventurous road ahead with at the least the rhino specifics as your challenge but it’s sure worthwhile!


Hi Willem,

Thank you very much for your detailed answer and taking your time for this. It seems like I’m not the only one bumping into this issue. I’m trying to do this as a side chapter of my post-graduate degree, since I’m thinking about running some global vibration analysis and also thought that a script like this would help me here and in the long run. I’m up for a lot of time and effort, and would love if you could help me out. To answer your questions:

  • The FEM softwares I’ve tried are Ansys and Femap. What I meant was that the midsurface feature is not suitable for bulb profiles, for example. In other words, for deck plates, shell plates, bulkheads, T stiffeners etc, the option is good, even though it needs further refining for filling the gaps left behind, and I believe or at least hoped that this issue can also be fixed in Rhino. IN short, I don’t really need to distinguish between planar and non-planar plates, as long as the latter meshing done on the resulting surface accurately represents the initial solid plate.

-I would like to feed the fem software surfaces, since the meshing would be done in the fem software, for a better control of it. I believe Rhino has no option for meshing properties? I might be wrong here. Surfaces will do, especially if they’re sorted by thickness meaning one could import layer by layer and do automatic meshing for each plate thickness.

-Yes, it would suffice to split the midsurface with the extended perpendicular plate. And even so, wherever that is possible, since if it’s not, I will, as stated, refine and manage the meshing in the FEM software, arrange the nodes of the elements etc.

-That is another issue, and I’m honestly curious on how you solved this one. Indeed, there needs to be aditional information provided. The method I’ve used before when running global vibrations analysis was to approximate a bulb profile by a beam section with the same inertia properties, after learning (and I hope it’s true), that the end results are close enough to results obtained by actually modeling the profiles. I hope I’m making sense. But indeed, it would be amazing if I’d manage to replace them with an L profile.

Thank you again, it really feels great to talk to someone that has run into this challenge. I have basic programming experience, but I learn fast and, you know, deadlines have a way of giving you motivation. All the best, looking forward for your answer.