Solving Complex PDEs: Refs & Suggestions Needed

  • Thread starter Thread starter TheCanadian
  • Start date Start date
  • Tags Tags
    Complex Pdes
Click For Summary

Discussion Overview

The discussion revolves around solving coupled partial differential equations (PDEs) with complex-valued solutions. Participants are seeking references, methods, and programming tools suitable for tackling these equations, which involve multiple independent variables and complex parameters.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant describes a specific problem involving three coupled PDEs with complex-valued states and seeks suggestions for algorithms or packages to solve them.
  • Another participant provides a reference link for using Python to solve PDEs and suggests using the Anaconda distribution for ease of setup.
  • A later reply mentions a warning encountered when attempting to modify existing code for complex solutions, highlighting the challenge of handling complex values in the provided examples.
  • One participant proposes an alternative approach of replacing a single complex variable with two real variables representing the real and imaginary parts.

Areas of Agreement / Disagreement

Participants express varying approaches to solving the problem, with no consensus on the best method or tool. There are differing opinions on how to handle complex values in programming contexts.

Contextual Notes

Participants note challenges related to existing PDE solvers that may not accommodate complex values and the complexities involved in modifying code for such cases.

TheCanadian
Messages
361
Reaction score
13
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 into 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.)
 
Technology news on Phys.org
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
 
Last edited by a moderator:
jedishrfu said:
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

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:
You can always replace a single complex dependent variable with two real dependent variables (the real and imaginary parts of the original).
 

Similar threads

Replies
16
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
5
Views
2K
  • · Replies 0 ·
Replies
0
Views
3K
Replies
31
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K