Importing from FreeShip to be used by FEM?

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
Vincent B
Veteran
Posts: 4713
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: Importing from FreeShip to be used by FEM?

Post by Vincent B »

ok, yes. I forgot to lock the pad lock. ;)
User avatar
hammax
Veteran
Posts: 1985
Joined: Thu Jan 19, 2017 5:03 pm
Location: Ammersee DE

Re: Importing from FreeShip to be used by FEM?

Post by hammax »

... I had also problems with the points cloud.
You can get it from test.stl via "display only points" and from test.asc via import.
But if I tried to connect these points by CurvesWB "Interpolation_Curve" they don't get green.
I also had repeatedly de- and activated "selectable" in the points property - no success.
Only DraftWB is able to snap them???
FC.18.4 Win32
mag
Posts: 21
Joined: Mon Nov 09, 2020 12:55 pm

Re: Importing from FreeShip to be used by FEM?

Post by mag »

Thank you all for the great help. Now I cannot do FEM analysis at all (made another topic out of that), but I remember that Part/Create shape from mesh did work.
I had to add a plate thickness though, because the mesh is a surface mesh.
I still cannot edit, but that will be another question.

And yes, the ship is miniature, because Freeship uses meter as base unit, while freecad uses mm. I can scale it up either in Freeship or freecad.

Thanks again!
User avatar
hammax
Veteran
Posts: 1985
Joined: Thu Jan 19, 2017 5:03 pm
Location: Ammersee DE

Re: Importing from FreeShip to be used by FEM?

Post by hammax »

... I supposed the boat should be a hard chined boat and scaled it up to 12m.
Planking 50mm (or less). From Ruled_Surface planking I made a PartWB fusion.
File is too big for presenting here (1500kB).

ScaledPlankingt.PNG
ScaledPlankingt.PNG (41.44 KiB) Viewed 965 times
mag
Posts: 21
Joined: Mon Nov 09, 2020 12:55 pm

Re: Importing from FreeShip to be used by FEM?

Post by mag »

hammax wrote: Thu Nov 12, 2020 7:21 am From Ruled_Surface planking I made a PartWB fusion.
That is a bit more tedious than Part/create shape from mesh, but solves the problem of multiple shell thicknesses.
Thank you.

( Freeship actually uses subdivision surfaces, which makes plate development possible. This is a minor point, as I don't think a bspline is so different as to meaningfully alter the FEM results (a ship should be considerably overbuilt after all). Just out of curiosity, is there a way in Freecad to accurately modell developable surfaces? I'm just fascinated by stitch&glue and steel origami building techniques.)
User avatar
hammax
Veteran
Posts: 1985
Joined: Thu Jan 19, 2017 5:03 pm
Location: Ammersee DE

Re: Importing from FreeShip to be used by FEM?

Post by hammax »

... unfolding = plate development?
In FC there are unfolding tools => especially unfolding mesh.
https://forum.freecadweb.org/viewtopic. ... 85#p223479
With my FC.18.4 under Win10_32bit I can't do that.

MeshPlanking.PNG
MeshPlanking.PNG (29.92 KiB) Viewed 909 times
User avatar
Vincent B
Veteran
Posts: 4713
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: Importing from FreeShip to be used by FEM?

Post by Vincent B »

There a macro to unroll surface as well:
https://wiki.freecadweb.org/Macro_Unroll_Ruled_Surface
Result should be compared with mesh unwrap. ;)
heda
Veteran
Posts: 1348
Joined: Sat Dec 12, 2015 5:49 pm

Re: Importing from FreeShip to be used by FEM?

Post by heda »

Nice work hammax, do you get constant plate thickness when using surface offset this way? I have a vague memory from the distant past in tinkering with fc and shape/surface offsets that I had to give up at that time on constant thickness for multiple curvature surfaces.

Well, getting the fem running with a shell model turned out to be a rabbit hole, some of the sharp corners in fc is certainly not for the fainthearted :shock:, but hang in there and you will get rewarded.

Took a while but finally got there. it’s just a test condition to sort out the workflow, here shown with exaggerated displacement to see that it behaves as expected.

fem_result.png
fem_result.png (64.81 KiB) Viewed 838 times

Here is the crooked path on linux that is behind the above picture.
  • First did the fem setup as any tutorial, keeping in mind that one has to add the shell element thickness as an extra step (which is easy to spot from the fem menu).
  • In the snap fc v18 install gsmh is not included, and I could not get that hooked up with fc, does not matter so much since netgen works just fine on shells as long as one settles for triangular meshing. Actually could not even get the external ccx hooked up with fc, although it is clearly there and usable.
  • Ran the analysis – error. The error was node limit exceeded – there has to be something funny going on with how ccx is included in fc in this snap.
  • Did a small test model to check the workflow, worked just fine – so why did it not work on the hull then?
  • Small side note, when using shells in ccx, ccx will expand it to a full 3d prism (like thickening the face) for the matrix assembly. The default setting in fc is to only bring back the “reduced” shell result. Flipping that switch in fc, one can view the actual calculated 3d-mesh also in fc.
  • Back to the hull and fiddling with linear elements and half hull variants. That got me under the node limit, but sadly just changed the error code, which was now in node dependencies. Changes in the model and the node it got stuck on shifted.
  • Decided to try directly with ccx, did the apt install calculix-ccx (which for whatever reason installed v2.11 which I gather is quite old), took the input deck from fc and the job completed successfully – go and figure...
  • So now I have a result file that I cannot view… back to apt install calculix-cgx and trying to figure out how to view results there. Managed to load something so that one could see that there was coloring. One step closer, we now have what seems to be an ok result file.
  • Now, fc uses ccx, so how to get a loose .frd back into fc so that one can view the results there? Turns out that one can simply import a .frd file, great. Although, just importing it does not make it viewable from the fem wb. One also has to move the results into the Analysis group in the tree (can be done via draft/utils, or a right-click on the results in the tree-view).
  • Finally there :)
Suppose it’s possible to write a macro that is doing all this, after all also the fem wb is running ccx in a subprocess. It is really curious that the ccx behaves differently inside fc compared to outside, maybe someone is able to unlock that mystery. It seems to have something to do with the matrix formulation/assembly. Not knowing ccx very well, wonder if that is before or after spooles steps in (if it does at all for this workflow)?

It should not be too hard to add more realistic framing as surfaces, allowing one to do a fully usable structural check on a realistic hull.
Fc, as always turns out to be versatile, but it does require a bit of patience to get it to play along.

Would not be surprised if it with scripting is possible to go from hull lines as dxf or point cloud to viewable fem result with only 2 user interactions, the first would be to pick a file, the other one would be to pick the uppermost point of the bow (well assuming that you’re ok with doing it without additional framing).
User avatar
johnwang
Veteran
Posts: 1345
Joined: Sun Jan 27, 2019 12:41 am

Re: Importing from FreeShip to be used by FEM?

Post by johnwang »

heda wrote: Sat Nov 14, 2020 9:01 am [*] In the snap fc v18 install gsmh is not included, and I could not get that hooked up with fc, does not matter so much since netgen
Nice job heda.

For fea, always use the latest FC version. https://github.com/FreeCAD/FreeCAD/rele ... g/0.19_pre
Scroll down to the bottom, download from the Assets section.

Just wondering what kind of loads and constrains are applied?

Thanks

John
hfc series CAE workbenches for FreeCAD (hfcNastran95, hfcMystran, hfcFrame3DD, hfcSU2 and more)
User avatar
hammax
Veteran
Posts: 1985
Joined: Thu Jan 19, 2017 5:03 pm
Location: Ammersee DE

Re: Importing from FreeShip to be used by FEM?

Post by hammax »

... converting the hull to a rounded (BSpline) Form:
Offset is possible on a Gordon shell - but it is a little bit kinky near the bow.
It is able to cut off this region by a cube and place there a round bow.
The Gordon surface gives a nice mesh under Mefisto and 200mm max. edge length.
I only can supply the preliminary frames for CurvesWB Gordon, the file afterwards goes over 1Mb.
I think 3D-Offset is performed orthogonally/normal to the local surface and has equal thickness.
Only at complex shape transitions there could be a distortion (my experiences till now).

BSplineHull_3.PNG
BSplineHull_3.PNG (178.79 KiB) Viewed 798 times
Attachments
PointsMeshHull_3.FCStd
FC.18.4
(750.28 KiB) Downloaded 25 times
Post Reply