My system consist of a cylinder with axis Z that can contract and dilate along this axis. It obeys microscopically Hooke's law of elasticity: $${\cal{L}}=\frac12\rho\dot{u_z}^2-\frac12C_{zzzz}(\partial_z u_z)^2$$ with $\cal{L}$ the Lagrangian density, $u_z(z,t)$ the local displacement to the rest position, $C_{zzzz}$ the unique component of the stiffness tensor (equal to the Young Modulus $Y$) relevant here considering the unique degree of freedom of my system, and $\rho$ of course for density. Supposing that the stretch is uniform in my cylinder $u_z(z,t)$ obeys the following equation: $$u_z(z,t)=\frac{z}{l}\delta z(t)$$ with $l$ the rest length of the cylinder, $\delta z$ the total stretch at its top, and the base being being static by exterior constraint and defined as $z=0$. My goal is to rederive from there the global Hooke law, by integrating the Lagrangian density over x,y,z; But from there I arrive at: $$L=\frac12m\delta\dot{z}^2-\frac12(\frac{3C_{zzzz} S}{l})\delta z^2$$ My problem is that I get a wrong value for the global stiffness of my bar: $K=3\frac{YS}{l}$, the factor 3 shouldn't be there. Is it purely geometrical or is there a misunderstanding in my reasoning? It may seem dull at first to derive this result, but I'll be way more confident in seeing the right result emerging from this calculus.
Plus, if I had added a dissipative term to my first Lagrangian density, would it be possible to derive a damping term for my global oscillations. Should I need to work it out from the wave equations? (because dissipative terms and Lagrangian description don't seem quite compatible for me).