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: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: 227
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford UK/Shenzhen China
Contact:

Re: FEM object types

Post by qingfeng.xia »

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 18.04 LTS 64bit, python3, always work with latest FreeCAD daily build
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM object types

Post by bernd »

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
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM object types

Post by bernd »

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
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM object types

Post by bernd »

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
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: FEM object types

Post by ulrich1a »

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: 440
Joined: Thu Jul 24, 2014 8:29 am

Re: FEM object types

Post by fandaL »

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
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM object types

Post by bernd »

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: 440
Joined: Thu Jul 24, 2014 8:29 am

Re: FEM object types

Post by fandaL »

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
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM object types

Post by bernd »

@ulrich1a:

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

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