Group Abstract Group Abstract

Message Boards Message Boards

Solve nonlinear complex numerical differential equations

Posted 6 years ago

Dear Wolfram community,

I have a nonlinear complexe system with twovariables.

   system={
   D[a[t, x], t] == a[t, x] + I Conjugate[ d[t, x]] Conjugate[ c[t, x]],
   D[b[t, x], t] == b[t, x] + a[t, x] + I c[t, x]*d[t, x],
   D[c[t, x], t] == c[t, x] + I (a[t, x] - b[t, x])*Conjugate[d[t, x]],
   D[d[t, x], x] == I c[t, x],
   a[t, 0] == 1, b[t, 0] == 1, c[t, 0] == I, d[t, 0] == 0,
   a[0, x] == 1, b[0, x] == 1, c[0, x] == I, d[0, x] == 0};
solution = NDSolve[system, {a, b, c, d}, {t, 0, 10}, {x, 0, 10}]

and get as an error massage:

NDSolve:Some of the functions have zero differential order, so the equations will be solved as a system of differential-algebraic equations.
NDSolve: For the method NDSolve`IDA, only machine real code is available. Unable to continue with complex values or beyond floating-point exceptions.

What can I do to solve this system correctly. Thank for your help.

POSTED BY: C. H.
14 Replies
Anonymous User
Anonymous User
Posted 6 years ago

"I don't understand this because 10^15 is only a number." Perhaps the factor makes the estimative term error grow and Mathematica "tosses out" the result. Best to focus on the simple solution before details.

maxwell-bloch not correct? wikipedia shows the equations all in d/dt but A99 clearly shows 3 in d/dt and the 4th d/dx. I will re-check that against other online sources.

Again: your sub-problem is quite different from the problem in the paper. What PDE method are you using to claim this sub-problem (connects or ads) to solve the original problem? Is it a Fourier of the original problem? Is it split from the original in some other way?

Later (today, tomorrow?) I'll look at this again. I wrote down your new MBE eq. and will look at the original problem again. I will at least post the original equation set.

Reproduce Figure 3. The 6 complex plots are graphed from eq's but each requires more equations applied. When they graphed you have to ask if they used experiment data or equation. (example: if was Pee was data (not unknown when graphed) it would make "solving" totally different). For fig 3 it says to use eq 36-39 (then later that 48-51 are mostly equivalent but "assuming the initial absence of fields and coherences, neither of them will appear later on according to Eqs. (50) and (51)". The author suggests ref. 8 and 12 (12 about plotting), they are non-free and not guaranteed to contain the equations sought.

Did you contact the original authors? Or are they your professors and you cannot ask them?

POSTED BY: Anonymous User
Posted 6 years ago

An other Idea is:

MBE = {
     D[a[t, x], t] == -a[t, x] + d1[t, x] c0[t, x] - 
     d0[t, x] c1[t, x],
    D[b[t, x], t] == a[t, x] - b[t, x] - 
     d1[t, x] c0[t, x] + d0[t, x] c1[t, x],
    D[c0[t, x], t] == 
    c0[t, x] + (a[t, x] - b[t, x]) d1[t, x],
    D[c1[t, x], t] == 
   c1[t, x] + (a[t, x] - b[t, x]) d0[t, x],
    D[d0[t, x], x] == - c1[t, x],
    D[d1[t, x], x] ==  c0[t, x],
   a[t, 0] == 0, b[t, 0] == 0, c0[t, 0] == 0, c1[t, 0] == 0, 
   d0[t, 0] == 10^1, d1[t, 0] == 0,
   a[0, x] == 0, b[0, x] == 0, c0[0, x] == 0, c1[0, x] == 0, 
   d0[0, x] == 10^1, d1[0, x] == 0};
solutionMBE = 
 NDSolve[MBE, {a, b, c0, d0, c1, d1}, {t, 0, 
   3}, {x, 0, 20}]

with c=c0+I c1 and d=d0+I d0. Now the equations are real.

In this system of equations I get the Error massages:

NDSolve::pdord: Some of the functions have zero differential order, so the equations will be solved as a system of differential-algebraic equations.

and

NDSolve::ndcf: Repeated convergence test failure at t == 0.`; unable to continue.

What is now the problem of this system?

POSTED BY: C. H.
Posted 6 years ago

The author of the paper are the guys who where I apply for the PhD and I can start if I solve this problem and they programmed it in python. A solution of the system is given in: Design and Characteristics of a Population Inversion X-ray Laser Oscillator. And I want to reproduce Figure 3 of this paper

The Maxwell-Bloch-equation are a pde. I think the equations on Wikipedia are incorrect.

What I did is the same as you:

system = {D[a[t, x], t] == - a[t, x] + d[t, x]*  D[d[t, x], x],
   D[b[t, x], t] == b[t, x] + a[t, x] - D[d[t, x], x]*d[t, x],
   D[d[t, x], t, x] == D[d[t, x], x] + (a[t, x] - b[t, x])*d[t, x],
   a[t, 0] == 0, b[t, 0] == 0, d[t, 0] == 1,
   a[0, x] == 0, b[0, x] == 0, d[0, x] == 1};
solution = NDSolve[system, {a, b, d}, {t, 0, 10}, {x, 0, 10}]
Plot3D[{a[t, x] /. solution}, {t, 0, 2}, {x, 0, 2}]

But I'm not sure that I can kick the Conjugation of d. I know that a and b are real functions and I think that the derivative dont act on complex argument.

And a other problem is that is doesn't work for large prefactors 10^15 a[t,x]. Then I get: NDSolve::icfail: Unable to find initial conditions that satisfy the residual function within specified tolerances. Try giving initial conditions for both values and derivatives of the functions. Why do I get this Error. I don't understand this because 10^15 is only a number.

POSTED BY: C. H.
Anonymous User
Anonymous User
Posted 6 years ago
POSTED BY: Anonymous User
Posted 6 years ago

No, the problem come not from a book.

The problem comes from the preparation for my PhD and thought that I break the problem down to a general one.

I thought I could make any conditions and after I understand Mathematica I include the correct conditions.

The system which I want to solve comes from the Maxwell-Bloch-equations and the paper Quantum theory of superfluorescence based on two-point correlation functions equations 48-51.

* is the normal product between two functions.

POSTED BY: C. H.
Anonymous User
Anonymous User
Posted 6 years ago
POSTED BY: Anonymous User
Posted 6 years ago

OK. But I don't understand how can I solve my problem?

Can I solve this with NDSolve, if I restrict the functions a and b to be real and between 0 and 1?

POSTED BY: C. H.
POSTED BY: Daniel Lichtblau
Posted 6 years ago

OK, I use Mathematica 12. No, never change the method. What is ie?

POSTED BY: C. H.
Anonymous User
Anonymous User
Posted 6 years ago

I retract the question. A method I believed I saw was available, looking to check that it is, is not available. I cannot give an example of selecting an alternate method I know will work.

POSTED BY: Anonymous User

The error message answers that question.

For the method NDSolve`IDA, only machine real code is available. Unable to continue with complex values or beyond floating-point exceptions.

POSTED BY: Frank Kampas
Posted 6 years ago

Ok. But I can't play with the system of differential equations. But why it works if everything is real:

system = {D[a[t, x], t] == a[t, x] + d[t, x]*  c[t, x],
   D[b[t, x], t] == b[t, x] + a[t, x] + c[t, x]*d[t, x],
   D[c[t, x], t] == c[t, x] + (a[t, x] - b[t, x])*d[t, x],
   D[d[t, x], x] == c[t, x],
   a[t, 0] == 1, b[t, 0] == 1, c[t, 0] == 0, d[t, 0] == 0,
   a[0, x] == 1, b[0, x] == 1, c[0, x] == 0, d[0, x] == 0};
solution = NDSolve[system, {a, b, c, d}, {t, 0, 10}, {x, 0, 10}]
Plot3D[{a[t, x] /. solution}, {t, 0, 2}, {x, 0, 2}]
Attachment

Attachments:
POSTED BY: C. H.
Posted 6 years ago
Attachment

Attachments:
POSTED BY: C. H.

You don't have derivatives of the functions with respect to both variables. That may be the problem.

POSTED BY: Frank Kampas
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard