Advertisement
Guest User

Untitled

a guest
Apr 29th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. Boundary values may only be specified for one independent variable. Initial values may only be specified at one value of the other independent variable. >>
  2.  
  3. Needs["NDSolve`FEM`"]
  4. EE = 10000;
  5. [Alpha] = 1;
  6. [Beta] = 2500000;
  7. [Kappa] = 1/10000;
  8. H = 5;
  9. S0 = 1;
  10.  
  11. DD[z_, t_] = 0;
  12. [Epsilon][z_, t_] = Derivative[1, 0][U][z, t]
  13. SigS[z_, t_] = EE [Epsilon][z, t];
  14. SigT[z_, t_] = SigS[z, t] + [Alpha] P[z, t];
  15.  
  16.  
  17. eq1 = Derivative[1, 0][SigT][z, t]
  18. eq2 = (1/[Beta]) Derivative[0, 1][P][z,
  19. t] - [Alpha] Derivative[1, 1][U][z,
  20. t] - [Kappa] Derivative[2, 0][P][z, t]
  21. DE[z_, t_] = Derivative[1, 0][[Epsilon]][z, t];
  22.  
  23. eq3 = DirichletCondition[U[z, t] == 0, {z == 0}]
  24. eq4 = DirichletCondition[P[z, t] == 0, {z == 0}]
  25. eq5 = DirichletCondition[P[z, t] == 0, {z == 2 H}]
  26. eq6 = DirichletCondition[P[z, t] == S0, {z < 2 H, t == 0}]
  27. eq7 = [Epsilon][z, t] == NeumannValue[1/EE, z == 2 H]
  28. BC = {eq3, eq4, eq5, eq6}
  29. tF = 100;
  30. [CapitalOmega] = ImplicitRegion[True, {{z, 0, 10}, {t, 0, tF}}]
  31. mesh = DiscretizeRegion[[CapitalOmega], MaxCellMeasure -> 0.01];
  32.  
  33. NDSolve[{eq1 == -NeumannValue[S0, z == 2 H], eq2 == 0, eq3, eq4, eq5,
  34. eq6}, {U, P}, {z, 0, 10}, {t, 0, tF}, AccuracyGoal -> [Infinity],
  35. Method -> {"MethodOfLines",
  36. "SpatialDiscretization" -> {"TensorProductGrid",
  37. "MinStepSize" -> tF/10, "DifferenceOrder" -> "Pseudospectral"}}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement