# How do I add a velocity boundary condition with specific time period

I have a wave equation for displacement and velocity, I want to add this boundary condition $$v(x=0,\,t>0)=1$$

My mathematica code is

sol =
NDSolve[
{1/1000 D[u[x, t], {t, 2}] == D[u[x, t], {x, 2}],
D[u[x, t], t] == v[x, t],
u[x, 0] == 0,
v[x, 0] == 0, v[0, t > 0] == 1, v[L, t] == 0},
{u[x, t], v[x, t]}, {x, 0, L}, {t, 0, 1}]


L is a constant.

• What is the value of L? Would it be acceptable to just reduce your condition to v[0, t] == 1? Commented Jan 20, 2021 at 22:11
• Let try v[0, t] == If[t < 10^-4, 0, 1], but system looks like overdetermined. You don't need v as separate variable if you use second order equation for 'u'. Commented Jan 20, 2021 at 22:17
• Can you please tell me how to use NDSolve if v is not a separate variable? And how to plot v if I don't make v as separate variable? Commented Jan 20, 2021 at 22:57

Do I understand this correctly: A string at rest between 0 and L with zero displacement and zero velocity at t==0 and where you move the point at x==0 with constant velocity of 1.
L = 1;