CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [Other] HexBlocker a GUI for blockMeshDict, alpha release (https://www.cfd-online.com/Forums/openfoam-community-contributions/114773-hexblocker-gui-blockmeshdict-alpha-release.html)

nsf March 23, 2015 04:04

Hi Bruno

Thank you for the stub! I haven't found time in quite a while to work with hexBlocker but every contribution to the code or wiki are more than welcome!

Nicolas

Imed May 18, 2015 14:27

Hi all;
I was trying to nenerate BlockMeshDict using hexBlocker, but I had these errors, so i din't know how to fix it....
I have to tell you this is my first time i use ubuntu an OpenFoam.
so please can you help me, so I'm thankful for you all also for this great work you Nicolas :o . here is my errors:

from /usr/include/c++/4.9/iostream:38,
from /usr/include/vtk-5.8/vtkIOStream.h:35,
from /usr/include/vtk-5.8/vtkSystemIncludes.h:40,
from /usr/include/vtk-5.8/vtkIndent.h:24,
from /usr/include/vtk-5.8/vtkObjectBase.h:43,
from /usr/include/vtk-5.8/vtkSmartPointerBase.h:26,
from /usr/include/vtk-5.8/vtkSmartPointer.h:23,
from /home/bm/hexBlocker/src/HexEdge.h:29,
from /home/bm/hexBlocker/src/HexEdge.cpp:26:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:54:1: note: ‘acos’
__MATHCALL (acos,, (_Mdouble_ __x));
^
CMakeFiles/HexBlocker.dir/build.make:650: recipe for target 'CMakeFiles/HexBlocker.dir/HexEdge.cpp.o' failed
make[2]: *** [CMakeFiles/HexBlocker.dir/HexEdge.cpp.o] Error 1
CMakeFiles/Makefile2:63: recipe for target 'CMakeFiles/HexBlocker.dir/all' failed
make[1]: *** [CMakeFiles/HexBlocker.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2
+ '[' false == true ']'
+ exit 0

nsf May 18, 2015 14:50

Hi Imed,

I hope you'll find running OpenFOAM usefull! It's a good code but it has a rather steep learning curve. One has to be prepared to dig around (reading mostly) in the code in order to really understand whats going on but you'll learn alot.


From what I can tell you are trying to compile hexBlocker using the system VTK version 5.8:
Code:

from /usr/include/vtk-5.8/vtkIOStream.h:35,
from /usr/include/vtk-5.8/vtkSystemIncludes.h:40,
from /usr/include/vtk-5.8/vtkIndent.h:24,

I've only tested hexblocker with VTK version 5.10. The install script is supposed to try to download the correct version of VTK and compile that. I can't say what went wrong.

Could you please provide more information on what you did? Which version of ubuntu are you running?

Also make sure you've installed all packages required to compile paraview.

/Nicolas

Imed May 18, 2015 15:13

file needed ???
 
hello again;
QTcreator told me this problem :
libQVTK.so.5.10.0 needed
so where can I download this file so I can compile HexBlocker
thanks for your help

nsf May 18, 2015 15:24

Hi,

There is an install script included. Run that before compiling in qtcreator. It will download and compile the correct version of VTK.

/Nicolas

Imed May 18, 2015 17:23

Quote:

Originally Posted by nsf (Post 546768)
Hi,

There is an install script included. Run that before compiling in qtcreator. It will download and compile the correct version of VTK.

/Nicolas

Dear Necolas;
I fuond the error, I think, it was not about VTK, the problem is that the compiler didn't understand this:
double alpha = std::acos(dotp); // line 450 in HexEdge.cpp
and
double alphaMax = std::acos(dotp);//+std::asin(1); // line 452 in the same file

this what made the compilation stops.
thank u again for your replay

Imed May 18, 2015 17:45

HexBlocker Executed ...
 
hi again Necolas;
after fixing the 2 errors, HexBlocker works properly.
thank you for your help Necolas, I'll tell you how wonderful I'll find HexBlocker
thank you much more again.

nsf May 19, 2015 02:04

No worries. I'm glad it worked out!

If you would like to contribute on some code you are more than welcome!

Nicolas

Imed May 19, 2015 11:57

Quote:

Originally Posted by nsf (Post 546825)
No worries. I'm glad it worked out!

If you would like to contribute on some code you are more than welcome!

Nicolas

yes, it is great honnor to me dear Necolas.
also would you like to tell me how can I use HexBlocker, especialy for generating BlockMeshDict file please.

nsf May 19, 2015 12:31

Hi,

I've wrote a short tutorial earlier in this thread.
post 31

/Nicolas

Imed May 19, 2015 15:06

Quote:

Originally Posted by nsf (Post 546923)
Hi,

I've wrote a short tutorial earlier in this thread.
post 31

/Nicolas

hi there
Thank you so very much Nicolase, you did a great job...

mrueger June 21, 2015 11:03

Hi Nicolas,

i'm a Chemical Engineer in Erlangen (Germany) learning and working with OpenFoam for 3 Years. In the past , i mesh my geometries mostly with ANSYS-Mesh and fluent3DMeshToFoam.
You did a great job with hexblocker.

I tried to load the blockmeshDict from various Openfoam 2.4.x tutorials. The mixervessel2d blockMeshDict (.e.g. tutorials/incompressible/simpleFoam/mixerVessel2D) could not loaded correctly. I assume, the reason is a blockMeshDict format from a old OpenFoam Version 1.7.
for the blocks there is a zone-name (rotor) in the block-definition :

Code:

blocks
(
    // block0
    hex (0 2 13 12 48 50 61 60)
    rotor
    (12 12 1)
    simpleGrading (1 1 1)

and there is no boundary section, but a patches section.

The zone info after the vertices in the hex definition isn't described in the actual blockMesh the Online User http://cfd.direct/openfoam/user-guide/blockmesh/Guide.

The patches info can easily replaced with a boundary section, but the zone name is a prerequisite for running simpleFoam. May be i try to change your code and hopefully i succeed.


This is only for your Information, no request for correction.


I have a question:
Did you start rewriting the code in pyqt and vtk, as mentioned earlier (see quote below) ?

I also think about a python based hex-blocker .

Best Regards
Michael


Quote:

Originally Posted by nsf (Post 527536)
Hi Amine thank you for the kind words.

I haven't touch the code in about a year. I've had other spare time projects that have taken up all my time. If I do restart the work on hexblocker I'll most likely rewrite it in python using pyqt and vtk. Maybe, if I have to, some work in C++. Python is just so much easier to work with.

If you find any bugs let me know. If it doesn't take to much time I'll try to fix it.

Best regards
Nicolas


nsf June 23, 2015 09:53

Hi Michael,

Thanks for the info. I've just bought a house so my spare time is a bit limited. Well I've got a bit of spare time but it all goes to unboxing and setting up shelves. But I'll try to fix the region issue. Though it won't be any time soon. If you would like to contribute then check out the function getBlocks in hexReader.cpp, line 193. Around line 244 one could probalby check if there is a region entry in cellNumbersList. The list should have four entries one word and three integers.

Let me know if you do change any thing and I'll be happy to merge it.

I haven't yet started any work with pyqt. The only thing I did was to create a QtWindow with a vtk window inside. If you would like to start work I would be happy to have a talk about implementation. For instance I keep thinking one could skip qt entirely and only use the 3D widgets of VTK.


Best Regards
Nicolas

wc34071209 January 12, 2017 07:25

Hi, what is the current status of this tool?

nsf January 12, 2017 16:00

Hi,

These days I'm not active with hexBlocker. Mostly because I have less spare time these days but also because I mostly use other mesh generators. I only use hexBlocker if I need to modify a tutorial and for that it's in my eyes good enough.

But I gladly accept contributions and will be willing to help.

Best regards
Nicolas

gaza February 24, 2017 09:52

Hi All
I have installed hexBlocker without any errors. But how can I turn it on?
I do not have hexBlocker command
??

nsf February 25, 2017 13:56

Hi Pblasiak,

In the folder where you have hexblocker you should have a folder called bin. In there you have a executable called HexBlocker.

If you wan't to start it from another location provide the full path to the executable, add the bin folder to the path or create an alias in your bashrc.

I hope that helped!

Best Regards
Nicolas

gaza February 27, 2017 04:06

Quote:

Originally Posted by nsf (Post 638514)
Hi Pblasiak,

In the folder where you have hexblocker you should have a folder called bin. In there you have a executable called HexBlocker.

If you wan't to start it from another location provide the full path to the executable, add the bin folder to the path or create an alias in your bashrc.

I hope that helped!

Best Regards
Nicolas

Hi Nicolas,
Thank's a lot. It works :)

Ekscel May 31, 2018 16:50

HexBlocker installation on Ubuntu 18.04
 
Hi, can you, please, help me with installation:
I did everything exactly as in wiki:
Code:

This is what you need to compile and install hexBlocker on Ubunt 12.04
 sudo apt-get install git cmake qt4-dev-tools libqt4-dev libxt-dev
 To install open up a terminal and go to some directory where you want it.
 git clone git://github.com/nicolasedh/hexBlocker
 cd hexBlocker
 ./install.sh

Notes: Fresh version of Ubuntu 18.04 [minimalist option during setup], running in VirtualBox on Win10. OpenFOAM 5.0. Almost no knowledge of Linux...

And my effort ended with this list of errors:
Code:

ivan@ivan-VirtualBox:~/OpenFOAM/ivan-5.0/run/hexBlocker$ ./install.sh
+ baseDir=/home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker
+ vtkBuild=/home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/build/VTK
+ vtkInstall=/home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/VTK
+ vtkSRC=/home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/vtkSrc
+ hexBuild=/home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/build/hexBlocker
+ hexBin=/home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/bin
+ hexSRC=/home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/src
+ nprocs=1
+ debug=false
++ which qmake
+ QMAKE=/usr/bin/qmake
++ which moc-qt4 moc
++ head -n1
+ MOC=/usr/bin/moc-qt4
++ which uic-qt4 uic
++ head -n1
+ UIC=/usr/bin/uic-qt4
+ '[' -z /usr/bin/qmake -o -z /usr/bin/moc-qt4 -o -z /usr/bin/uic-qt4 ']'
+ vtkpgk=VTK-6.3.0.tar.gz
+ '[' '!' -f VTK-6.3.0.tar.gz ']'
+ '[' '!' -d /home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/vtkSrc ']'
+ '[' '!' -d /home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/build/VTK ']'
+ cd /home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker
+ mkdir -p /home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/build/hexBlocker
+ cd /home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/build/hexBlocker
+ cmake -DVTK_DIR=/home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/VTK/lib/cmake/vtk-6.3 -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake -DQT_MOC_EXECUTABLE=/usr/bin/moc-qt4 -DQT_UIC_EXECUTABLE=/usr/bin/uic-qt4 -DCMAKE_INSTALL_PREFIX=/home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/bin /home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/src
CMake Error at CMakeLists.txt:9 (FIND_PACKAGE):
  Could not find a package configuration file provided by "VTK" with any of
  the following names:

    VTKConfig.cmake
    vtk-config.cmake

  Add the installation prefix of "VTK" to CMAKE_PREFIX_PATH or set "VTK_DIR"
  to a directory containing one of the above files.  If "VTK" provides a
  separate development package or SDK, be sure it has been installed.


-- Configuring incomplete, errors occurred!
See also "/home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/build/hexBlocker/CMakeFiles/CMakeOutput.log".
+ echo 'error in cmake for hexBlocker'
error in cmake for hexBlocker
+ exit 1
+ make -j 1
make: *** No targets specified and no makefile found.  Stop.
+ echo 'error in make for hexBlocker'
error in make for hexBlocker
+ exit 1
+ make install
make: *** No rule to make target 'install'.  Stop.
+ '[' false == true ']'
 + exit 0

What should I do, what and how to setup? Any ideas?

wulonglong September 8, 2018 11:56

Quote:

Originally Posted by Ekscel (Post 694191)
Hi, can you, please, help me with installation:
I did everything exactly as in wiki:
Code:

This is what you need to compile and install hexBlocker on Ubunt 12.04
 sudo apt-get install git cmake qt4-dev-tools libqt4-dev libxt-dev
 To install open up a terminal and go to some directory where you want it.
 git clone git://github.com/nicolasedh/hexBlocker
 cd hexBlocker
 ./install.sh

Notes: Fresh version of Ubuntu 18.04 [minimalist option during setup], running in VirtualBox on Win10. OpenFOAM 5.0. Almost no knowledge of Linux...

And my effort ended with this list of errors:
Code:

ivan@ivan-VirtualBox:~/OpenFOAM/ivan-5.0/run/hexBlocker$ ./install.sh
+ baseDir=/home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker
+ vtkBuild=/home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/build/VTK
+ vtkInstall=/home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/VTK
+ vtkSRC=/home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/vtkSrc
+ hexBuild=/home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/build/hexBlocker
+ hexBin=/home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/bin
+ hexSRC=/home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/src
+ nprocs=1
+ debug=false
++ which qmake
+ QMAKE=/usr/bin/qmake
++ which moc-qt4 moc
++ head -n1
+ MOC=/usr/bin/moc-qt4
++ which uic-qt4 uic
++ head -n1
+ UIC=/usr/bin/uic-qt4
+ '[' -z /usr/bin/qmake -o -z /usr/bin/moc-qt4 -o -z /usr/bin/uic-qt4 ']'
+ vtkpgk=VTK-6.3.0.tar.gz
+ '[' '!' -f VTK-6.3.0.tar.gz ']'
+ '[' '!' -d /home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/vtkSrc ']'
+ '[' '!' -d /home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/build/VTK ']'
+ cd /home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker
+ mkdir -p /home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/build/hexBlocker
+ cd /home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/build/hexBlocker
+ cmake -DVTK_DIR=/home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/VTK/lib/cmake/vtk-6.3 -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake -DQT_MOC_EXECUTABLE=/usr/bin/moc-qt4 -DQT_UIC_EXECUTABLE=/usr/bin/uic-qt4 -DCMAKE_INSTALL_PREFIX=/home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/bin /home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/src
CMake Error at CMakeLists.txt:9 (FIND_PACKAGE):
  Could not find a package configuration file provided by "VTK" with any of
  the following names:

    VTKConfig.cmake
    vtk-config.cmake

  Add the installation prefix of "VTK" to CMAKE_PREFIX_PATH or set "VTK_DIR"
  to a directory containing one of the above files.  If "VTK" provides a
  separate development package or SDK, be sure it has been installed.


-- Configuring incomplete, errors occurred!
See also "/home/ivan/OpenFOAM/ivan-5.0/run/hexBlocker/build/hexBlocker/CMakeFiles/CMakeOutput.log".
+ echo 'error in cmake for hexBlocker'
error in cmake for hexBlocker
+ exit 1
+ make -j 1
make: *** No targets specified and no makefile found.  Stop.
+ echo 'error in make for hexBlocker'
error in make for hexBlocker
+ exit 1
+ make install
make: *** No rule to make target 'install'.  Stop.
+ '[' false == true ']'
 + exit 0

What should I do, what and how to setup? Any ideas?

Hi Ekscel,

I am also having this problem, did you solve it?


All times are GMT -4. The time now is 03:47.