more than one materials

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: more than one materials

Post by PrzemoF »

That looks really good! I did some tests and it works as expected :D

A minor comment if you don't mind: could you rename list_item_right_clicked (it's very vague) to something like reference_list_right_clicked or just something that tell what has been right clicked? MechanicalMaterial.py needs some serious renaming, so we might do it later.
Also I'm not sure if adding a reference works exactly as expected (select object + click button should work the same way as click button + select object?), but I'll test it again when you have the final version.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: more than one materials

Post by bernd »

PrzemoF wrote:That looks really good! I did some tests and it works as expected :D
Thanks for testing.
PrzemoF wrote:A minor comment if you don't mind: could you rename list_item_right_clicked (it's very vague) to something like reference_list_right_clicked or just something that tell what has been right clicked?
sure
PrzemoF wrote: MechanicalMaterial.py needs some serious renaming, so we might do it later.
of course it does !!!
PrzemoF wrote: Also I'm not sure if adding a reference works exactly as expected (select object + click button should work the same way as click button + select object?), but I'll test it again when you have the final version.
you need an observer fot this. Like ArchWB has in some objects (ArchRebar for example https://github.com/FreeCAD/FreeCAD_sf_m ... ar.py#L129). I do not know how to develop, not yet.
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: more than one materials

Post by ulrich1a »

I tried to do some calculations with Calculix over the years. It was always difficult to get a working model. Now with the FEM-workbench it is much easier to generate input-files for calculix. :D Even for calculations that do not have buttons in the workbench, one can define constraints:
I made a model with cyclic symmetry: I just added fixed constraints and edited them later in the input file. I was able to do a calculation with creep and nonlinear behavior.
I missed the option to use different materials, because I had not time to compile this branch on windows. Keep on going.

This gave me the idea, would it not be helpful, to have menus that only define set of nodes or sets of elements in the input file. These sets can then be used for special cases, which needs manual additions to the inputfile. Or better add an input field to those sets, where those special commands can be added manually and would automatically added to the input file.
This would open the range of calculation types a lot. It needs a good knowledge of calculix to use them, but may be not so difficult to program at this stage.

Thanks again
Ulrich
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: more than one materials

Post by sgrogan »

ulrich1a wrote: I missed the option to use different materials, because I had not time to compile this branch on windows. Keep on going.
Thanks again
Ulrich
I try to keep up with the development on this. If you need/want win builds just ask.
"fight the good fight"
User avatar
psicofil
Posts: 154
Joined: Thu Dec 15, 2011 11:02 pm

Re: more than one materials

Post by psicofil »

ulrich1a wrote:
This gave me the idea, would it not be helpful, to have menus that only define set of nodes or sets of elements in the input file. These sets can then be used for special cases, which needs manual additions to the inputfile. Or better add an input field to those sets, where those special commands can be added manually and would automatically added to the input file.
This would open the range of calculation types a lot.
+1 Totally agree, it would be great and very useful to have this possibility in FEM module. Then it would be very easy to write macros or template for the many options available in Calculix.
Sorry for my bad english.
Regards.
Ing. Gomez Lucio
Scope Ingenieria (scopeingenieria.com)
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: more than one materials

Post by bernd »

psicofil wrote:
ulrich1a wrote:
This gave me the idea, would it not be helpful, to have menus that only define set of nodes or sets of elements in the input file. These sets can then be used for special cases, which needs manual additions to the inputfile. Or better add an input field to those sets, where those special commands can be added manually and would automatically added to the input file.
This would open the range of calculation types a lot.
+1 Totally agree, it would be great and very useful to have this possibility in FEM module. Then it would be very easy to write macros or template for the many options available in Calculix.
Sorry for my bad english.
Regards.
Be patient. What you guys would like to have is what I use to make the multiple materials possible. But my solution to get the element sets is more a proof of concept than ready to merge. It has been allready disscussed to reimplement the writeAbaqus() method in src/Mod/Fem/FemMesh.cpp to be able to control this task from python. see viewtopic.php?f=18&t=11204&start=10
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: more than one materials

Post by bernd »

Rebased the multiple materials branch with current master (including new Result object and Quick Analysis with FemTools implementation).

Made some small changes in the gui. Added a new combo box for material shapes. If all is used only one material is allowed and this material behaves like material behaves in current master. If referenced is used reference shapes could be selected. It is possible to select as much as possible. They get added to the list imediately. If remaining is choosen all not referenced solids get this material.

wmayer wrote:
A problem resits. The BRep_Tool::Tolerance(solid) want work on the solid. I'm as always if it's C++ missing something.
Iterate over the faces of a solid and invoke getNodesByFace for each face.
Since my lack of C++ knowledge this part is still missing. Any help in this regard is happily appreciated.

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

find a file to test in following post:
viewtopic.php?f=18&t=10640#p92484
screen.jpg
screen.jpg (194.71 KiB) Viewed 2487 times
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: more than one materials

Post by bernd »

wmayer wrote:
bernd wrote:A problem resits. The BRep_Tool::Tolerance(solid) want work on the solid.
Iterate over the faces of a solid and invoke getNodesByFace for each face.
As far as I understand if over the faces is iterated only the surface nodes are returned. But all nodes inside the bounding box of the solid are needed.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: more than one materials

Post by bernd »

bernd wrote:
wmayer wrote:
bernd wrote:A problem resits. The BRep_Tool::Tolerance(solid) want work on the solid.
Iterate over the faces of a solid and invoke getNodesByFace for each face.
As far as I understand if over the faces is iterated only the surface nodes are returned. But all nodes inside the bounding box of the solid are needed.
attached a file and some code:
branch is https://github.com/berndhahnebach/FreeC ... aterials14

getNodesBySolid()

Code: Select all

mesh  = App.ActiveDocument.getObject("Box_Mesh")
solid = App.ActiveDocument.getObject("Box")
nodes1 = mesh.FemMesh.getNodesBySolid(solid.Shape)
mesh.ViewObject.HighlightedNodes = nodes1
print len(nodes1)
returns 2650 nodes

getNodesByFace()

Code: Select all

mesh  = App.ActiveDocument.getObject("Box_Mesh")
solid = App.ActiveDocument.getObject("Box")
nodes2 = []
for f in solid.Shape.Faces:
    for node in mesh.FemMesh.getNodesByFace(f):
        if node not in nodes2:
            nodes2.append(node)

mesh.ViewObject.HighlightedNodes = nodes2
print len(nodes2)
returns 1250 nodes

file:
getNodesBySolid.FCStd
(120.96 KiB) Downloaded 57 times
Post Reply