Re: NDSolve with Dirichlet boundary condition
- To: mathgroup at smc.vnet.net
- Subject: [mg107463] Re: NDSolve with Dirichlet boundary condition
- From: JH <jlucio at ubu.es>
- Date: Sat, 13 Feb 2010 05:23:40 -0500 (EST)
- References: <hkj8sp$dpg$1@smc.vnet.net>
Hi:
Perhaps you can try something like:
n[r_] := Exp[-3 r]; (* You haven't give an approximate function. At
least this is decreasing, and goes to 0 as r goes to inf *)
r0 = 0.001; (* You can try an initial point near the origin, as r =
0 is causing a 1/0 error (because of the r^2 factor of T''[r]) *)
sol = NDSolve[{(D[r^2 k0 T[r]^(5/2) T'[r], r] == 3/2 kB T'[r] - (kB
T[r])/n[r] n'[r]) /. {k0 -> -1.72, kB -> 100},
T[r0] == 10, T'[r0] == -1}, T[r], {r, r0, 1}, AccuracyGoal -> 10]
Plot[T[r] /. sol, {r, r0, 1}, AxesOrigin -> {0, 0}, PlotRange -> All]
You haven't give any value for k0 nor for kB. My election match with
your boundary conditions. If you give an approximate function
(polynomial, for instance) for n[r] and the values for k0 and kB
perhaps we can give you a better solution.
Bye,
JH