Hyperbolic Second Order PDE - boundary condition with sinusoid

This is similar to countless PDE equations, but the error seems specific to my case:

I'm trying to solve a hyperbolic PDE, where $$U=(x,t)$$ and $$V=(x,t)$$:

The system represents a piezoelectric beam in quasi-static assumptions: $$\rho\frac{\partial^2 U}{\partial t^2}-\alpha \frac{\partial^2U}{\partial x^2} U=0$$ with BCs: $$U(0,t)=0; \quad \alpha\frac{\partial U}{\partial x}(L,t)=\frac{\gamma V(t)}{h}$$ and ICs: $$U(x,0)=0\quad\frac{\partial U}{\partial x}(x,0)=0$$

The error I get seems related to the boundary condition since it is represents a voltage applied:

NDSolveValue::deqn: Equation or list of equations expected instead of 0 in the first argument {0,0,-(Sin[20 \[Pi] t]/1000000000),0,0}.


It seems like a straight forward solution, and my code:

ClearAll[U, V]
alpha = 12.1*10^10; gamma = 10*10^-12; rho = 7850; freq = 10; omega =
2 Pi freq; Volt = 100;
L = 3; T = 30; h = 1;
System = {rho D[U[x, t], t, t] - alpha D[U[x, t], x, x] = 0,
U[x, t] = 0 /. x -> 0,
alpha1 D[U[x, t], x] = -gamma/h Volt Sin[omega t] /. x -> L,
U[x, t] = 0 /. t -> 0,
D[U[x, t], t] = 0 /. t -> 0
};
{U} = NDSolveValue[System, {U}, {x, 0, L}, {t, 0, T}]

Plot3D[{U[x, t], V[x, t]}, {x, 0, L}, {t, 0, T}]
$$$$

• btw, your latex is wrong for the initial conditions, it is partial w.r.t. time not x Commented Feb 4, 2020 at 0:57

You had many syntax error. The following works

ClearAll[U, V, t, x]
alpha = 12.1*10^10;
gamma = 10*10^-12;
rho = 7850;
freq = 10;
omega = 2 Pi freq;
Volt = 100;
L = 3;
T = 30;
h = 1;
pde = rho D[U[x, t], t, t] - alpha D[U[x, t], x, x] == 0
bc = {U[0, t] == 0, alpha Derivative[1, 0][U][L, t] == -gamma/h Volt Sin[omega t]}
ic = {U[x, 0] == 0, Derivative[0, 1][U][x, 0] == 0 }


Now

sol = NDSolveValue[{pde, bc, ic}, U, {x, 0, L}, {t, 0, T}]


Notice NDSolve gives some warnings. So you might need to add some options to NDSolve as the warning says. See help for more information

  NDSolveValue::eerr: Warning: scaled local spatial error estimate of
310.83221931718424 at t = 0.4330212489387017 in the direction of
independent variable x is much greater than the prescribed error
tolerance. Grid spacing with 25 points may be too large to achieve the
desired accuracy or precision. A singularity may have formed or a
smaller grid spacing can be specified using the MaxStepSize
or MinPoints method options.
`

So the solution might not be accurate