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

  • Context: Mathematica 
  • Thread starter Thread starter crazybird
  • Start date Start date
  • Tags Tags
    Mathematica Pde Set
Click For Summary
SUMMARY

The discussion focuses on solving complex partial differential equations (PDEs) using Mathematica's NDSolve function. The equations involve parameters such as γ, ω, α, β, c, η and require appropriate initial conditions for variables S and A. Participants concluded that NDSolve may not be suitable for this problem due to its complexity, suggesting a canonical form and numerical methods like the Euler method for better handling the equations. The need for initial conditions and the integration of variables were emphasized as critical steps in the solution process.

PREREQUISITES
  • Understanding of partial differential equations (PDEs)
  • Familiarity with Mathematica's NDSolve function
  • Knowledge of numerical methods, specifically the Euler method
  • Concept of initial conditions in differential equations
NEXT STEPS
  • Research how to implement the Euler method for coupled integrodifferential equations
  • Learn about canonical forms of PDEs and their simplification techniques
  • Explore advanced numerical methods for solving PDEs in Mathematica
  • Study the impact of initial conditions on the behavior of PDE solutions
USEFUL FOR

Mathematicians, physicists, and engineers working with complex PDEs, as well as Mathematica users seeking to enhance their numerical solution techniques.

crazybird
Messages
16
Reaction score
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
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:

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

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

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:

A(z,0)= h(z)

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

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:
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~
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 6 ·
Replies
6
Views
7K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K