mesh distortion on reload (only quadratic elements)

About the development of the FEM module/workbench.
UR_
Posts: 44
Joined: Tue Jan 03, 2017 8:42 pm

mesh distortion on reload (only quadratic elements)

Postby UR_ » Wed Mar 15, 2017 5:48 pm

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 340 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 340 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 340 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
Posts: 3924
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: mesh distortion on reload (only quadratic elements)

Postby bernd » Wed Mar 15, 2017 8:29 pm

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
Posts: 3924
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: mesh distortion on reload (only quadratic elements)

Postby bernd » Wed Mar 15, 2017 8:30 pm

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: 226
Joined: Thu Jul 24, 2014 8:29 am

Re: mesh distortion on reload (only quadratic elements)

Postby fandaL » Wed Mar 15, 2017 9:40 pm

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_
Posts: 44
Joined: Tue Jan 03, 2017 8:42 pm

Re: mesh distortion on reload (only quadratic elements)

Postby UR_ » Wed Mar 15, 2017 9:59 pm

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 7 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 314 times

med import
Screenshot Gmsh GUI med import.png
Screenshot Gmsh GUI med import.png (169.3 KiB) Viewed 314 times

used version
Gmsh version.png
Gmsh version.png (19.79 KiB) Viewed 314 times


Seems to be a windows feature :D
User avatar
bernd
Posts: 3924
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: mesh distortion on reload (only quadratic elements)

Postby bernd » Wed Mar 15, 2017 10:00 pm

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
Posts: 3924
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: mesh distortion on reload (only quadratic elements)

Postby bernd » Wed Mar 15, 2017 10:07 pm

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 9 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_
Posts: 44
Joined: Tue Jan 03, 2017 8:42 pm

Re: mesh distortion on reload (only quadratic elements)

Postby UR_ » Wed Mar 15, 2017 10:38 pm

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

Re: mesh distortion on reload (only quadratic elements)

Postby bernd » Thu Mar 23, 2017 11:29 am

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
Posts: 3054
Joined: Wed Oct 22, 2014 5:02 pm

Re: mesh distortion on reload (only quadratic elements)

Postby sgrogan » Thu Mar 23, 2017 8:39 pm

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)