Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Infinite expression, NDSolve

  • To: mathgroup at smc.vnet.net
  • Subject: [mg128406] Re: Infinite expression, NDSolve
  • From: "Kevin J. McCann" <kjm at KevinMcCann.com>
  • Date: Tue, 16 Oct 2012 20:11:30 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <k5j254$8r3$1@smc.vnet.net>

Your problem is twofold, I think. One is the obvious numerical 
singularity at r=0. Here you could try using r=0.00001 or some such to 
get around it, but care must be taken. The second problem is the 
inconsistency of the boundary conditions T[1,t]= and T[r,0]==0.

Kevin

On 10/16/2012 3:25 AM, Grasley wrote:
> Dear All,
>
> I am trying to use NDSolve to solve the heat equation for 1-D radial flow in cylindrical coordinates, with the initial condition of a spatially constant temperature, and boundary conditions of zero flux at r=0 (axisymmetry) and a constant temperature at a radius of 1.  Here is the code:
>
> NDSolve[{D[T[r, t], t] == 1/r*D[r D[T[r, t], r], r],
>    Derivative[1, 0][T][0, t] == 0, T[1, t] == 20, T[r, 0] == 0}, T, {r,
>     0, 1}, {t, 0, 10}]
>
> Power::infy: Infinite expression 1/0. encountered. >>
>
> Infinity::indet: Indeterminate expression 0. ComplexInfinity encountered. >>
>
> Power::infy: Infinite expression 1/0. encountered. >>
>
> Infinity::indet: Indeterminate expression 0. ComplexInfinity encountered. >>
>
> NDSolve::ndnum: Encountered non-numerical value for a derivative at t == 0.`. >>
>
> I've tried using nonzero (i.e. very small values) for the initial time and in place of r=0 in the boundary condition, but to no avail.  Any ideas?
>
> Thanks!
>



  • Prev by Date: Plot in function
  • Next by Date: Re: 3D plotting problem in Mathematica
  • Previous by thread: Infinite expression, NDSolve
  • Next by thread: Re: with machine-precision input