I am trying to solve the wave PDE with NDSolve. Below is the equation:
NDSolve[{D[u[x, t], {t, 2}] == 2*D[u[x, t], {x, 2}], u[0, t] == 0,
u[10, t] == 0, u[x, 0] == 5, D[u[x, 0] == 0]},
u[x, t], {x, 0, 10}, {t, 0, 5}]
When I try to get the solution I get the following error:
NDSolve::ibcinc: Warning: boundary and initial conditions are inconsistent.
NDSolve::ndinpd: The initial conditions did not evaluate to an array of numbers of depth 1 on the spatial grid. Initial conditions for partial differential equations should be specified as scalar functions of the spatial variables.
My Boundary conditions are:
- when x=0 (at t=0) is zero
- when x=10 (at t=0) is also zero
My Initial conditions are:
- u when $t=0$ g[x]=5
- derivative of u when t=0 is zero
By this initial condition it means the string is stretched in vertical direction by 5 units at its center, initial velocity being zero and then let go.
I want to check the wave pattern of the string with these conditions.
Comments
Post a Comment