|
[Sponsors] |
April 8, 2021, 13:02 |
Bug of faceOrientation due to decomposing
|
#1 |
Senior Member
Join Date: Dec 2019
Posts: 215
Rep Power: 7 |
Hi,
I am doing a simulation of a pipe system, which is basically a Y, so the flow is divided into those two pipes. I am sampling the mass flow rate at the outlet and inlet patches and I am getting good results. I have also created faceZones to sample the mass flow rate insides those pipes. The results are way too small, like there is no mass flow at all. I have noticed, that this error occurs due to wrong oriented faceZones. Thats why I have run orientFaceZone after toposet. After that the faceNormals look nice in paraview. After I decompose the case, I am getting those weird mass flow rates again. It seems decomposePar missoriented the faceNormals again. Unfortunately paraFoam -builtin is not able to visualize the faceNormals. Thats why I have tried sumDirection of phi instead of sum and I am getting better results, but ofc they are not correct. So this error occurs defenitivly due to wrong oriented faceNormals. But I dont know how to solve it. Can someone help? I am using openfoam4.1 and sampling the data like: Code:
inletMassFlow { type surfaceRegion; functionObjectLibs ("libfieldFunctionObjects.so"); enabled true; writeControl timeStep; writeInterval 50; log true; writeFields false; regionType patch; name inlet; operation sum; fields ( phi ); } outletMassFlow100 { type surfaceRegion; functionObjectLibs ("libfieldFunctionObjects.so"); enabled true; writeControl timeStep; writeInterval 50; log true; writeFields false; regionType faceZone; name outlet100; operation sum; fields ( phi ); } outletMassFlow100_2 { type surfaceRegion; functionObjectLibs ("libfieldFunctionObjects.so"); enabled true; writeControl timeStep; writeInterval 50; log true; writeFields false; regionType faceZone; name outlet100; operation sumDirection; direction (0 1 0); fields ( phi ); } |
|
April 9, 2021, 06:36 |
|
#2 |
Senior Member
Join Date: Dec 2019
Posts: 215
Rep Power: 7 |
I came up with a work around:
With sumDirection I can sample into both normal directions of the faces and later add those mass flow rates. Unfortunately I couldnt find a real solution so far. |
|
April 9, 2021, 06:53 |
|
#3 |
Senior Member
Join Date: Dec 2019
Posts: 215
Rep Power: 7 |
I just noticed that its way easier to use sumMag instead... I have no the slightest idea why I didnt came up with that early. Its works like a charm.
The problem with the face orientation after decomposing still remains. With this work around its no longer a problem, atleast for the massflow in my case without recircularisation at the given faceZones. |
|
April 10, 2021, 16:23 |
|
#4 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12 |
Hi,
Is there any chance for you to open a bug ticket, if possible? Thank you
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
April 11, 2021, 12:38 |
|
#5 |
Senior Member
Join Date: Dec 2019
Posts: 215
Rep Power: 7 |
||
April 11, 2021, 15:03 |
|
#6 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12 |
I am sorry for causing this!
if you still wanna press on the issue, please open a bug ticket either in gitlab or in foam-extend (you can find relevant links below). thanks for your efforts.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
April 12, 2021, 05:18 |
|
#7 |
Senior Member
Join Date: Dec 2019
Posts: 215
Rep Power: 7 |
Well that escalted quickly :P
No worries, I didn't expect such a harsh reaction either. I actually had the intention to help others, since I have a working work around for my applications. I tried to look deeper in it and the code should actually take the flipMap() into account. Its strange, that it doesnt do it in the end. I have seen, that you can also add the option orientedFields (phi). After that I get actually two sums: the wrong one and one that equals the sumMag. To be sure you have to create a case with rezircularisation to see whether the correction of the surface normals is now taken into account or not. I am just quite busy atm, but I can try it a later date and create a testcase to test it. |
|
April 13, 2021, 15:22 |
|
#8 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12 |
In my humble opinion, you (or anyone else) don't need to feel and/or be grateful/thankful to any of the OpenFOAM providers for anything.
OpenFOAM is open source, only and only because of the business model that OpenFOAM providers follow in order to earn money (and hopefully make profit). Absolutely not because of Stallman-like love for open-source software (most of the developers do love to contribute to the community, though, I believe and know - and possibly you know them by seeing them here). For this reason, if you receive a reprimand from one of these providers (like you have experienced above) for reporting a potential bug in their platform by costing them zero money, you don't need to apologise or feel sorry if it reveals to be a no bug. You don't need to provide a patch or anything if you don't feel up for it. If they also complain about the funding by putting the blame on the user community, it is absolutely not your problem. Actually, he/she needs to thank to you for allocating time to report a potential bug. These are only my opinions, of course, but I strongly believe their validity.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
April 14, 2021, 11:59 |
|
#9 |
Senior Member
Join Date: Dec 2019
Posts: 215
Rep Power: 7 |
Thank you very much for your kind words.
I did not know that openfoam actually has a business model. I really thought they would do it for the love of opensource-software, like you described it. I also I completely agree, that reporting a bug is only beneficial for them. It took soem time to create a test case and so on. I was actually really surprised about that reaction. I did not mean to offend anyone and thought that it must be a though job to work in a opensource project and depend on the good will of others people to collect the funding and that that is the reason he was so stressed out. |
|
April 14, 2021, 12:17 |
|
#10 | ||
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12 |
Quote:
Quote:
Keep up good work.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM.com] swak4foam compiling issues on a cluster | saj216 | OpenFOAM Installation | 5 | January 17, 2023 16:05 |
[cfMesh] CfMesh v1.1.2 not working as expected with OpenFOAM 8 | akashpatel95 | OpenFOAM Community Contributions | 11 | April 10, 2021 14:27 |
Is it a bug of Lee.C in icoReactingMultiphaseInterFoam? | MamoruTamura | OpenFOAM Bugs | 1 | December 2, 2020 21:51 |
How the momentum source term due to droplet evaporation is calculated? | pappo1890 | OpenFOAM Programming & Development | 0 | July 3, 2020 09:57 |
Forum y2k Bug | Jonas Larsson | Main CFD Forum | 1 | January 5, 2000 10:22 |