Solving complex PDEs

  • #1
367
13

Main Question or Discussion Point

Hey! I've been trying to tackle this problem but i'm a little lost at the moment and any references or suggestions would be greatly appreciated. Essentially the problem boils down to solving (at least) 3 coupled partial differential equations with (at least) 2 independent variables. Now the solutions and parameters in these equations can be complex-valued and I've had trouble finding any good approaches or packages to help solve these equations. I know a bit of basic complex analysis although haven't taken a formal course in the subject yet, and am just struggling to figure out how I can build an algorithm or use an already known one to solve these complex PDEs. Here is an example of the type of equations I am considering:

## \frac {\partial A}{\partial t} = i (BC - B^*C^*) - \frac{A}{a} ##

## \frac{\partial B}{\partial t} = ibAC - \frac{B}{c} ##

## \frac{\partial C}{\partial x} = idB + e ##

where t and x are the independent variables (real numbers); a,b, c, d and e are parameters (complex); ## i = \sqrt{-1} ##; A, B, and C are the complex-valued states of the system that I am try to solve for. I've checked out a few different PDE solvers such as FiPy but they appear to only work with real values. I have begun looking into methods to solve complex PDEs such as above, but am still looking for methods better suited for my problem so that I have something to work with. If you have any material you'd suggest I look at or know of any packages well-suited to solve such equations, I'd be happy to look in to them.

(I haven't put down any particular prefix for programming language since I don't mind learning something new and better suited for my problem. With that being said, I am most familiar with Python.)
 

Answers and Replies

  • #2
11,519
5,069
Here's one such reference using python:

http://ipython-books.github.io/featured-05/

If you don't have a python distro with all the necessary modules installed, I'd suggest getting the Anaconda distro where everything is integrated into one package. This link can help you get started using iPython and the notebook interface:

http://www.quant-econ.net/py/getting_started.html [Broken]
 
Last edited by a moderator:
  • #3
367
13
Here's one such reference using python:

http://ipython-books.github.io/featured-05/

If you don't have a python distro with all the necessary modules installed, I'd suggest getting the Anaconda distro where everything is integrated into one package. This link can help you get started using iPython and the notebook interface:

http://www.quant-econ.net/py/getting_started.html [Broken]
Thank you for the response. I do have anaconda installed luckily. I've actually been using that first link and have tried to play around with it but am not quite too familiar with how to modify it for complex-value solutions and differentials. For example, using their exact code and simply multiplying the differential dt by the value they have to update the variable V and also multiplying this by ## i ##, I get the following prompt:

"ComplexWarning: Casting complex values to real discards the imaginary part
# Neumann conditions: derivatives at the edges"

But keeping the imaginary part would be important for the end.
 
Last edited by a moderator:
  • #4
pasmith
Homework Helper
1,738
410
You can always replace a single complex dependent variable with two real dependent variables (the real and imaginary parts of the original).
 

Related Threads on Solving complex PDEs

Replies
6
Views
756
Replies
3
Views
5K
Top