Static FEA of a Flanged Pressure Vessel

About the development of the FEM module/workbench.

Moderator: bernd

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

Re: Error Displaying CalculiX Results in v0.17

Post by bernd »

Just a question in the regard of precision to CalculiX cracks around ...

We implemented double precision in inp exporter (git commit e58b747) but the ccx results are double precision only. Means we do not have any benefit do we ?!?

Is it possible to change precision of result to double too? As example see a frd of the unit test: https://github.com/FreeCAD/FreeCAD/blob ... static.frd
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: Error Displaying CalculiX Results in v0.17

Post by ulrich1a »

bernd wrote:Is it possible to change precision of result to double too?
I could not find an answer to this in the ccx-manual.
The frd-result-format is a format specification from an former FEM-code which did exist before calculix. The available format options are shown here: http://www.feacluster.com/CalculiX/cgx_ ... de188.html
A binary format with double precision does exist. Calculix is able to write the binary format, if the *NODE OUTPUT is used: https://www.feacluster.com/CalculiX/ccx ... de266.html

But I could not find a hint in the manual, if it writes single or double precision. One has to analyze the resulting frd-file in order to find out. The next step is to find out, if FreeCAD is able to import binary result files.

Anyway, the subtraction operation amplifies rounding errors, so I expect the enhancement of the input-file precision is not useless.

Ulrich

Edit: For a mixed ascii/binary format file, both *NODE OUTPUT and *ELEMENT OUTPUT must be used. The node coordinates are written with double, the results are written as binary float.
Doug
Posts: 46
Joined: Sun Feb 26, 2017 8:51 pm

Re: Error Displaying CalculiX Results in v0.17

Post by Doug »

I have been trying different GMSH settings to see if I can eliminate these 'lonely' nodes. I tried turning on the higher order mesh optimization, but it had no effect. I looked at the source code, and I believe I can see why it didn't work. The following code is from FemGmshTools.py starting at line 367:

Code: Select all

        # hight order mesh optimizing
        if hasattr(self.mesh_obj, 'OptimizeNetgen') and self.mesh_obj.OptimizeNetgen is True:
            geo.write("Mesh.HighOrderOptimize = 1;  //probably needs more lines off adjustment in geo file\n")
        else:
            geo.write("Mesh.HighOrderOptimize = 0;  //probably needs more lines off adjustment in geo file\n")

I believe the code should be:

Code: Select all

        # higher order mesh optimizing
        if hasattr(self.mesh_obj, 'HighOrderOptimize') and self.mesh_obj.HighOrderOptimize is True:
            geo.write("Mesh.HighOrderOptimize = 1;  //probably needs more lines of adjustment in geo file\n")
        else:
            geo.write("Mesh.HighOrderOptimize = 0;  //probably needs more lines of adjustment in geo file\n")
With this modification, I found the mesh optimization worked.

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

Re: Error Displaying CalculiX Results in v0.17

Post by bernd »

Doug wrote: Tue Jun 20, 2017 3:52 amWith this modification, I found the mesh optimization worked.
Thanks Doug for triggering this out ... https://github.com/FreeCAD/FreeCAD/pull/826
UR_
Veteran
Posts: 1354
Joined: Tue Jan 03, 2017 8:42 pm

Re: Error Displaying CalculiX Results in v0.17

Post by UR_ »

Hello,
Doug wrote: Tue Jun 20, 2017 3:52 am With this modification, I found the mesh optimization worked.
This might be true, but these lonely nodes are not gone. :?

tested with:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11432 (Git)
Build type: Release
Branch: master
Hash: 0768ae99cfd6036601f66658f6e0f923de9af6f2
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
gmsh_3.0.3.exe
ccx_2.12_MTNO.exe


ccx gives this message even with: Mesh.HighOrderOptimize = 1;

Code: Select all

*ERROR: in gen3dboun: node 3 does not 
belong to a beam nor shell 
element and consequently has no 
rotational degrees of freedom. 
This may be caused by applying 
a local coordinate system to a 
node in which a rotational boundary 
conditions is defined. In CalculiX 
this is not allowed.
But there is a feature inside gmsh to get rid of these nodes.

gmsh's input file "shape2mesh.geo" needs 2 additional lines in meshing section.
After that, gmsh merges all nodes with a distance less than given tolerance.
(red lines are added manually)

.
.
// meshing
Geometry.Tolerance = 1e-3; // set tolerance for merging nodes
Mesh 2;
Coherence Mesh; // Remove duplicate entities
.
.


Here is an example file with 2 meshes inside, one generated the old way, and one with activated coherence.
Please dragndrop one of them into analysis, and see the difference.

SphereTest.FCStd
(113.54 KiB) Downloaded 42 times
screenshot result with coherence.png
screenshot result with coherence.png (82.42 KiB) Viewed 1948 times


Perhaps one can add a coherence ON/OFF-flag and a coherence tolerance to "FEM GMSH Mesh Params" :roll:
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Error Displaying CalculiX Results in v0.17

Post by bernd »

I'l add them ...
Doug
Posts: 46
Joined: Sun Feb 26, 2017 8:51 pm

Re: Error Displaying CalculiX Results in v0.17

Post by Doug »

UR_ wrote: Sat Jun 24, 2017 11:20 pm
But there is a feature inside gmsh to get rid of these nodes.

gmsh's input file "shape2mesh.geo" needs 2 additional lines in meshing section.
After that, gmsh merges all nodes with a distance less than given tolerance.
(red lines are added manually)

.
.
// meshing
Geometry.Tolerance = 1e-3; // set tolerance for merging nodes
Mesh 2;
Coherence Mesh; // Remove duplicate entities
.
.
Thanks very much, UR_! :D I've been stumped on these lonely nodes for some time now.

By the way, when I said that mesh optimization now worked, I didn't mean that it fixed the lonely node problem, just that the .geo file was now triggering mesh optimization as intended.

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

Re: Error Displaying CalculiX Results in v0.17

Post by bernd »

as a hint, be careful in setting the tolerance to hight, you might get non-positive jacobians than. Thus default in FreeCAD is quite small with 1e-6
Doug
Posts: 46
Joined: Sun Feb 26, 2017 8:51 pm

Re: Error Displaying CalculiX Results in v0.17

Post by Doug »

bernd wrote: Sat Jul 01, 2017 7:17 am as a hint, be careful in setting the tolerance to hight, you might get non-positive jacobians than. Thus default in FreeCAD is quite small with 1e-6
Thanks, Bernd :) Indeed, I found 1E-3 was too large and resulted in many missing mesh elements. For my model, 1E-5 worked nicely.

Cheers,
Doug
Post Reply