|
[Sponsors] |
Run-time postprocessing - incorrect flow rate through faceZone |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 4, 2013, 10:36 |
|
#41 | |
Member
Daniel Pielmeier
Join Date: Apr 2012
Posts: 99
Rep Power: 14 |
Quote:
No offense, but this seems to me like a workaround. I really would like to identify the underlying bug(s) to have solution which generally works. |
||
November 4, 2013, 17:59 |
|
#42 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quote:
The only other way I can think of fixing the broken orientations, would be to either use or create a utility application that fixes the orientations, based on which way we want it to go. Another detail that is bothering me is this: what if this is a problem of OpenFOAM version incompatibility? For example, Hypermesh might not be fully tested for OpenFOAM 2.2, but somehow works fine in 2.1 or 2.0?
__________________
|
||
November 5, 2013, 10:35 |
|
#43 | |
Member
Daniel Pielmeier
Join Date: Apr 2012
Posts: 99
Rep Power: 14 |
Quote:
I tested wit OpenFOAM 2.2.2, 2.1.1 and 2.0.1. For my simple model the results were off by 25% for 2.2.2 and 5% for 2.1.1 and 2.0.1 when exporting direct to OpenFOAM format. When exporting to Fluent format first for all versions are off by 25%. So there is a difference between versions for native export but all results are unacceptable. The version of Hypermesh I use was released on 9/23/2013 which already includes some fixes for bugs regarding native export to OpenFOAM reported by me. OpenFOAM 2.2.0 was released on 06/03/13 so I guess they work with 2.2. |
||
November 5, 2013, 18:17 |
|
#44 | ||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Sometimes there is an exercise that I like to do: to look into the "$FOAM_APPBIN" folder and look at the names of the binaries and try to ascertain which ones look suspicious enough to come in handy
And I think I found one terribly nice one for you: https://github.com/OpenFOAM/OpenFOAM...ideCells.C#L28 Quote:
In essence, all you have to do (although it's just another workaround, but since Altair can't fix things on their end, what else is there...) is to:
WAIT!! orientFaceZone ... It's orientFaceZone!!! Quote:
__________________
|
|||
November 6, 2013, 06:49 |
|
#45 | |
Member
Daniel Pielmeier
Join Date: Apr 2012
Posts: 99
Rep Power: 14 |
Quote:
Should have done this already, although I think this is a bug in renumberMesh. For the exported mesh all face are oriented in the same directions, renumberMesh seems to flip some faces and after running orientFaceZone all faces have the same directions again. I think this is worth an OpenFOAM bug. |
||
November 6, 2013, 16:45 |
|
#46 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quote:
__________________
|
||
November 7, 2013, 11:51 |
|
#47 | ||
Member
Daniel Pielmeier
Join Date: Apr 2012
Posts: 99
Rep Power: 14 |
Quote:
First It could be possible that until this issue occurred I was just lucky and renumbering did not change the orientation. Which means Hypermesh did always write a mesh were the cell numbers on one side of the faceZone are consistently lower or higher than the corresponding neighbor cell, so the flipMap was always 1 or 0 for all faces. When renumbering this remained the same and no orientations were flipped. This time this was not the case and renumbering switched some cells as it is supposed to do when a cell number change occurs which requires a change in orientation. The reason for this may be that until now I only had one volume on each side of the faceZone. Now there were more volumes meshed sequentially on both sides. Second, from reading the OpenFOAM Wiki about swak4Foam and calcMassflow [1] I was under the impression that it requires the slaveCells of the faceZone to calculate the correct mass flux. This was because of the sentence Quote:
So if the faceZone flipMap is not consistent it needs to be oriented (after renumbering the mesh of course). This is currently the only way which works. Which means there is no bug I just got into the wrong direction. I thought the face Orientations are considered by OpenFOAM and swak4Foam but apparently they are not. One question remains. Why not consider the face orientation of the faceZone and sum up all fluxes with positive orientation and add them to the sum of the fluxes with negative orientation to get the correct mass flux? However there is indeed a bug if this is the desired behavior. Regarding orientFaceZone I need to open another bug because in my work flow I renumber after I split the mesh regions for my multi region cases and currently orientFaceZone does not work per region. This is however a trivial change I managed to code myself :-) [1] http://openfoamwiki.net/index.php/Co...e_calcMassFlow |
|||
November 9, 2013, 10:56 |
|
#48 | |||||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi Daniel,
Quote:
Quote:
Quote:
Come to think of it, swak4Foam without "flip()" did give you the correct mass flows, wasn't it? Which would mean that it uses the faceZone as a faceSet and only flips the face orientations if a cellSet is given. In other words, by default is does not use "faceZones" the same way as OpenFOAM. Quote:
The faceZone and faceSet are generic concepts. You can a single faceSet or faceZone to have in one of several shapes:
Quote:
I gotta give a quick test to the multi-region cases that OpenFOAM has got and check the effect that renumberMesh has got on them. This way it'll be easier to ensure that there is a bug or not. Best regards, Bruno
__________________
|
||||||
November 9, 2013, 14:09 |
|
#49 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
By the way, I was looking for another post of mine and I happen to stumble upon this code:
Sooo.... any chance you can disable "flipMap" on HyperMesh?
__________________
|
|
November 10, 2013, 11:32 |
|
#50 | |||
Member
Daniel Pielmeier
Join Date: Apr 2012
Posts: 99
Rep Power: 14 |
Quote:
Quote:
What I am currently unsure about are the results of the runs without renumbering. Then Swak4Foam with flip should provide correct results because the flipMap is uniform. I need to take another look into this and also check if the created cellSets are different with and without renumbering. If the cellSet remains the same I can understand that both results for Swak4Foam are wrong because the cellSet is wrong and the flipMap (if Hypermesh does not care about the information and sets the flipMap arbitrarily). This is probably the reason because when the cellset is created it does not look up the flipMap but the cell numbers on each side of the mesh. But as I sad I need to check this. Quote:
Well I just run renumberMesh on the split mesh because I recognized that the results of renumberMesh are different if the mesh is split. I don't know however what is more efficient, renumber the complete mesh or renumber the individual regions. I think the better option is to run it on the individual regions as they are also solved individual. |
||||
November 10, 2013, 11:36 |
|
#51 |
Member
Daniel Pielmeier
Join Date: Apr 2012
Posts: 99
Rep Power: 14 |
No, there are no export options in Hypermesh at all. It just exports anything that is currently visible and to some degree relies on the naming of the exported parts e.g. when they are starting with starting with wall_* or inte_* etc...
|
|
November 10, 2013, 14:27 |
|
#52 | |||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
I gave one of the tutorials in OpenFOAM a quick spin to try and see if I could see something similar and I didn't manage to seem any problems with it.
Perhaps I was in too much of a hurry, but the tutorial "heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater" did not give me any problems with using renumberMesh. Another possibility that comes to mind is that this kind of problem might only occur with tetrahedral meshes. Quote:
As for the problem with "flip()" and the cellSets, I thought that the problem was that the cellSets were deduced from the faceZones, therefore the result with "flip()" was as bad as OpenFOAM's calculations (which uses the flip map from the faceZones). Quote:
...Although... OK, I think I understand your idea: if the surface is contiguous, there are only 2 sides to the faceZone, no matter the shape. Problem is that OpenFOAM allows for faceZones to be non-contiguous, which would require a pre-identification of the faceZone islands and then fixing their flip maps according to the notion of "there can be only 2 sides to a surface". Quote:
__________________
|
||||
November 11, 2013, 06:26 |
|
#53 | |||
Member
Daniel Pielmeier
Join Date: Apr 2012
Posts: 99
Rep Power: 14 |
Quote:
Quote:
Now when not renumbering the mesh Swak4Foam provides wrong results because the cellSet is ill-defined. Without flip the results are wrong because it uses the flipMap which is wrong (they would be correct if the orientations are grabbed from the neighbor cells itself). With renumbering the flipMaps are now correct but the cellSet is still ill-defined and Swak4Foam provides wrong results. Without flip the results are correct as the flipMap is now correct. Note: The cellset is ill-defined because of me misunderstanding the definition of the cellSet required by the Swak4Foam flip option. If I use a faceSet with all cells of the required cellSet on one side it works in any case. When using a faceZone with Swak4Foam it only works when the mesh is renumbered although the cellset is defined correct. This is something I do not understand until now. So when not renumbering the mesh or there is a non-contigous faceZone it is better to create a faceSet and a cellSet with all cells on one the desired side(s) of the mesh. The OpenFOAM postprocessing only works if I use orientFaceZone, but in my opinion it should also work with a correct flipMap, because as you say the reason for the flipMap is because there might be an inconsistent orientation of the faces. This is the bug which I have to report. Quote:
Thanks for the tip, I will compare both methods when doing the next simulations. |
||||
November 18, 2013, 09:10 |
|
#54 | |
Member
Daniel Pielmeier
Join Date: Apr 2012
Posts: 99
Rep Power: 14 |
Quote:
|
||
December 2, 2013, 06:55 |
|
#55 | |
Member
Daniel Pielmeier
Join Date: Apr 2012
Posts: 99
Rep Power: 14 |
Quote:
Thanks to Bernhard and especially Bruno for spending their time to help me with this issue. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Transient simulation not converging | skabilan | OpenFOAM Running, Solving & CFD | 14 | December 17, 2019 00:12 |
High Courant Number @ icoFoam | Artex85 | OpenFOAM Running, Solving & CFD | 11 | February 16, 2017 14:40 |
dynamic Mesh is faster than MRF???? | sharonyue | OpenFOAM Running, Solving & CFD | 14 | August 26, 2013 08:47 |
same geometry,structured and unstructured mesh,different behaviour. | sharonyue | OpenFOAM Running, Solving & CFD | 13 | January 2, 2013 23:40 |
Velocity of flow v time | MitsubishiEvo6 | FLUENT | 0 | August 31, 2012 00:51 |