I have a PDE describing a bending beam which I want to solve numerically.
a=1;
b=0.1;
Approx[x_, ϵ_] := Approx[x, ϵ] = ϵ/(Pi*(x^2 + ϵ^2))
Initial = {p[x, 0] == 0.5, q[x, 0] == 0.5};
CisTrans =
{Derivative[0, 1][p][x, t] == 10*(1 - p[x, t]) - p[x, t],
Derivative[0, 1][q][x, t] == -q[x, t]};
Deflection =
{Derivative[0, 2][w][x, t] + a*Derivative[0, 1][w][x, t] +
Derivative[2, 0][u][x, t] == -b*(p[x, t] - q[x, t]) *
Approx[x - 1, 10^(-1000)]};
s =
NDSolveValue[
{Initial, CisTrans, Deflection, Derivative[2, 0][w][x, t] == u[x, t],
u[1, t] == 0, u[x, 0] == 1, w[x, 0] == 0, w[0, t] == 0,
WhenEvent[t == 0.5, Print[t]]},
w, {x, 0, 1}, {t, 0, 1}]
This NDSolveValue
solves the PDE, but ignores my WhenEvent
, so 0.5 is not printed, while in other PDE's the WhenEvent
is not ignored. Does anyone know how to solve this?
t,0,1/2
) . This tells me the default solution method is a poor choice, although I didn't have any luck doing better. $\endgroup$Approx
is supposed to do. It is essentially zero everywhere and then blows up exactly on the x=1 boundary. (off hand I think it never gets evaluated exactly at the boundary ) $\endgroup$WhenEvent
to work, and then it only applies to the time-stepping. (While you may call your variablet
, it is being treated as one of the spatial variables inNDSolve
above.) $\endgroup$Approx
seems to be an approximate Dirac delta. $\endgroup$NDSolve
will not integrate it properly however. $\endgroup$