1
$\begingroup$

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. enter image description here

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. enter image description here

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.

$\endgroup$
4
  • 2
    $\begingroup$ 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. $\endgroup$
    – Kirill
    May 3, 2018 at 9:14
  • $\begingroup$ 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 $\endgroup$
    – user27504
    May 3, 2018 at 13:34
  • $\begingroup$ I understand, but as far as I can see there just isn't much information in what you've got so far. $\endgroup$
    – Kirill
    May 3, 2018 at 14:51
  • $\begingroup$ 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. $\endgroup$
    – user27504
    May 3, 2018 at 15:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.