CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Gmsh] Version 20 of the bmshb file format to FOAM converter

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 5, 2007, 03:46
Default Thanks for your time Mattijs,
  #21
Member
 
David Segersson
Join Date: Mar 2009
Posts: 39
Rep Power: 17
segersson is on a distinguished road
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
segersson is offline   Reply With Quote

Old   October 5, 2007, 04:42
Default Don't think the problem is in
  #22
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Don't think the problem is in gmshToFoam. It reads all cells without doing any filtering.
mattijs is offline   Reply With Quote

Old   October 15, 2007, 11:28
Default Thanks again for your help Mat
  #23
Member
 
David Segersson
Join Date: Mar 2009
Posts: 39
Rep Power: 17
segersson is on a distinguished road
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:



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
segersson is offline   Reply With Quote

Old   October 16, 2007, 05:08
Default Seems some/all (204768?) of th
  #24
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Seems some/all (204768?) of the tets are inside out. Try switching off the automatic orientation with the '-keepOrientation' command line switch.
mattijs is offline   Reply With Quote

Old   October 16, 2007, 05:17
Default Hi, Problem solved. Seeems li
  #25
Member
 
David Segersson
Join Date: Mar 2009
Posts: 39
Rep Power: 17
segersson is on a distinguished road
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
segersson is offline   Reply With Quote

Old   March 6, 2008, 14:13
Default Hello, I am trying to get thi
  #26
jam
Member
 
Alain Martin
Join Date: Mar 2009
Posts: 40
Rep Power: 17
jam is on a distinguished road
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 is offline   Reply With Quote

Old   March 6, 2008, 17:46
Default Hi, The problem is not there
  #27
jam
Member
 
Alain Martin
Join Date: Mar 2009
Posts: 40
Rep Power: 17
jam is on a distinguished road
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
jam is offline   Reply With Quote

Old   March 6, 2008, 20:00
Default Hi Alaiin, Which version are
  #28
Super Moderator
 
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 20
7islands is on a distinguished road
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
7islands is offline   Reply With Quote

Old   March 6, 2008, 20:41
Default Thank you very much Takuya. I
  #29
jam
Member
 
Alain Martin
Join Date: Mar 2009
Posts: 40
Rep Power: 17
jam is on a distinguished road
Thank you very much Takuya. I was using the version from the forum.
Now it works perfectly.
-Alain
jam is offline   Reply With Quote

Old   June 9, 2008, 23:28
Default Hi, trying to install gmshF
  #30
New Member
 
Juergen Neubauer
Join Date: Mar 2009
Location: Los Angeles, CA, USA
Posts: 2
Rep Power: 0
juergen is on a distinguished road
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
juergen is offline   Reply With Quote

Old   June 10, 2008, 00:26
Default Hi Juergen, Try searching t
  #31
Super Moderator
 
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 20
7islands is on a distinguished road
Hi Juergen,

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

Takuya
7islands is offline   Reply With Quote

Old   July 19, 2008, 16:54
Default Hi Takuya, is gmsh2Foam is
  #32
Senior Member
 
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17
podallaire is on a distinguished road
Hi Takuya,

is gmsh2Foam is compatible with OpenFoam-1.5 ?

Best regards,

Pierre-Oliver
podallaire is offline   Reply With Quote

Old   July 19, 2008, 22:16
Default Hi Pierre-Olivier, The curren
  #33
Super Moderator
 
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 20
7islands is on a distinguished road
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
7islands is offline   Reply With Quote

Old   July 20, 2008, 22:26
Default Ok, thanks Takuya ! Pierre-
  #34
Senior Member
 
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17
podallaire is on a distinguished road
Ok, thanks Takuya !

Pierre-Olivier
podallaire is offline   Reply With Quote

Old   April 1, 2010, 05:41
Default gmsh2ToFoam and OF-1.6
  #35
New Member
 
Veselin Lefterov
Join Date: Apr 2009
Location: Bulgaria
Posts: 1
Rep Power: 0
v_lefterov is on a distinguished road
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!
v_lefterov is offline   Reply With Quote

Old   April 1, 2010, 06:13
Default
  #36
Super Moderator
 
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 20
7islands is on a distinguished road
Hi Veselin,
You typically no longer need to use gmsh2ToFoam. Try the standard gmshToFoam that comes with OF 1.6.x instead.

Takuya
7islands is offline   Reply With Quote

Old   February 9, 2019, 23:47
Default Compiling issue
  #37
New Member
 
Abhishek Mukherjee
Join Date: Nov 2018
Posts: 6
Rep Power: 8
absrocks007 is on a distinguished road
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
absrocks007 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SimpleFoam cannot open include file Marija OpenFOAM Running, Solving & CFD 1 October 28, 2020 11:35
[mesh manipulation] RefineMesh Error and Foam warning jiahui_93 OpenFOAM Meshing & Mesh Conversion 4 March 3, 2018 12:32
OpenFoam "Permission denied" and "command not found" problems. iyidaniel@yahoo.co.uk OpenFOAM Running, Solving & CFD 11 January 2, 2018 07:47
polynomial BC srv537 OpenFOAM Pre-Processing 4 December 3, 2016 10:07
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08


All times are GMT -4. The time now is 21:24.