Message Boards Message Boards

0
|
9237 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

I am new to Mathematica. Trying to solve a partial differential equation.

Inputs: rho = 0.414; c = 2029; m = 0.024; U = 013.811; A = 0.00405; Tsol = 300.6; Tin = 358; Tout = 354; L = 0.334; t200 = 1200; X1 = .01;

pde = (rhocD[V[t, X], t] == mD[V[t, X], X, X] + UA*(V[t, X] - Tsol));

sol = NDSolve[{pde, V[0, X] == 300, V[t, 0] == Tin, D[V[t, L]] == Tout}, V, {t, 0, 2000}, {X, 0.001, L}];

V[t200, X1] /. sol

plot[V[t, X] /. sol, {t, 0, 1000}, {X, 0.001, L}]

Outputs:

{357.737}

plot[{InterpolatingFunction[{{0., 2000.}, {0., 0.334}}, <>][t, 

X]}, {t, 0, 1000}, {X, 0.001, 0.334}]

It is not giving me a plot. why is it so? Can you help me finding the error in my coding or conditions.

Thank You

POSTED BY: Nirmalya Datta
4 Replies

Thank You Henrik,

Problem solved

POSTED BY: Nirmalya Datta

Hi Nirmalya,

sorry, I should have looked more closely: There are two arguments, => Try Plot3D instead of Plot.

Henrik

POSTED BY: Henrik Schachner

Hi Tried that. thank you.

Now the output says: Plot::nonopt: Options expected (instead of {X,0.001,L}) beyond position 2 in Plot[V[t,X]/. sol,{t,0,1000},{X,0.001,L}]. An option must be a rule or a list of rules. >>

POSTED BY: Nirmalya Datta

Try Plot instead of plot.

Henrik

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

Group Abstract Group Abstract