View Issue Details

IDProjectCategoryView StatusLast Update
0000750OpenFOAMBugpublic2013-02-18 22:17
Reporterchegdan Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
PlatformLinuxOSUbuntuOS Version12.04
Summary0000750: localMin does not report correct value of local min between owner and neighbor cells in certain cases
DescriptionlocalMin does not report correct value of local min between owner and neighbor cells of a face, if values are equal in magnitude but opposite sign. I have attached a snippet of code and test case to reproduce the error. Both numbers reported in the snippet should be equal to 40, which is found by inspecting paraview for the L field and counting the faces straddling the two regions of opposite sign.
Steps To Reproducecompile the code with wmake.
Run the "box" test case with Allrun, where the script runs blockMesh, setFields, and localMinTest executables. It should report two numbers that should be equal.
Additional Informationin localMin.H, line ~158

            forAll(vff, facei)
            {
                vff[facei] = minMod(vf[own[facei]], vf[nei[facei]]);
            }

where the line might want to read

            forAll(vff, facei)
            {
                vff[facei] = min(vf[own[facei]], vf[nei[facei]]);
            }

After this change, i get the expected number of faces. When checking the min of owner neighbor cells on coupled boundaries, the method uses min instead of minMod as expected. Unless I'm missing something, the function min should be used on internal faces instead of minMod.
TagsNo tags attached.

Activities

chegdan

2013-02-18 15:34

reporter  

localMinTest.tar.gz (18,969 bytes)

henry

2013-02-18 15:44

manager   ~0001923

Would it help if we called it localMinMod or localMinMag rather than localMin?

chegdan

2013-02-18 15:57

reporter   ~0001924

why not have another scheme for localMinMod and alter the behavior of localMin to be the expected behavior? Was there a particular reason to have it this way (reaching back years ago when it was programmed)?

henry

2013-02-18 16:23

manager   ~0001925

Yes the reason is that the minimum value of interest in this scheme is the minimum of the magnitude, I am not sure if the minimum of the signed field would be useful in the context of surfaceInterpolation.

chegdan

2013-02-18 20:58

reporter   ~0001926

the only situation I can think of is when you would want to identify the face that straddles an interface in a level-set field. each side of the face could be equal in value but opposite in sign. Clearly, localMin would not be able to identify some of the faces. Thanks for your comments.

Issue History

Date Modified Username Field Change
2013-02-18 15:34 chegdan New Issue
2013-02-18 15:34 chegdan File Added: localMinTest.tar.gz
2013-02-18 15:44 henry Note Added: 0001923
2013-02-18 15:57 chegdan Note Added: 0001924
2013-02-18 16:23 henry Note Added: 0001925
2013-02-18 20:58 chegdan Note Added: 0001926
2013-02-18 22:17 henry Status new => closed
2013-02-18 22:17 henry Assigned To => henry
2013-02-18 22:17 henry Resolution open => no change required