Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Specifiying finiteness condition using NDSolve

8 views
Skip to first unread message

pradeep

unread,
Jan 31, 2008, 12:50:19 AM1/31/08
to
Hello all,
I am trying to solve a PDE for unsteady laminar flow through a circular
tube using NDSolve, but am having difficulty in implementing one of the
boundary conditions which states that the velocity at all time, at r=0
(centre of the tube), is FINITE. How do I specify the fact that the
function i am solving for has a value that is finite at a specific point
in the domain in mathematica?

Thanks in advance!

Pradeep
Purdue University

bghi...@ucdavis.edu

unread,
Feb 4, 2008, 3:14:39 AM2/4/08
to

Pradeep,

I presume you are trying to solve the following linear PDE, where x is
the radial coordinate

D[u[t, x], t] == 1 + D[u[t, x], x, x] + D[u[t, x], x]/x

and the difficulty is the term with 1/x which becomes indeterminate at
x=0. If you apply l'Hopital's rule you find that the appropriate PDE
at x=0 is

D[u[t, x], t] == 1 + 2 D[u[t, x], x, x] at x=0

Thus to solve this system of PDEs we construct the following helper
functions

g1[x_ /; x > 0] := 1
g1[x_ /; x == 0] := 2
g2[x_ /; x > 0] := 1/x
g2[x_ /; x == 0] := 0


sol = NDSolve[{D[u[t, x], t] ==
1 + g1[x] D[u[t, x], x, x] + g2[x] D[u[t, x], x], u[0, x] == 0,
Derivative[0, 1][u][t, 0] == 0, u[t, 1] == 0}, u, {t, 0, 10}, {x,=

0, 1}]

And here is a plot of the solution at various time intervals

Plot[Evaluate[{u[0.02, x], u[0.08, x], u[0.1, x], u[0.4, x], u[1, x],
u[5, x]} /. sol], {x, 0, 1}]

Cheers,

Brian

0 new messages