View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001491 | OpenFOAM | Bug | public | 2015-01-15 22:49 | 2015-01-16 15:51 |
Reporter | dkxls | Assigned To | henry | ||
Priority | normal | Severity | text | Reproducibility | N/A |
Status | closed | Resolution | no change required | ||
Platform | GNU/Linux | OS | OpenSuSE | OS Version | 13.2 |
Summary | 0001491: [GammaLimiter]: Confusing coefficient documentation/implementation | ||||
Description | According 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 | ||||
Tags | No tags attached. | ||||
|
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. |