# Decrease in slope during convergence analysis

I am using the method of manufactured solutions to perform the order of accuracy testing. I am using a cube for the testing. The cube is size 1m on all sides.

I used 5 refinements:

1. $dx = dy = dz = 0.5$ ($8$ cells)
2. $dx = dy = dz = 0.5/2$ ($8^2$ cells)
3. $dx = dy = dz = 0.5/2/2$ ($8^3$ cells)
4. $dx = dy = dz = 0.5/2/2/2$ ($8^4$ cells)
5. $dx = dy = dz = 0.5/2/2/2/2$ ($8^5$ cells)

I first performed the analysis for a pure Dirichlet BC problem and observed 2nd order accuracy, as expected.

Next, I changed one of the cube surfaces to be a Neumann condition, the other 5 surfaces are still Dirichlet conditions. The results for this are shown below.

So the slope here goes from about 2 to 1. I am still expecting 2nd order accuracy with the Neumann condition.

Assuming that my math is correct and the scheme that I am using is 2nd order accurate, does the decrease in slope suggest that I have a problem with my implementation?

Could it also signify the onset of some other sort of error (perhaps algebraic?) taking over the discretization error? I would think not given that we did not observe this in the pure Dirichlet case.

I am puzzled as to why the first segment of this 2nd figure indicates 2nd order accuracy and then gradually decreases. Any insight would be greatly appreciated.

• I think it isn't possible to answer this question without examining the scheme/code itself, because any sufficiently subtle coding error might show up as an incorrect order of convergence. May 3, 2018 at 9:14
• Ah I see. The code database is big, so I am not sure if there's any way I can provide that. I can provide the schemes that I used May 3, 2018 at 13:34
• I understand, but as far as I can see there just isn't much information in what you've got so far. May 3, 2018 at 14:51
• I will update later with the numerical schemes I used. I guess I thought the 2nd figure could reveal some insight in itself, but I guess not. May 3, 2018 at 15:20