Message Boards Message Boards

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

Using NDSolve with Method -> {"PDEDiscretization" -> {"MethodOfLines"?

Posted 8 years ago

Can someone help me, why is this not working?

ClearAll["Global`*"]

EE = 10000;
\[Alpha] = 1;
\[Beta] = 2500000;
\[Kappa] = 1/10000;
H = 5;
S0 = 1;

eq1 = EE Derivative[0, 2][u][t, x] + \[Alpha] Derivative[1, 0][p][t, x]
eq2 = (1/\[Beta]) Derivative[1, 0][p][t, 
x] - \[Alpha] Derivative[1, 1][u][t, 
x] - \[Kappa] Derivative[0, 2][p][t, x]

eq3 = u[t, 0]
eq4 = p[t, 2 H]
eq5 = p[t, 0]
eq6 = p[0, x]
eq7 = u[0, x]

tf = 1000;
s = NDSolve[{eq1 == NeumannValue[S0, x == 2 H], eq2 == 0, eq3 == 0, 
eq4 == 0, eq5 == 0, eq6 == 0, eq7 == 0}, {u[t, x], p[t, x]}, {t, 0,
tf}, {x, 0, 2 H}, 
Method -> {"PDEDiscretization" -> {"MethodOfLines", 
"TemporalVariable" -> t}}]

Plot3D[Evaluate[p[t, x] /. s], {t, 0, tf}, {x, 0, 2 H} , 
PlotRange -> All]
Plot3D[Evaluate[u[t, x] /. s], {t, 0, tf}, {x, 0, 2 H} , 
PlotRange -> All]
POSTED BY: Mostafa Mobasher
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