CalculiX 3-node Beam Element

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
HarryvL
Posts: 1052
Joined: Sat Jan 06, 2018 7:38 pm

CalculiX 3-node Beam Element

Postby HarryvL » Sat Apr 07, 2018 12:38 am

In another post (https://forum.freecadweb.org/viewtopic. ... &start=100) I raised a concern about the accuracy of the results obtained with the CalculiX 3-node beam element. Here some further notes and considerations.

I analysed the problem of a simply supported beam under uniform load and found that for a coarse mesh (1 three-noded element) the mid-span displacement is 20% lower than that obtained with classical beam theory (i.e. 59.5393 mm versus a theoretical value of 74.4048 mm):

Simple_Beam_Disp_Coarse_Mesh.png
Simple_Beam_Disp_Coarse_Mesh.png (221.85 KiB) Viewed 832 times

It is only with a very fine mesh that a good agreement with theory is achieved (73.7716 mm, which is 0.9% below the theoretical value).

Simple_Beam_Disp_Fine_Mesh.png
Simple_Beam_Disp_Fine_Mesh.png (208.44 KiB) Viewed 832 times

My initial suspicion was that the uniform load was inconsistently applied and upon close inspection I found that there is indeed a difference between the nodal load values exported to INP file and what is obtained by integrating the Hermitian shape functions for a three-node beam (e.g. https://pdfs.semanticscholar.org/12be/d ... 87f271.pdf):

Consistent Load Vector.png
Consistent Load Vector.png (46.86 KiB) Viewed 832 times

However, manual correction of the *CLOAD card did not give any improvement of the results.

To demonstrate that a normal 3-node Hermitian element (i.e. with displacement and rotational degrees of freedom) should give very accurate results, I generated the stiffness matrix for a single element and multiplied its inverse with the above consistent load vector:

Spreadsheet4.png
Spreadsheet4.png (32.44 KiB) Viewed 756 times

This shows that a single three-noded element can reproduce the theoretical value for the maximum displacement of a simply supported beam under uniform load to within 0.0000512%.

It is therefore worth further investigating why the CCX beam gives such large errors for this simple case.
Last edited by HarryvL on Sat Apr 07, 2018 3:08 pm, edited 1 time in total.
User avatar
bernd
Posts: 8488
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: CalculiX 3-node Beam Element

Postby bernd » Sat Apr 07, 2018 6:43 am

check this: https://github.com/FreeCAD/FreeCAD/blob ... #L820-L863

should we change them to your values? I do not know any of such FEM back gound in detail. I just used the values from the book mentioned in the source code.

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

Re: CalculiX 3-node Beam Element

Postby bernd » Sat Apr 07, 2018 6:54 am

ahh and in the other topic where I copied all the messages from guido and martin I should add some more. They had another conversation on the mailing list in the regard of beam examples.

BTW: Might be worth for you to sign ccx mailinglist. There is only one or two posts each day, but the developer guido and one of the advanved users martin kraska reads and writes regulary over there.

BTW Do you know martin kraskas ccx examples on github? To recode them in python in FreeCAD has been on my todo for years, but there has been any time some more impotant dev to do :geek:
User avatar
bernd
Posts: 8488
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: CalculiX 3-node Beam Element

Postby bernd » Sat Apr 07, 2018 6:56 am

User avatar
HarryvL
Posts: 1052
Joined: Sat Jan 06, 2018 7:38 pm

Re: CalculiX 3-node Beam Element

Postby HarryvL » Sat Apr 07, 2018 7:59 am

No need to change them Bernd. The shape functions I used are for a classical 3-node Hermitian beam but in CCX this is translated into a volume element. So the manual change I made to *CLOAD had no effect. Also, I now think I know why the CCX 3-Node element behaves so poorly. It's probably shear locking. That's what you can get when you use volume elements for beams, plates and shells. The same element with reduced integration (B32R) should perform much better for this example. I will try when I am at my computer. However good results with reduced integration are not guaranteed for all situations. You can get funny zero energy patterns (called hourglassing).

Finally, the traditional beam element with 3 nodes has 6 degrees of freedom and can therefore represent a 5th degree polynomial displacement exactly. This implies that up to linear loads can be calculated without theoretical error. The small error I got was due to numerical rounding.

So what do I learn from all of this? 1) The classical beam element is still by far the best for elastic analysis. 2) However, for plasticity you need an element of CCX type. 3) Use reduced integration, but always check for hourglassing.
User avatar
HarryvL
Posts: 1052
Joined: Sat Jan 06, 2018 7:38 pm

Re: CalculiX 3-node Beam Element

Postby HarryvL » Sat Apr 07, 2018 9:33 am

bernd wrote:
Sat Apr 07, 2018 6:54 am
BTW Do you know martin kraskas ccx examples on github? To recode them in python in FreeCAD has been on my todo for years, but there has been any time some more impotant dev to do
I know the examples. They are really cool and show the strength of Calculix.

They show the workflow for many practical analyses and therefore give inspiration on where FEM workbench could go in the future ?! I would be keen to help map out those multi-step work flows for a few typical cases ... for example how to automate what I did by hand for the knee joint example. The whole design workflow for a practical structural engineering problem, so to say.
User avatar
HarryvL
Posts: 1052
Joined: Sat Jan 06, 2018 7:38 pm

Re: CalculiX 3-node Beam Element

Postby HarryvL » Sat Apr 07, 2018 2:51 pm

HarryvL wrote:
Sat Apr 07, 2018 7:59 am
... Also, I now think I know why the CCX 3-Node element behaves so poorly. It's probably shear locking. That's what you can get when you use volume elements for beams, plates and shells. The same element with reduced integration (B32R) should perform much better for this example.
Well, I tried and it's not shear locking. The results for the B32R element are exactly the same - 20% in error. I read CCX 2.13 manual and see that similar examples/issues are discussed there. The manual says displacements are quadratic (2nd order polynomial), which implies that displacement and rotations are both interpolated independently to 2nd order, unlike in the classical beam element.

To verify that the order of interpolation leads to the 20% error, I derived the stiffness matrix for a quadratic interpolation of displacements, inverted it and multiplied this with the consistent load vector for quadratic interpolation:

Spreadsheet5.png
Spreadsheet5.png (11.38 KiB) Viewed 755 times

The displacement thus obtained is indeed very close to the CCX result.

Conclusion: to obtain accurate results with the CCX beam element you need to use fine meshes :(
User avatar
HarryvL
Posts: 1052
Joined: Sat Jan 06, 2018 7:38 pm

Re: CalculiX 3-node Beam Element

Postby HarryvL » Sat Apr 07, 2018 3:10 pm

Note: I corrected an error in figures "Spreadsheet4.png" and "Spreadsheet5.png"
User avatar
bernd
Posts: 8488
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: CalculiX 3-node Beam Element

Postby bernd » Sun Apr 08, 2018 1:02 pm