I am trying to solve the following system of two partial differential equations
$\partial_t G(x,y,t) + \partial_x G(x,y,t)+\partial_y G(x,y,t) = -i\left[f(x,t) + f(y,t)\right] $
$\partial_t f(x,t) + \partial_x f(x,t) = f(x,t) - iG(x,0,t)$
with initial conditions $f(x,0)=0$ and $G(x,y,0) = G_0(x,y)$ where $G_0$ is a given function (e.g., a double Gaussian packet in the x-y plane)
I tried the following code:
L = 1; T = 1; x0 = -L/4; sigma = L/30;
sol = NDSolve[{
D[G[x, y, t], t] == -(D[G[x, y, t], x] + D[G[x, y, t], y]) - I*(f[x, t] + f[y, t]),
D[f[x, t], t] == -D[f[x, t], x] + f[x, t] - I*(G[x, 0, t]),
G[x, y, 0] == Exp[-((x - x0)/(Sqrt[2]*sigma))^2 - ((y - x0)/(Sqrt[2]*sigma))^2],
f[x, 0] == 0
},
{G, f}, {x, -L/2, L/2}, {y, -L/2, L/2}, {t, 0, T},
MaxSteps -> 500]`
But I get the errors:
Function::fpct: Too many parameters in {x,y,t} to be filled from Function[{x,y,t},0][x,t].
Function::fpct: Too many parameters in {x,y,t} to be filled from Function[{x,y,t},0][-0.5,0.].
Function::fpct: Too many parameters in {x,y,t} to be filled from Function[{x,y,t},0][-0.5,0.].
General::stop: Further output of Function::fpct will be suppressed during this calculation.
NDSolve::ndnum: Encountered non-numerical value for a derivative at y == 0.`.
NDSolve::ndnum: Encountered non-numerical value for a derivative at y == 0.`.
Any suggestion on how to proceed?
Comments
Post a Comment