CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Bugs

Bug of faceOrientation due to decomposing

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 8, 2021, 13:02
Default Bug of faceOrientation due to decomposing
  #1
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
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
        ); 
   }
shock77 is offline   Reply With Quote

Old   April 9, 2021, 06:36
Default
  #2
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
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.
shock77 is offline   Reply With Quote

Old   April 9, 2021, 06:53
Default
  #3
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
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.
shock77 is offline   Reply With Quote

Old   April 10, 2021, 16:23
Default
  #4
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
Hi,

Is there any chance for you to open a bug ticket, if possible?

Thank you
HPE is offline   Reply With Quote

Old   April 11, 2021, 12:38
Default
  #5
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
Hi,


I have opned a ticket: https://bugs.openfoam.org/view.php?id=3659
shock77 is offline   Reply With Quote

Old   April 11, 2021, 15:03
Default
  #6
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
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.
HPE is offline   Reply With Quote

Old   April 12, 2021, 05:18
Default
  #7
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
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.
shock77 is offline   Reply With Quote

Old   April 13, 2021, 15:22
Default
  #8
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
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.
HPE is offline   Reply With Quote

Old   April 14, 2021, 11:59
Default
  #9
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
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.
shock77 is offline   Reply With Quote

Old   April 14, 2021, 12:17
Default
  #10
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
Quote:
I was actually really surprised about that reaction.
I am afraid, you are not the first one, and you will also not be the last one.

Quote:
... the good will of others people to collect the funding and that that is the reason he was so stressed out.
Absolutely not. Please don't worry about it as well. I don't think he was stressed at all.

Keep up good work.
HPE is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


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


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