# PDE plotting assistance needed

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?
-
You asked a question, accepted an answer, then modified the question and unaccepted the answer. How many times do you plan to do that? – Dr. belisarius Mar 10 '15 at 19:59

fixing the Cos typo and making a bold decision that the xrange ends at 4 Pi not 10

 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], U[t, 4 Pi] == 0,T[t, 0] == 1, T[t, 4 Pi] == 0};
bcAll = Flatten[{ics, bcs}, 1];
sol = NDSolve[{pdeset, bcAll}, {U, T}, {t, 0, 5}, {x, 0, 4 Pi}];


(* NDSolve::ibcinc: Warning: boundary and initial conditions are inconsistent. *)

The warning is because you have specified both U and T to be simultaneously 0 and 1 at the origin. You get a solution but it obviously doesn't satisfy both conditions.

 Plot3D[ (T /. First@sol)[t, x] , {x, 0, 4 Pi}, {t, 0, 5},
PlotRange -> All]


this figure shows but U and T with red lines indicating the prescribed boundary conditions.

 Plot[Evaluate[  (D[(T /. First@sol)[t, x], x]) /. x -> 0 ], {t, 0, 5}]


-

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}]


-
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 – Dr. 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