Page 1 of 1

[Solved] Question about FEM examples - mutlimaterial bending beam 5 faces

Posted: Fri Nov 20, 2020 10:13 am
by johnwang
Hi,

Tried it.

The model is Fusion face1+face2+face3+face4+face5. The value of the FemMaterial1's References is 'Face3[Face1]'. How do I read it? Does it mean:

1. Face3's materrial is FemMaterial1
2. Face1's materrial is FemMaterial1
3. Both are FemMaterial1
4. The face between Face3 & Face1 (which is Fcae2) is FemMaterial1

Any of these true?

Regards,

John
femMat.jpg
femMat.jpg (31.81 KiB) Viewed 358 times

Re: Question about FEM examples - mutlimaterial bending beam 5 faces

Posted: Sat Nov 21, 2020 10:33 am
by johnwang
From FreeCAD\Mod\Fem\femexamples\material_multiple_bendingbeam_fivefaces.py:
m1.jpg
m1.jpg (31.33 KiB) Viewed 297 times
Looks like that "Face1" is a bit confusing.

Re: Question about FEM examples - mutlimaterial bending beam 5 faces

Posted: Mon Nov 23, 2020 10:50 am
by bernd
johnwang wrote:
Sat Nov 21, 2020 10:33 am
From FreeCAD\Mod\Fem\femexamples\material_multiple_bendingbeam_fivefaces.py:
m1.jpg
Looks like that "Face1" is a bit confusing.
better to post a link to the code. but use the commit link to keep it even after a change ... https://github.com/FreeCAD/FreeCAD/blob ... es.py#L136

Code: Select all

    material_object1.References = [(doc.Face3, "Face1")]
I will have a look.

The time beeing. If you double cklick in the gui in the FEM Material and select a face in the task panel the face should be hightlighted if the body is visible.

Re: Question about FEM examples - mutlimaterial bending beam 5 faces

Posted: Mon Nov 23, 2020 10:54 am
by bernd
yep select the face in tree view material task panel and the face gets hightligthed in 3D-Scene. If not you need to switch visibilities of some objects.
screen.png
screen.png (39.37 KiB) Viewed 199 times
screen2.png
screen2.png (54.4 KiB) Viewed 198 times

Re: Question about FEM examples - mutlimaterial bending beam 5 faces

Posted: Mon Nov 23, 2020 11:40 am
by bernd
seams all good to me ...

- document object "FemMaterial1": element "Face1" of the document object "Face3"
- document object "FemMaterial2": element "Face1" of the document object "Face2 and element "Face1" of document object "Face4"
- document object "FemMaterial3": since references are empty take all the rest

Re: Question about FEM examples - mutlimaterial bending beam 5 faces

Posted: Tue Nov 24, 2020 3:48 am
by johnwang
bernd wrote:
Mon Nov 23, 2020 11:40 am
seams all good to me ...

- document object "FemMaterial1": element "Face1" of the document object "Face3"
All good. Just at the beginning, hard to understand 'face1 of face1'.

It's pretty smart if no reference specified, it will pick the rest objects. I was thinking It applies to all, but wondering why it is at the end.

If I want to retrieve the material values with script, it seems I have to leave the one with no reference at the end.