SHARE
TWEET

Untitled

a guest Jul 20th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (*Initial Parameters*)Needs["NDSolve`FEM`"];
  2. Mobi = 1.0; lame = 0.01; noise = 0.02; conu0 = 0.63;
  3. xmax = 1.0;
  4. ymax = 1.0;
  5. tmax = 1.0;
  6.  
  7. [CapitalOmega] = Rectangle[{0, 0}, {a, b}] /. {a -> 1, b -> 1};
  8. RegionPlot[[CapitalOmega], AspectRatio -> Automatic]
  9. mesh = ToElementMesh[[CapitalOmega], "MaxCellMeasure" -> 1/1000,
  10.    "MeshElementType" -> QuadElement];
  11. mesh["Wireframe"]
  12. n = Length[mesh["Coordinates"]]
  13. u0 = ElementMeshInterpolation[{mesh},
  14.    conu0 + noise*(0.5 - RandomReal[{0, 1}, n])];
  15. Plot3D[u0[x, y], {x, y} [Element] mesh]
  16.  
  17. op1 = !(
  18. *SubscriptBox[([PartialD]), (t)](u[t, x, y])) - !(
  19. *SubsuperscriptBox[([Del]), ({x, y}), (2)](v[t, x, y]))*
  20.    Mobi
  21.  
  22. op2 = v[t, x, y] -
  23.   200 *u[t, x, y] (1 - 3 *u[t, x, y] + 2 *u[t, x, y]^2) + lame*!(
  24. *SubsuperscriptBox[([Del]), ({x, y}), (2)](u[t, x, y]))
  25.  
  26. {unn, vnn} =
  27.   NDSolve[{op1 == 0, op2 == 0, u[0, x, y] == u0[x, y],
  28.     v[0, x, y] == 0}, {u, v}, {t, 0, tmax}, {x, y} [Element] mesh];
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top