Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- eq = D[f[t, x], {t, 2}] - D[f[t, x], {x, 2}] - D[f[t, x], {t, 2},{x, 2}]==0
- shape = Cos[32*Pi*(-0.5 + x)]/E^(120.*(x-0.5)^2);
- ics ={f[0, x] == shape, Derivative[1,0][f][0,x]==0};
- Plot[shape,{x,0,1},Frame->True, PlotLabel->{"x","f[0,x]","initial shape"]}]
- sol=NDSolveValue[{eq, ics} // Flatten, f, {t, 0, 0.25}, {x} [Element]region,
- Method -> {"FiniteElement", "MeshOptions" -> {"MaxCellMeasure" -> 0.005}}];
- eq2 = D[f[t, x], {t, 2}] - D[f[t, x], {x, 2}]==0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement