2017-08-21 07:26 BST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002650OpenFOAM[All Projects] Bugpublic2017-08-17 17:29
ReporterSahas 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusnewResolutionopen 
Product Versiondev 
Target VersionFixed in Version 
Summary0002650: Wrong factors for the cubic inerpolation scheme
DescriptionDetails of the problem and corresponding mathematics can be found in this thread:
https://www.cfd-online.com/Forums/openfoam-programming-development/184766-factors-cubic-inerpolation-scheme-openfoam.html

To sum, there are the wrong values of kSc, kVecP, kVecN in cubic interpolation (see file src/finiteVolume/interpolation/surfaceInterpolation/schemes/cubic/cubic.H, lines 126, 127 and 142). Now the code is:
const surfaceScalarField kVecP(sqr(scalar(1) - lambda)*lambda);
const surfaceScalarField kVecN(sqr(lambda)*(lambda - scalar(1)));
and
surfaceInterpolationScheme<Type>::interpolate(vf, kSc, -kSc)

Should be:
const surfaceScalarField kVecN(-sqr(scalar(1) - lambda)*lambda);
const surfaceScalarField kVecP(-sqr(lambda)*(lambda - scalar(1)));
and
surfaceInterpolationScheme<Type>::interpolate(vf, -kSc, kSc)
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0008514

Sahas (reporter)

Present formula gives wrong results only in case of non-uniform grids, of course.

~0008515

henry (manager)

Can you provide a simple case which demonstrates the need for this change which can also be used to test the new implementation?

~0008517

Sahas (reporter)

I don't have such case but may be I can come up with it in a few days.
Anyway current implementation is incorrect "per se".

~0008518

henry (manager)

The current implementation may incorrect and your suggested change may be correct but this needs to be demonstrated and the new implementation tested otherwise it is a random change which may or may not improve the code.

~0008600

henry (manager)

Have you found a case which demonstrates the problem and verifies the proposed correction? If not should I close this report and "not reproducible"?

~0008602

Sahas (reporter)

Hello, Henry! Sorry for delaying with answer.
I have performed some tests and found them unsatisfactory (the difference in results obtained using two formulas is not strong and obvious). Thus you may close the report with reason "suspended", I think. If I find a good test I reopen the report.
+Notes

-Issue History
Date Modified Username Field Change
2017-08-04 16:34 Sahas New Issue
2017-08-04 16:42 Sahas Note Added: 0008514
2017-08-04 17:15 henry Note Added: 0008515
2017-08-04 18:44 Sahas Note Added: 0008517
2017-08-04 19:35 henry Note Added: 0008518
2017-08-17 14:57 henry Note Added: 0008600
2017-08-17 17:29 Sahas Note Added: 0008602
+Issue History