In order to gain a better understanding of the Drude model I\'m going guide you
ID: 2085486 • Letter: I
Question
In order to gain a better understanding of the Drude model I'm going guide you through a numerical experiment. For this problem you are going to need a computer and a software of your choice (Matlab, Mathematica, Octave, Maple, Excel, C, or whatever you like). Whatever software you choose you need to be able to do the following elementary operations: Generate a list of random numbers Add lists of numbers element by element Perform comparisons (i.e. "If" commands) Perform iterations (i.e. "For", "While", etc. commands) Plot your results Let us try to monitor the behavior of a particle of mass m = 1 moving under the action of a constant force F = 1 and undergoing collisions with an average collision time r = 1. We are going to monitor the velocity of the particle over an extended interval of time T > r. We are going to update the particle's velocity at intervals of dr
Explanation / Answer
Matlab code:
clear all;
clc;
t(1)=0;
v(1)=0;
tau=1;
tf=10;
d=0.01;
n=tf/d;
X=rand(1);
P=d/tau;
for l=1:100
for i=2:(n)
X=rand(1);
if(X<P)
v(i)=v(i-1)*d+1*d;
else
v(i)=d;
end
a(l)=v(i)
end
b=a(l)
end
axis([0 10 0 0.011]);
plot(v,'g')
xlabel('time');
ylabel('velocity');
legend('Velocity');
grid;
The result plot is as below doc:
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.