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.

enter image description here

ClearAll["Global`*"];
pdeset = {Derivative[1, 0][U][t, x] == Derivative[0, 2][U][t, x], 
Derivative[1, 0][T][t, x] == Derivative[0, 2][T][t, x] + E Derivative[0, 1][U][t, x]^2}
ics = {U[0, x] == 0, T[0, x] == 0};
bcs = {U[t, 0] == cos[t], T[t, 0] == 1, U[t, 10] == 0, T[t, 10] == 0 };
bcAll = Flatten[{ics, bcs}, 1];
  • For E=0.1, when I try to solve

    sol = NDSolve[{pdeset, bcAll}, {U, T}, {t, 0, 5}, {x, 0, 4 Pi}]

I get this error NDSolve::bcedge: "Boundary condition U[t,10]==0 is not specified on a single edge of the boundary of the computational domain"

  • How to plot Derivative[0, 1][T][t, x] as x->0 vs t (0...Pi) for E=0.1,0.2,0.3?
share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

After correcting some syntax errors and setting consistent boundary conditions:

ClearAll["Global`*"];
e = 0.1;
pdeset =
 {Derivative[1, 0][U][t, x] == Derivative[0, 2][U][t, x], 
  Derivative[1, 0][T][t, x] == Derivative[0, 2][T][t, x] + e Derivative[0, 1][U][t, x]^2}
ics =
  {U[0, x] == 0,
   T[0, x] == 0};
bcs =
  {U[t, 0] == Sin[t],
   T[t, 0] == 0,
   U[t, 10] == 0,
   T[t, 10] == 0};
bcAll = Flatten[{ics, bcs}, 1];

sol = NDSolve[{pdeset, bcAll}, {U, T}, {t, 0, 5}, {x, 0, 10}]

VectorPlot[{U[t, x], T[t, x]} /. sol[[1]], {t, 0, 5}, {x, 0, 10}, 
 VectorScale -> {Small, Scaled[.5], None}]

Mathematica graphics

share|improve this answer
    
Thx dear but why change bc T[t,0]=1 and how plot Derivative[0, 1][T][t, x] as x->0 vs t (0...Pi) for e=0.1,0.2,0.3? –  MMM Nov 27 '13 at 3:14
    
@MMM The ics and the bcs should be coherent –  belisarius Nov 27 '13 at 3:20
    
Dear @belisarius, I am still hoping to learn how to plot Derivative[0, 1][T][t, x] as x->0 vs t (0...Pi) for e=0.1,0.2,0.3? –  MMM Nov 28 '13 at 4:45
    
i am still waiting for your @belisarius response? –  MMM Dec 2 '13 at 5:07
add comment

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.