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:
- $dx = dy = dz = 0.5$ ($8$ cells)
- $dx = dy = dz = 0.5/2$ ($8^2$ cells)
- $dx = dy = dz = 0.5/2/2$ ($8^3$ cells)
- $dx = dy = dz = 0.5/2/2/2$ ($8^4$ cells)
- $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.