shell to shell contact

About the development of the FEM module/workbench.

Moderator: bernd

UR_
Posts: 1149
Joined: Tue Jan 03, 2017 8:42 pm

Re: shell to shell contact

Post by UR_ » Mon Jan 13, 2020 5:41 pm

Are mixed meshes supported by FreeCAD FEM?
User avatar
bernd
Posts: 8997
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: shell to shell contact

Post by bernd » Mon Jan 13, 2020 7:39 pm

ahh I forgot ... not with master. With my femmixedbranch yes. https://forum.freecadweb.org/viewtopic. ... 9&start=90
User avatar
bernd
Posts: 8997
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: shell to shell contact

Post by bernd » Tue Jan 14, 2020 12:38 pm

branch:
https://github.com/berndhahnebach/FreeC ... ellcontact

FEM lacks on examples which are uptodate and easy to load. Thus I would like to include the shell contact example in the code. Started to code the example.

ATM I have a small problem. Your tubes seam not to be rotated pi/2 ... ?! The mesh is yours, the tubes are coded by python. I would just remesh the mesh but than the files are not equal (yours and the one I coded.)


Screenshot_20200114_133428.png
Screenshot_20200114_133428.png (501.82 KiB) Viewed 166 times
UR_
Posts: 1149
Joined: Tue Jan 03, 2017 8:42 pm

Re: shell to shell contact

Post by UR_ » Tue Jan 14, 2020 2:03 pm

I think that's because upper tube from my example is rotated twice.
First by z-axis to accomplish tube crossing and a second rotation to move tube's seam to force application point.

Simply copy placement from my file to get identical position and orientation.
User avatar
bernd
Posts: 8997
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: shell to shell contact

Post by bernd » Tue Jan 14, 2020 3:54 pm

UR_ wrote:
Tue Jan 14, 2020 2:03 pm
Simply copy placement from my file to get identical position and orientation.
I have no idea how to create this by Python ...

Code: Select all

>>> obj.Placement
Placement [Pos=(-25,51,475), Yaw-Pitch-Roll=(90,0,90)]
>>> 
Never needed to code this ... :oops:
User avatar
bernd
Posts: 8997
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: shell to shell contact

Post by bernd » Tue Jan 14, 2020 4:13 pm

bernd wrote:
Tue Jan 14, 2020 3:54 pm
UR_ wrote:
Tue Jan 14, 2020 2:03 pm
Simply copy placement from my file to get identical position and orientation.
I have no idea how to create this by Python ...

Code: Select all

>>> obj.Placement
Placement [Pos=(-25,51,475), Yaw-Pitch-Roll=(90,0,90)]
>>> 
Never needed to code this ... :oops:

Code: Select all

obj.Placement.Base = FreeCAD.Vector(-25.0, 51.0, 475.0)
obj.Placement.Rotation.Angle = 2.0943951023931957
obj.Placement.Rotation.Axis = FreeCAD.Vector(0.5773502691896257, 0.5773502691896257, 0.5773502691896257)
but this seams not smart ...
UR_
Posts: 1149
Joined: Tue Jan 03, 2017 8:42 pm

Re: shell to shell contact

Post by UR_ » Tue Jan 14, 2020 4:50 pm

Code: Select all


App.getDocument("TubeTube_stripped").Cylinder.Placement=App.Placement(App.Vector(-25,51,475), App.Rotation(90,0,90), App.Vector(0,0,0))

User avatar
bernd
Posts: 8997
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: shell to shell contact

Post by bernd » Tue Jan 14, 2020 6:30 pm

UR_ wrote:
Tue Jan 14, 2020 4:50 pm

Code: Select all


App.getDocument("TubeTube_stripped").Cylinder.Placement=App.Placement(App.Vector(-25,51,475), App.Rotation(90,0,90), App.Vector(0,0,0))

:D


Screenshot_20200114_192920.png
Screenshot_20200114_192920.png (644.64 KiB) Viewed 107 times
User avatar
bernd
Posts: 8997
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: shell to shell contact

Post by bernd » Tue Jan 14, 2020 6:52 pm

would it be possible to give it a try if my example is equal to yours?

compile https://github.com/berndhahnebach/FreeC ... ellcontact start FreeCAD and run:

Code: Select all

from femexamples.manager import *
doc = run_contact_shell_shell()
BTW: Why is geometrical nonlinearity not set to True?

BTW2: It will only identical to yours as long as you do not remesh. The boolean fragment is not yet coded.
User avatar
bernd
Posts: 8997
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: shell to shell contact

Post by bernd » Tue Jan 14, 2020 7:46 pm

added the unit test as well ... compile my branch ... start FreeCAD ... run:

Code: Select all

import unittest
unittest.TextTestRunner().run(unittest.TestLoader().loadTestsFromName("femtest.app.test_ccxtools.TestCcxTools.test_6_contact_shell_shell"))
IMHO we could go for a merge, if my example is equal to yours ...
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest