CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ...

Extension of fluentMeshToFoam internal cells and faces

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   September 20, 2005, 16:46
Default @converting: I take the mesh a
  #21
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,862
Rep Power: 38
gschaider will become famous soon enoughgschaider will become famous soon enough
@converting: I take the mesh as provided by Hakan import it into Gambit as a Fluent-mesh and without further manipulation export it again as a Fluent mesh (the points seem to be renumbere mesh)

The mesh seems to be a pure Hex mesh. Nothing special. But maybe Hakan can tell us more.

@all patches in one: I could only do that in Gambit (or maybe with Emacs, if I knew the format well enough), but then the error goes away as explained above.
__________________
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   September 21, 2005, 04:28
Default Re the original Gambit convert
  #22
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,747
Rep Power: 20
hjasak will become famous soon enough
Re the original Gambit converter message from Ghanshyam Singh: the cell numbering in FOAM and Gambit will be identical, so you can find out which cells the problem face is between and with that got back to Gambit/TGrid and find out what's going on with the two cells.

Enjoy,

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

Old   September 22, 2005, 07:15
Default I've been away for one day, so
  #23
Senior Member
 
Håkan Nilsson
Join Date: Mar 2009
Location: Gothenburg, Sweden
Posts: 185
Rep Power: 7
hani is on a distinguished road
I've been away for one day, so that's why I didn't answer any of your messages. I'll try to do it now:

I have tried to remove the internal patches with ICEM, without success in the conversion.

There are only Hex cells.

I have imported and exported the mesh with Gambit as proposed by Bernhard. First of all, the boundary conditions were all mixed for some reason. The names do not correspond to the original names, that's why some walls are "internal". If I just exported it to Fluent format I still had the same problem. If I change the internal patches to internal in Gambit before exporting to Fluent format it can be converted using fluenMeshToFoam, and the internal patches are put in constant/polyMesh/sets. I tried this procedure before, but then the mesh was in binary format and Gambit wouldn't read it.

I have also tried just changing the internal patches to "internal" in the file, and it does of course not work for me either. I tried both changing the original names for the internal patches to "internal" and also the same as Bernhard described.

I can't make any sense out of this - I guess that I will have to use ICEM to convert binary to ascii and then update the boundary conditions with Gambit before I use fluentMeshToFoam.

Now, How can I use the internal patches that is defined in constant/polyMesh/sets to write out the results at those planes?

Håkan
hani is offline   Reply With Quote

Old   September 22, 2005, 13:35
Default - you can make them (faceSets)
  #24
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 15
mattijs is on a distinguished road
- you can make them (faceSets) into external patches using the splitMesh utility (discussed before)

- create a cellSet from the cells on one/both sides of the faceSet using the cellSet utility. Visualize the results on the cells with foamToVTK
mattijs is offline   Reply With Quote

Old   September 29, 2005, 11:36
Default Hi Hakan. If you want to do
  #25
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,862
Rep Power: 38
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Hakan.

If you want to do calculations on the surfaces defined by the faceSets you can do so by using the concept described in

http://openfoamwiki.net/index.php/Snip_access_cel lset_data
__________________
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   October 3, 2005, 16:52
Default hi I have 2 zones of fluid,
  #26
Member
 
olivier Petit
Join Date: Mar 2009
Location: Göteborg, Sweden
Posts: 67
Rep Power: 7
olivier is on a distinguished road
hi
I have 2 zones of fluid, separated by wall.
when I do this in blockMesh I have
------------------------------------------
FOAM FATAL ERROR : Trying to specify a boundary face 4(8 10 11 9) on the face on cell 0 which is either an internal face or already belongs to some other patch.
This is face 3 of patch 1 named fixedWalls.
-----------------------------------------------
can someone tell me how can I do this?
thanks a lot
convertToMeters 0.1;
------------------------
vertices
(
(0 0 0)
(1 0 0)
(1 1 0)
(0 1 0)
(0 0 0.1)
(1 0 0.1)
(1 1 0.1)
(0 1 0.1)
(0 0.5 0)
(1 0.5 0)
(0 0.5 0.1)
(1 0.5 0.1)
);

blocks
(
hex (0 1 9 8 4 5 11 10) (20 20 2) simpleGrading (1 1 1)
hex (8 9 2 3 10 11 6 7) (20 20 2) simpleGrading (1 1 1)
);

edges
(
);

patches
(
wall movingWall
(
(3 7 6 2)
)
wall fixedWalls
(
(0 4 10 8)
(2 6 11 9)
(1 5 4 0)
(8 10 11 9 )
)
empty frontAndBack
(
(0 8 9 1)
(8 3 2 9)
(4 5 11 10)
(10 11 6 7)
)
);

mergePatchPairs
(
);
olivier is offline   Reply With Quote

Old   June 12, 2007, 05:52
Default hello, I am trying to conve
  #27
mayank
Guest
 
Posts: n/a
hello,

I am trying to convert a mesh with internal faces on openFoam 1.4 .The original fluentMeshtoFOam utility does not wirte polymesh/sets or faceSets, so I compiled fluentMeshtoFoamWithInternals but I get the following error:

SOURCE=fluentMeshToFoamWithInternals.L ; flex++ -f $SOURCE ; mv lex.yy.cc Make/linux64Gcc4DPOpt/fluentMeshToFoamWithInternals.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/mgo/OpenFOAM/OpenFOAM-1.4/src/meshTools/lnInclude -IlnInclude -I. -I/home/mgo/OpenFOAM/OpenFOAM-1.4/src/OpenFOAM/lnInclude -fPIC -c Make/linux64Gcc4DPOpt/fluentMeshToFoamWithInternals.C -o Make/linux64Gcc4DPOpt/fluentMeshToFoamWithInternals.o
/bin/sh: flex++: command not found
mv: cannot stat `lex.yy.cc': No such file or directory
g++: Make/linux64Gcc4DPOpt/fluentMeshToFoamWithInternals.C: No such file or directory
g++: no input files
make: *** [Make/linux64Gcc4DPOpt/fluentMeshToFoamWithInternals.o] Error 1

Can anybody help me with this error.

Mayank.
  Reply With Quote

Old   June 12, 2007, 06:04
Default flex++ needs to be installed.
  #28
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 697
Rep Power: 10
msrinath80 is on a distinguished road
flex++ needs to be installed. Search for the flex++ package on yum/yast2/synaptic etc. depending on which GNU/Linux distro you use. Also install the corresponding devel package to be safe.
msrinath80 is offline   Reply With Quote

Old   June 12, 2007, 08:58
Default thanks for your reply.i instal
  #29
mayank
Guest
 
Posts: n/a
thanks for your reply.i installed flex++ but still there is error:

Making dependency list for source file extrudedTriangleCellShape.C
Making dependency list for source file extrudedQuadCellShape.C
Making dependency list for source file create3DCellShape.C
Making dependency list for source file fluentMeshToFoamWithInternals.L
SOURCE=extrudedTriangleCellShape.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/mgo/OpenFOAM/OpenFOAM-1.4/src/meshTools/lnInclude -IlnInclude -I. -I/home/mgo/OpenFOAM/OpenFOAM-1.4/src/OpenFOAM/lnInclude -fPIC -c $SOURCE -o Make/linux64Gcc4DPOpt/extrudedTriangleCellShape.o
SOURCE=extrudedQuadCellShape.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/mgo/OpenFOAM/OpenFOAM-1.4/src/meshTools/lnInclude -IlnInclude -I. -I/home/mgo/OpenFOAM/OpenFOAM-1.4/src/OpenFOAM/lnInclude -fPIC -c $SOURCE -o Make/linux64Gcc4DPOpt/extrudedQuadCellShape.o
SOURCE=create3DCellShape.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/mgo/OpenFOAM/OpenFOAM-1.4/src/meshTools/lnInclude -IlnInclude -I. -I/home/mgo/OpenFOAM/OpenFOAM-1.4/src/OpenFOAM/lnInclude -fPIC -c $SOURCE -o Make/linux64Gcc4DPOpt/create3DCellShape.o
SOURCE=fluentMeshToFoamWithInternals.L ; flex++ -f $SOURCE ; mv lex.yy.cc Make/linux64Gcc4DPOpt/fluentMeshToFoamWithInternals.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/mgo/OpenFOAM/OpenFOAM-1.4/src/meshTools/lnInclude -IlnInclude -I. -I/home/mgo/OpenFOAM/OpenFOAM-1.4/src/OpenFOAM/lnInclude -fPIC -c Make/linux64Gcc4DPOpt/fluentMeshToFoamWithInternals.C -o Make/linux64Gcc4DPOpt/fluentMeshToFoamWithInternals.o
stdin:14911: m4: Warning: Excess arguments to built-in `m4_ifdef' ignored
lex.yy.cc: In member function 'virtual int yyFlexLexer::yylex()':
lex.yy.cc:12072: warning: use of old-style cast
lex.yy.cc:12072: warning: use of old-style cast
lex.yy.cc:12088: warning: use of old-style cast
lex.yy.cc:12906: warning: use of old-style cast
lex.yy.cc: In member function 'int yyFlexLexer::yy_get_next_buffer()':
lex.yy.cc:13154: warning: use of old-style cast
lex.yy.cc:13177: warning: use of old-style cast
lex.yy.cc:13190: warning: use of old-style cast
lex.yy.cc:13190: warning: use of old-style cast
lex.yy.cc:13211: warning: use of old-style cast
lex.yy.cc: In member function 'yy_state_type yyFlexLexer::yy_get_previous_state()':
lex.yy.cc:13258: warning: use of old-style cast
lex.yy.cc:13258: warning: use of old-style cast
lex.yy.cc: In member function 'void yyFlexLexer::yyunput(int, char*)':
lex.yy.cc:13318: warning: use of old-style cast
lex.yy.cc:13319: warning: use of old-style cast
lex.yy.cc:13327: warning: use of old-style cast
lex.yy.cc: In member function 'int yyFlexLexer::yyinput()':
lex.yy.cc:13394: warning: use of old-style cast
lex.yy.cc: In member function 'virtual yy_buffer_state* yyFlexLexer::yy_create_buffer(std::istream*, int)':
lex.yy.cc:13472: warning: use of old-style cast
lex.yy.cc:13481: warning: use of old-style cast
lex.yy.cc: In member function 'virtual void yyFlexLexer::yy_delete_buffer(yy_buffer_state*)':
lex.yy.cc:13503: warning: use of old-style cast
lex.yy.cc:13506: warning: use of old-style cast
lex.yy.cc:13508: warning: use of old-style cast
lex.yy.cc: In member function 'void yyFlexLexer::yyensure_buffer_stack()':
lex.yy.cc:13635: warning: use of old-style cast
lex.yy.cc:13653: warning: use of old-style cast
lex.yy.cc: In member function 'void yyFlexLexer::yy_push_state(int)':
lex.yy.cc:13671: warning: use of old-style cast
lex.yy.cc:13674: warning: use of old-style cast
lex.yy.cc:13674: warning: use of old-style cast
lex.yy.cc: In function 'void* yyalloc(yy_size_t)':
lex.yy.cc:13754: warning: use of old-style cast
lex.yy.cc: In function 'void* yyrealloc(void*, yy_size_t)':
lex.yy.cc:13766: warning: use of old-style cast
lex.yy.cc:13766: warning: use of old-style cast
lex.yy.cc: In function 'void yyfree(void*)':
lex.yy.cc:13771: warning: use of old-style cast
g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/mgo/OpenFOAM/OpenFOAM-1.4/src/meshTools/lnInclude -IlnInclude -I. -I/home/mgo/OpenFOAM/OpenFOAM-1.4/src/OpenFOAM/lnInclude -fPIC Make/linux64Gcc4DPOpt/extrudedTriangleCellShape.o Make/linux64Gcc4DPOpt/extrudedQuadCellShape.o Make/linux64Gcc4DPOpt/create3DCellShape.o Make/linux64Gcc4DPOpt/fluentMeshToFoamWithInternals.o -L/home/mgo/OpenFOAM/OpenFOAM-1.4/lib/linux64Gcc4DPOpt \
-lmeshTools -lOpenFOAM -liberty -ldl -lm -o /home/mgo/OpenFOAM/mgo-1.4/applications/bin/linux64Gcc4DPOpt/fluentMeshToFoamWit hInternals
/usr/lib/../lib64/crt1.o: In function `_start':
init.c.text+0x20): undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [/home/mgo/OpenFOAM/mgo-1.4/applications/bin/linux64Gcc4DPOpt/fluentMeshToFoamWi thInternals] Error 1
  Reply With Quote

Old   June 12, 2007, 09:20
Default Hi, I think the capability
  #30
New Member
 
Helmut Roth
Join Date: Mar 2009
Posts: 23
Rep Power: 7
helmut is on a distinguished road
Hi,

I think the capability of fluentMeshToFoamWithInternals was added to fluentMeshToFoam in the 1.1 release. See the message above from Bernhard Gschaider on Wednesday, March 30, 2005
helmut is offline   Reply With Quote

Old   June 12, 2007, 13:04
Default Mayank, This seems to be re
  #31
connclark
Guest
 
Posts: n/a
Mayank,

This seems to be related to the problem I had

http://www.cfd-online.com/cgi-bin/Op...how.cgi?1/4610

mabey its an issue with the newer version of flex
  Reply With Quote

Old   June 14, 2007, 13:45
Default Mayank, I may have a fix fo
  #32
connclark
Guest
 
Posts: n/a
Mayank,

I may have a fix for you.

edit the fluentMeshToFoamWithInternals.L and change all occurrences of "]]" to "] ]"
  Reply With Quote

Old   June 25, 2007, 09:54
Default Hello conn, thanks for your
  #33
mayank
Guest
 
Posts: n/a
Hello conn,

thanks for your help ,it worked but i think fluentMeshtoFoamWithInternals is obsolete as mentioned earlier.
I still have problems converting meshes from fluent with internal wall.The following message is dispayed, that is no error is there but internal faces are not written in polymesh/sets/faceSets.

Building boundary and internal patches.
Creating patch 0 for zone: 10 start: 1 end: 1596 type: interior name: int_INTERNAL
Creating patch 1 for zone: 11 start: 1597 end: 8760 type: interior name: int_FLUID
Creating patch 2 for zone: 12 start: 8761 end: 9864 type: wall name: WALL
Creating patch 3 for zone: 13 start: 9865 end: 10008 type: wall name: INLET
Creating patch 4 for zone: 14 start: 10009 end: 10152 type: wall name: OUTLET
Creating patch 5 for zone: 15 start: 10153 end: 10632 type: wall name: INTERNAL
Patch int_INTERNAL is internal to the mesh and is not being added to the boundary.
Patch int_FLUID is internal to the mesh and is not being added to the boundary.
Adding new patch WALL of type wall as patch 0
Adding new patch INLET of type wall as patch 1
Adding new patch OUTLET of type wall as patch 2
Patch INTERNAL is internal to the mesh and is not being added to the boundary.

Default patch type set to empty

Checking mesh...done.


Writing mesh... to "constant/polyMesh" done.

Internal walls just disappear.How to write internal faces to sets dir. ?
  Reply With Quote

Old   January 2, 2011, 10:57
Default Ali's questions
  #34
Member
 
Santiago
Join Date: Dec 2009
Posts: 85
Rep Power: 6
gascortado is on a distinguished road
wrong post sorry
gascortado is offline   Reply With Quote

Old   January 2, 2011, 11:01
Default Ali's comments
  #35
Member
 
Santiago
Join Date: Dec 2009
Posts: 85
Rep Power: 6
gascortado is on a distinguished road
does anyone have the answer to Ali's questions above? I have the same problem. Thanks
gascortado is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting a mesh with splitted cells using fluentMeshToFoam jlpelerin OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 4 April 25, 2011 17:56
Internal patches with fluentMeshToFoam sega OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 12 October 29, 2009 10:11
How to set up invisible internal faces axel OpenFOAM Pre-Processing 0 August 4, 2008 12:42
FluentMeshtoFoam with internal solid surface mayank OpenFOAM Meshing & Mesh Conversion 3 May 30, 2007 03:57
interior and internal faces jx FLUENT 0 January 8, 2004 09:29


All times are GMT -4. The time now is 01:09.