Help to debug "Error on: FemConstraintForce"

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
gspeed
Posts: 18
Joined: Mon Sep 25, 2017 7:34 pm

Help to debug "Error on: FemConstraintForce"

Post by gspeed »

I'm getting the "Error on: FemConstraintForce --> Fusion003.Face19" error on a motorbike frame when writing the inp file. No error in Part->Check Geometry. Same error if I start the analisys from a shape union, a simple copy, a convert to solid etc (yeah... I tried to be creative).

Image

How can I understand what is going wrong? Thanks!

File is available here:
with FEM analysis (same as screenshot)
https://drive.google.com/open?id=0B8Y7t ... lN2bUgtS0E
original working document
https://drive.google.com/open?id=0B8Y7t ... y1kUTNfcjA

OS: Ubuntu 16.04.3 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6712 (Git)
Build type: None
Branch: releases/FreeCAD-0-16
Hash: da2d364457257a7a8c6fb2137cea12c45becd71a
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

ccx Version: 2.9
Christoph
Posts: 55
Joined: Fri Jul 08, 2016 9:02 pm

Re: Help to debug "Error on: FemConstraintForce"

Post by Christoph »

please dont use 0.16 version regarding fem workbench. 0.17 version of freecad has a much more powerfull fem workbench with lots of fixes and improvements. You can use daily builds with ubuntu: https://launchpad.net/~freecad-maintain ... ecad-daily
Maybe that will already solve this problem.
under windows just use a 0.17 pre version: https://github.com/FreeCAD/FreeCAD/releases
User avatar
gspeed
Posts: 18
Joined: Mon Sep 25, 2017 7:34 pm

Re: Help to debug "Error on: FemConstraintForce"

Post by gspeed »

Right - I switched to another PC with 0.17 but the FEM module seems to built without NETGEN support... let me figure out that :geek:
Christoph
Posts: 55
Joined: Fri Jul 08, 2016 9:02 pm

Re: Help to debug "Error on: FemConstraintForce"

Post by Christoph »

yes, just use Gmsh, its the icon right beside of the netgen mesh button. Some thought about the analysis: the tubes are pretty thin with 1 mm, maybe it is better to use shell elements because such thin geometries to mesh with volume elements is painfull. I was not able to create volume elements within 500 seconds of meshing time...
I gave it a quick try, but when transforming the model to faces with facebinder tool in the draft workbench, not the whole model is going to be meshed. The tube with the fixed constraint is pretty persistent against meshing. Always something new...
Image
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Help to debug "Error on: FemConstraintForce"

Post by bernd »

gspeed wrote: Mon Sep 25, 2017 10:00 pm Right - I switched to another PC with 0.17 but the FEM module seems to built without NETGEN support... let me figure out that :geek:
use latest win dev builds. AFAIK netgen is again included, but as christiph said you could use gmsh instead.

bernd
User avatar
gspeed
Posts: 18
Joined: Mon Sep 25, 2017 7:34 pm

Re: Help to debug "Error on: FemConstraintForce"

Post by gspeed »

Bernd - thanks but I've only linux boxes around.

Christoph - I did not succeed on creating a mesh in 0.17 with gmsh - after a while I get a core dump with the below on std output

Code: Select all

*** Error in `gmsh': double free or corruption (!prev): 0x00005556d3838f80 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7908b)[0x7fa00e27c08b]
/lib/x86_64-linux-gnu/libc.so.6(+0x82c3a)[0x7fa00e285c3a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7fa00e289d2c]
/usr/lib/x86_64-linux-gnu/libtet.so.1.5(_ZN10tetgenmesh10freememoryEv+0x385)[0x7fa00cba7925]
[...]
While if I try to run the GMSHMacro it complains about line 19 attempting to import FemAnalysis with

Code: Select all

<type 'exceptions.ImportError'>: No module named FemAnalysis
(maybe this is expected in 0.17 since Macro is for 0.16?)

Anyway, I've been able to import in 0.17 the netgen mesh generated with 0.16, however - and this might be expected - I get the same "Error on: FemConstraintForce --> FusionX.FaceY" when creating the calculix imp file. Note the file is generated and- this happens both in 0.16 & 0.17 - if I run calculix on the generated inp file it runs for a while, complaining several times about about:

Code: Select all

*ERROR in e_c3d: nonpositive jacobian         determinant in element  xxxxxxx
but it ends with "Calculix Done!" green message: the "CalculiX_static_results" item seems ok, the mesh get distorted when I apply the force via the slider, displacement colors looks fine while Von Mises stress / Principals stress all looks green (while I expected red spots BUT I might miss some theory here).

Thanks for your patience, I'll try to better understand why gmsh is failing on Linux, perhaps I should upgrade it...

OS: Ubuntu 17.04
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12195 (Git)
Build type: None
Branch: master
Hash: f3953a45e3c073c97fe05a10c5871abd25ea1d30
Python version: 2.7.13
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Help to debug "Error on: FemConstraintForce"

Post by bernd »

gspeed wrote: Tue Sep 26, 2017 8:07 am Bernd - thanks but I've only linux boxes around.
[/quote] Ahh, on ubuntu you simply need to install ppa and FreeCAD will run with netgen.
gspeed wrote: Tue Sep 26, 2017 8:07 amWhile if I try to run the GMSHMacro it complains about line 19 attempting to import FemAnalysis with

Code: Select all

<type 'exceptions.ImportError'>: No module named FemAnalysis
(maybe this is expected in 0.17 since Macro is for 0.16?)
This macro is outdated and all it's functionalaty is included in FreeCAD FEM GMSH mesh tool.
gspeed wrote: Tue Sep 26, 2017 8:07 am Anyway, I've been able to import in 0.17 the netgen mesh generated with 0.16, however - and this might be expected - I get the same "Error on: FemConstraintForce --> FusionX.FaceY" when creating the calculix imp file.
would you post this file?

gspeed wrote: Tue Sep 26, 2017 8:07 am if I run calculix on the generated inp file it runs for a while, complaining several times about about:

Code: Select all

*ERROR in e_c3d: nonpositive jacobian         determinant in element  xxxxxxx
but it ends with "Calculix Done!" green message: the "CalculiX_static_results" item seems ok, the mesh get distorted when I apply the force via the slider, displacement colors looks fine while Von Mises stress / Principals stress all looks green (while I expected red spots BUT I might miss some theory here).
nonpositve jacobians are a problem we have been faceing a few time already. It is a sign of a bad mesh quality in some elements. Normally ccx refueses to solve a mesh with non positive jacobians.

BTW: what you could do, is export your geometry into a brep file and open the mesh in GMSH GUI and mesh it manually and reimport it in FreeCAD by the use of unv file format.

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

Re: Help to debug "Error on: FemConstraintForce"

Post by bernd »

Ahh for mesh testing in FreeCAD you do not need to add any constraint. Just add a material and run a frequency analysis.

bernd
User avatar
gspeed
Posts: 18
Joined: Mon Sep 25, 2017 7:34 pm

Re: Help to debug "Error on: FemConstraintForce"

Post by gspeed »

bernd - many thanks for the feedback

. I installed freecad daily two days ago from ppa - netgen does not seem built-in

. File with (netgen) mesh generated in 0.16 is here
note that if I just add material and run a frequency analysis I don't get any error. If I add the constrains, I get the "Error on: FemConstraintForce ..." when creating the inp file for status analysis .

I'll try the way you suggest through GMSH GUI later today - I would really like to know what I did wrong when creating the model, so that I can avoid this issue going forward.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Help to debug "Error on: FemConstraintForce"

Post by bernd »

ahh I forgot, netgen is no more included in ppa. They had some problems.

Generally you could use 0.16 for meshing and import the mesh in 0.17. Netgen mostly does make better meshes on complicated geometry. I mostly use gmsh, but I have huge, but simple geometry.

I will have a look at your file.

bernd
Post Reply