Elmer Integration (GSoC) - Activity Log

About the development of the FEM module/workbench.

Moderator: bernd

julieng
Posts: 40
Joined: Sun Nov 25, 2018 8:57 pm

Re: Elmer Integration (GSoC) - Activity Log

Postby julieng » Sun Dec 09, 2018 7:41 pm

I have the version 0.17 of FreeCAD , 2 weeks ago installed.
I have the same error when computing the work bench FEM 3D beam example (I change the mesh to gmsh before computing)

Best regards

Julien
Attachments
test5.FCStd
file
(712.94 KiB) Downloaded 18 times
User avatar
bernd
Posts: 8442
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Elmer Integration (GSoC) - Activity Log

Postby bernd » Mon Dec 10, 2018 8:50 am

Is the error you have a Elmer error or a FreeCAD error?

your file as well as the FEM 3D example newSolver from Start WB work great here on:

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15321 (Git)
Build type: Release
Branch: master
Hash: ef002fdde2f2626c3fd04afea3d54e145d4ecdb0
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Switzerland (de_CH)

you may test with the latest 0.18 version from https://github.com/FreeCAD/FreeCAD/releases


screen.jpg
screen.jpg (300.97 KiB) Viewed 502 times
User avatar
easyw-fc
Posts: 2672
Joined: Thu Jul 09, 2015 9:34 am

Re: Elmer Integration (GSoC) - Activity Log

Postby easyw-fc » Mon Dec 10, 2018 11:09 am

bernd wrote:
Mon Dec 10, 2018 8:50 am
Is the error you have a Elmer error or a FreeCAD error?

your file as well as the FEM 3D example newSolver from Start WB work great here on:

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15321 (Git)
Build type: Release
Branch: master
Hash: ef002fdde2f2626c3fd04afea3d54e145d4ecdb0
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Switzerland (de_CH)

you may test with the latest 0.18 version from https://github.com/FreeCAD/FreeCAD/releases
Hi @bernd
I have two issues with Elmer solver also on "FemCalculixCantilever3D_newSolver".
The first is related to py3, but this should be fine with my latest PR,
the second one is a blocking issue... when I run the Elmer from the Solver Control Tab, FC just crashes.
I run FC with a log file and I get an error related to QtGui and multithreads
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
here my FC log file

Code: Select all

Log: Init: Loading FreeCAD GUI
Log: Init: Running FreeCADGuiInit.py start script... done
Log: Init: Activating default workbench StartWorkbench
Log: Init: Showing main window
Log: Main window restored
Log: Show main window
Log: Toolbars restored
Log: 3Dconnexion device not attached.
Log: Init: Entering event loop
Log: Init: Processing command line files
Log: Loading GUI of Web module... done
Log: Loading GUI of Start module... done
Log: Loading Start module... done
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: Loading Fem module... done
Log: Loading GUI of Fem module... done
Log: Start: ViewProviderFEMMeshBuilder::createMesh() =================================
Log:     0.000000: Start build up 868 face helper
Log:     0.000000: Start eliminate internal faces SIMPLE
Log:     0.000000: Start build up node map
Log:     0.000000: Start set point vector
Log:     0.000000: Start count triangle size
Log:     NumTriangles:800
Log:     0.000000: Start build up triangle vector
Log:     0.000000: Start build up edge vector
Log:     NumEdges:1200
Log:     0.000000: Finish =========================================================
Log: Start: ViewProviderFEMMeshBuilder::createMesh() =================================
Log:     0.000000: Start build up 868 face helper
Log:     0.016000: Start eliminate internal faces SIMPLE
Log:     0.016000: Start build up node map
Log:     0.016000: Start set point vector
Log:     0.016000: Start count triangle size
Log:     NumTriangles:800
Log:     0.016000: Start build up triangle vector
Log:     0.016000: Start build up edge vector
Log:     NumEdges:1200
Log:     0.016000: Finish =========================================================
Log: Start: ViewProviderFEMMeshBuilder::createMesh() =================================
Log:     0.000000: Start build up 868 face helper
Log:     0.000000: Start eliminate internal faces SIMPLE
Log:     0.000000: Start build up node map
Log:     0.000000: Start set point vector
Log:     0.000000: Start count triangle size
Log:     NumTriangles:800
Log:     0.000000: Start build up triangle vector
Log:     0.000000: Start build up edge vector
Log:     NumEdges:1200
Log:     0.000000: Finish =========================================================
Log: Start: ViewProviderFEMMeshBuilder::createMesh() =================================
Log:     0.000000: Start build up 868 face helper
Log:     0.000000: Start eliminate internal faces SIMPLE
Log:     0.000000: Start build up node map
Log:     0.000000: Start set point vector
Log:     0.000000: Start count triangle size
Log:     NumTriangles:800
Log:     0.000000: Start build up triangle vector
Log:     0.000000: Start build up edge vector
Log:     NumEdges:1200
Log:     0.000000: Finish =========================================================
Log: Start: ViewProviderFEMMeshBuilder::createMesh() =================================
Log:     0.000000: Start build up 868 face helper
Log:     0.000000: Start eliminate internal faces SIMPLE
Log:     0.000000: Start build up node map
Log:     0.000000: Start set point vector
Log:     0.000000: Start count triangle size
Log:     NumTriangles:800
Log:     0.000000: Start build up triangle vector
Log:     0.000000: Start build up edge vector
Log:     NumEdges:1200
Log:     0.000000: Finish =========================================================
Log: Start: ViewProviderFEMMeshBuilder::createMesh() =================================
Log:     0.000000: Start build up 868 face helper
Log:     0.000000: Start eliminate internal faces SIMPLE
Log:     0.000000: Start build up node map
Log:     0.000000: Start set point vector
Log:     0.000000: Start count triangle size
Log:     NumTriangles:800
Log:     0.000000: Start build up triangle vector
Log:     0.000000: Start build up edge vector
Log:     NumEdges:1200
Log:     0.000000: Finish =========================================================
Msg: Prepare testmode: FalseMsg: 
Msg:   ElementDimension: 3Msg: 
Msg:   C:/FreeCAD-daily/bin/gmsh.exeMsg: 
Log: FEM mesh object will be exported to unv format.
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Wrn: Cannot find icon: TextDocument
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QObject::startTimer: timers cannot be started from another thread
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Wrn: Cannot find icon: TextDocument
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Err: Traceback (most recent call last):
  File "C:\FreeCAD-daily\Mod\Fem\femsolver\run.py", line 344, in slotChangedObject
    self._checkAnalysis(obj)
  File "C:\FreeCAD-daily\Mod\Fem\femsolver\run.py", line 383, in _checkAnalysis
    if FemUtils.isDerivedFrom(obj, "Fem::FemAnalysis"):
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'isDerivedFrom'
Err: Traceback (most recent call last):
  File "C:\FreeCAD-daily\Mod\Fem\femsolver\run.py", line 344, in slotChangedObject
    self._checkAnalysis(obj)
  File "C:\FreeCAD-daily\Mod\Fem\femsolver\run.py", line 383, in _checkAnalysis
    if FemUtils.isDerivedFrom(obj, "Fem::FemAnalysis"):
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'isDerivedFrom'
Err: Traceback (most recent call last):
  File "C:\FreeCAD-daily\Mod\Fem\femsolver\run.py", line 344, in slotChangedObject
    self._checkAnalysis(obj)
  File "C:\FreeCAD-daily\Mod\Fem\femsolver\run.py", line 383, in _checkAnalysis
    if FemUtils.isDerivedFrom(obj, "Fem::FemAnalysis"):
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'isDerivedFrom'
Err: Exception in thread Thread-15:
Traceback (most recent call last):
  File "C:\FreeCAD-daily\bin\lib\threading.py", line 801, in __bootstrap_inner
    self.run()
  File "C:\FreeCAD-daily\bin\lib\threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "C:\FreeCAD-daily\Mod\Fem\femsolver\task.py", line 115, in protector
    self.run()
  File "C:\FreeCAD-daily\Mod\Fem\femsolver\elmer\tasks.py", line 144, in run
    self.solver.ElmerResult.read(postPath)
FreeCADError: Unknown C++ exception
Err: 
Log: QObject: Cannot create children for a parent that is in a different thread.
(Parent is QTextDocument(0x2c08af8cad0), parent's thread is QThread(0x2c09dd4ce40), current thread is QThread(0x2c082d0de00)
and my FC release

Code: Select all

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15340 (Git)
Build type: Release
Branch: master
Hash: 14b780c0ee9a0cd4adc2dc7abdff94ed315dd781
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
and my Elmer release:

Code: Select all

C:/Program Files (x86)/Elmer 8.3-c30fff2/bin/ElmerSolver.exe
Please note that if I run the Elmer Solver by console command
"C:\Program Files (x86)\Elmer 8.3-c30fff2\bin\ElmerSolver.exe" case.sif
I can create the case0001.vtu file
User avatar
bernd
Posts: 8442
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Elmer Integration (GSoC) - Activity Log

Postby bernd » Mon Dec 10, 2018 11:50 am

for the second ... https://github.com/FreeCAD/FreeCAD/pull/1831

I forgot to change them here ... git commit f3cee72
User avatar
easyw-fc
Posts: 2672
Joined: Thu Jul 09, 2015 9:34 am

Re: Elmer Integration (GSoC) - Activity Log

Postby easyw-fc » Mon Dec 10, 2018 11:53 am

I also tried with a clean profile... Elmer doesn't crashes FC anymore, but I get this error:

Code: Select all

Prepare testmode: False
  ElementDimension: 3
  C:/FreeCAD-daily/bin/gmsh.exe
Cannot find icon: TextDocument
Cannot find icon: TextDocument
Traceback (most recent call last):
  File "C:\FreeCAD-daily\Mod\Fem\femsolver\run.py", line 344, in slotChangedObject
    self._checkAnalysis(obj)
  File "C:\FreeCAD-daily\Mod\Fem\femsolver\run.py", line 383, in _checkAnalysis
    if FemUtils.isDerivedFrom(obj, "Fem::FemAnalysis"):
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'isDerivedFrom'
Traceback (most recent call last):
  File "C:\FreeCAD-daily\Mod\Fem\femsolver\run.py", line 344, in slotChangedObject
    self._checkAnalysis(obj)
  File "C:\FreeCAD-daily\Mod\Fem\femsolver\run.py", line 383, in _checkAnalysis
    if FemUtils.isDerivedFrom(obj, "Fem::FemAnalysis"):
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'isDerivedFrom'
Traceback (most recent call last):
  File "C:\FreeCAD-daily\Mod\Fem\femsolver\run.py", line 344, in slotChangedObject
    self._checkAnalysis(obj)
  File "C:\FreeCAD-daily\Mod\Fem\femsolver\run.py", line 383, in _checkAnalysis
    if FemUtils.isDerivedFrom(obj, "Fem::FemAnalysis"):
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'isDerivedFrom'
Traceback (most recent call last):
  File "C:\FreeCAD-daily\Mod\Fem\femsolver\run.py", line 344, in slotChangedObject
    self._checkAnalysis(obj)
  File "C:\FreeCAD-daily\Mod\Fem\femsolver\run.py", line 383, in _checkAnalysis
    if FemUtils.isDerivedFrom(obj, "Fem::FemAnalysis"):
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'isDerivedFrom'
I still have multithread issues / warning on the log file:
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QObject::startTimer: timers cannot be started from another thread

Code: Select all

Log: Init: Loading FreeCAD GUI
Log: Init: Running FreeCADGuiInit.py start script... done
Log: Init: Activating default workbench StartWorkbench
Log: Loading GUI of Web module... done
Log: Loading GUI of Start module... done
Log: Loading Start module... done
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: Init: Showing main window
Log: Main window restored
Log: Show main window
Log: Toolbars restored
Log: 3Dconnexion device not attached.
Log: Init: Entering event loop
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Log: Init: Processing command line files
Log: Module: Part
Log: Loading Part module... done
Log: Loading GUI of Part module... done
Log: Loading Fem module... done
Log: Loading GUI of Fem module... done
Log: Start: ViewProviderFEMMeshBuilder::createMesh() =================================
Log:     0.000000: Start build up 868 face helper
Log:     0.000000: Start eliminate internal faces SIMPLE
Log:     0.000000: Start build up node map
Log:     0.000000: Start set point vector
Log:     0.000000: Start count triangle size
Log:     NumTriangles:800
Log:     0.000000: Start build up triangle vector
Log:     0.000000: Start build up edge vector
Log:     NumEdges:1200
Log:     0.000000: Finish =========================================================
Log: Start: ViewProviderFEMMeshBuilder::createMesh() =================================
Log:     0.000000: Start build up 868 face helper
Log:     0.000000: Start eliminate internal faces SIMPLE
Log:     0.000000: Start build up node map
Log:     0.000000: Start set point vector
Log:     0.000000: Start count triangle size
Log:     NumTriangles:800
Log:     0.000000: Start build up triangle vector
Log:     0.000000: Start build up edge vector
Log:     NumEdges:1200
Log:     0.000000: Finish =========================================================
Log: Start: ViewProviderFEMMeshBuilder::createMesh() =================================
Log:     0.000000: Start build up 868 face helper
Log:     0.000000: Start eliminate internal faces SIMPLE
Log:     0.000000: Start build up node map
Log:     0.000000: Start set point vector
Log:     0.000000: Start count triangle size
Log:     NumTriangles:800
Log:     0.000000: Start build up triangle vector
Log:     0.000000: Start build up edge vector
Log:     NumEdges:1200
Log:     0.000000: Finish =========================================================
Log: Start: ViewProviderFEMMeshBuilder::createMesh() =================================
Log:     0.000000: Start build up 868 face helper
Log:     0.000000: Start eliminate internal faces SIMPLE
Log:     0.000000: Start build up node map
Log:     0.000000: Start set point vector
Log:     0.000000: Start count triangle size
Log:     NumTriangles:800
Log:     0.000000: Start build up triangle vector
Log:     0.000000: Start build up edge vector
Log:     NumEdges:1200
Log:     0.000000: Finish =========================================================
Log: Start: ViewProviderFEMMeshBuilder::createMesh() =================================
Log:     0.000000: Start build up 868 face helper
Log:     0.000000: Start eliminate internal faces SIMPLE
Log:     0.000000: Start build up node map
Log:     0.000000: Start set point vector
Log:     0.000000: Start count triangle size
Log:     NumTriangles:800
Log:     0.000000: Start build up triangle vector
Log:     0.000000: Start build up edge vector
Log:     NumEdges:1200
Log:     0.000000: Finish =========================================================
Log: Start: ViewProviderFEMMeshBuilder::createMesh() =================================
Log:     0.000000: Start build up 868 face helper
Log:     0.000000: Start eliminate internal faces SIMPLE
Log:     0.000000: Start build up node map
Log:     0.000000: Start set point vector
Log:     0.000000: Start count triangle size
Log:     NumTriangles:800
Log:     0.000000: Start build up triangle vector
Log:     0.000000: Start build up edge vector
Log:     NumEdges:1200
Log:     0.000000: Finish =========================================================
Msg: Prepare testmode: FalseMsg: 
Msg:   ElementDimension: 3Msg: 
Msg:   C:/FreeCAD-daily/bin/gmsh.exeMsg: 
Log: FEM mesh object will be exported to unv format.
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Wrn: Cannot find icon: TextDocument
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QObject::startTimer: timers cannot be started from another thread
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Wrn: Cannot find icon: TextDocument
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QPixmap: It is not safe to use pixmaps outside the GUI thread
Log: QObject::startTimer: timers cannot be started from another thread
Err: Traceback (most recent call last):
  File "C:\FreeCAD-daily\Mod\Fem\femsolver\run.py", line 344, in slotChangedObject
    self._checkAnalysis(obj)
  File "C:\FreeCAD-daily\Mod\Fem\femsolver\run.py", line 383, in _checkAnalysis
    if FemUtils.isDerivedFrom(obj, "Fem::FemAnalysis"):
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'isDerivedFrom'
Err: Traceback (most recent call last):
  File "C:\FreeCAD-daily\Mod\Fem\femsolver\run.py", line 344, in slotChangedObject
    self._checkAnalysis(obj)
  File "C:\FreeCAD-daily\Mod\Fem\femsolver\run.py", line 383, in _checkAnalysis
    if FemUtils.isDerivedFrom(obj, "Fem::FemAnalysis"):
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'isDerivedFrom'
Err: Traceback (most recent call last):
  File "C:\FreeCAD-daily\Mod\Fem\femsolver\run.py", line 344, in slotChangedObject
    self._checkAnalysis(obj)
  File "C:\FreeCAD-daily\Mod\Fem\femsolver\run.py", line 383, in _checkAnalysis
    if FemUtils.isDerivedFrom(obj, "Fem::FemAnalysis"):
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'isDerivedFrom'
Err: Traceback (most recent call last):
  File "C:\FreeCAD-daily\Mod\Fem\femsolver\run.py", line 344, in slotChangedObject
    self._checkAnalysis(obj)
  File "C:\FreeCAD-daily\Mod\Fem\femsolver\run.py", line 383, in _checkAnalysis
    if FemUtils.isDerivedFrom(obj, "Fem::FemAnalysis"):
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'isDerivedFrom'
Log: Hide main window
Log: Finish: Event loop left
Log: Destruct Gui::Application
Log: FreeCAD terminating...
Log: Saving system parameter...
Log: Saving system parameter...done
Log: Saving user parameter...
Log: Saving user parameter...done
I still need to check which WB or config may lead to the previous crashing error
thschrader
Posts: 1422
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Elmer Integration (GSoC) - Activity Log

Postby thschrader » Mon Dec 10, 2018 2:31 pm

Did some testing with the beam from julieng.
Be careful wich solver settings you choose in elmer... ;)
beam_test.JPG
beam_test.JPG (143.82 KiB) Viewed 456 times
julieng
Posts: 40
Joined: Sun Nov 25, 2018 8:57 pm

Re: Elmer Integration (GSoC) - Activity Log

Postby julieng » Tue Dec 11, 2018 6:50 am

Hello,

Ok now it works, my Elmer installation was wrong.
I can reproduce the beam in using the direct solver of Elmer.

I try a simple 3D fluid flow curve pipe test. I am a little bit lost with the Elmer BC.
For the inlet I define a velocity in the way of the flow no prblem.
For the walls I force a 0 velocity for all the wall boundaries.
But for the outlet I cannot fixed a 0 pressure surface?
To constrain the normal velocity I choose x y or z for normal value?
For the flow initialization, problem to define it when there is several direction for the flow.
What I have to do for a symmetric flow condition.

My flow profile seems not good.

Maybe I have to check Elmer tutorials.

Concerning GMSH it is very difficult to produce boundary layers, I have a simple mesh but I am not able to do it.
Is it possible to use cfMesh and convert the mesh for Elmer?

I join my file

Best regards
Attachments
test6.FCStd
curved pipe
(265.43 KiB) Downloaded 16 times
m42kus
Posts: 159
Joined: Tue Sep 02, 2014 9:41 am

Re: Elmer Integration (GSoC) - Activity Log

Postby m42kus » Tue Dec 11, 2018 10:39 am

Hi julieng,
Nice work getting it to run on windows ;)
julieng wrote:
Tue Dec 11, 2018 6:50 am
I try a simple 3D fluid flow curve pipe test. I am a little bit lost with the Elmer BC.
For the inlet I define a velocity in the way of the flow no prblem.
For the walls I force a 0 velocity for all the wall boundaries.
But for the outlet I cannot fixed a 0 pressure surface?
To constrain the normal velocity I choose x y or z for normal value?
For the flow initialization, problem to define it when there is several direction for the flow.
What I have to do for a symmetric flow condition.
Zero pressure is the default in Elmer. If you specify no velocity, zero pressure is assumed by Elmer. To constrain the normal velocity you have to use the "normal to boundary" checkbox. I don't know for sure right now how they are mapped, just try it out and if it doesn't work align your model so that your boundary matches the global coordinate system and try it without the "normal to boundary" option.

I already did a flow in a pipe example in the past (click the ↑ to see the plots):
m42kus wrote:
Fri Aug 25, 2017 8:52 am
Today I ran one of the biggest simulations I have done in FreeCAD jet. In addition to the heat equation it makes use of the third euquation type I added during the last weeks: Flow. Atm the only constraint type avaliable is velocity. But it's enouth for the following simulation. The simulation is very similar to "Thermal flow in curved pipe" elmer tutorial (http://www.nic.funet.fi/index/elmer/doc ... orials.pdf). The only difference is that I explicitly set a "cooling" (heat flux) constraint on the outer shell of the pipe. Here are my results:

pipe_screen.png
Have a look at the tutorial and compare it to what FreeCAD generates for you. To do that you should select a folder that's convenient for you before executing or writing the analysis.
My GSoC Devlog: ceeli.github.io/gsoc
Chum4k3r
Posts: 2
Joined: Wed Dec 19, 2018 1:25 pm

Re: Elmer Integration (GSoC) - Activity Log

Postby Chum4k3r » Wed Dec 19, 2018 1:48 pm

Hello! Regards from Brazil :D

I'm an acoustical engineering and since my discovering of FreeCAD i've been trying to adapt all my CAD work to the software...

My latest deed was adding the Helmholtz Equation to Elmer solver, but i'm facing some issues with the write.py file, seems like some settings of this equation aren't similar to any other already built in.

How can I add the Frequency I wish to analyse? And how can I add a GUI input to set this analysis step?

Do I need to create a GmshFemMesh by my own within the Analysis object, or the Elmer solver make its own FemMesh?

Also, at some point of the Elmer models documentation provided by CSC, there is the Simulation keyword (for Helmholtz eq) and two options, Frequency and Angular Frequency, I presume is to choose wether the analysis variable will be shown as Hz or rad/s.

In any case, I'm sending a .py file with every addition i've made to the src/Mod/Fem/femsolver/elmer/write.py file
writerHelmholtzSection.py
(5.91 KiB) Downloaded 16 times
Many thanks to you for providing such amazing software
User avatar
bernd
Posts: 8442
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Elmer Integration (GSoC) - Activity Log

Postby bernd » Wed Dec 19, 2018 3:47 pm

Hi Chum4k3r and welcome to the world of FreeCAD FEM,

what an first post :shock: !

Which FreeCAD version do you work with? You should work with latest 0.18 dev version if you do coding for FEM!!!

Would be cool if Markus could give some hints ...

cheers bernd