FEM Thermal Analysis of a PCB: a new challenge

About the development of the FEM module/workbench.

Moderator: bernd

HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: FEM Thermal Analysis of a PCB: a new challenge

Post by HoWil »

Also my 2 cent. 8-)

- To simulate such PCBs in a meaningful way we need convection :!: :mrgreen:

-- Convection is available as boundary-condition in calculix (also done in simscale) but not jet implemented in freecad. I somehow remember that this boundary condition is not really accurate but do not have any link for that now (maybe in the simcale forum). A comparison with a detailed navier-stokes simulation including convection would here be really helpfull.

-- In Elmer convection is available but as I remember only in combination with the navier stokes when also simulating the air around the PCB. I do not know if a steady state simulation of convection is available.... as I remember it always has to be a transient simulation which consumes huge amounts of memory and time :? .
Please note also that there is a inconvenience regarding the definition of the the dissipated energy of body heat sources which has to be inserted as fraction with the density of the domain. I am not sure if all needed elements currently are available in FC. EDIT: Please see also https://forum.freecadweb.org/viewtopic. ... hilit=heat

-- CfdOF could be an alternative to elmer if it is possible to introduce proper heat-sources.

I currently do have only a very very limited time budget for FC-FEM :o but really hope to see some solution in this regard of a better collaboration between FreeCAD and KiCAD.

All the best.
BR,
HoWil
User avatar
HarryvL
Veteran
Posts: 1337
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: FEM Thermal Analysis of a PCB: a new challenge

Post by HarryvL »

easyw-fc wrote: Mon Dec 03, 2018 3:30 pm
HarryvL wrote: Sun Dec 02, 2018 9:17 pm A slightly more interesting picture is obtained if the bolt hole faces are kept at 293.1 K ;)
@HarryvL
that's very nice... would it be possible to share the modified file model?
Is there a guide to make an Elmer FEM analysis in FC?
I haven't found any...
Thanks again
Maurice
As requested:
Termal analysis pcb ccx.fcstd
(42.36 KiB) Downloaded 87 times
thschrader
Veteran
Posts: 3157
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: FEM Thermal Analysis of a PCB: a new challenge

Post by thschrader »

Here is a calculation (thermomechanical) with elmer:
pcb_elmer.fcstd
(41.63 KiB) Downloaded 143 times
I tried the pump tutorial from
http://www.nic.funet.fi/index/elmer/doc ... orials.pdf
but the elmer-GUI does not work properly. Cant select any surface.
with_elmer.JPG
with_elmer.JPG (67.93 KiB) Viewed 2732 times
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: FEM Thermal Analysis of a PCB: a new challenge

Post by easyw-fc »

thschrader wrote: Mon Dec 03, 2018 4:43 pm ...
Thomas
pcb calculix.fcstd
Hi Thomas,
I downloaded your FC file but I cannot display the FEMMeshGmsh...
If I toggle the visibility of the compound, I cannot display the FEMMeshGmsh mesh object... and then I cannot run any analysis...
Is there a bug in FC when saving the file or am I missing some basic step?
I mean it seems the meshing is not available inside the file...
I'm a real noob in FEM, but I tried the Cantilever example and it works on my FC installation...
mesh-missing.gif
mesh-missing.gif (220.11 KiB) Viewed 2688 times
Here my FC info:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15190 (Git)
Build type: Release
Branch: master
Hash: c18785fdb31e378500440de23dcf648a2c79dc5f
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)
thschrader
Veteran
Posts: 3157
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: FEM Thermal Analysis of a PCB: a new challenge

Post by thschrader »

easyw-fc wrote: Thu Dec 06, 2018 9:33 am I downloaded your FC file but I cannot display the FEMMeshGmsh...
Hi Maurice,
load my file in FC. Then:
Doubleclick on Analysis in tree ==> FEM-wb is activated.
Doubleclick on mesh in tree ==> meshing dialog opens, click apply to remesh the body
Run analysis

After meshing the body, right click on mesh in tree. You will see the option "clear mesh".
This can be used to reduce the file size (< 1 MB) for posting in the FC-forum. Which I did...
Thomas
thschrader
Veteran
Posts: 3157
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: FEM Thermal Analysis of a PCB: a new challenge

Post by thschrader »

@Maurice:
preferences_solver.JPG
preferences_solver.JPG (43.87 KiB) Viewed 2676 times
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: FEM Thermal Analysis of a PCB: a new challenge

Post by easyw-fc »

thschrader wrote: Thu Dec 06, 2018 10:26 am Hi Maurice,
load my file in FC. Then:
Doubleclick on Analysis in tree ==> FEM-wb is activated.
Doubleclick on mesh in tree ==> meshing dialog opens, click apply to remesh the body
Run analysis

After meshing the body, right click on mesh in tree. You will see the option "clear mesh".
This can be used to reduce the file size (< 1 MB) for posting in the FC-forum. Which I did...
Thomas
Thx a lot! now it works :D
Next step is trying the Elmer model... ;)
pcb-fem-ccx.png
pcb-fem-ccx.png (452.02 KiB) Viewed 2637 times
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: FEM Thermal Analysis of a PCB: a new challenge

Post by easyw-fc »

HarryvL wrote: Tue Dec 04, 2018 9:10 am As requested:
Termal analysis pcb ccx.fcstd
Thanks a lot @HarryvL
Ccx works with your model too :D
Nice to see the cold anchors :)
fem-pcb-ccx-2.png
fem-pcb-ccx-2.png (461.57 KiB) Viewed 2615 times
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: FEM Thermal Analysis of a PCB: a new challenge

Post by easyw-fc »

thschrader wrote: Thu Dec 06, 2018 10:44 am @Maurice:
'Elmer Solver'
Hi Thomas,
I'm testing the Elmer using 'C:\Program Files (x86)\Elmer 8.3-c30fff2' downloaded here:
https://sourceforge.net/projects/elmerf ... Installer/
but during the solver analysis FC is crashing without any message...
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15190 (Git)
Build type: Release
Branch: master
Hash: c18785fdb31e378500440de23dcf648a2c79dc5f
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0


BTW the FC conda release has a py3 issue

Code: Select all

Traceback (most recent call last):
  File "C:\FreeCAD\Mod\Fem\femsolver\solverbase.py", line 79, in setEdit
    machine = run.getMachine(vobj.Object)
  File "C:\FreeCAD\Mod\Fem\femsolver\run.py", line 54, in getMachine
    _DocObserver.attach()
  File "C:\FreeCAD\Mod\Fem\femsolver\run.py", line 334, in attach
    cls._instance = cls()
  File "C:\FreeCAD\Mod\Fem\femsolver\run.py", line 326, in __init__
    for doc in App.listDocuments().itervalues():
<class 'AttributeError'>: 'dict' object has no attribute 'itervalues'
Traceback (most recent call last):
  File "C:\FreeCAD\Mod\Fem\femsolver\solverbase.py", line 79, in setEdit
    machine = run.getMachine(vobj.Object)
  File "C:\FreeCAD\Mod\Fem\femsolver\run.py", line 54, in getMachine
    _DocObserver.attach()
  File "C:\FreeCAD\Mod\Fem\femsolver\run.py", line 334, in attach
    cls._instance = cls()
  File "C:\FreeCAD\Mod\Fem\femsolver\run.py", line 326, in __init__
    for doc in App.listDocuments().itervalues():
<class 'AttributeError'>: 'dict' object has no attribute 'itervalues'
Traceback (most recent call last):
  File "C:\FreeCAD\Mod\Fem\femsolver\solverbase.py", line 79, in setEdit
    machine = run.getMachine(vobj.Object)
  File "C:\FreeCAD\Mod\Fem\femsolver\run.py", line 54, in getMachine
    _DocObserver.attach()
  File "C:\FreeCAD\Mod\Fem\femsolver\run.py", line 334, in attach
    cls._instance = cls()
  File "C:\FreeCAD\Mod\Fem\femsolver\run.py", line 326, in __init__
    for doc in App.listDocuments().itervalues():
<class 'AttributeError'>: 'dict' object has no attribute 'itervalues'
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: FEM Thermal Analysis of a PCB: a new challenge

Post by easyw-fc »

here a detailed Fc log file, related to the FEM crash:

Code: Select all

Log: Init: Entering event loop
Log: Init: Processing command line files
Log: Loading Fem module... done
Log: Loading GUI of Fem module... done
Log: Start: ViewProviderFEMMeshBuilder::createMesh() =================================
Log:     0.000000: Start build up 39744 face helper
Log:     0.015000: Start eliminate internal faces SIMPLE
Log:     0.937000: Start build up node map
Log:     0.937000: Start set point vector
Log:     0.937000: Start count triangle size
Log:     NumTriangles:27096
Log:     0.937000: Start build up triangle vector
Log:     0.968000: Start build up edge vector
Log:     NumEdges:40284
Log:     0.968000: Finish =========================================================
Log: Start: ViewProviderFEMMeshBuilder::createMesh() =================================
Log:     0.000000: Start build up 39744 face helper
Log:     0.016000: Start eliminate internal faces SIMPLE
Log:     0.922000: Start build up node map
Log:     0.922000: Start set point vector
Log:     0.922000: Start count triangle size
Log:     NumTriangles:27096
Log:     0.922000: Start build up triangle vector
Log:     0.953000: Start build up edge vector
Log:     NumEdges:40284
Log:     0.953000: Finish =========================================================
Msg: Prepare testmode: FalseMsg: 
Msg:   ElementDimension: 3Msg: 
Msg:   C:/FreeCAD-daily/bin/gmsh.exe
Msg: 
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
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
Log: QObject: Cannot create children for a parent that is in a different thread.
(Parent is QTextDocument(0x25234a23eb0), parent's thread is QThread(0x25234a1ca50), current thread is QThread(0x25213f705d0)
It seems something related to multi threads
Post Reply