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

[Gmsh] Problem with mesh conversion from gmsh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 12, 2016, 11:54
Default Problem with mesh conversion from gmsh
  #1
New Member
 
A Russell
Join Date: Mar 2016
Posts: 13
Rep Power: 10
arussell92 is on a distinguished road
I have created a mesh in gmsh and am trying to convert it to openfoam format using gmshToFoam. However I keep getting the error as shown below, any suggestions as to how to fix the problem?

[ofuser@boot2docker Sun_val]$ gmshToFoam /home/ofuser/workingDir/FoamCases/Sun_v
al/validation.mshh
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v3.0+ |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : v3.0+-e941ee6c15e9
Exec : gmshToFoam /home/ofuser/workingDir/FoamCases/Sun_val/validation.msh
Date : Apr 12 2016
Time : 14:47:27
Host : "boot2docker"
PID : 202
Case : /home/ofuser/workingDir/FoamCases/Sun_val
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMas
ter
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Starting to read mesh format at line 2
Read format version 2.2 ascii 0

Starting to read physical names at line 5
Physical names:6
Surface 1 backwall
Surface 2 frontWall
Surface 3 outlet
Surface 4 inlet
Surface 5 bottomWall
Surface 6 topWall

Starting to read points at line 14
Vertices to be read:350400
Vertices read:350400

Starting to read cells at line 350417
Cells to be read:524253

Mapping region 1 to Foam patch 0
Mapping region 3 to Foam patch 1
Mapping region 6 to Foam patch 2
Mapping region 4 to Foam patch 3
Mapping region 5 to Foam patch 4
Mapping region 2 to Foam patch 5
Mapping region 1000 to Foam cellZone 0


--> FOAM FATAL IO ERROR:
Attempt to get back from bad stream

file: IStringStream.sourceFile at line 0.

From function bool Foam::Istream::getBack(Foam::token&)
in file db/IOstreams/IOstreams/Istream.C at line 56.

FOAM exiting
arussell92 is offline   Reply With Quote

Old   April 12, 2016, 12:23
Default
  #2
New Member
 
A Russell
Join Date: Mar 2016
Posts: 13
Rep Power: 10
arussell92 is on a distinguished road
Had been trying to convert a 2D mesh to 3D via an extrusion to be run as 2D in openfoam so had been defining the layers in the extrusion to 1 however this did not work. Having increased the number of layers to 10 the mesh appeared to convert correctly and checkMesh returned that the Mesh was ok.

Therefore how do you run a 2D simulation in openfoam if the mesh has more than 1 layer in the z-direction?
arussell92 is offline   Reply With Quote

Old   April 12, 2016, 13:05
Default
  #3
New Member
 
A Russell
Join Date: Mar 2016
Posts: 13
Rep Power: 10
arussell92 is on a distinguished road
Found the problem it seems. GMSH was taking a while to save the mesh and I hadn't noticed this and so think I may have been copying the file to the case folder before it had finished saving the mesh file.
arussell92 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
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 06:38
[snappyHexMesh] SnappyHexMesh for internal Flow vishwa OpenFOAM Meshing & Mesh Conversion 24 June 27, 2016 09:54
[snappyHexMesh] SHM problem : KVLCC2 with appendage mesh sc.park OpenFOAM Meshing & Mesh Conversion 1 March 13, 2016 14:28
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 19:57
[Gmsh] problem converting mesh from gmsh Fried OpenFOAM Meshing & Mesh Conversion 8 October 18, 2011 09:53


All times are GMT -4. The time now is 17:49.