{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

4_Quarterman_Patrick_HW09A - w2(1)=500%starting angular...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Patrick Quarterman Section 4 HW09A Script: %'script' Steam Turbine HW9A %Patrick Quarterman, Section 4 %calculate the angular velocity of the generator until it stops %Given constants k=.2; %motor constant (V*(rad/s)^1) J=1.5; %angular moment of inertia (kg*m^2) R=120; %load resistance (Ohms) t=0:4:20; %time interval from 0 to 20 s w(1)=500; %initial angular velocity L=length(t); %determine legnth of time vector to be used in for loop for i= 1:(L-1) %run loop for euler's method (we have first value so skip that one) w(i+1)=w(i)-(k^2/(J*R)*w(i)^2)*(t(i+1)-t(i)); %angualr velocity equation end %repeat for smaller time interval T=0:.5:20; %time interval from 0 to 20s in .5 s increments
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: w2(1)=500; %starting angular velocity l=length(T); %determine legnth of vector to use in loop for j= 1:(l-1) %same loop as above. .. w2(j+1)=w2(j)-(k^2/(J*R)*w2(j)^2)*(T(j+1)-T(j)); %angualr velocity equation end plot(t,w, '.-' ,T,w2, 'r-x' ) %plot w and w2 as function of time xlabel( 'Time (s)' ) ylabel( 'Angular Velocity (rad/s)' ) title( 'Angular Velocity vs. Time' ) Output: 2 4 6 8 10 12 14 16 18 20 100 150 200 250 300 350 400 450 500 Time (s) Angular Velocity (rad/s) Angular Velocity vs. Time At t = 4s, the model with fewer iterations 277.8 rad/s, and about 341.08 for the equation with intervals of .5s....
View Full Document

{[ snackBarMessage ]}

Page1 / 2

4_Quarterman_Patrick_HW09A - w2(1)=500%starting angular...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon bookmark
Ask a homework question - tutors are online