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   March 24, 2005, 09:23
Default For some of my simulations I n
  #1
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
For some of my simulations I need the information about the interior BCs that are assigned by Gambit (to calculate surface integrals on them during postprocessing).

I adapted the fluentMeshToFoam-convertor to write out this information: it writes out faceSets, but doesn't modify the grid in any other way.

I also did a similar thing for cellSets (to assign different material properties for different domains).

My question:
- Are these changes of general interest?
- If yes: where do I send them to, so that they can be inserted in the regular OpenFOAM-distribution (writing of the sets is optional)

The other question is the following: if I understood it correctly face and cellSets are just a collection of face/cell-numbers. Some of the mesh-utilities cause the cells to be reordered. Would I have to rewrite these too?
__________________
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, 09:29
Default Heya, 1) Yes, having things
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,758
Rep Power: 21
hjasak will become famous soon enough
Heya,

1) Yes, having things zoned up in Gambit may come in handy

2) send it to OpenCFD and it will end up in the next release

3) It is the mesh that enforces the ordering and zones are passive. You may wish to orient the face zones to have front and back (otherwise there may be problems with orientation) but apart from that there's nothing to worry about.

Thanks for the effort, much appreciated,

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

Old   March 24, 2005, 09:34
Default Ad 2) send it to me and I'll h
  #3
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
Ad 2) send it to me and I'll have a look at it. Address is m.janssens at opencfd.co.uk

A small testcase would be nice as well - we don't have Gamibt over here.

Mattijs
mattijs is offline   Reply With Quote

Old   March 26, 2005, 12:17
Default From what I tried, foam does n
  #4
ali
Member
 
Ali Heidari
Join Date: Mar 2009
Location: Surrey, London, United Kingdom
Posts: 39
Rep Power: 8
ali is on a distinguished road
From what I tried, foam does not recognize the boundaries at all. So, the 'boundary' file has nothing in it although 'cells', 'points', and 'faces' are all created correctly using fluentMeshToFoam.

So, what should I do to set boundaries? In other codes, one can select the desired faces (using GUI) and set it as a special boundary condition.

However, in foam, the only thing I can think of is than I should state the name and type of boundary and state 'nFaces' and 'startFace', right?

If this is the way to do it, I don't know how to determine the face numbers.
ali is offline   Reply With Quote

Old   March 26, 2005, 12:24
Default Heya, You've messed somethi
  #5
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,758
Rep Power: 21
hjasak will become famous soon enough
Heya,

You've messed something up: fluentMeshToFoam does indeed read boundary data - have a look at:
OpenFOAM-1.1/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshT oFoam.L
line 1088 onwards: patch types, names and faces are read from the fluent file and re-assembled on line 1229.

Also, you can see the mapping for various fluent-to-foam patch types in lines 1134-1206.

The nice thing is that now you've got full source you can find out and tell me what has actually happened! :-)

Looking forward to any bug fixes,

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

Old   March 30, 2005, 08:38
Default The gambitMeshToFoam converter
  #6
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
The gambitMeshToFoam converter has been extended to write faceSets and cellSets for interior boundaries and regions that were defined in Gambit.

Mattijs has inserted it into the next release (>1.1)

Should anyone need this feature before that release is released, contact me and I'll send it to you.
__________________
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   April 27, 2005, 10:47
Default I'd like to take up your offer
  #7
New Member
 
Helmut Roth
Join Date: Mar 2009
Posts: 23
Rep Power: 8
helmut is on a distinguished road
I'd like to take up your offer of getting this feature now, before the next release. Thanks very much for making it available.

Regards,
Helmut
helmut is offline   Reply With Quote

Old   April 28, 2005, 04:16
Default I have attached the tar-file:
  #8
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
I have attached the tar-file:

fluentMeshToFoamWithInternals.tar.gz
__________________
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   August 17, 2005, 16:00
Default Hi, Is there also an extend
  #9
New Member
 
Helmut Roth
Join Date: Mar 2009
Posts: 23
Rep Power: 8
helmut is on a distinguished road
Hi,

Is there also an extended mesh object with read and access functions for the face and cell sets? Once again, I'd be interested ...

Regards,
Helmut
helmut is offline   Reply With Quote

Old   August 22, 2005, 07:56
Default With read&access you mean some
  #10
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
With read&access you mean something like

filter[cellSet]=filterID;

to set the value of filter for all the cells in the cellSet to filterID? I don't think so. (At least I didn't find anything like that).

The way I'm doing this is:

cellSet filterSet(mesh,filterName,IOobject::MUST_READ,IOob ject::NO_WRITE);

for(cellSet::iterator cell=filterSet.begin();cell!=filterSet.end();cell+ +)
filter[cell.key()]=filterID;

__________________
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   August 29, 2005, 09:45
Default Thanks, this looks very helpfu
  #11
New Member
 
Helmut Roth
Join Date: Mar 2009
Posts: 23
Rep Power: 8
helmut is on a distinguished road
Thanks, this looks very helpful.
helmut is offline   Reply With Quote

Old   September 5, 2005, 14:02
Default Just wanted to say, that the u
  #12
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Just wanted to say, that the utility posted to this thread on the 28th of April is obsolete, because it's functionality has been incorporated into the 1.2 release.
__________________
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 6, 2005, 00:52
Default That is a great news. Thanks f
  #13
ghanshyam
Guest
 
Posts: n/a
That is a great news. Thanks for the info. How do we see those internal faces? We tried but could not see those internal faces. Where might be the mistake from our side?

Regards
GS
  Reply With Quote

Old   September 6, 2005, 08:23
Default With "see" you mean "display i
  #14
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
With "see" you mean "display in paraFoam"?

If yes: Unfortunately paraFoam can't display these sets.

What you should see is in the polyMesh-dictionary an additional dictionary named "sets". In this dictionary are files that are named like the cellSets and faceSets.

To display them in a postprocessor you can convert the Geometry with foamToVTK (there is an option for faceSets and cellSets) and display the geometry with the normal paraview.

For examples how to access the resulting sets from a program see my response in this thread or this utility on the wiki http://openfoamwiki.net/index.php/Contrib_calcMas sFlow
(there may be other more elegant way)
__________________
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 20, 2005, 07:05
Default I'm having troubles converting
  #15
Senior Member
 
Håkan Nilsson
Join Date: Mar 2009
Location: Gothenburg, Sweden
Posts: 193
Rep Power: 8
hani is on a distinguished road
I'm having troubles converting a Fluent mesh to OpenFoam using FluentMeshToFoam. I get the following messages:
Found unknown block
Embedded blocks in comment or unknown
Found end of section in unknown

The mesh has internal patches, which might cause the problem.

The mesh is available at
http://www.sirius.luth.se/strl/Turbine-99/Mesh/t99_hex_unstr_1m_yp50.fluent6.bin .zip
if someone would be kind enough to help me have a look at it.

I am aiming at using the internal patches for post-processing. I simply want to output the velocity and pressure fields on those patches. Maybe someone can tell me how to do that.

Håkan.
hani is offline   Reply With Quote

Old   September 20, 2005, 07:50
Default Hello Hakan. I noticed, tha
  #16
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Hello Hakan.

I noticed, that your mesh has a "Binary Section". The meshes I've had experience with were only pure ASCII-texts (to be honest I even don't know how to produce that binary output).

My guess (and the funny characters in the output back that up) is that the converter can't handle meshes that are output as binary (looking at the source-code I'd be surprised if it did)

Try writing the mesh as pure ASCII(text) and convert 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   September 20, 2005, 08:28
Default Thanks for your quick reply!
  #17
Senior Member
 
Håkan Nilsson
Join Date: Mar 2009
Location: Gothenburg, Sweden
Posts: 193
Rep Power: 8
hani is on a distinguished road
Thanks for your quick reply!

I converted the mesh to ASCII using ICEM (find it at http://www.tfd.chalmers.se/~hani/outgoing/t99_hex_unstr_1m_yp50.fluent6.ascii.ms h)
(Note that I did not generate the grid myself, I got it in the binary format.)

Then I got the following error message, which you might be able to help me interpret:

--> FOAM FATAL ERROR : Cannot find match for face 3.
Model: hex model face: 4(3 7 6 2) Mesh faces:
6
(
4(891900 891902 891901 891899)
4(891902 891900 532724 532726)
4(891902 532726 532725 891901)
4(532723 532725 532726 532724)
4(532725 891901 891899 532723)
4(891899 891900 532724 532723)
)
Matched points: 8(532723 532724 891900 891899 891902 532726 -1 891901)

From function create3DCellShape(const label cellIndex, const labelList& faceLabels, const labelListList& faces, const labelList& owner, const labelList& neighbour, const label fluentCellModelID)
in file create3DCellShape.C at line 281.

FOAM aborting

Håkan.
hani is offline   Reply With Quote

Old   September 20, 2005, 10:25
Default Hi Håkan, does it convert i
  #18
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
Hi Håkan,

does it convert if you remove the internal patches? Does the mesh have any 'split' hexes? Did you have any luck with 'normal' cellShapes?
mattijs is offline   Reply With Quote

Old   September 20, 2005, 11:31
Default I tried it by editing all the
  #19
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
I tried it by editing all the internal patches (wall_right, wall_left, wall_sides, wall_cyl, cs4b and symmetry) from type ''wall'' to type ''internal''. This doesn't help.

If I import the mesh to Gambit and export it again the exported mesh can be converted (if the interior patches are set correctly).
Don't know whether these meshes are identical, but fluentMeshToFoam reports the same number of points/cells/faces during importing (for the second mesh it reports them in the order points/faces/cells - don't know if this has any importance)

@Mattijs: removed the interior patches as proposed. This doesn't help either.
__________________
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 20, 2005, 13:28
Default > reports them in the order po
  #20
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
> reports them in the order points/faces/cells
No importance, just inconsistency.

You convert successfully from Gambit with gambitToFoam? Or does Gambit again write Fluent format?

From the original message it seems it has not matched all of the points of a hex.

Anything special about the mesh? Does it work if you put all outside faces in one patch (and have no internal patches and/or gaps in the mesh)?
mattijs 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 16:56
Internal patches with fluentMeshToFoam sega OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 12 October 29, 2009 09:11
How to set up invisible internal faces axel OpenFOAM Pre-Processing 0 August 4, 2008 11:42
FluentMeshtoFoam with internal solid surface mayank OpenFOAM Meshing & Mesh Conversion 3 May 30, 2007 02:57
interior and internal faces jx FLUENT 0 January 8, 2004 09:29


All times are GMT -4. The time now is 19:41.