ibndirac

5 Reputation

One Badge

7 years, 2 days

MaplePrimes Activity


These are questions asked by ibndirac

I am trying to solve a diffusion equation with a potential term that has an integral in it. The equation has the following form: 

PDE := diff(g(x, t), t) = diff((beta(x, t)+diff(g(x, t), x)), x), 

with the function beta: 

beta := proc (x, t) options operator, arrow; int(exp(-abs(x-y))*g(y, t), y = -infinity .. +infinity) end proc

The boundary conditions for the function g(x,t) are simply assumed to be a zero-centered Gaussian in space (i.e. in x). So it is unity for x=0 and zero for the outer boundary that we can set as x=L. 

The problem is easily solved if the function beta is not an integral, but in the current form I get the following error: 
*******
Error, (in pdsolve/numeric/process_PDEs) inconsistent dependencies in PDEs: g(x, t) v.s. g(y, t)

*******

So it does not like the dummy variable in the function g.  

I can not write an additional PDE for beta because my Kernel is an exponential so the integral never goes away. Anyone with a way to solve this?

ADDENDUM: I have now copied the scriptPDE_DIFFUSION_INTEGRAL.mw
 

restart

L := 20; betaz := proc (x, t) options operator, arrow; int(exp(-abs(x-y))*g(y, t), y = 0 .. L) end proc

proc (x, t) options operator, arrow; int(exp(-abs(x-y))*g(y, t), y = 0 .. L) end proc

(1)

PDE := diff(g(x, t), t) = diff(-betaz(x, t)+diff(g(x, t), x), x)

diff(g(x, t), t) = -(int(-abs(1, x-y)*exp(-abs(x-y))*g(y, t), y = 0 .. 20))+diff(diff(g(x, t), x), x)

(2)

v__t := 1; v__d := 0; IBC := {g(0, t) = exp(-(0.-v__d)^2/v__t), g(L, t) = 0*exp(-(L-v__d)^2/v__t), g(x, 0) = exp(-(x-v__d)^2/v__t)}

{g(0, t) = 1., g(20, t) = 0, g(x, 0) = exp(-x^2)}

(3)

pds := pdsolve(PDE, IBC, numeric, time = 100, range = 0 .. L, spacestep = .1)

Error, (in pdsolve/numeric/process_PDEs) inconsistent dependencies in PDEs: g(x, t) v.s. g(y, t)

 

p0 := pds:-plot(t = 0, numpoints = 100, color = red); p1 := pds:-plot(t = 10, numpoints = 100, color = red); p2 := pds:-plot(t = 20, numpoints = 100, color = blue); p6 := pds:-plot(t = 60, numpoints = 100, color = blue); p5 := pds:-plot(t = 50, numpoints = 100, color = blue); p3 := pds:-plot(t = 30, numpoints = 100, color = blue); p4 := pds:-plot(t = 40, numpoints = 100, color = green); p7 := pds:-plot(t = 70, numpoints = 100, color = blue); p8 := pds:-plot(t = 80, numpoints = 100, color = black); p9 := pds:-plot(t = 90, numpoints = 100, color = blue); plots[display]({p0, p2, p4, p8})

NULL


 

Download PDE_DIFFUSION_INTEGRAL.mw

below. 

 
Page 1 of 1