0
$\begingroup$

What is a reasonable manufactured solution to test the following equation against its finite difference approximation? I want it to look like a Cosine function about $0$, rotated about $Z$ axis (basically not varying about $\theta$) such that $f$ turns out to be a not so bad function in terms of $r,\theta$

$$u_{rr} \;+\; \frac{1}{r} u_r \;+\; \frac{1}{r^2} u_{\theta\theta}\;+\; Cu \;=\; f(r,\theta)$$

Also, it should avoid the discontinuity at $r = 0$

$\endgroup$
  • $\begingroup$ Hi @mod0 and welcome to scicomp! Your question appears to be virtually identical to one posted eariler: scicomp.stackexchange.com/questions/12902/… $\endgroup$ – Paul Dec 9 '14 at 3:40
  • $\begingroup$ Hi Paul, I have seen that question and even gone over the document attached in the answer. The document does not deal with a source term. And hence I asked anyway. I meant, I went to the MASA site, downloaded their document and went over it. $\endgroup$ – mod0 Dec 9 '14 at 3:42
  • 3
    $\begingroup$ Nothing magic happens. You just plug your chosen $u$ into the PDE and see what $f$ it generates. Implement that and the BCs, and you're set. $\endgroup$ – Bill Barth Dec 9 '14 at 3:48
  • 2
    $\begingroup$ Also, you should choose a more complex manufactured solution than a simple cosine function about the origin. If your manufactured solution has no $\theta$ variation, you will not test the $u_{\theta\theta}$ term's implementation at all. You should include a product of transcendental functions at the very least. $\endgroup$ – Bill Barth Dec 9 '14 at 3:51
  • 2
    $\begingroup$ You should not use a polynomial in $r$. Use trancendentals in both directions at the very least. $\endgroup$ – Bill Barth Dec 9 '14 at 21:59