Modified from Jacopo Bertolotti:
(*Find the dispersion relation for the Telegrapher’s equation*)
f = E^(I (k x – \[Omega] t));
FullSimplify[D[f, {t, 2}] – v^2 D[f, {x, 2}] + b D[f, t] + c f]
Solve[c + k^2 v^2 + (-I b – \[Omega]) \[Omega] == 0, \[Omega]]
(*Generate the animation*)
R0 = 1; L0 = 1; G0 = 0.1; C0 = 1;
\[Sigma] = 1; k0 = 5; b = R0/L0 + G0/C0; c = R0*G0/(L0*C0); v =
1/Sqrt[ L0* C0];
g = Sum[(E^(I k x) E^(-(k –
k0)^2/(2 \[Sigma]^2)) E^(-I \[Omega] t)) /. {\[Omega] ->
k v}, {k, 0, 15, 0.1}];
g2 = Sum[(E^(I k x) E^(-(k –
k0)^2/(2 \[Sigma]^2)) E^(-I \[Omega] t)) /. {\[Omega] ->
1/2 (-I b + Abs[Sqrt[-b^2 + 4 c + 4 k^2 v^2]])}, {k, 0, 15, 0.1}];
p1 = Table[
Show[Plot[Re[g], {x, -5, 50}, PlotStyle -> {Orange, Thick},
PlotRange -> {-25, 25}],
Plot[Re[g2], {x, -5, 50}, PlotStyle -> {Black, Thick},
PlotRange -> {-25, 25}], Axes -> False,
PlotLegends -> {“Wave eq.”, “Telegrapher’s eq.”}], {t, 0, 50, 0.5}];
ListAnimate[p1, 10]
*Still need to find proper RLGC values and length of simulation in proper units to be a good model
From Mathematica Documentation:
a = 0.7; b = 0.6; c = 1.1;
f[x_] = D1, x];
vInit[x_] = -c*D[f[x], x] – (a + b) f[x]/2;
Plot[f[x], {x, -1, 1}, PlotRange -> All]
Plot[vInit[x], {x, -1, 1}, PlotRange -> All]
uif = NDSolveValue[{D[u[t, x], {t, 2}] + (a + b) D[u[t, x], {t, 1}] –
c^2 D[u[t, x], {x, 2}] + a b u[t, x] == 0, u[0, x] == f[x],
Derivative[1, 0][u][0, x] == vInit[x],
DirichletCondition[u[t, x] == f[0], x == 0],
DirichletCondition[u[t, x] == f[1], x == 1]},
u, {t, 0, 2}, {x, 0, 1}];
framesTEQ =
Table[Plot[uif[t, x], {x, 0, 1}, PlotRange -> {-1, 1.3}], {t, 0, 2,
0.01}];
Manipulate[framesTEQ[[i]], {{i, 3, “time”}, 1, Length[framesTEQ], 1},
SaveDefinitions -> True]
ListAnimate[framesTEQ, AnimationRate -> 25, SaveDefinitions -> True]
- 125 Erf[(x – 0.5)/0.125 ↩