CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Gmsh] Version 20 of the bmshb file format to FOAM converter (https://www.cfd-online.com/Forums/openfoam-meshing/61877-version-20-bmshb-file-format-foam-converter.html)

segersson October 5, 2007 02:46

Thanks for your time Mattijs,
 
Thanks for your time Mattijs,
I guess you have found my problem. What I do not understand is why they do not match, which I guess in turn causes the geometry to be interpreted as multiple separated parts. As I've extruded the bottom faces simultaneoulsly, one would think they would match...
If I could get an answer to if the error is in gmsh or in gmshToFoam, or in my handling, I could continue from there. Now however, I found it hard to know where to begin. Any further suggestions?
Regards
David

mattijs October 5, 2007 03:42

Don't think the problem is in
 
Don't think the problem is in gmshToFoam. It reads all cells without doing any filtering.

segersson October 15, 2007 10:28

Thanks again for your help Mat
 
Thanks again for your help Mattijs!

I have now solved some of the problems:-)
There were two of them:
1. The physical regions badly defined - sorry about this, I should have checked this befire posting.
2. Truncation
Since I used geographical coordinates for the mesh, the numbers were so big that truncation became a problem. Solved this by translating the geometry to origo.

The conversion now seems to work for all simple geometries. However, as soon as I try something a litter bigger and more complex, such as:

http://www.cfd-online.com/OpenFOAM_D...ges/1/5687.gif

I get the following result from checkMesh:

Checking geometry...
Domain bounding box: (-427 -276 0) (433 284 100)
***Boundary openness (1.93265e-08 1.12445e-07 1.44203e-06) possible hole in boundary description.
***Open cells found, max cell openness: 1, number of open cells 204768
<<Writing 204768 non closed cells to set nonClosedCells
Minumum face area = 0.141263. Maximum face area = 238.253. Face area magnitudes OK.
Min volume = 0.0651389. Max volume = 1933.7. Total volume = 4.8409e+07. Cell volumes OK.
Mesh non-orthogonality Max: 180 average: 20.6569
***Number of non-orthogonality errors: 102384.
<<Writing 102384 non-orthogonal faces to set nonOrthoFaces
***Error in face pyramids: 204768 faces are incorrectly oriented.
<<Writing 204768 faces with incorrect orientation to set wrongOrientedFaces
Max skewness = 0.479058 OK.
Min/max edge length = 0.15 23.8253 OK.
All angles in faces OK.
Face flatness (1 = flat, 0 = butterfly) : average = 1 min = 1
All face flatness OK.

I'm having a hard time to see what could be so wrong with my mesh. Due to the limited ways of checking the quality in gmsh, the best I can do is a visual check. This is quite good though, since the mesh is extruded and the errors should be visible from the original 2d-mesh.

However, it seems like the errors I get are not simply a question of quality ("open cells", "face incorrectly oriented"...). It seems like either I have missed something or there is a problem in the conversion. Could theses errors be round-off errors, or could they be caused by different demands on accuracy between gmsh and OpenFoam?

Does anybody have advice on how to handle these errors? Is it for example posible to display where the errors take place?

BTW, is there a way to use the physical entities from gmsh2.0 in gmshToFoam in OF 1.4.1?

Best regards
David

mattijs October 16, 2007 04:08

Seems some/all (204768?) of th
 
Seems some/all (204768?) of the tets are inside out. Try switching off the automatic orientation with the '-keepOrientation' command line switch.

segersson October 16, 2007 04:17

Hi, Problem solved. Seeems li
 
Hi,
Problem solved. Seeems like the extrusion went bad (some layers were extruded in the wrong direction, strange that gmsh didn't complain). Now I've finally managed to get a OK mesh for a real geometry :-)

Now on to recombining into hexes!

Thanks!
David

jam March 6, 2008 13:13

Hello, I am trying to get thi
 
Hello,
I am trying to get this utility(gmsh2ToFoam) to work with both physical name and type in the

Physical Surface("tube symetryPlane") = { .. };
for example.

I only get good results if only one name is given. Physical Surface("tube")= {.. };

I quickly look into the source file and I found that the index numberI is not define in the source. Is it defined somewhere?
thanks,
-Alain

jam March 6, 2008 16:46

Hi, The problem is not there
 
Hi,
The problem is not there (numberI).

If I give two names in the msh file:
.
3 "bottomTop symmetryPlane"
.


, I get the following messages:

word::stripInvalid() called for string bottomTopsymmetryPlane

You see that both names a concatenated!
-Alain

7islands March 6, 2008 19:00

Hi Alaiin, Which version are
 
Hi Alaiin,
Which version are you using? I ask this because only some of the most recent versions have this feature. The latest is the one that comes with gmshFoam-20070905 package[1]. If still haven't, could you try the version.

[1]http://openfoamwiki.net/index.php/Contrib_gmshFoam

Takuya

jam March 6, 2008 19:41

Thank you very much Takuya. I
 
Thank you very much Takuya. I was using the version from the forum.
Now it works perfectly.
-Alain

juergen June 9, 2008 22:28

Hi, trying to install gmshF
 
Hi,

trying to install gmshFoam I ran into a problem:

~/OpenFOAM/neubauer-1.4.1/applications/utilities/gmshFoam> ./Allwmake
+ wmake libso libgmshMessageStream
/home/neubauer/OpenFOAM/OpenFOAM-1.4.1/wmake/wmakeLnInclude: linking include files to /home/neubauer/OpenFOAM/neubauer-1.4.1/applications/utilities/gmshFoam/libgmshMe ssageStream/lnInclude

Making dependency list for source file gmshMessageStream.C
SOURCE=gmshMessageStream.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/home/neubauer/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/gmshMessageStream.o
/tmp/ccWuhAbc.s: Assembler messages:
/tmp/ccWuhAbc.s:5: Warning: setting incorrect section attributes for .text._ZN4Foam4endlERNS_7OstreamE
/tmp/ccWuhAbc.s:37: Warning: setting incorrect section attributes for .text._ZNSs12_S_constructIPcEES0_T_S1_RKSaIcESt20f orward_iterator_tag
/tmp/ccWuhAbc.s:1499: Error: unknown pseudo-op: `.weakref'
/tmp/ccWuhAbc.s:1500: Error: unknown pseudo-op: `.weakref'
/tmp/ccWuhAbc.s:1501: Error: unknown pseudo-op: `.weakref'
/tmp/ccWuhAbc.s:1502: Error: unknown pseudo-op: `.weakref'
/tmp/ccWuhAbc.s:1503: Error: unknown pseudo-op: `.weakref'
/tmp/ccWuhAbc.s:1504: Error: unknown pseudo-op: `.weakref'
/tmp/ccWuhAbc.s:1505: Error: unknown pseudo-op: `.weakref'
/tmp/ccWuhAbc.s:1506: Error: unknown pseudo-op: `.weakref'
/tmp/ccWuhAbc.s:1507: Error: unknown pseudo-op: `.weakref'
/tmp/ccWuhAbc.s:1508: Error: unknown pseudo-op: `.weakref'
/tmp/ccWuhAbc.s:1509: Error: unknown pseudo-op: `.weakref'
/tmp/ccWuhAbc.s:1510: Error: unknown pseudo-op: `.weakref'
/tmp/ccWuhAbc.s:1511: Error: unknown pseudo-op: `.weakref'
/tmp/ccWuhAbc.s:1512: Error: unknown pseudo-op: `.weakref'
/tmp/ccWuhAbc.s:1809: Warning: setting incorrect section attributes for .data.DW.ref.__gxx_personality_v0
make: *** [Make/linux64GccDPOpt/gmshMessageStream.o] Error 1

How can I resolve this issue?

Thanks for your help.

Ciao, Juergen

7islands June 9, 2008 23:26

Hi Juergen, Try searching t
 
Hi Juergen,

Try searching the forum for "weakref," and you'll find several options you could try.

Takuya

podallaire July 19, 2008 15:54

Hi Takuya, is gmsh2Foam is
 
Hi Takuya,

is gmsh2Foam is compatible with OpenFoam-1.5 ?

Best regards,

Pierre-Oliver

7islands July 19, 2008 21:16

Hi Pierre-Olivier, The curren
 
Hi Pierre-Olivier,
The current status is that I still haven't done anything about 1.5-porting. While I definitely have a plan to port the gmshFoam suite to OF 1.5 and Gmsh 2.2 along with support for Gmsh 2.2's new features (mainly for postprocessing though) I don't have a concrete timeline yet. I'll post a quick patch when I have time to do so but I guess it will be next month at the earliest.

If there's someone who successfully ported gmshFoam/gmsh2ToFoam (even not the complete gmshFoam-suite), feel free to attach the patch to the wiki.

Takuya

podallaire July 20, 2008 21:26

Ok, thanks Takuya ! Pierre-
 
Ok, thanks Takuya !

Pierre-Olivier

v_lefterov April 1, 2010 04:41

gmsh2ToFoam and OF-1.6
 
Hi,

I'm trying to compile the latest version of gmsh2ToFoam (from 20070312) in compatibility with OpenFOAM-1.6.
When I run wmake, I get the following errors:

Code:

Making dependency list for source file polyMeshBandCompression.C
could not open file Time.hh for source file polyMeshBandCompression.C
Making dependency list for source file gmsh2ToFoam.C
could not open file Time.hh for source file gmsh2ToFoam.C
SOURCE=polyMeshBandCompression.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-40 -I/home/Veselin/OpenFOAM/OpenFOAM-1.6/src/meshTools/lnInclude -I/home/Veselin/OpenFOAM/OpenFOAM-1.6/src/dynamicMesh/lnInclude -I/home/Veselin/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/Veselin/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/Veselin/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linux64GccDPOpt/polyMeshBandCompression.o
polyMeshBandCompression.C: In constructor ‘Foam::polyMeshBandCompression::polyMeshBandCompression(const Foam::IOobject&, const Foam::pointField&, const Foam::cellShapeList&, const Foam::faceListList&, const Foam::wordList&, const Foam::wordList&, const Foam::word&, const Foam::wordList&)’:
polyMeshBandCompression.C:60: error: no matching function for call to ‘Foam::polyMesh::polyMesh(const Foam::IOobject&, const Foam::Field<Foam::Vector<double> >&, const Foam::List<Foam::cellShape>&, const Foam::List<Foam::List<Foam::face> >&, const Foam::List<Foam::word>&, const Foam::List<Foam::word>&, const Foam::word&, const Foam::List<Foam::word>&)’
/home/Veselin/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/polyMesh.H:257: note: candidates are: Foam::polyMesh::polyMesh(const Foam::IOobject&, const Foam::Xfer<Foam::Field<Foam::Vector<double> > >&, const Foam::cellShapeList&, const Foam::faceListList&, const Foam::wordList&, const Foam::wordList&, const Foam::word&, const Foam::word&, const Foam::wordList&, bool)
/home/Veselin/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/polyMesh.H:242: note:                Foam::polyMesh::polyMesh(const Foam::IOobject&, const Foam::Xfer<Foam::Field<Foam::Vector<double> > >&, const Foam::Xfer<Foam::List<Foam::face> >&, const Foam::Xfer<Foam::List<Foam::cell> >&, bool)
/home/Veselin/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/polyMesh.H:231: note:                Foam::polyMesh::polyMesh(const Foam::IOobject&, const Foam::Xfer<Foam::Field<Foam::Vector<double> > >&, const Foam::Xfer<Foam::List<Foam::face> >&, const Foam::Xfer<Foam::List<int> >&, const Foam::Xfer<Foam::List<int> >&, bool)
/home/Veselin/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/polyMesh.H:219: note:                Foam::polyMesh::polyMesh(const Foam::IOobject&)
/home/Veselin/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/polyMesh.H:166: note:                Foam::polyMesh::polyMesh(const Foam::polyMesh&)
polyMeshBandCompression.C: In member function ‘Foam::polyMesh* Foam::polyMeshBandCompression::renumberedMesh() const’:
polyMeshBandCompression.C:213: error: ‘allFaces’ was not declared in this scope
polyMeshBandCompression.C:246: error: ‘allPoints’ was not declared in this scope
make: *** [Make/linux64GccDPOpt/polyMeshBandCompression.o] Error 1

Obviously, the errors are related to changes in polyMesh, but I don't know what exactly is so different between version 1.4.1 of the file and 1.6 of the respective OF library.

If you have any ideas on how to solve the problem - you're welcome!

Thanks in advance guys!

7islands April 1, 2010 05:13

Hi Veselin,
You typically no longer need to use gmsh2ToFoam. Try the standard gmshToFoam that comes with OF 1.6.x instead.

Takuya

absrocks007 February 9, 2019 22:47

Compiling issue
 
Hi,



I faced some errors while trying to compile the package. Here is error I got
"/opt/openfoam6/wmake/makefiles/general:139: *** multiple target patterns. Stop."


Do you have any idea how to solve this?


Thanks in advance


All times are GMT -4. The time now is 09:39.