Skip to content

gmshToFoam failed #10

@ldv1

Description

@ldv1

Hi,

I am using OpenFoam-8 on a Suse Linux box.
I generated a simple 3D mesh with gmsh, and exported it in two flavors: airfoil.msh (native gmsh format) and airfoil.vtk.
Running gmshToFoam airfoil.msh, I get an error:

/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  8
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : 8-563c11b49eaf
Exec   : gmshToFoam airfoil.msh
Date   : Jan 28 2021
Time   : 23:05:36
Host   : "localhost.localdomain"
PID    : 12854
I/O    : uncollated
Case   : /home/laurent/OpenFOAM/OpenFOAM-8/tutorials/compressible/rhoSimpleFoam/airfoil_nacaXX
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

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

Using #calcEntry at line 20 in file "/home/laurent/OpenFOAM/OpenFOAM-8/tutorials/compressible/rhoSimpleFoam/airfoil_nacaXX/system/controlDict/functions/forceCoeffsCompressible/forceCoeffsCompressible"
Using #codeStream with "/home/laurent/OpenFOAM/OpenFOAM-8/tutorials/compressible/rhoSimpleFoam/airfoil_nacaXX/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_1cdcbfab46358bbcf2b09b5ffdb81074e9595ac2.so"
Using #codeStream at line 21 in file "/home/laurent/OpenFOAM/OpenFOAM-8/tutorials/compressible/rhoSimpleFoam/airfoil_nacaXX/system/controlDict/functions/forceCoeffsCompressible/forceCoeffsCompressible"
Using #codeStream with "/home/laurent/OpenFOAM/OpenFOAM-8/tutorials/compressible/rhoSimpleFoam/airfoil_nacaXX/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_4e53ea6683014d43aaae7f1655fdc419be73fa84.so"
Using #codeStream at line 27 in file "/home/laurent/OpenFOAM/OpenFOAM-8/tutorials/compressible/rhoSimpleFoam/airfoil_nacaXX/system/controlDict/functions/forceCoeffsCompressible/forceCoeffsCompressible"
Using #codeStream with "/home/laurent/OpenFOAM/OpenFOAM-8/tutorials/compressible/rhoSimpleFoam/airfoil_nacaXX/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_3a1ca79d5a971693a00301e3a44b841419f9a7ca.so"
Using #codeStream at line 33 in file "/home/laurent/OpenFOAM/OpenFOAM-8/tutorials/compressible/rhoSimpleFoam/airfoil_nacaXX/system/controlDict/functions/forceCoeffsCompressible/forceCoeffsCompressible"
Using #codeStream with "/home/laurent/OpenFOAM/OpenFOAM-8/tutorials/compressible/rhoSimpleFoam/airfoil_nacaXX/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_2d58ca55a9c3d5f23a93b18c140764657d312776.so"
Starting to read mesh format at line 2
Read format version 4.1  ascii 0

Starting to read physical names at line 5
Physical names:4
    Line 1      airfoil
    Line 2      farfield
    Surface 1   mesh
    Volume 1    volume

Skipping tag $Entities at line 12
Starting to read points at line 1398
Vertices to be read:817


--> 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

With vtkUnstructuredToFoam airfoil.vtk, I get

/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  8
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : 8-563c11b49eaf
Exec   : vtkUnstructuredToFoam airfoil.vtk
Date   : Jan 28 2021
Time   : 23:08:44
Host   : "localhost.localdomain"
PID    : 13476
I/O    : uncollated
Case   : /home/laurent/OpenFOAM/OpenFOAM-8/tutorials/compressible/rhoSimpleFoam/airfoil_nacaXX
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

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

Using #calcEntry at line 20 in file "/home/laurent/OpenFOAM/OpenFOAM-8/tutorials/compressible/rhoSimpleFoam/airfoil_nacaXX/system/controlDict/functions/forceCoeffsCompressible/forceCoeffsCompressible"
Using #codeStream with "/home/laurent/OpenFOAM/OpenFOAM-8/tutorials/compressible/rhoSimpleFoam/airfoil_nacaXX/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_1cdcbfab46358bbcf2b09b5ffdb81074e9595ac2.so"
Using #codeStream at line 21 in file "/home/laurent/OpenFOAM/OpenFOAM-8/tutorials/compressible/rhoSimpleFoam/airfoil_nacaXX/system/controlDict/functions/forceCoeffsCompressible/forceCoeffsCompressible"
Using #codeStream with "/home/laurent/OpenFOAM/OpenFOAM-8/tutorials/compressible/rhoSimpleFoam/airfoil_nacaXX/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_4e53ea6683014d43aaae7f1655fdc419be73fa84.so"
Using #codeStream at line 27 in file "/home/laurent/OpenFOAM/OpenFOAM-8/tutorials/compressible/rhoSimpleFoam/airfoil_nacaXX/system/controlDict/functions/forceCoeffsCompressible/forceCoeffsCompressible"
Using #codeStream with "/home/laurent/OpenFOAM/OpenFOAM-8/tutorials/compressible/rhoSimpleFoam/airfoil_nacaXX/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_3a1ca79d5a971693a00301e3a44b841419f9a7ca.so"
Using #codeStream at line 33 in file "/home/laurent/OpenFOAM/OpenFOAM-8/tutorials/compressible/rhoSimpleFoam/airfoil_nacaXX/system/controlDict/functions/forceCoeffsCompressible/forceCoeffsCompressible"
Using #codeStream with "/home/laurent/OpenFOAM/OpenFOAM-8/tutorials/compressible/rhoSimpleFoam/airfoil_nacaXX/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_2d58ca55a9c3d5f23a93b18c140764657d312776.so"
Header   : "# vtk DataFile Version 2.0"
Title    : "1234, Created by Gmsh"
dataType : "ASCII"
line:4 tag:DATASET
geomType : UNSTRUCTURED_GRID
line:5 tag:POINTS
Reading 80754 numbers representing 80754 coordinates.
line:80761 tag:CELLS
Reading 160682 cells or faces.
line:241445 tag:CELL_TYPES
Read 80339 cells;80339 faces.
line:402129 tag:CELL_DATA
line:402130 tag:SCALARS
Reading scalar CellEntityIds of type int from lookup table
Read points:80754 cellShapes:80339 faces:80339 lines:4

Cell fields:
Read 1 labelField fields:
Size    Name
----    ----
160682  CellEntityIds



Point fields:


Other fields:
--> FOAM Warning : 
    From function Foam::polyMesh::polyMesh(const Foam::IOobject&, Foam::pointField&&, const cellShapeList&, const faceListList&, const wordList&, const wordList&, const Foam::word&, const Foam::word&, const wordList&, bool)
    in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 595
    Found 161093 undefined faces in mesh; adding to default patch.
Writing mesh ...
End

I would prefer to work with the gmsh format though.
I can provide airfoil.msh for debugging.
Thanks for the help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions