MathGroup Archive 2013

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

Search the Archive

Re: diffusion PDE

  • To: mathgroup at smc.vnet.net
  • Subject: [mg130993] Re: diffusion PDE
  • From: Roland Franzius <roland.franzius at uos.de>
  • Date: Sun, 2 Jun 2013 00:27:33 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net
  • References: <koch1r$t5b$1@smc.vnet.net>

Am 01.06.2013 12:05, schrieb sabrinacasanova at gmail.com:
> Hello,
>
>
> In the notebook below you can find  PDE which represents a particle diffusion equation
> with energy dependence and not only time/spatial dependences. The
> particles should diffuse in a energy dependent way inside, lets say, a
> sphere. There is a spherical symmetry, so only the radius of this
> sphere is important. I have an initial condition and a boundary
> condition on the spatial border of the sphere. My question is whether Mathematica
> is able to solve such PDEs at all. If yes, do you know of somebody
> who has already done it ?
> Best
>
> Sabrina
>
> --------------------------------
>
> chi = 1.
> d0 = 3. Power[10., 27]
> n = 300.
>
> norm = 4. 3.14 1.8/( 3 Power[10., 10.])
> Evaluate [norm]
> B = 100. Power[n/10000., 0.5]
> Dif = chi*d0*Power[B/3., -0.5]
> tau0 = 2.*Power[10., 5]*Power[(n/300.), -1] 3. Power[10., 7]
> gam = 0.5
>
> x2min = 0.00001
> x2rad = 20.
> x2max = 40.
> x1min = 0.
> x1max = Power[(40.*3.18 Power[10., 18.]), 2]/(6.*Dif)
> x3min = 1.
> x3max = 100000000000.
> x3cut = 1000000
>
> pde = D[y[x1, x2, x3], x1] -
>     Dif Power[x3, gam] D[y[x1, x2, x3], {x2, 2}] -
>     Dif Power[x3, gam] Power[x2, -1] 2 D[y[x1, x2, x3], x2] +
>     y[x1, x2, x3]/tau0 + x3  D[y[x1, x2, x3], x3]/tau0 == 0
>
>
> s = NDSolve[{pde,
>     y[x1min, x2, x3] ==
>      norm Power[x3, -2.7] Exp[-x3/x3cut] UnitStep[x2 - x2max] UnitStep[
>        x3max - x3],
>     y[x1, x2max, x3] ==
>      norm Power[x3, -2.7] Exp[-x3/x3cut] UnitStep[x3max - x3],
>     Derivative[0, 1, 0][y][x1, x2min, x3] == 0,
>     y[x1, x2, x3max] == 0 },
>    y, {x1, x1min, x1max}, {x2, x2min, x2max}, {x3, x3min, x3max}]
>
> Plot3D[Evaluate[y[x1, x2max, x3] /. s], {x1, x1min, x1max}, {x3,
>    x3min, x3max}, PlotRange -> All]
>



I've written the system a bit more readable.

There seems to be no problem exept a lacking boundary condition at 
energymin and the fact, that the solution seems to be independent of 
time. The start condition seems to be already a solution, make a test of 
it applying the operator pde on the start condition.


chi = 1.;
d0 = 3. 10^27;
n = 300.;
norm = 4. 3.14 1.8/(3 10^10);
B = 100. Sqrt[n/10000.];
Dif = chi*d0/Sqrt[B/3];
tau0 = 2.*10^5/(n/300.)* 3.10^7;
gam = 0.5;
radiusmin = 0.00001;
radiusrad = 20.;
radiusmax = 40.;
timemin = 0.;
timemax = 1000 (40.*3.18 10^18)^2/(6.*Dif);
energymin = 1.;
energymax = 100000000000.;
energycut = 1000000;
pde = D[y[time, radius, energy], time] -
    Dif *energy^gam *D[y[time, radius, energy], radius, radius] -
    Dif* energy^gam/radius * 2* D[y[time, radius, energy], radius] +
    y[time, radius, energy]/tau0 +
    energy  D[y[time, radius, energy], energy]/tau0 == 0

startcond =
  y[timemin, radius, energy] == norm/ energy^2.7 Exp[-energy/energycut]

rmaxcond =
  y[time, radiusmax, energy] == norm/energy^2.7* Exp[-energy/energycut]
rmincond = Derivative[0, 1, 0][y][time, radiusmin, energy] == 0
energymaxcond = y[time, radius, energymax] == 0
energymincond =
  y[time, radius, energymin] == startcond[[2]] /. energy -> energymin



s = NDSolve[{pde, startcond, rmincond, rmaxcond, energymincond,
    energymaxcond},
   y, {radius, radiusmin, radiusmax}, {energy, energymin,
    energymax}, {time, timemin, timemax},
   MaxStepFraction -> {1/1000, 1/40, 1/40}]


Plot3D[y[time, radiusmax, energy] /. s, {time, timemin,
   timemax}, {energy, energymin, energymax/10}, PlotRange -> All,
  PlotPoints -> 200, AxesLabel -> {"time", "energy", "y"}]

-- 

Roland Franzius





  • Prev by Date: defining a function whose parameter must be a function with two parameters
  • Next by Date: Re: Warsaw Univ. course, was Re: Work on Basic Mathematica Stephen!
  • Previous by thread: diffusion PDE
  • Next by thread: Re: diffusion PDE