Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

im trying to solve a PDE-System, with the "periodic boundary condition"

c[t,0]==4*c[t,2pi]

But mathenmatica says:

NDSolve::bcedge: "Boundary condition c[t,0]==4\ c[t,2\ [Pi]] is not specified on a single edge of the boundary of the computational domain."

If i replace the 4 by 1 everything is fine. Anyone can explain this to me? And/or can tell me how/if mathematica can solve this?

Thanks for reading!

share|improve this question
1  
It would help to have the rest of your equation as well. –  b.gatessucks Mar 19 at 16:37

1 Answer 1

The condition c[t, 0] == 4 * c[t, 2 Pi] does not define a periodic boundary condition. The function value must be the same for it to be periodic. That is also why it works if you replace 4 by 1. You might be able to replace c[t, x] by m[x] u[t, x] where u is periodic and m[x] grows exponentially by a factor of 4 over each period.

Here is an adaptation of the sine-Gordon equation in the NDSolve documentation illustrating this idea.

L = 4;
m[x_] := Exp[Log[4] x/(2 L)];
sol = NDSolve[{D[m[x] u[t, x], t, t] == 
     D[m[x] u[t, x], x, x]  + Sin[m[x] u[t, x]], u[t, -L] == u[t, L],
    m[x] u[0, x] == Exp[-x^2],
    Derivative[1, 0][u][0, x] == 0},
   u, {t, 0, L}, {x, -L, L}];

Plot3D[Evaluate[m[x] u[t, x] /. First[sol]], {x, -L, 5 L}, {t, 0, L}]

Mathematica graphics

A check of the constant ratio over the "period" 2 L:

Ratios /@ Table[m[x] u[t, x] /. First[sol],
  {t, RandomReal[{0, L}, 5]}, {x, -L, 7 L, 2 L}]
(*
  {{4., 4., 4., 4.}, {4., 4., 4., 4.}, {4., 4., 4., 4.},
   {4., 4., 4., 4.}, {4., 4., 4., 4.}}
*)
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.