|
[Sponsors] |
[Commercial meshers] Extension of fluentMeshToFoam internal cells and faces |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 24, 2005, 09:23 |
Extension of fluentMeshToFoam internal cells and faces
|
#1 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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 |
|
March 24, 2005, 09:29 |
Heya,
1) Yes, having things
|
#2 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
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 |
|
March 24, 2005, 09:34 |
Ad 2) send it to me and I'll h
|
#3 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
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 |
|
March 26, 2005, 12:17 |
From what I tried, foam does n
|
#4 |
Member
Ali Heidari
Join Date: Mar 2009
Location: Surrey, London, United Kingdom
Posts: 39
Rep Power: 17 |
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. |
|
March 26, 2005, 12:24 |
Heya,
You've messed somethi
|
#5 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
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 |
|
March 30, 2005, 09:38 |
The gambitMeshToFoam converter
|
#6 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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 |
|
April 27, 2005, 11:47 |
I'd like to take up your offer
|
#7 |
New Member
Helmut Roth
Join Date: Mar 2009
Posts: 23
Rep Power: 17 |
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 |
|
April 28, 2005, 05:16 |
I have attached the tar-file:
|
#8 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
__________________
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 |
|
August 17, 2005, 17:00 |
Hi,
Is there also an extend
|
#9 |
New Member
Helmut Roth
Join Date: Mar 2009
Posts: 23
Rep Power: 17 |
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 |
|
August 22, 2005, 08:56 |
With read&access you mean some
|
#10 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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 |
|
August 29, 2005, 10:45 |
Thanks, this looks very helpfu
|
#11 |
New Member
Helmut Roth
Join Date: Mar 2009
Posts: 23
Rep Power: 17 |
Thanks, this looks very helpful.
|
|
September 5, 2005, 15:02 |
Just wanted to say, that the u
|
#12 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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 |
|
September 6, 2005, 01:52 |
That is a great news. Thanks f
|
#13 |
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 |
|
September 6, 2005, 09:23 |
With "see" you mean "display i
|
#14 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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 |
|
September 20, 2005, 08:05 |
I'm having troubles converting
|
#15 |
Senior Member
Håkan Nilsson
Join Date: Mar 2009
Location: Gothenburg, Sweden
Posts: 204
Rep Power: 18 |
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. |
|
September 20, 2005, 08:50 |
Hello Hakan.
I noticed, tha
|
#16 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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 |
|
September 20, 2005, 09:28 |
Thanks for your quick reply!
|
#17 |
Senior Member
Håkan Nilsson
Join Date: Mar 2009
Location: Gothenburg, Sweden
Posts: 204
Rep Power: 18 |
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. |
|
September 20, 2005, 11:25 |
Hi Håkan,
does it convert i
|
#18 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
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? |
|
September 20, 2005, 12:31 |
I tried it by editing all the
|
#19 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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 |
|
September 20, 2005, 14:28 |
> reports them in the order po
|
#20 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
> 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)? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Foam::error::PrintStack | almir | OpenFOAM Running, Solving & CFD | 92 | May 21, 2024 08:56 |
Decomposing meshes | Tobi | OpenFOAM Pre-Processing | 22 | February 24, 2023 10:23 |
[snappyHexMesh] sHM layer process keeps getting killed | MBttR | OpenFOAM Meshing & Mesh Conversion | 4 | August 15, 2016 04:21 |
[snappyHexMesh] No layers in a small gap | bobburnquist | OpenFOAM Meshing & Mesh Conversion | 6 | August 26, 2015 10:38 |
snappyhexmesh remove blockmesh geometry | philipp1 | OpenFOAM Running, Solving & CFD | 2 | December 12, 2014 11:58 |