FreeCAD as pre-post processor for MBDyn

About the development of the FEM module/workbench.

Moderator: bernd

carno
Posts: 9
Joined: Sun Jun 18, 2017 4:38 am

Re: FreeCAD as pre-post processor for MBDyn

Postby carno » Wed Nov 04, 2020 5:14 am

T-Garnier wrote:
Tue Nov 03, 2020 5:31 pm
Hello,

you can find the documation here: https://www.mbdyn.org/userfiles/documen ... -1.7.3.pdf or directly download it from https://www.mbdyn.org/?Software_Download.

As shown on the documentation, the keyword "offset" exists. The InLine joint works as follow:

The node N2' (moved from N2 by "offset" keyword) is constrained on the line define by N1' (moved from N1 by "position" keyword) and the direction v(defined by "direction" keyword) as shown on the above illustration.
inline.PNG
Thank you for the nice explanation. You guys are doing very useful and great work.
HaiLiExp
Posts: 4
Joined: Sun Oct 25, 2020 6:36 pm

Re: FreeCAD as pre-post processor for MBDyn

Postby HaiLiExp » Fri Nov 06, 2020 7:40 am

Hello developers

I want to realize the following tutorial, but there are missing node types: abstract, dummy; the joint types: in plane, revolute rotation; element types: genel, force. I am also not clear how to create reference surfaces or lines which coincide with the geometry. What can I do for this please? Thank you very much for your advices in advance.

https://www.sky-engin.jp/en/MBDynExampl ... /ex22.html

Best regards
Hai Li
User avatar
mfasano
Posts: 122
Joined: Wed Apr 11, 2018 12:31 pm

Re: FreeCAD as pre-post processor for MBDyn

Postby mfasano » Fri Nov 06, 2020 8:50 pm

HaiLiExp wrote:
Fri Nov 06, 2020 7:40 am
I want to realize the following tutorial, but there are missing node types: abstract, dummy; the joint types: in plane, revolute rotation; element types: genel, force. I am also not clear how to create reference surfaces or lines which coincide with the geometry. What can I do for this please? Thank you very much for your advices in advance.
There are a lot of elements that we do not have code for. My first priority is getting the ones we do have code for working. Another contributor had suggested making a string object so you can write elements manually we don't have code for and it would be saved in the FreeCAD file and written to the input file. I am on board with that, but I don't know when that will be written. There are some excellent programers contributing to FreeCAD, but I am not one of them. It will take time.

Thanks for you interest in the workbench.
carno
Posts: 9
Joined: Sun Jun 18, 2017 4:38 am

Re: FreeCAD as pre-post processor for MBDyn

Postby carno » Sat Nov 07, 2020 4:40 am

I think there was one person Jose who was much ahead on this. But he is not on the forum now a days. He has lots of code on this. Hopefully he starts again. If mfasano gets his code, it will be very helpful.

I want to try following tutorial.

https://www.sky-engin.jp/en/MBDynExampl ... /ex13.html
User avatar
mfasano
Posts: 122
Joined: Wed Apr 11, 2018 12:31 pm

Re: FreeCAD as pre-post processor for MBDyn

Postby mfasano » Sat Nov 07, 2020 3:28 pm

I have fixed the inline joint offset bug(commit 160). I will be working on the tutorial for the slide crank mechanism. I will let you know when I am done with that.
User avatar
mfasano
Posts: 122
Joined: Wed Apr 11, 2018 12:31 pm

Re: FreeCAD as pre-post processor for MBDyn

Postby mfasano » Sat Nov 07, 2020 3:44 pm

carno wrote:
Sat Nov 07, 2020 4:40 am
I want to try following tutorial.

https://www.sky-engin.jp/en/MBDynExampl ... /ex13.html
I have the joints for that example. I will need the force and plugin variables.
carno
Posts: 9
Joined: Sun Jun 18, 2017 4:38 am

Re: FreeCAD as pre-post processor for MBDyn

Postby carno » Mon Nov 09, 2020 5:24 am

mfasano wrote:
Sat Nov 07, 2020 3:44 pm
I have the joints for that example. I will need the force and plugin variables.
I really appreciate the work !

Another thing, may be trivial. It gives a warning when I switch to MBDyn WB.
<string>:95: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
T-Garnier
Posts: 11
Joined: Sat Jun 27, 2020 5:30 am

Re: FreeCAD as pre-post processor for MBDyn

Postby T-Garnier » Tue Nov 10, 2020 12:55 am

Thanks for your feedback. The warning appears when we add the mbdyn logo to the preferences tab. Actually, I don't know the source of the problem, but as it has no impact on the workbench itself, it is not the top priority.
carno
Posts: 9
Joined: Sun Jun 18, 2017 4:38 am

Re: FreeCAD as pre-post processor for MBDyn

Postby carno » Thu Nov 12, 2020 11:16 am

Dear All,

Any idea how to constraint a point (or edge) always on an edge (or surface) in FreeCAD? I know this may not be purely related to MBDyn forum, but MBD people will know this better. This is similar to contact constraint. I am trying to figure it our but no results yet.
Thanks in advance.

"This point should always follow this edge" constraint, I am talking about.
User avatar
mfasano
Posts: 122
Joined: Wed Apr 11, 2018 12:31 pm

Re: FreeCAD as pre-post processor for MBDyn

Postby mfasano » Tue Nov 17, 2020 3:06 pm

I have written a tutorial on how to simulate a slide crank as done in the sky engineering tutorial below.
https://www.sky-engin.jp/en/MBDynTutori ... hap17.html

I hope it helps. The tutorial is in the WB's repository wiki; linked below.
https://github.com/mfasano727/MBDynFCwb ... k-Tutorial

There is a bug it the axial rotation joint and the revolut hinge joint. the simulation still works it just not quit the way it is supposed to, The bug fix will not change the tutorial.

The first picture shows the initial position of the mechanism. you can see how the parts side by side(not overlapping). The next picture shows the final position of the mechanism. you can see the part overlap. That is not what should happen.

I know how to fix this case, but my misunderstanding of how the MBDyn works makes me less confident this will fix it in gerneral.
Attachments
init_crank.jpg
init_crank.jpg (45.87 KiB) Viewed 327 times
final_crank.jpg
final_crank.jpg (40.02 KiB) Viewed 327 times