How do I discretize $-\frac{d^2}{dx^2}u = .0000001(300^4-u^4)$ using the finite difference method where $u(0)=900=u(L)$?
Asked
Active
Viewed 243 times
0
-
probably the derivative is applied to u? Essentially you have 2 options. Sorry haven't seen that this is a boundary problem. You could use a so called shooting method. Otherwise a 2nd order difference quotient with a restriction for the values at $0$ and $L$. What is your knowledge concerning these problems so far? – Quickbeam2k1 Mar 14 '13 at 16:57
-
I was told that I have to discretize the above equation, which I have edited since your comment, using the finite difference method for non-linear equations. I believe that the boundry conditions are both Dirichlet but my professor says one condition is Robin and one is Dirichlet but Robin boundries would need to include u' according to my knowledge. – user63575 Mar 14 '13 at 19:33
-
Both boundary conditions are of Dirichlet type. Have you tried using ode methods? That's why I mentioned the shooting method.I first thought of an equation evolving from left to right. But this seems to complicated. As mentioned above, discretize the differential operator by e.g. a central differential quotient. For the power term you have several options. I would choose the evaluation in the place where you are at the moment. Could you add something you already did? – Quickbeam2k1 Mar 14 '13 at 20:24
1 Answers
1
We pick some spacing. Maybe we think $101$ points are enough to capture what we want. Then we make an array $U$, with indices from $0$ t0 $100$. $U(i)$ represents the value of $u$ at $\frac {iL}{100}$. The first derivative would be approximated by $\frac {100(u(i+1)-u(i))}L$. The second derivative would be approximated by $\frac {10000(u(i+1-2u(i)+u(i-1)}{L^2}$ Now you (just) have to find a set of $U(i)$ that satisfy your equation. More points gives better spatial resolution, but using numerical derivatives can add more noise as the spacing gets smaller. You are given the values $U(0)=U(100)=900$. Now you can use relaxation methods to adjust the other $U(i)$ toward a solution.
Ross Millikan
- 374,822