Message Boards Message Boards

Get the solution with NDSolve?

Posted 8 years ago
sol = NDSolve[{K1*D[w[x, t], {x, 4}] - K2*x*D[w[x, t], {x, 4}] - 
         2*K2*D[w[x, t], {x, 3}] + K3*D[w[x, t], {t, 2}] - 
         K4*x*D[w[x, t], {t, 2}] == 0,

   w[0, t] == 0,
   Derivative[1, 0][w][0, t] == 0,
   Derivative[2, 0][w][1, t] == 0,
   Derivative[3, 0][w][1, t] == 0,

   w[0, x] == W,
   Derivative[1, 0][w][0, x] == 0},
  w, {x, 0, 1}, {t, 0, 1}, PrecisionGoal -> 2]
Plot3D[w[x, t], {x, 0, 1}, {t, 0, 1}]

Can anyone help me with correction in these codes? Here k1, k2, k3, k4 are constant.

POSTED BY: pushpa pandey
5 Replies
Posted 8 years ago

this is fourth order non linear pde ....i guess i wrote the codes incorrectly. please assist.

Attachments:
POSTED BY: pushpa pandey

Assuming constants:

  K1 = 1;
  K2 = 1;
  K3 = 2/10;
  K4 = 1/10;
  V = Sin[x];
  W = x;

  eq = K1*D[w[x, t], {x, 4}] - K2*x*D[w[x, t], {x, 4}] - 
     2*K2*D[w[x, t], {x, 3}] + K3*D[w[x, t], {t, 2}] - 
     K4*x*D[w[x, t], {t, 2}] == 0

 sol = w[x, t] /. 
 NDSolve[{eq,
 w[0, t] == 0,
 Derivative[1, 0][w][0, t] == 0, 
 Derivative[2, 0][w][0, t] == 0, 
 Derivative[3, 0][w][0, t] == 0, 
 w[x, 0] == V, 
 Derivative[0, 1][w][x, 0] == W}, 
 w, {x, 0, 1}, {t, 0, 1},
 MaxSteps -> Infinity, PrecisionGoal -> 1,
 AccuracyGoal -> 1, 
 Method -> {"MethodOfLines", 
 "SpatialDiscretization" -> {"TensorProductGrid", 
 "MinPoints" -> 32, "MaxPoints" -> 32, "DifferenceOrder" -> 2},
 Method -> {"Adams", "MaxDifferenceOrder" -> 1}}] // Quiet

 Plot3D[sol, {x, 0, 1}, {t, 0, 1}, AxesLabel -> Automatic]

enter image description here

POSTED BY: Mariusz Iwaniuk
Posted 8 years ago

can we keep k1, k2, k3,k4 as it is without assigning any values to them?? and V is also some constant here and not the function of x.

POSTED BY: pushpa pandey

This is a non-linear 4 order pde equation and symbolic solution maybe may not be possible.

The best and fastest way is to calculate solution with NDSolve numerics.

POSTED BY: Mariusz Iwaniuk

With corrected code:

 K1 = 1;
 K2 = 1;
 K3 = 2/10;
 K4 = 1/10;
 W = Exp[-x^2];

 eq = K1*D[w[x, t], {x, 4}] - K2*x*D[w[x, t], {x, 4}] - 2*K2*D[w[x, t], {x, 3}] + K3*D[w[x, t], {t, 2}] - K4*x*D[w[x, t], {t, 2}] == 0
 sol = w[x, t] /. NDSolve[{eq,
 w[0, t] == 0,
 Derivative[1, 0][w][0, t] == 0, 
 Derivative[2, 0][w][1, t] == 0,
 Derivative[3, 0][w][1, t] == 0, 
 w[x, 0] == W,
 Derivative[0, 1][w][x, 0] == 0}, 
 w, {x, 0, 1}, {t, 0, 1},
 MaxSteps -> Infinity, PrecisionGoal -> 1,
 AccuracyGoal -> 1, 
 Method -> {"MethodOfLines", 
 "SpatialDiscretization" -> {"TensorProductGrid", 
 "MinPoints" -> 32, "MaxPoints" -> 32, "DifferenceOrder" -> 2},
 Method -> {"Adams", "MaxDifferenceOrder" -> 1}}] // Quiet

 Plot3D[sol, {x, 0, 1}, {t, 0, 1}, AxesLabel -> Automatic]

enter image description here

POSTED BY: Mariusz Iwaniuk
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