more than one materials
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Re: more than one materials
That looks really good! I did some tests and it works as expected
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.
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.
Re: more than one materials
Thanks for testing.PrzemoF wrote:That looks really good! I did some tests and it works as expected
surePrzemoF 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?
of course it does !!!PrzemoF wrote: MechanicalMaterial.py needs some serious renaming, so we might do it later.
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.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.
Re: more than one materials
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. 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
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
Re: more than one materials
I try to keep up with the development on this. If you need/want win builds just ask.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
"fight the good fight"
Re: more than one materials
+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.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.
Sorry for my bad english.
Regards.
Ing. Gomez Lucio
Scope Ingenieria (scopeingenieria.com)
Scope Ingenieria (scopeingenieria.com)
Re: more than one materials
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=10psicofil wrote:+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.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.
Sorry for my bad english.
Regards.
Re: more than one materials
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.
branch:
https://github.com/berndhahnebach/FreeC ... aterials14
find a file to test in following post:
viewtopic.php?f=18&t=10640#p92484
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.
Since my lack of C++ knowledge this part is still missing. Any help in this regard is happily appreciated.wmayer wrote:Iterate over the faces of a solid and invoke getNodesByFace for each face.A problem resits. The BRep_Tool::Tolerance(solid) want work on the solid. I'm as always if it's C++ missing something.
branch:
https://github.com/berndhahnebach/FreeC ... aterials14
find a file to test in following post:
viewtopic.php?f=18&t=10640#p92484
Re: more than one materials
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.wmayer wrote:Iterate over the faces of a solid and invoke getNodesByFace for each face.bernd wrote:A problem resits. The BRep_Tool::Tolerance(solid) want work on the solid.
Re: more than one materials
attached a file and some code:bernd wrote: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.wmayer wrote:Iterate over the faces of a solid and invoke getNodesByFace for each face.bernd wrote:A problem resits. The BRep_Tool::Tolerance(solid) want work on the solid.
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)
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)
file: