Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (*Initial Parameters*)Needs["NDSolve`FEM`"];
- Mobi = 1.0; lame = 0.01; noise = 0.02; conu0 = 0.63;
- xmax = 1.0;
- ymax = 1.0;
- tmax = 1.0;
- [CapitalOmega] = Rectangle[{0, 0}, {a, b}] /. {a -> 1, b -> 1};
- RegionPlot[[CapitalOmega], AspectRatio -> Automatic]
- mesh = ToElementMesh[[CapitalOmega], "MaxCellMeasure" -> 1/1000,
- "MeshElementType" -> QuadElement];
- mesh["Wireframe"]
- n = Length[mesh["Coordinates"]]
- u0 = ElementMeshInterpolation[{mesh},
- conu0 + noise*(0.5 - RandomReal[{0, 1}, n])];
- Plot3D[u0[x, y], {x, y} [Element] mesh]
- op1 = !(
- *SubscriptBox[([PartialD]), (t)](u[t, x, y])) - !(
- *SubsuperscriptBox[([Del]), ({x, y}), (2)](v[t, x, y]))*
- Mobi
- op2 = v[t, x, y] -
- 200 *u[t, x, y] (1 - 3 *u[t, x, y] + 2 *u[t, x, y]^2) + lame*!(
- *SubsuperscriptBox[([Del]), ({x, y}), (2)](u[t, x, y]))
- {unn, vnn} =
- NDSolve[{op1 == 0, op2 == 0, u[0, x, y] == u0[x, y],
- v[0, x, y] == 0}, {u, v}, {t, 0, tmax}, {x, y} [Element] mesh];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement