I am trying to solve the PDE for longitudinal vibrations in a bar (as shown for example at Youtube Longitudinal Bar Vibration). My challenge is the application I am trying to solve has these boundary conditions:
Left(x=0) end free; Right end(x=len) forced sinusoidal displacement.
ClearAll[len, ρ, Y, c, x, t, tmax, z]
len = 1; (*meter *)
tmax = 5;
ρ = 7860; (*kg/m^3 for steel*)
Y = 199*^9; (*Newtons/m^2*)
c = Sqrt[Y/ρ];
nsol11 = NDSolve[Derivative[0, 2][z][x, t] == NeumannValue[0, x == 0] +
(ρ*Derivative[2, 0][z][x, t])/Y,
z[len, t] == 0.005*Sin[1*t]}, z[x, t], {x, 0, len}, {t, 0, tmax},
Method -> {"PDEDiscretization" -> {"FiniteElement"}}]
fnnsol11[x_, t_] = nsol11[[1, 1, 2]];
Plot3D[fnnsol11[x, t], {x, 0, len}, {t, 0, tmax},
PlotLabels -> Automatic, AxesLabel -> Automatic, PlotRange -> All,
PlotLabel -> "Displacement vs. Time",
ColorFunction -> "TemperatureMap", PerformanceGoal -> "Quality",
PlotPoints -> 150]
The problem I have is it solves, but the "free" left end is not oscillating like the forced displacement right end. With the input values used (a 1m long steel bar) the input and output should very closely match in phase and magnitude. My understanding is applying the free boundary condition as a NeumannValue[] was the proper way to do it as learned from this question.NDsolve related problem
In summary, my question is how can I properly apply a free and forced displacement boundary condition to the PDE for a longitudinal vibration in a rod?
Thank You
NDSolve[Derivative[0, 2][z][x, t] == c^2 Derivative[2, 0][z][x, t]
. As written in the question,c^2
is replaced byc^-2
. By the way, your usage of theNewton
condition is fine. $\endgroup$NDSolve
FEM options does not do what you think it does. Have a look at the FiniteElementOptions tutorial to learn more. $\endgroup$