FEM crash when trying to write calculix input file

About the development of the FEM module/workbench.

Moderator: bernd

wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FEM crash when trying to write calculix input file

Post by wmayer »

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

Re: FEM crash when trying to write calculix input file

Post by bernd »

:D
I had allready a version running here but it was just a hack not worth merging into FreeCAD. I knew it would give a better solution. I was on the way when I saw your post yesterday. I just had a view on github and knew that's what it needs. And yeah it works :D We are on! The most import for 1D and 2D fem is done. We are able to write the mesh !!!

How about the view provider of 1d or 2D meshes? I had a view on the viewprovider of FemMesh but this is a lot of code ... It's far far away of my knowledge. On the other hand 1D or 2D is only a subset of 3D mesh. So it should be possible to reuse code of the current 3Dmesh view provider.
wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FEM crash when trying to write calculix input file

Post by wmayer »

The most import for 1D and 2D fem is done. We are able to write the mesh !!!
I wonder about what is a valid FEM mesh. Is it allowed to consist of multiple components? For instance is it allowed to have a volumetric part, a surface part that is not part of the volume and then a curve that is not part of the volume and surface. Because if these is allowed then the current implementation would ignore the surfaces and curves on export.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM crash when trying to write calculix input file

Post by bernd »

wmayer wrote:
The most import for 1D and 2D fem is done. We are able to write the mesh !!!
I wonder about what is a valid FEM mesh. Is it allowed to consist of multiple components? For instance is it allowed to have a volumetric part, a surface part that is not part of the volume and then a curve that is not part of the volume and surface. Because if these is allowed then the current implementation would ignore the surfaces and curves on export.
Yes it is possible to have that as well. But one needs to take care about the connecting. An example from my buissnes would be. In buildings normaly slabs and walls are modelled by shell-elements and columns are modelled by beam-elements. All togeter in one big huge calculation run. Attached an example of CalculiX manual. Our implementation does not handle this ...

BTW. There are more things which are not handeled by the method currently. We will need to split the elementset in pices of elementsets according to the materials. Once if the definition of materials for individual shapes is running. (we havn't talked about this one yet).
Attachments
shellbeam.inp.zip
(1.45 KiB) Downloaded 70 times
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM crash when trying to write calculix input file

Post by bernd »

Again checked Calculix (Abaqus) format. Elementsets (ELSET) for material could be defined afterwards. Means we don't need to split for this :D

As for the case you mentioned. This should be possible by writeAbaqus(). The problem is we need the ELSET name and the appropriate Elementnumbers afterwards in MechanicalAnalysis.py to define the Elementtype. An other possibility would be just to write the whole mesh without the ELSET=... and generate the ELSET later in MechanicalAnalysis.py. But than we need a possibility to get alist of the elementnumbers by python (list elementids beam, list elementids shell, list elementids volume) ...

Since I'm a python boy I really like the later. We could do all in python in MechnicalAnalysis.py than. The problem we need all getNodeByEdge(), getNodeByFace(), getNodeBySolid() for the elements means getElementByEdge(), getElementByFace(), getElementBySolid()
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: FEM crash when trying to write calculix input file

Post by PrzemoF »

We should start thinking about splitting writing .inp file from the rest in MechanicalAnalysis.py There is no need to keep gui handling procedures together with the export part. I'm expecting that the export part will be growing over time.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM crash when trying to write calculix input file

Post by bernd »

PrzemoF wrote:We should start thinking about splitting writing .inp file from the rest in MechanicalAnalysis.py There is no need to keep gui handling procedures together with the export part. ...
+1 !!!!
We may see more solver than CalculiX. Since the gui could look very much the same for another solver it would be much more easy to implement another solver if we would split the gui from the rest! They even could exsist side by side. It would be FreeCAD like.

But on the other side as you may know I'm not the gui guy. Means it's mostly testing I could do in this regard.
PrzemoF wrote:... I'm expecting that the export part will be growing over time.
For sure. I have a few things in mind ...
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: FEM crash when trying to write calculix input file

Post by PrzemoF »

I'll try to do it next week.
Post Reply