FEM object types

About the development of the FEM module/workbench.
ulrich1a
Posts: 1379
Joined: Sun Jul 07, 2013 12:08 pm

Re: FEM object types

Postby ulrich1a » Sun Mar 05, 2017 1:09 pm

bernd wrote:Why do you really need access to the python-objects to write out the mesh data ?
This depends on where the information about the type of finite element is stored. In case of axisymmetric elements as example this information needs to be written by writeABAQUS into the calculix-input-file. Triangles are then CAX6-elements or CAX3-elements. If this information is only available in a python object, then I need to access this python object from inside c++. It would be of course much easier, if this information stays in a c++-object.

bernd wrote:I have been playing with writeABAQUS too but I'm not able to do all my wishes in C++.
I started to learn c++ a little bit. The actual state is, that I made a c++ program outside of FreeCAD, that does what I want. It can find out element-faces which are not part of the surface of the solid. The next step is to integrate this program into writeABAQUS.

Ulrich
qingfeng.xia
Posts: 107
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford Uk
Contact:

Re: FEM object types

Postby qingfeng.xia » Mon Mar 06, 2017 5:16 pm

Regarding on the recent submodule name "PyGui" and "ObjectsFem", I am a bit worry of The naming clash/shadow.

It may happen if other big workbench like Arch, also has a "PyGui" folder, and then "PyGui" in Arch will shadow the Fem's. It seems FC will append each Mod folder into search path, that is why each file need a Mod Suffix like "Fem*.py". Correct me if I am not correct.

In that case, "PyFem"/"PyFemGui" or any kind with Fem inside would be safer, C++ Fem/Gui -> "FemGui.so python module" I believe Fem may be reused by other modules, not only Cfd.
Ubuntu 0.17-dev OpenFOAM + FreeCAD
User avatar
bernd
Posts: 3877
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: FEM object types

Postby bernd » Mon Mar 06, 2017 6:29 pm

qingfeng.xia wrote:Regarding on the recent submodule name "PyGui" and "ObjectsFem", I am a bit worry of The naming clash/shadow.

It may happen if other big workbench like Arch, also has a "PyGui" folder, and then "PyGui" in Arch will shadow the Fem's. It seems FC will append each Mod folder into search path, that is why each file need a Mod Suffix like "Fem*.py". Correct me if I am not correct.

In that case, "PyFem"/"PyFemGui" or any kind with Fem inside would be safer, C++ Fem/Gui -> "FemGui.so python module" I believe Fem may be reused by other modules, not only Cfd.
I made a post on developer section of the forum to get more people involved in this topic. https://forum.freecadweb.org/viewtopic.php?f=10&t=21128
User avatar
bernd
Posts: 3877
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: FEM object types

Postby bernd » Mon Mar 06, 2017 6:38 pm

ulrich1a wrote:
bernd wrote:Why do you really need access to the python-objects to write out the mesh data ?
This depends on where the information about the type of finite element is stored. In case of axisymmetric elements as example this information needs to be written by writeABAQUS into the calculix-input-file. Triangles are then CAX6-elements or CAX3-elements. If this information is only available in a python object, then I need to access this python object from inside c++. It would be of course much easier, if this information stays in a c++-object.
I have been thinking about this too. The problem is our FEM mesh data model does not depend on a special solver. As soon as we start to save this information (CAX3 or S8R or whatever specific element type) inside the mesh the mesh data model depends on lots of solver. We could easily save the elements which should be specific in seaparte groups and give the group name the name from the element. Then the exporter needs to support groups and transfers the groupnames into element set names. If the element set name would be the element type we could get around the problem earlier described. The other way would be we would give the writeAbaqus some parameter to work with. These parameter (element set name and typ) could be retrieved from the python FEM elements.

ulrich1a wrote:
bernd wrote:I have been playing with writeABAQUS too but I'm not able to do all my wishes in C++.
I started to learn c++ a little bit. The actual state is, that I made a c++ program outside of FreeCAD, that does what I want. It can find out element-faces which are not part of the surface of the solid. The next step is to integrate this program into writeABAQUS.
Wow cool would this work for Shell and edges too. Means find the edges which does not belong to shells. It is what I need in structural concrete engineering. Slabs and walls are shells and columns are edges in such FEM analysis.

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

Re: FEM object types

Postby bernd » Mon Mar 06, 2017 6:48 pm

ulrich1a wrote: Triangles are then CAX6-elements or CAX3-elements. If this information is only available in a python object,
BTW, we have some hack / work around in FreeCAD master in this regard already. The new fluid 1D needs some other element name too and does it replace afterwards. See https://github.com/FreeCAD/FreeCAD/blob ... s.py#L1429 Means we need to solve this problem somehow to proper fix this and get rid of the word around / hack.

Bernd
ulrich1a
Posts: 1379
Joined: Sun Jul 07, 2013 12:08 pm

Re: FEM object types

Postby ulrich1a » Mon Mar 06, 2017 8:43 pm

bernd wrote:The problem is our FEM mesh data model does not depend on a special solver. As soon as we start to save this information (CAX3 or S8R or whatever specific element type) inside the mesh the mesh data model depends on lots of solver.
I would use a more general approach. The needed c++-object needs to store to the element class and the group name for the elements. writeABAQUS will then generate the element name for Calculix based on this information and the number of nodes per element.

The user has to provide a geometric entity and should give the element class, something like the following.
3D-elements: solid, reduced integration solid, fluid
2D-elements: shells, plane stress, axisymmetric
1D-elements: beam, truss, 1D-flow.

Other FEM-solvers have similar concepts, so the same information can be used again. Although I have to admit, I need to learn about groups in c++ first before able to tackle this. One step after the other.

bernd wrote:Wow cool would this work for Shell and edges too. Means find the edges which does not belong to shells. It is what I need in structural concrete engineering. Slabs and walls are shells and columns are edges in such FEM analysis.
Thats the plan.

Ulrich
fandaL
Posts: 219
Joined: Thu Jul 24, 2014 8:29 am

Re: FEM object types

Postby fandaL » Mon Mar 06, 2017 10:27 pm

Good to see a progress in using element types.
Bernd wrote:
ulrich1a wrote:
bernd wrote:I have been playing with writeABAQUS too but I'm not able to do all my wishes in C++.
I started to learn c++ a little bit. The actual state is, that I made a c++ program outside of FreeCAD, that does what I want. It can find out element-faces which are not part of the surface of the solid. The next step is to integrate this program into writeABAQUS.
Wow cool would this work for Shell and edges too. Means find the edges which does not belong to shells. It is what I need in structural concrete engineering. Slabs and walls are shells and columns are edges in such FEM analysis.

Bernd

There are also cases where shell elements are desirable on volume elements – if I model sandwich structure (in more detail than one composite shell) – elements are connected through common nodes and shell elements can be offset.
In aircraft engineering it is not rare that 1D elements are used as a reinforcement of shell element panels. They share nodes so you do not care about contact and mesh is still nice, easy to compute (probably not in CalculiX).
User avatar
bernd
Posts: 3877
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: FEM object types

Postby bernd » Mon Mar 06, 2017 10:45 pm

fandaL wrote:In aircraft engineering it is not rare that 1D elements are used as a reinforcement of shell element panels. They share nodes so you do not care about contact and mesh is still nice, easy to compute (probably not in CalculiX).
Does it mean they only make the model more stiff.
fandaL
Posts: 219
Joined: Thu Jul 24, 2014 8:29 am

Re: FEM object types

Postby fandaL » Mon Mar 06, 2017 11:18 pm

bernd wrote:Does it mean they only make the model more stiff.

They are called stiffeners and increase especially bending stiffness and buckling load. Like timber beams under a ceilling I guess.
User avatar
bernd
Posts: 3877
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: FEM object types

Postby bernd » Tue Mar 14, 2017 4:07 pm

@ulrich1a:

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

The ViewProvider does not support to display volume and faces either :(