Dear All,
I have created an
Dear All,
I have created an application to view the block structure of blockMeshDicts graphically. Its a modified version of blockMesh which reads in the block structure in blockMeshDict and uses OpenGL and the FOX GUI toolkit to display this. It is fairly robust in that it will display what is actually written in the blockMeshDict (including errors) and I find it quite useful for correcting mistakes there. Its called simpleViewer, and I've uploaded it to /trunk/Breeder_1.5/utilities/preProcessing/simpleViewer on the SourceForge openfoam-extend project for distribution. (Or at least I think I've done this correctly; this is the first time I've done this. I can forsee a busy weekend, possibly). http://www.cfd-online.com/OpenFOAM_D...es/1/10897.gif Feel free to make use of it! Gavin |
Hi Gavin,
I am not able to
Hi Gavin,
I am not able to find the "simpleviewer" in the specified path, rather i am not able find the path. Could you pl. help me out in experiencing your unique package. Thank you Rishi |
Hi Gavin,
I am not able to
Hi Gavin,
I am not able to find the "simpleviewer" in the specified path, rather i am not able find the path. Could you pl. help me out in experiencing your unique package? Thank you Rishi |
Dear Rishi,
Point your brow
Dear Rishi,
Point your browser at http://openfoam-extend.svn.sourceforge.net/viewvc/openfoam-extend/trunk/Breeder_ 1.5/utilities/preProcessing/simpleViewer/ Gavin |
Hi Gavin,
I have tried your
Hi Gavin,
I have tried your nice tool. Thank you for sharing it! I agree on how this could be developed in the future. Fox seems to have some nice functionality for creating GUIs. With this I can generate simple tailored GUIs for teaching with OpenfOAM as a black-box in the background. I would like to propose to modify the following information: In the README file: Change: ./configure -prefix ~/OpenFOAM/ThirdParty/fox-1.6.34 to: ./configure --prefix $WM_THIRD_PARTY_DIR/fox-1.6.34 (The use of environment variables i really great! Note that I use two dashes: --prefix, but perhaps it is sufficient with one) Then: Should EXE_LIBS really point at the src directory of the Fox installation? I had to make it point at the lib directory instead. The *.so files are in the lib directory. In the Make/options file: Change: curvedEdges = ../blockMesh/curvedEdges to: curvedEdges = $(FOAM_UTILITIES)/mesh/generation/blockMesh/curvedEdges Remove: -I$(LIB_SRC)/foam/lnInclude (there is no src/foam directory) Change: -I/opt/foam/OpenFOAM/ThirdParty/fox-1.6.34/include to: -I$(WM_THIRD_PARTY_DIR)/fox-1.6.34/include Change: -L/opt/foam/OpenFOAM/ThirdParty/fox-1.6.34/src to: -L$(WM_THIRD_PARTY_DIR)/fox-1.6.34/lib (NOTE here that I had to use lib instead of src!!!) In my case, my Linux installation does not have /usr/X11R6/include and lib, but I could just remove those. What are those needed for, since I could just remove them? Are all those libraries that you are linking to really needed, or would it be possible to remove some of them? It seems like you should remove one of the two times you specify: -DHAVE_GL_H=1 -DHAVE_GLU_H=1 The following do not seem to be needed: -L$(WM_PROJECT_USER_LIB) -L/usr/local/lib -DFULLDEBUG -g -O0 I have some graphical problems, but I think that has to do with my hardware. Your functionality works, but I have some distortion at start-up. I will probably have a further look at this utility and future possibilities in the future. Thanks again! Håkan. |
Hi,
Also, I had to set the
Hi,
Also, I had to set the following i etc/bashrc: export LD_LIBRARY_PATH=$WM_THIRD_PARTY_DIR/fox-1.6.34/lib:$LD_LIBRARY_PATH Håkan. |
Hi Hakan,
Thanks for the fe
Hi Hakan,
Thanks for the feedback; I will try and make the suggested changes to the Makefiles (and some suggested by Bernhard Gschaider) in the next day or so. As for the additional libraries; I'm afraid that once something is working I very often stop fiddling with it; so I may have some redundancies cluttering up the Makefiles. Again; I'll have a look. FOX is one of the nicest GUI toolkits available, IMHO. (FLTK is a good one as well from what I have seen). If you do want to put some sort of a GUI around OpenFOAM it would be a good choice. Gavin |
Hi,
nice work Gavin!
May I
Hi,
nice work Gavin! May I add, that there exist a quite nice fltk 'gui' for openfoam based on gmsh: http://openfoamwiki.net/index.php/Contrib_gmshFoam The definition of boundary conditions, models and solvers is still missing; otherwise it is a great tool might be a good base, if one does not use blockMesh. Another option, maybe more enhanced than gmsh, could be some add-on for paraview or visit. The functionality for displaying the mesh, checking the quality is already there (at least in visit). As for gmsh one still needs a'small' plugin to set the boundary conditions, models and solvers... The next, which comes to my mind, is to build something around engrid!? Though, it should be a tool which could prepare all openfoam conform meshes for the actual calculation. Does anyone know, if there is an import function in engrid for openfoam mesh? Fabian |
Hi Fabian,
I don't know tha
Hi Fabian,
I don't know that an addon for paraview would be a good idea. From what I have seen, mesh generation is almost as complex a task as Cfd itself; to cover the geometry manipulation (either through built-in solid modelling or through import of eg. STL) and meshing would be a huge task, rather more than just an add-on! That being so, any features that paraview might bring would be relatively minor - you would be better off starting further back with VTK or even OpenGL. Same goes I think for VisIt. Personally, I am looking seriously at Cubit, about which I have heard good things, and OpenSALOME. With Cubit, unfortunately you don't get the source code, so either you have to rely on translation from the existing output formats, or someone needs to twist an arm at Sandia to write an OpenFOAM output. OpenSALOME looks better for this; it is opensource, so it would presumably be possible to write a native OpenFOAM export module. Gavin |
Hi Fabian, Gavin,
First of al
Hi Fabian, Gavin,
First of all, impressive work, Gavin. Said that, I'd like to agree to Fabian's opinion in every sense. What I really wanted to show with gmsFoam was that what could be achieved by adding a small piece of code to existing software, rather than writing a GUI application from scratch. Along this line, an idea that hit me when I saw the blockMeshDict viewer was to add gmshFoam a functionality to import blockMeshDict as internal data structure of Gmsh geometry (represented as .geo files in human-readable form). With this approach a user can not only view the blockMeshDict geometry but also utilize all the Gmsh functionalities while being kept away from being enforced to learn how to use another software. And the same can be said with regard to Fabian's opinion about ParaView and VisIt... My baseline thought is that opensourse softwares require more tight mutual integration to exploit a synergy effect. Takuya |
Woops, I didn't realize Gavin'
Woops, I didn't realize Gavin's post until I pressed the post button... As to the meshing, you don't have to write all the mesing algorithm as there are Netgen and Gmsh meshers encapsuled to libraries. Salome's export module would be a nice idea as well.
Takuya |
Hi to both,
yes, I forgot S
Hi to both,
yes, I forgot Salome. Somehow, I had the feeling, that it was a bit slow, but this was a quite old version and I did not use it long enough... Greetings! Fabian |
Hi,
I am building a virtual
Hi,
I am building a virtual machine based on opensuse 11.1 for training and for summer interns (who are given a windows box). Anyway, I've built 1.5-dev, and simpleViewer compiles just fine. However, when I try to use it, a window is opened, but I get the following error: [01:03:18][foamuser@linux:cavity]769$ simpleViewer addIstreamConstructorToTable addIstreamConstructorToTable addIstreamConstructorToTable addIstreamConstructorToTable addIstreamConstructorToTable /*---------------------------------------------------------------------------*\ | ========= | | | \ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \ / O peration | Version: 1.5-dev | | \ / A nd | Web: http://www.OpenFOAM.org | | \/ M anipulation | | \*---------------------------------------------------------------------------*/ Exec : simpleViewer Date : Mar 09 2009 Time : 01:03:22 Host : linux-jei4 PID : 18825 Case : /home/foamuser/OpenFOAM/foamuser-1.5-dev/tutorials/icoFoam/cavity nProcs : 1 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Reading block mesh description dictionary Creating vertices Creating curved edges Creating blocks glXUseXftFont: unable to render glyph. glXUseXftFont: unable to render glyph. glXUseXftFont: unable to render glyph. glXUseXftFont: unable to render glyph. glXUseXftFont: unable to render glyph. glXUseXftFont: unable to render glyph. glXUseXftFont: unable to render glyph. glXUseXftFont: unable to render glyph. glXUseXftFont: unable to render glyph. glXUseXftFont: unable to render glyph. glXUseXftFont: unable to render glyph. Xft: locking error Attempt to close locked file Any ideas where to look? |
Quote:
Are you running this over a nfs file system? I rembemer some similar nfs related locking problems for many java applications (OpenOffice, Netbeans, ModeFrontier). One of the solutions was to run on a local file system the problematic application, whereas a more general solution was to upgrade the nfs server. Dragos |
I followed the instructions in the readme and it seemed to install and compile right, but when I try to use simpleViewer to open the icoFoam cavity tutorial it fail giving me this error
Code:
addIstreamConstructorToTable EDIT: I fixed the problem. i just had to the edit that Hani left out of the first list of fixes Hani, you're a life saver! |
Hi,
From the screenshots provided it looks like a really useful tool to me. After making some changes (see below), I can compile the program with OF2.1.0. Running the program on the cavity tutorial reads the blockmesh files and creates the window, but nothing is actually shown in the window + the program continues to consume more and more memory (needed to kill it before it started swapping). I guess that's because it's built upon the structure of blockMesh and related of V2.1, which of course has been changed since v1.5... (how I made it compile) Some minor changes required; I grabbed the updated version from here [1], updated references to some mathematical constants [2] and installed libfox-1.6-dev from ubuntu repositories (Ubuntu 11.10). Adding the include path to the Make/options file [3] makes sure you can find the header files, and the program compiles with wmake. If someone updated this program I'll be happy to know about it :) [1] http://openfoam-extend.svn.sourcefor...pleViewer_1.6/ [2] Change mathematicalConstant::pi to constant::mathematical::pi [3] -I/usr/include/fox-1.6/ \ |
Quote:
About the program you're referring to: I think it would be best to contact Gavin Tabor whether he is actively updating the program or whether he knows of any efforts. If there are no such efforts and you want to update the program then we can set you up with write access to the SVN BTW: the problem you are experiencing probably has to do with the change of format. Have you tried it with a blockMesh from a 1.x-version? |
Quote:
Besides, on OpenFOAM wiki I've found that running blockMesh with argument -blockTopology creates an .obj file that can be converted to .vtk and viewed in Paraview so you can view the blockMesh point locations+numbers, which is basically what I was looking for. It's funny how you will find a solution built into OpenFOAM itself 10 minutes after posting about it on the forum :) I first need to get acquinted with OpenFOAM programming in general, so I guess I won't start with this program, especially since it involves the additional GL library. Concerning your final point, yes, I tried to set up OF1.6 and compile but eventually I ran into some linking problems and I gave up (in retrospect, I should have tried V1.5 anyway). |
Greetings to all!
@Ivo: you can open ".obj" files directly on ParaView, without having to convert to ".vtk". But better than that and as Bernhard implied, starting with OpenFOAM 2.0.0 we can run paraFoam with an additional option: Code:
paraFoam -block Bruno |
Quote:
|
simpleViewer
Hi
http://openfoam-extend.svn.sourceforge.net/viewvc/openfoam-extend/trunk/Breeder_ 1.5/utilities/preProcessing/simpleViewer/ I am not able to open the above mentioned link , can somebody repost it again , I just want to see how it works . with regards |
Quote:
Code:
paraFoam -block However, if you mess it up, and blockMesh aborts and reports a topological error, paraFoam won't work either, because there is no mesh to read. But, you can always read blockMeshDict with pyFoamDisplayBlockMesh.py to display all nodes, patches and cells. This really speeds finding the error up. In the picture below (sorry for the huge image), a topological error prevents blockMesh from creating a mesh. Viewing the output of pyFoamDisplayBlockMesh.py indicates the root of the error. http://openfoamwiki.net/images/1/1d/...yBlockMesh.png http://openfoamwiki.net/index.php/Fi...yBlockMesh.png |
simpleviewer
Hi
Gerhard . Thanks for the reply . I will try this one to visualize blockMesh .But my intention was to see the code , how simpleViewer is reading the blockMesh .with regards |
All times are GMT -4. The time now is 00:50. |