View Issue Details

IDProjectCategoryView StatusLast Update
0001491OpenFOAMBugpublic2015-01-16 15:51
Reporterdkxls Assigned Tohenry  
PrioritynormalSeveritytextReproducibilityN/A
Status closedResolutionno change required 
PlatformGNU/LinuxOSOpenSuSEOS Version13.2
Summary0001491: [GammaLimiter]: Confusing coefficient documentation/implementation
DescriptionAccording to the original Gamma paper [1], the coefficient \beta_m should be in the range of 0.1 ... 0.5.
The OpenFOAM implementation allows for coefficients between 0...1 and divides them by 2 in the class constructor.

The confusion I'm facing comes from this division by 2. Meaning, does a coefficient 1 in OpenFOAM correspond to 0.5 in the original paper?

If I understand the source code correctly, then the division by 2 ensures that the implementation is conform with original paper. Or am I missing something in the code?

Apparently I'm not the first one facing this problem, as can be seen from the two discussions in the cfd-online.com forums [2,3].
Hence a remark in the source code that clarifies the different coefficient ranges in the OpenFOAM implementation compared to the original paper would be very helpful.
Additional Information[1] Jasak, H., H. G. Weller, and A. D. Gosman. “High Resolution NVD Differencing Scheme for Arbitrarily Unstructured Meshes.” International Journal for Numerical Methods in Fluids 31, no. 2 (September 30, 1999): 431–49. doi:10.1002/(SICI)1097-0363(19990930)31:2<431::AID-FLD884>3.0.CO;2-T.

[2] http://www.cfd-online.com/Forums/openfoam-programming-development/136084-doubt-gamma-scheme.html

[3] http://www.cfd-online.com/Forums/openfoam-programming-development/60771-interpolation-openfoam.html
TagsNo tags attached.

Activities

henry

2015-01-15 23:35

manager   ~0003545

The input coefficient is 0-1 as this is the expected range for a blending factor for most schemes:

        if (k_ < 0 || k_ > 1)
        {
            FatalIOErrorIn("GammaLimiter(Istream& is)", is)
                << "coefficient = " << k_
                << " should be >= 0 and <= 1"
                << exit(FatalIOError);
        }

and there is a comment in the code stating this is scaled when used in the
gamma scheme function:

        // Rescale k_ to be >= 0 and <= 0.5 (TVD conformant)
        // and avoid the /0 when k_ = 0
        k_ = max(k_/2.0, SMALL);

I am not sure what more is needed.

Issue History

Date Modified Username Field Change
2015-01-15 22:49 dkxls New Issue
2015-01-15 23:35 henry Note Added: 0003545
2015-01-15 23:35 henry Status new => closed
2015-01-15 23:36 henry Assigned To => henry
2015-01-15 23:36 henry Resolution open => no change required