Skip to main content
deleted 1 character in body
Source Link
Jim Fischer
  • 3.1k
  • 12
  • 15
%% Housekeeping
clc
clear

%% Givens
d = 2.05e-3;            % wire diameter, m
r = d/2;                % wire radius, m
A = pi*(r^2);           % wire cross-sectional area, m^2

q = 1.602e-19;          % electron charage, C
                        % (NB: This is 'e' in the equation above).

n = 8.46e28;            % estimate of the number of charge-conducting 
                        % electrons per cubic meter in solid copper
                        % (NB: This is 'rho_e' in the equation above).

k = 0.1;                % Sinusoidal current amplitude, peak
f = 60;                 % Sinusoidal current frequency, Hz
w = 2 * pi * f;         % Sinusoidal current frequency, rad/sec

%% Equations
% Current in the wire, C/s
I = @(t)  k * sin(w*t);

% Current density in the wire at time t, C s^-1 m^-2
% J = I/A = k*sin(w*t)/A = k/A * sin(w*t)
% Let k2 = k/A
k2 = k/A;
J = @(t)  k2 * sin(w*t);

% Average electron drift velocity at time t, m/s
% vd = J/n/q = I/n/q/A = k*sin(w*t)/n/q/A
% Let k3 = k/n/q/A
k3 = k/n/q/A;
vd = @(t)  k3 * sin(w*t);

% Average electron displacement at time t, m
% displacement = k/n/q/A/w * (1 - cos(w*t))
% Let k4 = k/n/q/A/w
k4 = k/n/q/A/w;
displacement = @(t)  k4 * (1 - cos(w*t));

%% Solutions
% For sin(w*t), max drift velocity occurs at w*t == pi/2 -> t = pi/2/w
vd_max = vd( pi/2/w )
    % 2.2355e-06 -> ~2.2 um/s

% Maximum average displacement of an electron during 1/2 cycle of 60 Hz 
% can be calculated as the area under the averagedrift velocity curve during 
% the time interval (0 <= t <= pi/w) sec
% NB: For sin(w*t), 1/2 cycle occurs at w*t == pi -> t = pi/w
displacement_max = integral(vd, 0, pi/w )
    % 1.1860e-08 -> ~12 nm


%% Plot the velocity and displacement curves vs time
clf('reset')

% NB: For sin(w*t), 1/2 cycle occurs at w*t == pi -> t = pi/w
t_ = linspace( 0, pi/w );

% drift velocity in micrometers/sec at time t
vd_t = vd(t_) * 1e6;
yyaxis left
plot(t_, vd_t)

% displacement in nanometers at time t
displacement_t = displacement(t_) * 1e9;
yyaxis right
plot(t_, displacement_t)

yyaxis left
title('Velocity and Displacement vs time')
xlabel('Time (sec)')
ylabel('Velocity (um/s)')
yyaxis right
ylabel('Displacement (nm)')
grid on
%% Housekeeping
clc
clear

%% Givens
d = 2.05e-3;            % wire diameter, m
r = d/2;                % wire radius, m
A = pi*(r^2);           % wire cross-sectional area, m^2

q = 1.602e-19;          % electron charage, C
                        % (NB: This is 'e' in the equation above).

n = 8.46e28;            % estimate of the number of charge-conducting 
                        % electrons per cubic meter in solid copper
                        % (NB: This is 'rho_e' in the equation above).

k = 0.1;                % Sinusoidal current amplitude, peak
f = 60;                 % Sinusoidal current frequency, Hz
w = 2 * pi * f;         % Sinusoidal current frequency, rad/sec

%% Equations
% Current in the wire, C/s
I = @(t)  k * sin(w*t);

% Current density in the wire at time t, C s^-1 m^-2
% J = I/A = k*sin(w*t)/A = k/A * sin(w*t)
% Let k2 = k/A
k2 = k/A;
J = @(t)  k2 * sin(w*t);

% Average electron drift velocity at time t, m/s
% vd = J/n/q = I/n/q/A = k*sin(w*t)/n/q/A
% Let k3 = k/n/q/A
k3 = k/n/q/A;
vd = @(t)  k3 * sin(w*t)

% Average electron displacement at time t, m
% displacement = k/n/q/A/w * (1 - cos(w*t))
% Let k4 = k/n/q/A/w
k4 = k/n/q/A/w;
displacement = @(t)  k4 * (1 - cos(w*t));

%% Solutions
% For sin(w*t), max drift velocity occurs at w*t == pi/2 -> t = pi/2/w
vd_max = vd( pi/2/w )
    % 2.2355e-06 -> ~2.2 um/s

% Maximum average displacement of an electron during 1/2 cycle of 60 Hz 
% can be calculated as the area under the average velocity curve during 
% the time interval (0 <= t <= pi/w) sec
% NB: For sin(w*t), 1/2 cycle occurs at w*t == pi -> t = pi/w
displacement_max = integral(vd, 0, pi/w )
    % 1.1860e-08 -> ~12 nm


%% Plot the velocity and displacement curves vs time
clf('reset')

% NB: For sin(w*t), 1/2 cycle occurs at w*t == pi -> t = pi/w
t_ = linspace( 0, pi/w );

% drift velocity in micrometers/sec at time t
vd_t = vd(t_) * 1e6;
yyaxis left
plot(t_, vd_t)

% displacement in nanometers at time t
displacement_t = displacement(t_) * 1e9;
yyaxis right
plot(t_, displacement_t)

yyaxis left
title('Velocity and Displacement vs time')
xlabel('Time (sec)')
ylabel('Velocity (um/s)')
yyaxis right
ylabel('Displacement (nm)')
grid on
%% Housekeeping
clc
clear

%% Givens
d = 2.05e-3;            % wire diameter, m
r = d/2;                % wire radius, m
A = pi*(r^2);           % wire cross-sectional area, m^2

q = 1.602e-19;          % electron charage, C
                        % (NB: This is 'e' in the equation above).

n = 8.46e28;            % estimate of the number of charge-conducting 
                        % electrons per cubic meter in solid copper
                        % (NB: This is 'rho_e' in the equation above).

k = 0.1;                % Sinusoidal current amplitude, peak
f = 60;                 % Sinusoidal current frequency, Hz
w = 2 * pi * f;         % Sinusoidal current frequency, rad/sec

%% Equations
% Current in the wire, C/s
I = @(t)  k * sin(w*t);

% Current density in the wire at time t, C s^-1 m^-2
% J = I/A = k*sin(w*t)/A = k/A * sin(w*t)
% Let k2 = k/A
k2 = k/A;
J = @(t)  k2 * sin(w*t);

% Average electron drift velocity at time t, m/s
% vd = J/n/q = I/n/q/A = k*sin(w*t)/n/q/A
% Let k3 = k/n/q/A
k3 = k/n/q/A;
vd = @(t)  k3 * sin(w*t);

% Average electron displacement at time t, m
% displacement = k/n/q/A/w * (1 - cos(w*t))
% Let k4 = k/n/q/A/w
k4 = k/n/q/A/w;
displacement = @(t)  k4 * (1 - cos(w*t));

%% Solutions
% For sin(w*t), max drift velocity occurs at w*t == pi/2 -> t = pi/2/w
vd_max = vd( pi/2/w )
    % 2.2355e-06 -> ~2.2 um/s

% Maximum average displacement of an electron during 1/2 cycle of 60 Hz 
% can be calculated as the area under the drift velocity curve during 
% the time interval (0 <= t <= pi/w) sec
% NB: For sin(w*t), 1/2 cycle occurs at w*t == pi -> t = pi/w
displacement_max = integral(vd, 0, pi/w )
    % 1.1860e-08 -> ~12 nm


%% Plot the velocity and displacement curves vs time
clf('reset')

% NB: For sin(w*t), 1/2 cycle occurs at w*t == pi -> t = pi/w
t_ = linspace( 0, pi/w );

% drift velocity in micrometers/sec at time t
vd_t = vd(t_) * 1e6;
yyaxis left
plot(t_, vd_t)

% displacement in nanometers at time t
displacement_t = displacement(t_) * 1e9;
yyaxis right
plot(t_, displacement_t)

yyaxis left
title('Velocity and Displacement vs time')
xlabel('Time (sec)')
ylabel('Velocity (um/s)')
yyaxis right
ylabel('Displacement (nm)')
grid on
added 111 characters in body
Source Link
Jim Fischer
  • 3.1k
  • 12
  • 15

Recall that displacement \$d\$ is the area under the velocity curve. For a sinudoidalsinusoidal drift velocity \$v_d\$ having radian frequency \$\omega=2\pi f\$ where \$f=60\,\text{Hz}\$, the magnitude of maximum displacement over one half cycle can be calculated as the integral of \$v_d\$ with respect to time, during the time interval \$(0 \le t \le \pi/\omega)\,\text{s}\$:

Recall that displacement \$d\$ is the area under the velocity curve. For a sinudoidal velocity \$v_d\$ having radian frequency \$\omega=2\pi f\$ where \$f=60\,\text{Hz}\$, the magnitude of maximum displacement over one half cycle can be calculated as the integral of \$v_d\$ with respect to time, during the time interval \$(0 \le t \le \pi/\omega)\,\text{s}\$:

Recall that displacement \$d\$ is the area under the velocity curve. For a sinusoidal drift velocity \$v_d\$ having radian frequency \$\omega=2\pi f\$ where \$f=60\,\text{Hz}\$, the magnitude of maximum displacement over one half cycle can be calculated as the integral of \$v_d\$ with respect to time, during the time interval \$(0 \le t \le \pi/\omega)\,\text{s}\$:

Edited the LaTeX equation for displacement d to stack and align the equations on the verb '='
Source Link
Jim Fischer
  • 3.1k
  • 12
  • 15

Recall that displacement \$d\$ is the area under the velocity curve. For a sinudoidal velocity \$v_d\$ having radian frequency \$\omega=2\pi f\$ where \$f=60\,\text{Hz}\$, the magnitude of maximum displacement over one half cycle can be calculated as the integral of \$v_d\$ with respect to time, during the time interval \$(0 \le t \le \pi/\omega)\,\text{s}\$:

$$ d=\int_{0}^{\pi/\omega}v_d\,dt\\ = \frac{1}{\rho_e\,e\,A}\int_{0}^{\pi/\omega}I(t)\,dt\\ = \frac{k}{\rho_e\,e\,A}\int_{0}^{\pi/\omega}\sin(\omega t)\,dt\\ \rightarrow d = \frac{2\,k}{\rho_e\,e\,A\,\omega} $$$$ \begin{align*} d &= \int_{0}^{\pi/\omega}v_d\,dt,\;\;v_d(t) = J(t) / (\rho_e\,e)\\ &= \frac{1}{\rho_e\,e}\int_{0}^{\pi/\omega}J(t)\,dt,\;\;J(t) = I(t)/A\\ &= \frac{1}{\rho_e\,e\,A}\int_{0}^{\pi/\omega}I(t)\,dt,\;\;I(t) = k\,\sin (\omega t)\\ &= \frac{k}{\rho_e\,e\,A}\int_{0}^{\pi/\omega}\sin(\omega t)\,dt\\ &= \frac{2\,k}{\rho_e\,e\,A\,\omega} \end{align*} $$

where \$k=0.1\,\text{A}\$ (as specified in the book example).

Recall that displacement is the area under the velocity curve. For a sinudoidal velocity \$v_d\$ having radian frequency \$\omega=2\pi f\$ where \$f=60\,\text{Hz}\$, the magnitude of maximum displacement over one half cycle can be calculated as the integral of \$v_d\$ with respect to time, during the time interval \$(0 \le t \le \pi/\omega)\,\text{s}\$:

$$ d=\int_{0}^{\pi/\omega}v_d\,dt\\ = \frac{1}{\rho_e\,e\,A}\int_{0}^{\pi/\omega}I(t)\,dt\\ = \frac{k}{\rho_e\,e\,A}\int_{0}^{\pi/\omega}\sin(\omega t)\,dt\\ \rightarrow d = \frac{2\,k}{\rho_e\,e\,A\,\omega} $$

where \$k=0.1\,\text{A}\$.

Recall that displacement \$d\$ is the area under the velocity curve. For a sinudoidal velocity \$v_d\$ having radian frequency \$\omega=2\pi f\$ where \$f=60\,\text{Hz}\$, the magnitude of maximum displacement over one half cycle can be calculated as the integral of \$v_d\$ with respect to time, during the time interval \$(0 \le t \le \pi/\omega)\,\text{s}\$:

$$ \begin{align*} d &= \int_{0}^{\pi/\omega}v_d\,dt,\;\;v_d(t) = J(t) / (\rho_e\,e)\\ &= \frac{1}{\rho_e\,e}\int_{0}^{\pi/\omega}J(t)\,dt,\;\;J(t) = I(t)/A\\ &= \frac{1}{\rho_e\,e\,A}\int_{0}^{\pi/\omega}I(t)\,dt,\;\;I(t) = k\,\sin (\omega t)\\ &= \frac{k}{\rho_e\,e\,A}\int_{0}^{\pi/\omega}\sin(\omega t)\,dt\\ &= \frac{2\,k}{\rho_e\,e\,A\,\omega} \end{align*} $$

where \$k=0.1\,\text{A}\$ (as specified in the book example).

added 15 characters in body
Source Link
Jim Fischer
  • 3.1k
  • 12
  • 15
Loading
Fixed formatting of math and SI symbols
Source Link
Elliot Alderson
  • 31.7k
  • 5
  • 31
  • 68
Loading
Source Link
Jim Fischer
  • 3.1k
  • 12
  • 15
Loading