I am trying to solve this PDE system:
EPS = NDSolveValue[{
D[e[z, t], z] == 0,
D[p[z, t], t] == -p[z, t] + I s[z, t],
D[s[z, t], t] == I p[z, t],
e[0, t] == 1, p[z, 0] == 0, s[z, 0] == 0
}, {e, p, s}, {z, 0, 1}, {t, 0, 1}];
Then I seek values for e and p at different z and t=0:
{EPS[[1]][0, 0], EPS[[2]][0, 0]}
{EPS[[1]][1, 0], EPS[[2]][1, 0]}
The result contradicts the condition p[z, 0] == 0:
{1, I}
{1, I}
Furthermore, if I ONLY change the order of the equations
EPS = NDSolveValue[{
D[p[z, t], t] == -p[z, t] + I s[z, t],
D[s[z, t], t] == I p[z, t],
D[e[z, t], z] == 0,
e[0, t] == 1, p[z, 0] == 0, s[z, 0] == 0
}, {e, p, s}, {z, 0, 1}, {t, 0, 1}];
{EPS[[1]][0, 0], EPS[[2]][0, 0]}
{EPS[[1]][1, 0], EPS[[2]][1, 0]}
The result changes, and is wrong again
{1, 0.999909 I}
{1.76683*10^10, - 1.09719*10^6 I}
Does anyone have an idea what is happening?
UPDATE: The original problem arised from this fully coupled equation:
NDSolveValue[{
D[e[z, t], z] == I p[z, t],
D[p[z, t], t] == -p[z, t] + I e[z, t] + I g[t] s[z, t],
D[s[z, t], t] == I Conjugate[g[t]] p[z, t],
s[z, 0] == p[z, 0] == 0, e[0, t] == f[t]
}, {e, p, s}, {z, 0, 1}, {t, 0, 1}]
Here g[t] and f[t] are simple functions, such as const, Gaussian, etc.
{}button above the edit window. It is recommended that you browse the Markdown help and How to copy code from Mathematica so it looks good on this site. Once read the edit window help button?gives quick reminders of that material. To remove from the screen, click?again. – Jack LaVigne Sep 01 '16 at 14:25