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

Homework Help: SCILAB - Thomson and Rutherford model

  1. Sep 10, 2010 #1
    1. The problem statement, all variables and given/known data

    I have a problem with differential scattering cross section. It says: "division by zero". My full work is in attachment.

    q = 2; - charge of particle
    Q = 79; - charge of nucleus
    m = 4; - mass of particle
    M = 197; - mass of nucleus
    R = 2.72; - nucleus radius

    N = 30; - number of particles
    bmin = 1; - impact parameter
    bmax = 3;
    vp = 50; - incident speed

    x_rutherford - coordinates
    y_rutherford

    fi - scattering angle (rutherford)
    fith - scattering angle (thomson)

    dbdfi - db/dfi (rutherford)
    dbdfith - db/dfith (thomson)

    rpc - differential scattering cross section (rutherford)
    rpcth - differential scattering cross section (thomson)

    2. Relevant equations

    if ((x_rutherford($)-x_rutherford($-1)) >= 0 ) do
    fi(j) = 180*atan(abs(y_rutherford($)-y_rutherford($-1))/abs(x_rutherford($)-x_rutherford($-1)))/%pi;
    else
    fi(j) = 180 - 180*atan(abs(y_rutherford($)-y_rutherford($-1))/abs(x_rutherford($)-x_rutherford($-1)))/%pi;
    end

    if ((x_thomson($)-x_thomson($-1)) >= 0 ) do
    fith(j) = 180*atan(abs(y_thomson($)-y_thomson($-1))/abs(x_thomson($)-x_thomson($-1)))/%pi;
    else
    fith(j) = 180 - 180*atan(abs(y_thomson($)-y_thomson($-1))/abs(x_thomson($)-x_thomson($-1)))/%pi;
    end


    3. The attempt at a solution

    dbbfi=zeros(b);
    for i = 3 : length(b)-2 do
    dbdfi(i) = (b(i-2) - 8*b(i-1) + 8*b(i+1) - b(i+2))/(3*( abs(fi(i-2)-fi(i-1))+abs(fi(i-1)-fi(i))+abs(fi(i)-fi(i+1))+abs(fi(i+1)-fi(i+2)) ));
    end
    dbdfi(i+1)=0;
    dbdfi(i+2)=0;

    dbbfith=zeros(b);
    for i = 3 : length(b)-2 do
    dbdfith(i) = (b(i-2) - 8*b(i-1) + 8*b(i+1) - b(i+2))/(3*( abs(fith(i-2)-fith(i-1))+abs(fith(i-1)-fith(i))+abs(fith(i)-fith(i+1))+abs(fith(i+1)-fith(i+2)) ));
    end
    dbdfith(i+1)=0;
    dbdfith(i+2)=0;

    rpc = 2*%pi*b'.*dbdfi;
    rpcth = 2*%pi*b'.*dbdfith;
     

    Attached Files:

  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted