mesh distortion on reload (only quadratic elements)

About the development of the FEM module/workbench.

Moderator: bernd

UR_
Veteran
Posts: 1354
Joined: Tue Jan 03, 2017 8:42 pm

mesh distortion on reload (only quadratic elements)

Post by UR_ »

Hello,
some mesh distortion occures after reloading *.FCStd files containing mesh data.
This seems to happen only on quadratic meshes, where end nodes and mid nodes are mixed up.

after meshing cube looks good (2nd order elements)
2nd order after meshing.png
2nd order after meshing.png (44.48 KiB) Viewed 2584 times
after save and reopen mid nodes are treated as end nodes
2nd order after save and reopen.png
2nd order after save and reopen.png (108.67 KiB) Viewed 2584 times
on 1st order meshes everything is fine
1st order after save and reopen.png
1st order after save and reopen.png (41.39 KiB) Viewed 2584 times
using:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10460 (Git)
Build type: Release
Branch: master
Hash: 91c59c7910436c44ede608e29d9a90a287121a11
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: mesh distortion on reload (only quadratic elements)

Post by bernd »

could you give more informations, or a step by step explanation, or post a file. I can not reproduce it on

OS: Debian GNU/Linux 8.7 (jessie)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10490 (Git)
Build type: Unknown
Branch: master
Hash: 378f99f1b318202db3bc89b45d691a0376d07512
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.0.0
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: mesh distortion on reload (only quadratic elements)

Post by bernd »

What you could try to is to export to unv and import this unv. Or try to export to med and import this med. Does it work, or do you have similar problems.
fandaL
Posts: 440
Joined: Thu Jul 24, 2014 8:29 am

Re: mesh distortion on reload (only quadratic elements)

Post by fandaL »

I can reproduce it. Moreover if I export 2nd order mesh to .unv, then after loading it is broken as well. Exporting to .med and openning works well.

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10490 (Git)
Build type: Release
Branch: master
Hash: 378f99f1b318202db3bc89b45d691a0376d07512
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0

Seems that problem is in export to unv. When I open that file (crated in 0.17.10490) in older FC (0.17.10061) it is broken. When I generate a mesh in older version (0.17.10061) I can open it in new FC (0.17.10490).
UR_
Veteran
Posts: 1354
Joined: Tue Jan 03, 2017 8:42 pm

Re: mesh distortion on reload (only quadratic elements)

Post by UR_ »

Hello bernd, hello fandaL,
fandaL was bit faster than me.
So what, here are the files:

.FCStd, .med, .unv
testcase.zip
(22.79 KiB) Downloaded 49 times
importing into gmsh GUI delivers similar results
unv import
Screenshot Gmsh GUI unv import.png
Screenshot Gmsh GUI unv import.png (303.03 KiB) Viewed 2558 times
med import
Screenshot Gmsh GUI med import.png
Screenshot Gmsh GUI med import.png (169.3 KiB) Viewed 2558 times
used version
Gmsh version.png
Gmsh version.png (19.79 KiB) Viewed 2558 times
Seems to be a windows feature :D
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: mesh distortion on reload (only quadratic elements)

Post by bernd »

fandaL wrote:I can reproduce it. Moreover if I export 2nd order mesh to .unv, then after loading it is broken as well.
Would you open this unv in GMSH ? Is it brocken as well? Would you post such a "broken" file?

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

Re: mesh distortion on reload (only quadratic elements)

Post by bernd »

UR_ wrote:.FCStd, .med, .unv
testcase.zip
They are broken for me too. Just remeshed them and saved and exported. If I import the remeshed ones everything works fine. Attached the files. Would you try to import them. If they work fine for you guys than it seams the unv export is broken on windows.
testcase-bhb_linux.zip
(22.55 KiB) Downloaded 53 times
BTW: The FEM mesh inside a FCStd file is just an unv. Try to unzip the FCStd and you will see the unv.
UR_
Veteran
Posts: 1354
Joined: Tue Jan 03, 2017 8:42 pm

Re: mesh distortion on reload (only quadratic elements)

Post by UR_ »

Hello bernd,
your files written on linux are ok!
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: mesh distortion on reload (only quadratic elements)

Post by bernd »

Just booted windows and downloaded the latest win build. Confirmed on windows.

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10611 (Git)
Build type: Release
Branch: master
Hash: 44a9ecd25f27ec3efe52c9de9c95ef2b3e19dd17
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0


I have a vague guess ... git commit 732bd85 It is a pity I can not test, I have never compiled FreeCAD on Windows. ...
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: mesh distortion on reload (only quadratic elements)

Post by sgrogan »

bernd wrote:I have a vague guess ... git commit 732bd85 It is a pity I can not test, I have never compiled FreeCAD on Windows. ...
Compiling this commit now. If the error is there I will backup one commit.
if this doesn't isolate it I will git bisect.
BTW: How to I create first order elements with gmesh in FreeCAD? It seems 2nd order elements are the default (which is good)
"fight the good fight"
Post Reply