My question
Consider the following circuit. A lossless long transmission lines ($R' = G' = 0 \text{ } \Omega$), of length $\ell$ and inductance per unit length $L'$ and capacitance per unit length $C'$, with one of its ports short-circuited by ideal wires. In the other port of the transmission line, we connect an ideal independent sinusoidal voltage source of voltage $v_\text{s}(t) = V_\text{m} \cos{(\omega t)}$ in series with an ideal normally-open switch. The switch is closed at $t = 0 \text{ s}$.
Before that instant, the circuit has been for a long time in the configuration shown, meaning it is operating in steady-state, so the inductors and capacitors act as short-circuits and open-circuits, respectively; all voltages and currents are zero.
The circuit is shown in the following figure.
Figure 1. Image source: own.
Given the above assumptions, I'd like to determine the current $i(z,t)$ flowing through the transmission line as a function of space $z$ and time $t$, the voltage $v(z,t)$ across the transmission line as a function of space and time. I want to solve them analytically (if possible) or numerically. For simplicity, let's assume that $L' = 1 \text{ H}$, $C' = 1 \text{ F}$, $\ell = 5 \text{ m}$, $V_\text{m} = 1 \text{ V}$, $\omega = 1 \text{ rad/s}$, and the maximum time we're interested on is $t_\text{max} = 20 \text{ s}$.
My attempt
As we know, the uncoupled telegrapher's equations for a lossless long transmission line in the time domain (which are pretty much the one-dimensional wave equation, a hyperbolic PDE) are:
$\left\{ \begin{align} \dfrac{\partial^2 v}{\partial z^2} &= L' C' \dfrac{\partial^2 v}{\partial t^2} \\ \dfrac{\partial^2 i}{\partial z^2} &= L' C' \dfrac{\partial^2 i}{\partial t^2} \end{align} \right. \quad , \, 0 \text{ m} \le z \le \ell, \, t \ge 0 \text{ s} \tag 1$
As for the boundary conditions:
- At the sending-end (where the voltage source is) of the transmission:
$v(0, t) = V_\text{m} \cos{(\omega t)} \tag 2$
- At the receiving-end (short-circuited port) of the transmission:
$v(\ell, t) = 0 \text{ V} \tag 3$
- Before the switch is closed, the voltage and current at all locations is zero:
$v(z, 0 \text{ s}) = 0 \text{ V} \tag 4$
$i(z, 0 \text{ s}) = 0 \text{ V} \tag 5$
Is the above correct?
I tried to solve them in Mathematica with NDSolve using the following code:
LL = 1;
CC = 1;
L = 5;
tmax = 20;
Clear[v, i, z, t];
eqs = {
D[v[z, t], {z, 2}] == LL*CC*D[v[z, t], {t, 2}],
D[i[z, t], {z, 2}] == LL*CC*D[i[z, t], {t, 2}]
};
bcs = {
v[0, t] == Cos[t]*UnitStep[t],
v[L, t] == 0,
v[z, 0] == 0,
i[z, 0] == 0
};
sol = NDSolve[Join[eqs, bcs], {v, i}, {z, 0, L}, {t, 0, tmax}]
But Mathematica can't solve them:
Figure 2. Image source: own.
Is it because there are too many or too few boundary conditions, or because there are too few equations, or because Mathematica can't simply solve them (which doesn't seem likely since it can solve much more complex equations), or because of something else?