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

[Commercial meshers] Importing a mesh from Gambit Interior faces that are walls

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 24, 2005, 08:41
Default Importing a mesh from Gambit Interior faces that are walls
  #1
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
I'm trying to import a mesh that was generated in Gambit (in order to compare OpenFOAM with Fluent).

It's a rather large room (>10m) with some thin walls in it (<1cm). These walls were not modelled by volumes but with surfaces: In Fluent the resulting faces can be assigned wall properties althoug topologically they are interior faces.

When I try to import that mesh with fluentMeshToFoam I get a fatal error:

--> FOAM FATAL ERROR : Trying to specify a boundary face 4(203114 207394 205234 203113) on the face on cell 185261 which is either an internal faceor already belongs to some other patch. This is face 0 of patch 16 namedbruestung_balkon.

in file: meshes/polyMesh/createPolyMesh.C at line: 375.

I looked at the source file and of course I could comment out that test and recompile OpenFOAM. But before I do that I'd like to ask: Would that make any sense? In other words: can OpenFOAM treat "interior faces" with boundary conditions (in that special case wall-boundaries)?
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   March 24, 2005, 08:51
Default This is a bit off topic: I jus
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
This is a bit off topic: I just received a copy of the original posting by EMail. In the EMail some lines are missing (but on the Web-Interface the message is complete). The EMailed message doesn't make much sense. Please check the Web.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   March 24, 2005, 08:54
Default No, OpenFOAM cannot have bound
  #3
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
No, OpenFOAM cannot have boundary conditions on interior faces.

What you can do is to make these interior faces exterior by splitting the mesh.

Either do that in Gambit (can it do this?) or use the splitMesh utility.

Tu use the splitMesh utility you will need to collect the conflicting faces in a faceSet and supply this as an argument.

Have a look at the faceSetDict (in mesh/manipulation/faceSet) to see how you can collect a faceSet.

Mattijs
mattijs is offline   Reply With Quote

Old   March 29, 2005, 17:30
Default I've tried it using the splitM
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
I've tried it using the splitMesh utility.

Just to check whether I understood this correctly:
- I imported the mesh from Gambit. The interior boundary (named obst) was converted to a faceSet (we can do that now ;-) )
- used the createPatch utility to create two wall-patches consisting of no faces (called obst_a and obst_b)
- the I called

splitMesh . innerboundary obst obst_a obst_b

This resulted in the following output (only the last part is shown, some of the debug-flags for the meshes were set):

Determining visibility from point 55
Determining visibility from point 76
Adding point and face zones

Constructed topologyModifier:

Splitter
{
type attachDetach;
faceZoneName membraneFaces;
masterPatchName obst_a;
slavePatchName obst_b;
triggerTimes 1(0);
manualTrigger off;
active on;
}

Adding topology modifiers
void attachPolyMesh::attach(): Attaching mesh
Modifier 0 named Splitter morphing
Bus error

This happens for two different geometries.

Any hints what could be wrong?
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   March 30, 2005, 05:54
Default Hi Bernhard, Can you run ch
  #5
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Hi Bernhard,

Can you run checkMesh after you have added the empty patches?

I tried same on your testmesh.msh.

I added a halfA and a halfB patch of zero size and ran

splitMesh .. testmesh innen halfA halfB

I get lots of 'Determining visibility' messages and


Splitter
{
type attachDetach;
faceZoneName membraneFaces;
masterPatchName halfA;
slavePatchName halfB;
triggerTimes 1(0);
manualTrigger off;
active on;
}

which finishes without problems.

Does a traceback of the core in a debugger tell you anything?
mattijs is offline   Reply With Quote

Old   March 30, 2005, 07:50
Default To be honest I havn't tried it
  #6
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
To be honest I havn't tried it with the testmesh.msh. Now I did. It works.

The two meshes splitMesh doesn't work with showed no problems with checkMesh (except for the fact that one of them is a pure tet-mesh; some people think that this is a problem ;-) , the other one contains all kinds of cells)

The condensed traceback of the core is:
Foam::attachDetach::detachInterface ()
Foam::attachDetach::setRefinement ()
Foam::polyMeshMorphEngine::topoChangeRequest ()
Foam::polyMesh::updateTopology ()
main()

I'll try to construct a minimal mesh that fails.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   March 30, 2005, 11:03
Default Works ok for me. I create a
  #7
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Works ok for me.

I create a boundry file

boundary

and run

splitMesh .. cavity innen halfA halfB

and checkMesh tells me the domain has two unconnected regions.

There is however a intermittent pointer problem which is fixed in 1.1.1 so that might give you problems. I tried 1.1 as well and that worked as well.
mattijs is offline   Reply With Quote

Old   March 30, 2005, 11:35
Default Mattijs, let me guess: you're
  #8
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Mattijs, let me guess: you're working on a i386-machine?

I did the previous tests on our new Opteron (am so proud have to use it for everything :-) ). Went to one of our i386-boxes and did the splitting there: it worked without a crash.

Started from scratch and could reproduce this. So there seems to be some processor dependence there (don't know if you like that).
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   March 30, 2005, 12:03
Default Think it is the pointer proble
  #9
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Think it is the pointer problem. Try and run it on your i386 under valgrind and you'll see.
mattijs is offline   Reply With Quote

Old   April 11, 2005, 14:43
Default hello , I want to import .m
  #10
New Member
 
brahim
Join Date: Mar 2009
Location: Sherbrooke, QC, Canada
Posts: 2
Rep Power: 0
sbrahim is on a distinguished road
hello ,

I want to import .msh file from gambit but the OpenFoam could not know the walls has the interior of a furnace, for example walls of interior mobile.
when I execute here the error of OpenFoam is:


FOAM FATAL ERROR : Trying to specify a boundary face 3(145 69 138) on the face on cell 13873 which is either an internal face or already belongs to some other patch. This is face 0 of patch 4 named surf_sup.

Function: polyMesh::polyMesh
(
const IOobject& io,
const pointField& points,
const cellShapeList& cellsAsShapes,
const faceListList& boundaryFaces,
const wordList& boundaryPatchTypes,
const wordList& boundaryPatchNames,
const word& defaultBoundaryPatchType
)
in file: meshes/polyMesh/createPolyMesh.C at line: 375.
FOAM aborting
Aborted
thank you to inform me on this problem.
sincere greetings
sbrahim is offline   Reply With Quote

Old   April 12, 2005, 10:44
Default Interior walls are not support
  #11
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Interior walls are not supported - group the faces you want to make into a wall in a face zone and then use a mesh modifier. I am sure this has been discussed before in this newsgroup.

Enjoy,

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   February 27, 2006, 17:30
Default A nice overview on this topic
  #12
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
A nice overview on this topic (making 'internal walls') was written some time ago by Christian Jordan:

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

The only problem with this approach is that the splitMesh-utility uses a faceSet but doesn't update the other faceSets to the new faceNumbers. So if one (me for example) wanted to make another wall 'internal' or relies on faceSets for other purposes he had a problem.

A little mutation of the splitMesh-utility that converts the faceSets to the new face-numbers after splitting can be found at:

http://openfoamwiki.net/index.php/Contrib_SplitMe shWithSets
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   March 7, 2006, 08:49
Default hello, I had the same kind
  #13
Member
 
Mélanie Piellard
Join Date: Mar 2009
Posts: 86
Rep Power: 17
melanie is on a distinguished road
hello,

I had the same kind of problems by converting a Fluent mesh into Foam, as the construction edges are understood as walls.
I tried first the splitMesh utility as is, with the advices above, and had problems on running my case:

--> FOAM FATAL ERROR : This mesh contains patches of type empty but is not 1D or 2D
by virtue of the fact that the number of faces of this
empty patch is not divisible by the number of cells.

From function emptyFvPatchField<type>::updateCoeffs()
in file fields/fvPatchFields/basicFvPatchFields/empty/emptyFvPatchField.C at line 129.

FOAM aborting

As the problem was linked to the number of faces, I tried to install the splitMeshWithSets, but unfortunately I get an error message on compilation:

~/OpenFOAM/tzntgq-1.2.1/applications/bin/linuxAMD64Gcc4Opt/utilities/splitMeshWi thSets> wmake
Making dependency list for source file regionSide.C
Making dependency list for source file splitMeshWithSets.C

SOURCE_DIR=.
SOURCE=regionSide.C ; g++ -m64 -DlinuxAMD64 -Wall -W -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -ffast-math -DNoRepository -ftemplate-depth-30 -I/appl/OpenFOAM/OpenFOAM-1.2.1/src/dynamicMesh/lnInclude -I/appl/OpenFOAM/OpenFOAM-1.2.1/src/meshTools/lnInclude -I/appl/OpenFOAM/OpenFOAM-1.2.1/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC -c $SOURCE -o Make/linuxAMD64Gcc4Opt/regionSide.o
SOURCE_DIR=.
SOURCE=splitMeshWithSets.C ; g++ -m64 -DlinuxAMD64 -Wall -W -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -ffast-math -DNoRepository -ftemplate-depth-30 -I/appl/OpenFOAM/OpenFOAM-1.2.1/src/dynamicMesh/lnInclude -I/appl/OpenFOAM/OpenFOAM-1.2.1/src/meshTools/lnInclude -I/appl/OpenFOAM/OpenFOAM-1.2.1/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC -c $SOURCE -o Make/linuxAMD64Gcc4Opt/splitMeshWithSets.o
splitMeshWithSets.C: In function âint main(int, char**)â:
splitMeshWithSets.C:325: error: no matching function for call to âFoam::attachDetach::attachDetach(const char [9], int, Foam::attachPolyMesh&, const char [14], Foam::word&, Foam::word&, Foam::scalarField)â
/appl/OpenFOAM/OpenFOAM-1.2.1/src/dynamicMesh/lnInclude/attachDetach.H:174: note: candidates are: Foam::attachDetach::attachDetach(const Foam::word&, const Foam::dictionary&, Foam::label, const Foam::polyMeshMorphEngine&)
/appl/OpenFOAM/OpenFOAM-1.2.1/src/dynamicMesh/lnInclude/attachDetach.H:165: note: Foam::attachDetach::attachDetach(const Foam::word&, Foam::label, const Foam::polyMeshMorphEngine&, const Foam::word&, const Foam::word&, const Foam::word&, const Foam::scalarField&, bool)
/appl/OpenFOAM/OpenFOAM-1.2.1/src/dynamicMesh/lnInclude/attachDetach.H:114: note: Foam::attachDetach::attachDetach(const Foam::attachDetach&)
make: *** [Make/linuxAMD64Gcc4Opt/splitMeshWithSets.o] Error 1

Could someone help me fixing the bug ?
thanks !
mélanie
melanie is offline   Reply With Quote

Old   March 7, 2006, 09:19
Default Hi Melanie! @fatal error wi
  #14
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Melanie!

@fatal error with empty patch: Look through the polymesh/boundary-file for patches of type "empty" and replace the type there with a more appropriate one ("wall" for instance)

@compilation problem: You're not using the stock-1.2-version, but a newer version? It seems that there was a change in the constructor of attachDetach. Instead of
tm[0] =
new attachDetach
(
"Splitter",
0,
pMesh,
"membraneFaces",
masterPatch,
slavePatch,
scalarField(1, runTime.value())
);

it now should be

tm[0] =
new attachDetach
(
"Splitter",
0,
pMesh.morphEngine(),
"membraneFaces",
masterPatch,
slavePatch,
scalarField(1, runTime.value())
);

(the line with morphEngine changed)

I'll write a remark to this effect on the Wiki page (I have both kinds of 1.2-versions and always have to modify that line)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   March 7, 2006, 09:35
Default Thanks Bernhard, indeed I f
  #15
Member
 
Mélanie Piellard
Join Date: Mar 2009
Posts: 86
Rep Power: 17
melanie is on a distinguished road
Thanks Bernhard,

indeed I forgot to reset the patches and fields before running. When I set it correctly, I get the same error, but I think something is wrong in my procedure:

1. I import the mesh from Fluent, it creates faceSets on each internal edge (2D mesh), for example face Set int1
2. I create 2 empty patches with names int1_a and int1_b
3. I call splitMesh; the output is correct
4. I reset all the patches but int1_a and int1_b are already here, with faces defined, and set to empty, and I run the case with the fatal error.

I don't know how to tell Foam that int1_a and int1_b are nothing but an internal boundary...

should I rerun the splitMeshWithSet utility ?
thanks!
melanie is offline   Reply With Quote

Old   March 7, 2006, 10:32
Default Hi Melanie! What do you mea
  #16
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Melanie!

What do you mean with "internal boundary"? Something interacting with the flow (like a wall for instance)? In that case you'll have to set the type of the patches to walls (or something appropriate). Or do you need it for "diagnostic" purposes (for instance calculating the mass flow through a specific "control area"? In that case you don't have to split thew mesh but use the faceSet (this is discussed somewhere else on the MessageBoard or the wiki).

If you have a second boundary (for instance int2) that you want to split the mesh with you'll have to use splitMeshWithSet instead of splitMesh at step 3 of your description (repeat steps 2-4 for every faceSet you want to split).
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   March 7, 2006, 11:10
Default Sorry Bernhard, I think I was
  #17
Member
 
Mélanie Piellard
Join Date: Mar 2009
Posts: 86
Rep Power: 17
melanie is on a distinguished road
Sorry Bernhard, I think I was not clear enough.

My conversion problems come from the fact that some interior edges, which were defined in Gambit for construction handling and that I cannot remove or I remove the mesh, these edges are understood as walls within OpenFoam. That is why I wanted to do something about it. It is like if I defined it for diagnostic purposes as you say.
melanie is offline   Reply With Quote

Old   March 7, 2006, 13:18
Default If I understand you correctly,
  #18
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
If I understand you correctly, the last thing you want to do is a splitMesh. Just convert it with fluentMeshToFoam. If checkMesh doesn't complain everything is good and the internal boundaries won't interfer with your simulation.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   March 22, 2006, 11:06
Default Hi! I'm trying to use the spl
  #19
Senior Member
 
Francesco Del Citto
Join Date: Mar 2009
Location: Zürich Area, Switzerland
Posts: 237
Rep Power: 18
fra76 is on a distinguished road
Hi!
I'm trying to use the splitMeshWithSets utility downloaded from here: http://openfoamwiki.net/index.php/Contrib_SplitMe shWithSets
It seems to work fine, but I have a problem: the mesh is really big.
I tried to run it on Opteron machine with 4Gb of maximum virtual memory size imposed, and it fails.
On 32bit machines, it fails as well.
On my Athlon64 PC I have "only" 2Gb of ram, Linux tries to use the swap space, and it really slows down the process.
I have exactly the same problem with the normal splitMesh utility.

The question is:
is it possible to run splitMesh (or splitMeshWithSets) in parallel? I mean, AFTER decomposePar.
Francesco
fra76 is offline   Reply With Quote

Old   March 22, 2006, 12:29
Default I'm afraid you can't. If it's
  #20
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
I'm afraid you can't. If it's not supported in the original splitMesh, then it's not supported in splitMeshWithSets (which is only a slight extension of the original). And the original has parallel explictly switched off (I can only guess the reason without diving into the source, but one guess would be that faceSets are not supported by decomposePar).

splitMeshWithSets uses more memory that splitMesh. Does splitMesh fail too for the first faceSet?
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider 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
importing mesh from Gambit and other software to ansys workbench mortazavi CFX 12 May 30, 2012 08:38
Icemcfd 11: Loss of mesh from surface mesh option? Joe CFX 2 March 26, 2007 19:10
Importing Mesh from IDEASto GAMBIT OR FLUENT Ramesh Gannamani FLUENT 0 January 30, 2004 14:05
Importing mesh into Gambit from Hypermesh vaddiraju FLUENT 0 August 23, 2002 12:50
Importing mesh files from Ansys into Gambit Srinivas FLUENT 2 August 6, 2002 11:02


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