I was working on checking volume conservation in my Nested Grid setup using check_refine.m, and ran into an issue where there was a banding pattern appearing in several variables.
Looking at check_refine.m, the issue was coming from dg_index . I've only plotted the gradient in the eta direction, but there is a similar pattern in the xi direction.
This comes from the way the Idg and Jdg points are set. It seems like Idg and Jdg should increase linearly, so I make them increase linearly.
Code: Select all
oldIdg = fix(XrF(Imid) - 0.5) + 1;
oldJdg = fix(YrF(Jmid) - 0.5) + 1;
Idg = (1:size(oldIdg,2))+oldIdg(1)-1;
Jdg = (1:size(oldJdg,2))+oldJdg(1)-1;
I do apologize for the oversized images. I see there is an imgh and imgw option, but I can't seem to figure out where to put them in the text.
Thank you!
-Ben