Good day All,
I have been using CfdOF with FreeCAD successfully in Windows for various VOF simulations and recently attempted to use Linux 20.04 LTS as OS with the aim to use Microsoft Azure for larger simulations.
I have successfully installed OpenFOAM v.7, FreeCAD 0.18.4, the Plot and CfdOF workbenches in FreeCAD, as well as gmsh, HiSA and cfMesh in Linux 20.04 LTS OS and when I run the dependency checker it states: No missing dependencies detected.
However, trying to create the mesh for the simulation, I keep on getting the following error:
Traceback (most recent call last):
File "/home/louis/.FreeCAD/Mod/CfdOF/CfdMesh.py", line 162, in setEdit
import _TaskPanelCfdMesh
File "/home/louis/.FreeCAD/Mod/CfdOF/_TaskPanelCfdMesh.py", line 35, in <module>
import CfdMeshTools
File "/home/louis/.FreeCAD/Mod/CfdOF/CfdMeshTools.py", line 32, in <module>
import Fem
<class 'ImportError'>: libnglib.so: cannot open shared object file: No such file or directory
Attached is a link to the example file, double-clicking on the "mesh" item yields the error, but only in Linux 20.04 LTS, in Windows, the meshing operation is working fine: https://drive.google.com/file/d/1xXzsIr ... sp=sharing
Any ideas on what the problem might be or how to solve the issue?
Meshing problem on Linux 20.04 LTS
Moderator: oliveroxtoby
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
- oliveroxtoby
- Posts: 840
- Joined: Fri Dec 23, 2016 9:43 am
- Location: South Africa
Re: Meshing problem on Linux 20.04 LTS
There seems to be a missing library required by the FEM workbench.LouisC wrote: ↑Mon May 18, 2020 11:59 am Good day All,
I have been using CfdOF with FreeCAD successfully in Windows for various VOF simulations and recently attempted to use Linux 20.04 LTS as OS with the aim to use Microsoft Azure for larger simulations.
I have successfully installed OpenFOAM v.7, FreeCAD 0.18.4, the Plot and CfdOF workbenches in FreeCAD, as well as gmsh, HiSA and cfMesh in Linux 20.04 LTS OS and when I run the dependency checker it states: No missing dependencies detected.
However, trying to create the mesh for the simulation, I keep on getting the following error:
Traceback (most recent call last):
File "/home/louis/.FreeCAD/Mod/CfdOF/CfdMesh.py", line 162, in setEdit
import _TaskPanelCfdMesh
File "/home/louis/.FreeCAD/Mod/CfdOF/_TaskPanelCfdMesh.py", line 35, in <module>
import CfdMeshTools
File "/home/louis/.FreeCAD/Mod/CfdOF/CfdMeshTools.py", line 32, in <module>
import Fem
<class 'ImportError'>: libnglib.so: cannot open shared object file: No such file or directory
Attached is a link to the example file, double-clicking on the "mesh" item yields the error, but only in Linux 20.04 LTS, in Windows, the meshing operation is working fine: https://drive.google.com/file/d/1xXzsIr ... sp=sharing
Any ideas on what the problem might be or how to solve the issue?
I had to do the following to get it working:
Code: Select all
sudo apt install netgen
sudo sh -c 'echo /usr/lib/x86_64-linux-gnu/netgen > /etc/ld.so.conf.d/netgen.conf'
sudo ldconfig
kkremitzki wrote: ping
Re: Meshing problem on Linux 20.04 LTS
Good day oliveroxtoby,
Thank you for the response and the assistance thus far, it is much appreciated. Your proposed method enables me to open the "CFD mesh" tab, and to "Run mesher" without any problems; however, trying to "Write mesh case" for a new problem is not possible. The following error remains present:
Traceback (most recent call last):
File "/home/louis/.FreeCAD/Mod/CfdOF/_TaskPanelCfdMesh.py", line 183, in writeMesh
self.store()
File "/home/louis/.FreeCAD/Mod/CfdOF/_TaskPanelCfdMesh.py", line 137, in store
"= '{}'".format(self.mesh_obj.Name, getQuantity(self.form.if_max)))
File "/home/louis/.FreeCAD/Mod/CfdOF/CfdTools.py", line 288, in getQuantity
return str(inputField.property("quantity"))
RuntimeError: Can't find converter for 'Base::Quantity'.
Also, opening Paraview from the "CFD mesh" tab does not load the model. The following error is given when ParaView opens:
ModelNotFoundError: No module named 'paraview'.
Furthermore, I have found that my FreeCAD installation would now close unintentionally (i.e. crash) without warning after running the proposed commands:
sudo sh -c 'echo /usr/lib/x86_64-linux-gnu/netgen > /etc/ld.so.conf.d/netgen.conf'
sudo ldconfig
I have found that using a FreeCAD AppImage instead of the full installation allows one te to overcome the meshing problem somewhat, but still, there is no integration into Paraview, thus viewing any meshing or output results remains challenging.
Lastly, I had so trouble using the command: sudo dnf install netgen and ended up downloading netgen (6.2.1804+dfsg1-3build2) manually from the following link: https://www.ubuntuupdates.org/package/c ... ase/netgen
I am looking forward to your response.
Regards,
Thank you for the response and the assistance thus far, it is much appreciated. Your proposed method enables me to open the "CFD mesh" tab, and to "Run mesher" without any problems; however, trying to "Write mesh case" for a new problem is not possible. The following error remains present:
Traceback (most recent call last):
File "/home/louis/.FreeCAD/Mod/CfdOF/_TaskPanelCfdMesh.py", line 183, in writeMesh
self.store()
File "/home/louis/.FreeCAD/Mod/CfdOF/_TaskPanelCfdMesh.py", line 137, in store
"= '{}'".format(self.mesh_obj.Name, getQuantity(self.form.if_max)))
File "/home/louis/.FreeCAD/Mod/CfdOF/CfdTools.py", line 288, in getQuantity
return str(inputField.property("quantity"))
RuntimeError: Can't find converter for 'Base::Quantity'.
Also, opening Paraview from the "CFD mesh" tab does not load the model. The following error is given when ParaView opens:
ModelNotFoundError: No module named 'paraview'.
Furthermore, I have found that my FreeCAD installation would now close unintentionally (i.e. crash) without warning after running the proposed commands:
sudo sh -c 'echo /usr/lib/x86_64-linux-gnu/netgen > /etc/ld.so.conf.d/netgen.conf'
sudo ldconfig
I have found that using a FreeCAD AppImage instead of the full installation allows one te to overcome the meshing problem somewhat, but still, there is no integration into Paraview, thus viewing any meshing or output results remains challenging.
Lastly, I had so trouble using the command: sudo dnf install netgen and ended up downloading netgen (6.2.1804+dfsg1-3build2) manually from the following link: https://www.ubuntuupdates.org/package/c ... ase/netgen
I am looking forward to your response.
Regards,
- oliveroxtoby
- Posts: 840
- Joined: Fri Dec 23, 2016 9:43 am
- Location: South Africa
Re: Meshing problem on Linux 20.04 LTS
Sorry - this was a typo. It should have been 'apt', not 'dnf' (getting my platforms mixed up). I have edited the original post.LouisC wrote: ↑Sat May 23, 2020 7:19 pm Lastly, I had so trouble using the command: sudo dnf install netgen and ended up downloading netgen (6.2.1804+dfsg1-3build2) manually from the following link: https://www.ubuntuupdates.org/package/c ... ase/netgen
-
- Posts: 8
- Joined: Sun Feb 09, 2020 5:17 am
Re: Meshing problem on Linux 20.04 LTS
Thanks for posting. I was able to make netgen meshing work following the command line instructions.
Regards
OS: Ubuntu 20.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.4.
Build type: Release
Python version: 3.8.2
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.3.0
Locale: English/United States (en_US)
Regards
OS: Ubuntu 20.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.4.
Build type: Release
Python version: 3.8.2
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.3.0
Locale: English/United States (en_US)