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/)
-   -   [Commercial meshers] Importing a mesh from Gambit Interior faces that are walls (https://www.cfd-online.com/Forums/openfoam-meshing/61685-importing-mesh-gambit-interior-faces-walls.html)

gschaider May 3, 2006 12:42

Hi Francesco! At first: con
 
Hi Francesco!

At first: congratulations.

The problem with the T-shapes is known and I have already reported it at:
http://www.cfd-online.com/OpenFOAM_D...tml?1141080108
(the problem lies "below" the splitMeshWithSets and it would have to be fixed in the library)

I'll write a warning on the Wiki page of the utility.

Bernhard

ham June 14, 2006 03:19

Helle When using splitMesh I
 
Helle
When using splitMesh I get a similar error as one described below but it has some differences so I post my error and see if anyone can tell me whats wrong:

ham[plate]$ splitMesh . alpha3 wall.13 wall_A wall_B
/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.3 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : splitMesh . alpha3 wall.13 wall_A wall_B
Date : Jun 14 2006
Time : 10:09:11
Host : condor
PID : 11666
Root : /home/ham/OpenFOAM/OpenFOAM-1.3/ham/plate
Case : alpha3
Nprocs : 1
Create time

Create polyMesh for time = 0

Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&)
Foam::sigSegv::sigSegvHandler(int)
[0xffffe420]
Foam::polyMesh::initMesh()
Foam::polyMesh::polyMesh(Foam::IOobject const&)
splitMesh [0x804fdea]
__libc_start_main
__gxx_personality_v0
Segmentation fault
ham[plate]$


Thanx!!

/M

ham June 14, 2006 03:19

Helle When using splitMesh I
 
Helle
When using splitMesh I get a similar error as one described above but it has some differences so I post my error and see if anyone can tell me whats wrong:

ham[plate]$ splitMesh . alpha3 wall.13 wall_A wall_B
/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.3 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : splitMesh . alpha3 wall.13 wall_A wall_B
Date : Jun 14 2006
Time : 10:09:11
Host : condor
PID : 11666
Root : /home/ham/OpenFOAM/OpenFOAM-1.3/ham/plate
Case : alpha3
Nprocs : 1
Create time

Create polyMesh for time = 0

Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&)
Foam::sigSegv::sigSegvHandler(int)
[0xffffe420]
Foam::polyMesh::initMesh()
Foam::polyMesh::polyMesh(Foam::IOobject const&)
splitMesh [0x804fdea]
__libc_start_main
__gxx_personality_v0
Segmentation fault
ham[plate]$


Thanx!!

/M

gschaider June 14, 2006 04:09

Hi Marcus! As I see it, the
 
Hi Marcus!

As I see it, the error occurs while reading in the mesh (before any splitting occurs) so it seems to be a problem with the mesh. Have you tried running another mesh-utility on that mesh (checkMesh for instance). I think the same error should occur.

ham June 14, 2006 04:41

Hi Yes, as you thought the sa
 
Hi
Yes, as you thought the same error occured when running checkMesh.

Fluent did not complain about the same mesh.

The only thing I know thats bad about the mesh is that it has some cells that are very slender, what do you call it "have large aspect ratio". But according to me this should not result in an error, it should rather give uncertain results?

Did that give any hints?

thanx again.

/M

gschaider June 14, 2006 09:53

Any special messages when you
 
Any special messages when you tried to convert the mesh?

The slender cells shouldn't be a problem at that stage. There is something fundamentally wrong with the data in constant/polymesh. I'd suggest you first do a sanity check on the files there (are the required files there? valid headers? correct ending of the files (maybe they were only written partially)?)

I never experienced any problems like that with the fluent-converter (and I use it quite regulary). What's your version of Gambit? Any special things about the mesh?

ham June 14, 2006 10:13

Convert message: ham$ fluen
 
Convert message:

ham[plate]$ fluentMeshToFoam . alpha3 alpha3.msh
/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.3 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : fluentMeshToFoam . alpha3 alpha3.msh
Date : Jun 14 2006
Time : 17:12:29
Host : condor
PID : 12936
Root : /home/ham/OpenFOAM/OpenFOAM-1.3/ham/plate
Case : alpha3
Nprocs : 1
Create time

Dimension of grid: 2
Number of points: 76455
Reading points
number of faces: 204414
Reading mixed faces
Reading mixed faces
Reading mixed faces
Reading mixed faces
Reading mixed faces
Reading mixed faces
Number of cells: 127960
Reading mixed cells
Reading zone data
Reading zone data
Reading zone data
Reading zone data
Reading zone data
Reading zone data
Reading zone data


FINISHED LEXING


dimension of grid: 2
Grid is 2-D. Extruding in z-direction by: 72.111
Creating shapes for 2-D cells
Creating patch for zone: 3 start: 1 end: 50 type: pressure-outlet name: pressure_outlet.45
Creating patch for zone: 4 start: 51 end: 100 type: velocity-inlet name: velocity_inlet.44
Creating patch for zone: 5 start: 101 end: 200 type: interior name: wall.43
Patch 5 contains solid or internal faces. Not added to boundary
Adding to internal boundaries
Creating patch for zone: 6 start: 201 end: 275 type: wall name: wall.42
Creating patch for zone: 7 start: 276 end: 350 type: wall name: wall.41
Creating patch for zone: 9 start: 351 end: 204414 type: interior name: default-interior
Patch 9 contains solid or internal faces. Not added to boundary
Not adding to internal boundaries
Creating patch for front and back planes

Default patch type set to empty
Checking mesh
Number of non-orthogonality errors: 0. Number of severely non-orthogonal faces: 384.
--> FOAM Warning :
From function primitiveMesh::checkFaceSkewness(const bool report, labelHashSet* setPtr) const
in file meshes/primitiveMesh/primitiveMeshCheck.C at line 838
Large face skewness detected. Max skewness = 1080.98 percent.
This may impair the quality of the result.
654 highly skew faces detected.
Failed 1 mesh geometry checks.
Failed some mesh checks.
Writing mesh
Writing internal boundaries
Writing internal boundary wall.43 of size 100 to faceSet.
Only one cell group: no set written

End
ham[plate]$


As seen it complains somewhat on skewness etc. Is that enough to cause this problem?

If so(and even if it doesnt) how do I reduce the skewness?

Thanks

hjasak June 14, 2006 10:17

That all looks OK. There isn'
 
That all looks OK. There isn't much you can do about skewness unless you re-generate the mesh. Anyway, this is not a disaster...

Any progress with checkMesh + do the files look OK to you?

Hrv

ham June 14, 2006 10:31

This is a short version of the
 
This is a short version of the checkMesh result:

Severe non-orthogonality for face 135900 between cells 80613 and 89465: Angle = 78.1002 deg.
Number of non-orthogonality errors: 0. Number of severely non-orthogonal faces: 384.
Mesh non-orthogonality Max: 81.6897 average: 8.65492
Non-orthogonality check OK.

Writing 384 non-orthogonal faces to set nonOrthoFaces

--> FOAM Warning :
From function primitiveMesh::checkFaceSkewness(const bool report, labelHashS et* setPtr) const
in file meshes/primitiveMesh/primitiveMeshCheck.C at line 838
Large face skewness detected. Max skewness = 1081 percent.
This may impair the quality of the result.
654 highly skew faces detected.
Writing 654 skew faces to set skewFaces

Minumum edge length = 0.0018009. Maximum edge length = 72.111.

All angles in faces are convex or less than 10 degrees concave.

Face flatness (1 = flat, 0 = butterfly) : average = 1 min = 1
All faces are flat in that the ratio between projected and actual area is > 0.8

Geometry check done.

Number of cells by type:
hexahedra: 24698
prisms: 103262
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 0
polyhedra: 0
Number of regions: 1 (OK).
Failed 1 mesh checks.


Time = 0
No mesh.


End

ham[plate]$

Gambit version = 2.2.30
The files (boundary,faces etc) looks ok to me.

The mesh is nothing special I think. A plate in a freestream, high density grid near plate edges, low density elsewhere(with smooth transitions)

The mesh looks relatively ok to me and Fluents gives results satisfyingly close to theory.

Thanx for your help
/Marcus

gschaider June 14, 2006 11:01

Hi Marcus! Just to get the
 
Hi Marcus!

Just to get the order of things right:

1. You posted the original segmentation fault message
2. I asked about checkMesh
3. You said that checkMesh crashed with the same segmentation fault
4. You ran fluentMeshToFoam again to show us the skewness-Message
5. Hrv asked about checkMesh
6. You ran checkMesh and now it didn't crash (at least I assume that from the messages you showed us)

to me the logical next step would be

7. try splitMesh again

My guess is that the mesh generated before step 1 was f#### up (incompletely written ...) and now it's OK (if I'm not mistaken about step 3 and 6)

ham June 14, 2006 11:28

Hey, I got a bit confused myse
 
Hey, I got a bit confused myself after my last post.
You are correct about the order of things.

Now I am not at work so I can not do anything, but I as soon as I get to work tomorrow...

I never ran checkMesh before splitMesh earlier(before step 1) so maybe splitMesh made somethings worse or maybe you are correct and now(for some reason) the mesh is working better.

I let you know asap.
/Marcus

gschaider June 14, 2006 11:50

From the stack-trace you poste
 
From the stack-trace you posted I'd say that the mesh-files on the disk were never touched.

My guess is that for some reason (fluentMeshToFoam was ended prematurely, problems with the OS, insufficient disk space etc; but not the fault of OF) files were not written correctly during the first conversion and ANY OpenFOAM application that tried to read the mesh would have choked. For some reason this problem was not present during the second conversion.

ham June 15, 2006 01:05

hejhej again. Okey, I have
 
hejhej again.

Okey, I have tried it again this morning and:

If I run checkMesh before I try to run splitMesh I will get the error about skewness and non-ortogonality posted at
"Wednesday, June 14, 2006 - 08:31 am".

Then when I run splitMesh i get the error concerning segmentation fault posted at
"Wednesday, June 14, 2006 - 01:19 am"

Running checkMesh after I have tried splitMesh I will get the same segmentation error as when running splitMesh.


Confused...
/Marcus

ham June 16, 2006 01:05

Okey, I have narrowed it down
 
Okey, I have narrowed it down somewhat.

The segmentation arrives after editing the constant/polymesh/boundary file according to step 4 in

http://openfoamwiki.net/index.php/Howto_importing _fluent_mesh_with_internal_walls


How come? anyone?

thanx
/marcus

ham June 16, 2006 01:08

And with "segmentation" I mean
 
And with "segmentation" I mean the segmentation error described above.... http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

/marcus

gschaider June 16, 2006 03:08

All right. I think I've got it
 
All right. I think I've got it (it's been posted somewhere else, but never corrected on the Wiki and I forgot about it): the line

startFace ;

worked on OpenFOAM 1.2 (where it was implicitly set to the face after the last face). In OpenFOAM 1.3 it is set to 0 (which makes it crash when reading the file).
So check the faces file for the number of faces (for instance 4711) and edit the boundary file accordingly with the line

startFace 4711;

(as always with index calculations I may be wrong by +/-1)

I'll add a hint on the Wiki.

ham June 16, 2006 05:52

http://www.cfd-online.com/Open
 
http://www.cfd-online.com/OpenFOAM_D...part/happy.gif
Now it works...
Thank you for helping me!

Have a nice weekend!!
/Marcus

dhebert December 7, 2006 16:14

Hello everyone, I am having
 
Hello everyone,

I am having a problem trying to make an interior wall names using Gambit/Fluent5/6msh. As described above, I set the interior wall to "interior" in gambit, with name intwall. When I do fluentMeshToFoam I see:
...

Writing internal boundary intwall of size 5066 to faceSet.

...

5066 is also in sets/intwall file. I then modify polyMesh/boundary as described above (in the wiki page), setting startFace to 5066 for both wall_A and wall_B. When I run splitMeshWithSets, the following error occurs:

...

--> FOAM FATAL ERROR : Error in face ordering: mixed used and unused faces at the end of face list.
Number of used faces: 5066 and face 5066 is owned by cell 1330

From function void polyMesh::initMesh() const
in file meshes/polyMesh/polyMeshCalcFaceCells.C at line 101.

......

The same error occurs with splitMesh. Any ideas how to fix?

Thanks,

David

gschaider December 11, 2006 04:50

No. 5066 is going to be the si
 
No. 5066 is going to be the size of your resulting patches. The faces for these resulting patch are going to be appended to the faces that are already in the mesh. So if your mesh has already 25666 faces (just an example. Check constant/polyMesh/faces) you have to set startFace to 25666 (plus/minus 1. I'm not sure, I usually let a script do that for me).

ariorus June 18, 2007 07:01

Hello, I had also some prob
 
Hello,

I had also some problems using gambit/fluent mesh format and splitMesh.

Finally I found out a workaround using ANSYS/ICEM.
I post it if someone is interested in (it is necessary to use ANSYS/ICEM though).

First every internal wall has to be set to "internal wall" but not to "splitting wall", then after the mesh is built it is possible to use "split internal wall" (in ICEM) to split the mesh at the internal boundaries.
The mesh now should be valid but the faces orientation on the internal walls might be wrong.

To recover the correct faces orientation I wrote an application which works on the mesh in star format (.vrt .bnd .cel files).

So after the mesh is constructed and exported in star format it is possible to correct the boundary file (.bnd) and then to import the mesh in openFOAM using starToFoam.

I'm attaching the utility.

Rosario
http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif setSailThinSurface2.tgz


All times are GMT -4. The time now is 15:12.