Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

1D chain with loads of disorder

  1. Nov 28, 2008 #1
    Hi all,

    I'm wanting to write a small program simulating a 1D lattice with some motion. I have the equation:

    [tex]m_{n}\frac{d^{2}u_{n}}{dt^{2}}= k_{n,n+1}(u_{n+1}-u_{n})+k_{n-1,n}(u_{n-1}-u_{n})[/tex]

    Then using a simple trial plane wave ([tex]u_{n}=Ae^{-i\omega t}[/tex]). It boils down to:

    [tex]- \omega^{2} m_{n}u_{n}= k_{n,n+1}(u_{n+1}-u_{n})+k_{n-1,n}(u_{n-1}-u_{n})[/tex]

    This is the point that I'm really stuck at, I don't really know how to initialize the problem, without loosing generality. Looking at most textbooks like Hook & Hall, they only solve problems of this type with some kind of repeated lattice where either all masses are the same or at most they alternate between two types of mass. Although in most cases they find the dispersion relation (which I'm not actually interested in).

    I want the simulation as general as possible as I want to introduce random mass/spring constant disorder and see how this effects the amplitudes of the masses along the chain. Could someone give me some hints on how to start, as obviously nothing will happen if the masses are at equilibrium at the start of the simulation.

    Sorry if this appears very vague,
  2. jcsd
  3. Dec 6, 2008 #2
    Instead of using a plane wave ansatz, why not "integrate" the equations of motion directly? I've written some code in C for precisely this kind of problem. I'll give it to you if you're interested. It's base on the ODE solvers from the GSL:


    You only have to provide (i) the right hand side of the first-order system -- but I could give you a skeleton to start from -- and (ii) a bit of code to set the parameters and initial conditions. I assume you're only interested in a small number of particles, say, at most 10^3. My code provides for two kinds of output: the trajectories of all particles versus time, or a sequence of "frames" that can be used to create a film with gnuplot. All in a couple hundred lines of quick-and-dirty (but documented!) C.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?