meshing problem

A subforum specific to the development of the OpenFoam-based workbenches ( Cfd https://github.com/qingfengxia/Cfd and CfdOF https://github.com/jaheyns/CfdOF )

Moderator: oliveroxtoby

wafi
Posts: 66
Joined: Sat Oct 15, 2016 8:45 am

meshing problem

Postby wafi » Mon Jan 21, 2019 9:49 am

I have a problem to refine the meshing.
  • _TaskPanelCfdMeshRegion
    File "/home/peter/.FreeCAD/Mod/CfdOF/_TaskPanelCfdMeshRegion.py", line 40, in <module>
    import CfdFaceSelectWidget
    File "/home/peter/.FreeCAD/Mod/CfdOF/CfdFaceSelectWidget.py", line 47, in <module>
    from PySide import QtUiTools

    cannot import name QtUiTools
No problem to do a refinement in the FEM WB, but without task panel I can not define what to be to refine.
The problem occures after reinstallation the whole computer incl. new Ubuntu etc. Cfd dependencies seems to be ok.

Next problem, paraview does not start, a link is set : sudo ln -s /opt/paraviewopenfoam54/bin/paraview /usr/local/bin/paraview
Paraview can be started without any problems from terminal

OS: Ubuntu 18.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15611 (Git)
Build type: Release
Branch: master
Hash: 64a94ae0f7c60fc981086fe157150a9c0dca29c6
Python version: 2.7.15rc1
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
User avatar
oliveroxtoby
Posts: 278
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: meshing problem

Postby oliveroxtoby » Tue Jan 22, 2019 6:43 am

wafi wrote:
Mon Jan 21, 2019 9:49 am
I have a problem to refine the meshing.
  • _TaskPanelCfdMeshRegion
    File "/home/peter/.FreeCAD/Mod/CfdOF/_TaskPanelCfdMeshRegion.py", line 40, in <module>
    import CfdFaceSelectWidget
    File "/home/peter/.FreeCAD/Mod/CfdOF/CfdFaceSelectWidget.py", line 47, in <module>
    from PySide import QtUiTools

    cannot import name QtUiTools
I cannot reproduce this problem on my system. My only guess is that it's something specific to your version of PySide and/or Qt. Could you try running one of the .AppImage FreeCAD packages and see if you have the same problem?
Next problem, paraview does not start, a link is set : sudo ln -s /opt/paraviewopenfoam54/bin/paraview /usr/local/bin/paraview
Paraview can be started without any problems from terminal
Try making sure that /usr/local/bin is in your path as defined in /etc/profile, or ~/.bash_profile (not bashrc). You could also try linking it in ~/bin/ instead of /usr/local/bin/
wafi
Posts: 66
Joined: Sat Oct 15, 2016 8:45 am

Re: meshing problem

Postby wafi » Wed Jan 23, 2019 12:30 pm

Hi Oliver

I really frustrated now. The appImage does not work at all, of cause I tried to make it workable, but installation failed.
Trying to work with the ppa version gives same problem, even by installing version 0.17, missing or wrong Qt 5 ... I do not know, but I have the impression that this is a result of a test loading the ppa:freecad-community/ppa which might have destroyed the respositories ... or perhaps it`s in the ppa download of freecad. It seems that the Qt5 is not working and as far as I can see, Qt5 will be a general problem due licence problems ...

[bug]Arch/InitGui.py
Please look into the log file for further information
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.12' not found (required by /home/peter/.local/lib/python2.7/site-packages/PySide2/QtGui.so)[/bug]

Failure when trying to install the AppImage:

[bug]./FreeCAD-0.17.13541.9948ee4.glibc2.17-x86_64.AppImage

/bin/bash: /tmp/.mount_FreeCAUJIKrW/lib/x86_64-linux-gnu/libtinfo.so.5: no version information available (required by /bin/bash)
FreeCAD 0.17, Libs: 0.17R13541 (Git)
[/bug]
wafi
Posts: 66
Joined: Sat Oct 15, 2016 8:45 am

Re: meshing problem

Postby wafi » Thu Jan 24, 2019 2:12 pm

hm ...

now I reinstalled Ubuntu 18.04, of cause formated harddisk. I only loaded Ubuntu, tried to load freecad appImge without success, than FreeCad ppa, and openfoam 5, installed in /opt, dependencies worked after linked paraview into /bin ... but did not start when calling from freecad, cfdof ...
Refine does not work at all, failure message:
Running the Python command 'Cfd_MeshRegion' failed:
Traceback (most recent call last):
File "/home/peter/.FreeCAD/Mod/CfdOF/_CommandCfdMeshRegion.py", line 55, in Activated
FreeCADGui.doCommand("CfdMeshRegion.makeCfdMeshRegion(App.ActiveDocument." + sobj.Name + ")")
File "<string>", line 1, in <module>
File "/home/peter/.FreeCAD/Mod/CfdOF/CfdMeshRegion.py", line 50, in makeCfdMeshRegion
import _ViewProviderCfdMeshRegion
File "/home/peter/.FreeCAD/Mod/CfdOF/_ViewProviderCfdMeshRegion.py", line 35, in <module>
import _TaskPanelCfdMeshRegion
File "/home/peter/.FreeCAD/Mod/CfdOF/_TaskPanelCfdMeshRegion.py", line 40, in <module>
import CfdFaceSelectWidget
File "/home/peter/.FreeCAD/Mod/CfdOF/CfdFaceSelectWidget.py", line 47, in <module>
from PySide import QtUiTools

cannot import name QtUiTools



Paraview start ends here in Meshing status window, nothing in output window:
Running paraview --script=/media/peter/data/tmp/meshCase/pvScriptMesh.py
I think there is something wrong in the downloaded ppa files

best regards
Peter


OS: Ubuntu 18.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13541 (Git)
Build type: Release
Branch: releases/FreeCAD-0-17
Hash: 9948ee4f1570df9216862a79705afb367b2c6ffb
Python version: 2.7.15rc1
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
wafi
Posts: 66
Joined: Sat Oct 15, 2016 8:45 am

Re: meshing problem

Postby wafi » Thu Jan 24, 2019 3:31 pm

hm ... maybe there is a similar issue here:
https://forum.freecadweb.org/viewtopic.php?f=4&t=33429

problem here was: required Qt version `Qt_5.11'
installed Qt version: 5.9.5

question is, how to get the info which Qt version is necessary and how to change it.
triplus
Posts: 8415
Joined: Mon Dec 12, 2011 4:45 pm

Re: meshing problem

Postby triplus » Thu Jan 24, 2019 7:24 pm

Sahil
Posts: 4
Joined: Thu Sep 13, 2018 10:27 am

Re: meshing problem

Postby Sahil » Sun Feb 10, 2019 12:14 pm

Hi All,

I have just installed the cfdof module in freecad to start some trials and I have come up with 1 semi major issue and 1 major issue.
1st) when I create a volume (a rectangular section which is 40mmx40mmx2500mm) in part design and create the container for open foam and try to mesh the volume using cfmesh I get the below error.

"0.0: Starting meshing ...
0.0: Exporting mesh region data ...
0.1: Exporting the part surfaces ...
0.2: Running cfMesh ...
0.2: Mesher started
2.3: Meshing exited with error"

and in the freecad report view I get the messege below.

"not a freecad file: .STL

Starting meshing ...

Part to mesh: Name --> Pad, Label --> Pad, ShapeType --> Solid
CharacteristicLengthMax: 50.012798362
ElementDimension: 3D
No mesh regions.
Populating mesh dictionaries in folder C:\meshCase
Successfully wrote meshCase to folder C:\meshCase
Executing: C:\PROGRA~1\BLUECF~1\OPENFO~1.X\..\msys64\usr\bin\bash --login -O expand_aliases -c cd "/c/meshCase" && ./Allmesh
Raw command: [u'C:/Program Files/FreeCAD 0.17/bin\\python.exe', '-u', 'C:\\Users\\Sahil\\AppData\\Roaming\\FreeCAD\\Mod\\CfdOF\\WindowsRunWrapper.py', 'C:\\PROGRA~1\\BLUECF~1\\OPENFO~1.X\\..\\msys64\\usr\\bin\\bash', '--login', '-O', 'expand_aliases', '-c', 'cd "/c/meshCase" && ./Allmesh']
Setting environment for OpenFOAM 5.x mingw-w64 Double Precision (of5-64), using MSMPI71 - please wait...
Environment is now ready. Notes:
- You can change between installed versions by running: ofmenu
- You can change to other predefined versions by running: ofmenuNew
Fem::FemMeshObjectPython: Links go out of the allowed scope"[/quote]

2nd) If i do mesh using gsmsh and go through the steps and get to viewing the results paraview does not work. however i have salome-meca for windows installed with paravis and that works.

" ERROR: In C:\bbd\2d618e80\build\superbuild\paraview\src\VTK\Rendering\OpenGL2\vtkOpenGLRenderWindow.cxx, line 819
vtkGenericOpenGLRenderWindow (000002473F057B40): GLEW could not be initialized.

ERROR: In C:\bbd\2d618e80\build\superbuild\paraview\src\VTK\Rendering\OpenGL2\vtkOpenGLRenderWindow.cxx, line 819
vtkGenericOpenGLRenderWindow (000002473F057B40): GLEW could not be initialized.

ERROR: In C:\bbd\2d618e80\build\superbuild\paraview\src\VTK\Rendering\OpenGL2\vtkShaderProgram.cxx, line 408
vtkShaderProgram (000002473F63DAB0): 1: #version 120

18: /*=========================================================================
19:
20: Program: Visualization Toolkit
21: Module: vtkPolyDataVS.glsl
22:
23: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
24: All rights reserved.
25: See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
26:
27: This software is distributed WITHOUT ANY WARRANTY; without even
28: the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
29: PURPOSE. See the above copyright notice for more information.
30:
31: =========================================================================*/
32:
33: attribute vec4 vertexMC;
34:
35: // frag position in VC
36: varying vec4 vertexVCVSOutput;
37:
38: // optional normal declaration
39: //VTK::Normal::Dec
40:
41: // extra lighting parameters
42: //VTK::Light::Dec
43:
44: // Texture coordinates
45: //VTK::TCoord::Dec
46:
47: // material property values
48: //VTK::Color::Dec
49:
50: // clipping plane vars
51: //VTK::Clip::Dec
52:
53: // camera and actor matrix values
54: uniform mat4 MCDCMatrix;
55: uniform mat4 MCVCMatrix;
56:
57: // Apple Bug
58: //VTK::PrimID::Dec
59:
60: // Value raster
61: //VTK::ValuePass::Dec
62:
63: void main()
64: {
65: //VTK::Color::Impl
66:
67: //VTK::Normal::Impl
68:
69: //VTK::TCoord::Impl
70:
71: //VTK::Clip::Impl
72:
73: //VTK::PrimID::Impl
74:
75: vertexVCVSOutput = MCVCMatrix * vertexMC;
76: gl_Position = MCDCMatrix * vertexMC;
77:
78:
79: //VTK::ValuePass::Impl
80:
81: //VTK::Light::Impl
82: }
83:


ERROR: In C:\bbd\2d618e80\build\superbuild\paraview\src\VTK\Rendering\OpenGL2\vtkShaderProgram.cxx, line 409
vtkShaderProgram (000002473F63C5B0):

ERROR: In C:\bbd\2d618e80\build\superbuild\paraview\src\VTK\Rendering\OpenGL2\vtkOpenGLRenderWindow.cxx, line 1861
vtkGenericOpenGLRenderWindow (000002473F057B40): Hardware does not support the number of textures defined.

Generic Warning: In C:\bbd\2d618e80\build\superbuild\paraview\src\VTK\Rendering\OpenGL2\vtkOpenGLRenderTimer.cxx, line 104
vtkOpenGLRenderTimer::Stop called before vtkOpenGLRenderTimer::Start. Ignoring.

ERROR: In C:\bbd\2d618e80\build\superbuild\paraview\src\VTK\Rendering\OpenGL2\vtkOpenGLRenderWindow.cxx, line 1861
vtkGenericOpenGLRenderWindow (000002473F057B40): Hardware does not support the number of textures defined.

ERROR: In C:\bbd\2d618e80\build\superbuild\paraview\src\VTK\Rendering\OpenGL2\vtkShaderProgram.cxx, line 408
vtkShaderProgram (000002473F63D1F0): 1: #version 120
2: #ifdef GL_ES
3: #if __VERSION__ == 300
4: #define attribute in
5: #define varying out
6: #endif // 300
7: #else // GL_ES
8: #define highp
9: #define mediump
10: #define lowp
11: #if __VERSION__ == 150
12: #define attribute in
13: #define varying out
14: #endif
15: #endif // GL_ES
16:
17: attribute vec4 ndCoordIn;
18: attribute vec2 texCoordIn;
19: varying vec2 texCoord;
20: void main()
21: {
22: gl_Position = ndCoordIn;
23: texCoord = texCoordIn;
24: }


ERROR: In C:\bbd\2d618e80\build\superbuild\paraview\src\VTK\Rendering\OpenGL2\vtkShaderProgram.cxx, line 409
vtkShaderProgram (000002473F63D1F0):

Generic Warning: In C:\bbd\2d618e80\build\superbuild\paraview\src\VTK\Rendering\OpenGL2\vtkOpenGLRenderTimer.cxx, line 104
vtkOpenGLRenderTimer::Stop called before vtkOpenGLRenderTimer::Start. Ignoring.

versionFunctions: Not supported on OpenGL ES"


details copied from freecad "about tab"

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13541 (Git)
Build type: Release
Branch: releases/FreeCAD-0-17
Hash: 9948ee4f1570df9216862a79705afb367b2c6ffb
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)
Last edited by Sahil on Sun Feb 10, 2019 6:39 pm, edited 2 times in total.
Jee-Bee
Posts: 1910
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: meshing problem

Postby Jee-Bee » Sun Feb 10, 2019 2:38 pm

please can you switch from quote tags to code tags? That is more easy to read.
triplus
Posts: 8415
Joined: Mon Dec 12, 2011 4:45 pm

Re: meshing problem

Postby triplus » Sun Feb 10, 2019 4:53 pm

versionFunctions: Not supported on OpenGL ES"
This looks like a GPU driver related issue. If you have some other hardware (PC) with a different (modern) GPU available, please test the procedure there first.
Sahil
Posts: 4
Joined: Thu Sep 13, 2018 10:27 am

Re: meshing problem

Postby Sahil » Sun Feb 10, 2019 6:40 pm

I have updated the previous post by removing the quote code.