FEM object types

About the development of the FEM module/workbench.

Moderator: bernd

ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: FEM object types

Post by ulrich1a »

bernd wrote:Have you seen: https://forum.freecadweb.org/viewtopic. ... 94#p165194

The ViewProvider does not support to display volume and faces either :(
I did not look at this, but saw the problem also now at my testing attempts. You made a hack, is it ready to merge into master?

I got now some time to accomplish my first goal. It is now possible to write an calculix-input-file with solids and shells. See: https://github.com/ulrich1a/FreeCAD_sf_ ... AndShells2

Edges are next, but this already reveals the next problem: If there are solids in the analysis, there is no shell-section written into the inp-file. Actually all elements are in the elements-set Eall. This contains then solid-elements and shell-elements. I think, there is a need to provide different names for each set. But it is actually not clear to me, what is the right way to do this.

I made the test with the attached file.

Ulrich
Attachments
shellbox.fcstd
(22.78 KiB) Downloaded 48 times
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: FEM object types

Post by ulrich1a »

I played a little with a testfile containing a solid with a shell element. It seems, that the references in Gmsh are not right. :?
Other experiences?

Ulrich
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM object types

Post by bernd »

ulrich1a wrote:a solid with a shell element. It seems, that the references in Gmsh are not right. :?
What do you mean with this? Could you give mire informations, or an example?

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

Re: FEM object types

Post by bernd »

ulrich1a wrote:
bernd wrote:Have you seen: https://forum.freecadweb.org/viewtopic. ... 94#p165194

The ViewProvider does not support to display volume and faces either :(
I did not look at this, but saw the problem also now at my testing attempts. You made a hack, is it ready to merge into master?
no, it really is some sort of hack. The problem is, as more I do at the MeshViewProvider, as more I understand it and as more I see it needs lots of changes to fit in our needs. It will need some more time.

At the moment there are lot's of things going on at GSoC.

cheers bernd

I'm curious to test your solid-shell implementation.
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: FEM object types

Post by ulrich1a »

I hit certain problems at further working at writing solids, shells and beams all together in one calculix-input-file. I think, I can solve to write those elements into the input file, but the rest of the FEM-workbench is not suited for this. I came to the conclusion, that the main show-stopper is the mixing of the materials object with the definition of a solid in the analysis.
The material object should be a pure material definition without any reference to the mesh. A new FEM-Geom3D-object is needed, that links the FEM-element-group with the material object. There should always be a mesh-group for 3D-element or 2D-elements or 1D-elements. This would make things easier:
- The solver-object does not need to use complicated heuristics for writing the material data.
- The view-provider for the mesh visualization can just only display the defined element groups.
I would further put a routine for each solver in the FEM-objects, that delivers the needed data for this solver or just writes it directly into the solver input-file. This makes the solver object smaller and less object details have to be handled across objects.

I made an UML-diagram with the program dia to collect my thoughts about organization of the FEM-workbench. I expect, that this causes a lot of changes to the current code. The hope is, that the code gets more understandable with this approach and it is easier to add more features.

Ulrich
Attachments
FEM_objects.dia.zip
(2.71 KiB) Downloaded 42 times
FEM_objects.png
FEM_objects.png (40.51 KiB) Viewed 2253 times
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM object types

Post by bernd »

AFAIK: The problem is with the current implementation the ccx writer writes either solid or shell or beam material element sets. See https://github.com/FreeCAD/FreeCAD/blob ... #L353-L386 This would just needed to be changed to write multiple material element types (solid and shell and beam). You can define shell, beam, solid elements already in FEM workbench.
Last edited by bernd on Sun Apr 16, 2017 9:08 am, edited 2 times in total.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM object types

Post by bernd »

In the regard of your idea ... Just a question: Do we loose the independence off the FEM mesh? With the current implementation everything is defined at the geometry. At very last the mesh is created. The input data is used to create an appropriate mesh. We should not loose this independence since it is a huge advantage of FreeCAD compared to lots of other Software even to some big proprietary ones.
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: FEM object types

Post by ulrich1a »

bernd wrote:AFAIK: The problem is with the current implementation the ccx writer writes either solid or shell or beam material element sets. See https://github.com/FreeCAD/FreeCAD/blob ... #L353-L386 This would just needed to be changed to write multiple material element types (solid and shell and beam). You can define shell, beam, solid elements already in FEM workbench.
I do agree, I found kind of solution for this part of the code. Where I have a problem is the function def write_constraints_fixed(self, f): line 741 in the same file. This changes the written data just on the existence of a shell, even if I need a fixed constraint for a solid. And I got no idea, what kind of information from the current implementation I could use to solve it. My idea is to add some logic or a user defined input, that stores the information in the fixed-constraint-object, to what kind of FEM-element the fixed constraint is attached to. The pure brep-data are not decisive. A brep-face without solid can be a shell or an axisymmetric plane in a FEM analysis for example. Only the shell has the rotational degrees of freedom.
bernd wrote:Just a question: Do we loose the independence off the FEM mesh?
Of course not, the independence of the FEM mesh is the basis, I do build on. I only see the problem with my limited knowledge of C++, that this is a very long way to go for me.

Offtopic question: How do you create the blob-link?

Ulrich
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: FEM object types

Post by ulrich1a »

This is an answer to this post. https://forum.freecadweb.org/posting.ph ... 2#pr170043
But I think it should be written here.
bernd wrote:Solve this on either shell or solid mesh is possible, but on mixed meshes we really are in trouble ...
This is also a problem for pure 2D-meshes, when we want using more options from calculix. Those meshes are useful in several cases, where only a 2D-section needs to be analyzed, in order to get insight into the stresses of a 3D-objekt:
For a part with rotational symmetry you can use a section and analyze the section with axisymmetric elements. Example for Ansys: http://mae.uta.edu/~lawrence/ansys/thic ... linder.htm
For a flat part, you can use Plane-Stress-elements to calculate stresses in plane. See here for an explanation of Plane-stress-elements: http://www.digitaleng.news/de/simplifyi ... ne-strain/
Other cases are shells or membranes. All of them can base on a pure 2D-geometry.
Depending on the type of element used, the constraints and other things are different in the input file, even if the geometry of the mesh is just a flat face. I already went through this, where I used a section of a part with rotational symmetry. I could make the mesh and node sets and element sets in FreeCAD, but had to edit the file and needed to apply the constraints with cgx.

So we need a user input, what sort of element should be used for the geometry, the user wants to analyze. This information needs to be accessible for the definition of the other parts of the analysis: mesh element type, writing of the geometry definition into the input file, constraints definitions and others. In order to give this a clean structure, an object defining 3D-geometry independent from material is helpful.

When the user selects the part to be analyzed at time of adding of the analysis-object, a geometry object could be made automatically.

Ulrich
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM object types

Post by bernd »

ulrich1a wrote:Offtopic question: How do you create the blob-link?
* on https://github.com/FreeCAD/FreeCAD/commits/master click on the commit ID of the last commit --> https://github.com/FreeCAD/FreeCAD/comm ... 0a6689f7c9
* click on browse files --> https://github.com/FreeCAD/FreeCAD/tree ... 0a6689f7c9
* browse to the file you would like to show something --> https://github.com/FreeCAD/FreeCAD/blob ... iterCcx.py
* click on the line number --> https://github.com/FreeCAD/FreeCAD/blob ... cx.py#L885
* manually add -L900 in your browser address line --> https://github.com/FreeCAD/FreeCAD/blob ... #L885-L900
* copy and paste the address line, thats it ...

In the regard of your ideas I'm with you but not in any detail. I'd like to have a look at the pressure stuff first.
Post Reply