How Can I Solve Complex PDEs Using Mathematica's NDSolve?

In summary, the conversation discusses the difficulty of using NDSolve to solve a set of equations involving partial derivatives and integrals. It is determined that the equations need to be put in a canonical form and initial conditions need to be set in order to use a numerical method, such as Euler's method, to solve the equations. The equations also involve a derivative with respect to z, making it more complicated.
  • #1
crazybird
16
0
I have a pde set as following:

parameters: γ, ω, α, β, c, η
variables: z,t; x,y
want: S = S(z,t;x,y)
A = A(z,t)

∂S/∂t = -γ*S - i ω*A*exp{-i*[(-θ-α*t)*x+β*t*y]}
[∂/∂t + (1/c)*∂/∂t] A = -i η*∫∫dxdy S*exp{i*[(-θ-α*t)*x+β*t*y]}

The integral range is angle:(0,2Pi), radius: (0,R)

How to solve this equation with NDSolve? I tried the following, which obviously does not work:

Code:
t1 = 500;(*ns, duration=5*10^-7 s*)
\[Mu] = -250;(*ns, central=-2.5*10^-7 s*)
\[Sigma] = 100;(*ns, width=10^-7 s*)
L = 1;
R = 0.2;
c = c = 29.979;
\[Gamma] = 1/100000;
\[Omega] = 1.329489268210057*10^-8;
\[Eta] = 2.0034565952485216*10^9;
\[Theta] = 1022.4;
\[Alpha] = 4.09;
\[Beta] = 0;

sol = NDSolve[{\!\(
\*SubscriptBox[\(\[PartialD]\), \(t\)]\(sS[z, t, x]\)\) == -\[Gamma]*
      sS[z, t, x] - 
     I \[Omega]* E^(-I ((-\[Theta] - \[Alpha] t)*x))*aS[z, t, x], (\!\(
\*SubscriptBox[\(\[PartialD]\), \(z\)]\(aS[z, t, x]\)\) + 1/c  \!\(
\*SubscriptBox[\(\[PartialD]\), \(t\)]\(aS[z, t, 
         x]\)\)) == -I \[Eta]* 
     NIntegrate[
      E^(I ((-\[Theta] - \[Alpha] t)*x))*sS[z, t, x], {y, -R, 
       R}, {x, -Sqrt[R^2 - y^2], Sqrt[R^2 - y^2]}] , 
   sS[z, -t1, x] == 0, 
   aS[z, -t1, x] == 
    1/(Sqrt[2 Pi] \[Sigma]) E^(-((-t1 - \[Mu])^2/(2 \[Sigma]^2))), 
   aS[0, t, x] == 
    1/(Sqrt[2 Pi] \[Sigma]) E^(-((t - \[Mu])^2/(2 \[Sigma]^2)))}, {sS,
    aS,x}, {z, 0, L}, {t, -t1, 0}, {x, -R, R}, MaxSteps -> Infinity, 
  StartingStepSize -> 0.01, PrecisionGoal -> 1000, 
  MaxStepSize -> 0.01]

Anyone know how to do it easily?
 
Last edited:
Physics news on Phys.org
  • #2
I don't think NDSolve can solve that. Strip it down into it's canonicalized form so that's it's easier to see what's going on. Looks like:

[tex]\frac{\partial S}{\partial t}=-yS-iwA g(t,x,y)[/tex]

[tex]\frac{\partial A}{\partial t}=-ik\int_0^{2\pi}\int_0^{R} S(z,t,u,v) g(t,u,v)dudv[/tex]

So since the derivative are only with respect to t, those are ordinary coupled integrodifferential equations. However you need appropriate initial conditions. For example, you need an initial region for S so that the integration can be performed for every time step starting at t=0. So the initial conditions would be:

[tex]A(z,0)= h(z)[/tex]

[tex]S(z,0,x,y)=g(z,x,y),\quad 0\leq x\leq R,\quad 0\leq y\leq 2\pi[/tex]

for some constant z. Then I think just start by coding a simple Euler method. Do just like you would do for two ordinary DEs, but at each time step, numerically compute the integral and add it into the calculations.

That's a start anyway. May need to tweek it.
 
Last edited:
  • #3
Hi, jackmell,

After many trials I also realize that it is not quite possible to simply use NDSolve to get it done. Thanks for the suggestion to go to a canonicalized form and I find that one can put the e^ factor into the variables to make a better looking form. I find that I made a mistake--the second equation involves a derivative of z: [∂/∂z + (1/c)*∂/∂t] A=... . It is not only ODEs. So things get complicated. I am trying to find a numerical way to solve it. Thanks for you answer~
 

1. What is Mathematica?

Mathematica is a computational software program used for mathematical, scientific, and engineering calculations. It is widely used by scientists, researchers, and engineers to solve complex equations and analyze data.

2. How can Mathematica help me solve PDEs?

Mathematica has built-in algorithms and functions specifically designed to solve partial differential equations (PDEs). It can handle a wide range of PDEs, including linear and nonlinear equations, and provides accurate and efficient solutions.

3. Can Mathematica handle PDE sets?

Yes, Mathematica can handle systems of PDEs, also known as PDE sets. It has the capability to solve multiple equations simultaneously, making it a powerful tool for solving complex mathematical problems.

4. Do I need programming experience to use Mathematica for PDEs?

No, you do not need programming experience to use Mathematica for solving PDEs. It has a user-friendly interface and a wide range of built-in functions that can be easily accessed and used to solve PDEs without any programming knowledge.

5. Is Mathematica a reliable tool for solving PDEs?

Yes, Mathematica is a highly reliable tool for solving PDEs. It has been extensively tested and used by experts in the field of mathematics and science. It also provides accurate and efficient solutions, making it a trusted tool for solving complex equations.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
221
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
261
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
5K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
997
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
Back
Top