UNryERSITI
SAINSMALAYSIA
Peperiksaan Semester Kedua Sidang
Akademik
2005 12006 Second Semes ter Examination 2005 /2 006 Academic SesstonApril/Mei
2006April/Mei
2006ESA 102
|2 - Pengkomputeran Kej urute r aan Aeroangkasa
Computing In Aerospace Engineering
Masa :
2 jarrrDuration :
2 hoursARAHAN KEPADA CALON
:INSTRUCTION TO CANDIDATES
Sila pastikan bahawa kertas peperiksaan
ini
mengandungiSEMBILAN (9)
mukasurat dan!_UJUH (7) soalan sebelum anda memurakan peperiksaan
ini.
Please ensure
that
thispaper contains NINE
/9,printed
pages andSEVEN 0)
questionsoe1ore you begin examination.
Bahagian
A
: JawabDUA
(2) soalan.Bahagian
B
: JawabDUA
(2) soalan.Semua soalan membawa
jumlah
markah yang sama.Part
A
: Answer TWOA
questions.Part B : Answer TWO
QI
questions.All
questionscarry
the same marlcs.Jawab semua soalan dalam Bahasa Malaysia.
Answer
all
questions in Bahasa Malaysia.leti?e
soalan mestilah dimulakan pada mukasurat yang baru.Each questions must
beginfrom
a new page.IESA
102/21 -2-Bahagian
N PartA
JAWAB DUA
(2)SOALAT\ SAHAJA ANSWER
TWO(4
QaESTTONSONLY
1. Dua projektil A
danB,
dilancarkan pada masayang
samadari lokasi
yang sama.Projektil A dilancarkan
padahalaju 680 m/s pada sudut
65o, danprojektil B dilancarkan pada halaju 780 m/s, pada sudut 42o.
Tentukanprojektil
yang manakah yang akan sampaike
tanahdahulu.
Sekiranya masa penerbangan bagiprojektil
yang sampai ke tanah dahulu dibahagikan kepada sepuluh bahagian,iaitu
I 1 elemen yang sama perbezaarurya, daripada 0 hingga tnit,yang
menghasilkanvektor l, kira
perbezaanaltitud
dan perbezaanjarak melintang di
antara kedua-duaprojektil
tersebutpada
setiap sebelas masa dalam vektorI itu.
Papark an perbezaanj arak-j arak tersebut.h(t1=vtsinA-)St'
1/.
x(t) =
vtcos Atn, =2*(v/g)*sin(d)
h@: altitude
of projectile
at timet
x(t):
horizontal distanceof projectile
at timet
tp11: time of the
projectile
hits theground
Two
projectiles, A
andB, are
shofat
the same instantfrom the
same spot.Projectile
A
is shotat
a speedof
680 m/sat
an angleof
65o, andprojectile
Bis
shotat a
speedof
780 m/sat an
angleof
42o. Determine whichprojectile
will hit the
graundfirst.
Supposedthat
theJlying time of
thisprojectile
is divided into ten increments,with
II
equally spaced elements,from
0till
t1,x as vectort, calculate
thedffirence of altitude
andhorizontal
distance between the twoprojectiles
at the eleven timesin
the vector.Displry
the valuesof
the distancedifferences
(
2s
marrah/marks)2.
-3-
Halaju,
sebagaifungsi
kepada masa bagigarisan lurus ditunjukkan dalam graf
di seperti berikut:IESA r02t2l
suafu
zarahyang
bergerak padabawah dan
persamaannya diberiThe velocity, as a
function
of time of aparticle that
rnoves along thestraight
line, is shown below and given in the equation below.l.4t
t4+5,"[#u -tr)
for0</<10s forl0<t <25s
for25 <r <35s for35<t<40s
v(x)
=9
I -
|rr -:st
Tulis
duafungsi
pengguna: Satufungsi
untuk mengirahalaju
zarah tersebut pada masat (untuk
nama fungsi dan argumen, gunakan:v=velocity(t)),
dan satu fungsi
lagi
mengira pecutan zarah tersebut pada masat
(untuk nama fungsi dan argumen, gunakanrd.=occ€leration (t) ).
Tuliskanjuga
arahan- arahanMATLAB
seperti dalam sebuahfail skrip untuk
memplot halaju dan pecutan melawan masa (duaplot
dalam satu graf yang sama). Dalam aturcara tersebut,hasilkan dahulu vektor t,
0 <t
S40s,
dan kemudiannya, gunakan fungsivelocity
danacceLeration
untuk menghasilkan vektor halaju dan pecutan yang akan digunakan untuk plot tersebut.lhrite two
user-defi.nedfunctions: One that calcalates the velocity of
theparticle
at timet
(for thefunction
nume and arguments usev=veloc i ty
( t )),
and the other that calculates the accelerationof
theparticle
at timet (for
thefunction
nameand
arguments usea=aeceTeration(t)). In a
scriptfile, write
a MATLABprogram
that createsplots of
the velocity and accelerationas
functions
of time (twoplots
on the same graph).In
the program,first
createa vector t, O</<40s, and then use the functions weTocity
andacceTeration to
create vectorsof
velocity and acceleration thatare
usedfor
the plots.Hint:
(25
markah/marks)
ddu
-slnt,
=cosil-
dx
dx3.
IESA 102/2]
-4-
Jadual berikut memberi data suhu dalam oC sebagai fungsi kepada masa dan hari pada satu lokasi tertentu.
The
following
table gives temperature data in oC as a function of time of day and day of the week at a specific locafian.Jadual I Table
I
Terdapat datayanghilang dalam jadual tersebut yang ditandakan dengan tanda soal
(?).
Berikan arahanMATLAB
untuk menganggarkan suhu-suhu yang hilang itu.Data is
missingfor the
entries markedwith a
questionmark (?).
Give MATLAB commands to estimate the temperature at the missing points.Dengan menggunakan
nilai-nilai
yang diperolehi d aripada ( a), h asilkan satujadual
suhu yang lengkap seperti dalam JadualI
(tanpalajur jam).
Tulisarahan
MATLAB untuk
mencarinilai
purata,nilai
maksimum, dan nilai minimum suhu bagi setiap hari, dan juga bagi keseluruhan minggu tersebut.Using the values obtained in (a), generate a complete temperature as in Table
I
(without thehour
column). Write MATLAB commands tofind
the meanvalue, maximum and minimum value
for
each day, aswell
asfor
the wholeweek.
Berdasarkan
jadual
yang dihasilkandi (b), tulis
arahanMATLAB
untuk mencari jumlahjam
yang mana suhu padahari
Selasa adalahlebih
tinggi daripada hari Rabu tetapi lebih rendah daripadahari
Khamis dan paparkan suhu pada hari Selasa tersebut.Based on the table generated
in
(b), write MATLAB commands tofind
thenumber of hours that temperature
in
Tuesday is higher than lTednesday but lower than Thursday, and then display the temperature concerned.Berdasarkan
jadual
yang dihasilkandi (b), tulis
arahanMATLAB
untuk mencarijumlah jam
yang mana suhu padahari Isnin
adalahlebih
tinggi daripadahari
Khamis atau Jumaat tetapi tidak kedua-duanya dan paparkan suhu pada hari Isnin tersebut.Based on the table generated
in
(b), write MATLAB commands tofind
thenumber
of
hoursthat
temperaturein
Mondayis higher than
Thursday or Friday but not both days, and then display the temperature concerned'(25 markah/marks) (a)
(b)
(d) (c)
Haril Dav Jaml
Hour
Isnir/
Mondav
Selasa/
Tuesdat,
Rabu/
llednesday
Khamis/
Thursdav
Jumaat/
Fridav I
2 3 4 5
t7
13
l4 l7
23
l5
?
t4 l5 l8
t2
8 9
t4
l7
l6
1l
? 15 20
l6
t215
t9 24
...51-
lEsA
102/21-5-
4.
Sebuahkotak
denganjisim
m=20kg adalahditarik
dengan seutastali.
Daya yang diperlukan untuk menggerakkan kotak tersebut ialatr seperti berikut:A
box of massm:20kg
is beingpulled
by arope. Theforce
that is required to move the box is given by:F- pm8
cosd +
psin9
iaitu
p =0.45 iatah pekali geseran dan g=9.31ttz.
where
p
=0.45 isthefriction
coefficient and g=9'8lm/s2 '(a) Plot bagi fungsi tersebut untuk nilai-nilai x, 03 xS I, adalah seperti
di gambarajah.Tulis aruhanMATLAB
untuk menghasilkanplot
tersebut.The
plot of
theforce
functionfor
values ofx,
0SxS
1,is
as displayedin
thefollowingfigure. l(rite
the MATLAB command to obtain thisplot:
Tulis'arahan MATLAB untuk
menentukansudut 0,
sekiranya daya tarikan ialah 92N.Write MATLAB commands to determine the angle0,
if
thepullingforce
is 92N.Tulis
arahanMATLAB untuk
menentukansudut 0 yang
mana daya yang diperlukanuntuk menarik kotak
tersebut adalah yangpaling kecil,
dan beri arahan untuk menentukan magnitud daya tersebut.Write
MATLAB
commands to determine the angle0
at whichtheforce
that is required topull
the boxis
the smallest and also giveMATLAB
commands to obtain the magnitude of this force.(25
markah/marks)
(b)(c)
lEsA
r02t21-6-
Bahagian BtPartB
JAWAB DUA
(2)SOALAN SAIIAJA ANSWER
TWO (2) QUESTIONSONLY
5. (a) Bagi setiap
pembolehubahyang berikut, nyatakan sama ada ianya
satu pembolehubahFORTRAN
yang sah atau puntidak.
Jika sah, nyatakanjenis
data tersebut berdasarkan nama pembolehubahitu.
For
eachvariable
name, indicate whether theFORTMN variable
isvalid or invalid. If
valid, indicate theimplicit
data type based on the variable name(a)
payload(b)
Weight(c) UAV
2000(d)
$aero(e) NUMBER
(5
markahlma*$
(b) Kelajuan orbit (dalam krn pet jam) bagi
sebuahsatelit komunikasi
yang mengelilingi bumi boleh dikira menggunakan persamaan,Orbital
speed(in
krnper hour) of a
communicationsatellite that
orbits the earth can be calculated by using the equation,,=w
Dengan,
r ialah
jejari orbit
dari pusat bumi,M
ialahjisim
bumi, danT
ialahpemalar graviti.Where,
r
is the radius of theorbitfrom
the centre of the eorth,M
is the mass of the earth,and
f
is thegravitational
constant.Jikahasildarab TM :1.44X
l0r2 km34am2 danjejari
bumi ialah 6380km.If
theproduct TM :
1.44X
1012 km3/ hy' and the radius of the earth
is 6380km.ll.
lEsA r02t2l
-7- Buat satu carta
alir
; danWite aflowchart;
andPengaturcaraan
FORTRAN untuk
mengirakelajuan orbit bagi orbit
yang mempunyaialtitud l000km
hingga 20000kmdi
atas permukaanbumi
dengan penambahan500km. Hitung
bilanganhari satelit itu mengorbit bumi
(dengansatelit orbit satelit ialah 2nt
danr
adalattaltitud satelit). Berikan jadual keluaran program ini dalam
bentukjadual altitud, kelajuan dan bilangan hari bagi satelit itu
mengorbit bumi.A FORTMN program to calculate the orbital
speedfor orbits with altitude of l000krn to 20000km above the earth's surface,
inincrements of 500km. calculate also the number of
daysfor
thesatellite to orbit the earth
(wherethe orbit is 2m.for a satellite of
altitude r).
Tabulate the resultsof altitude,
speedand
the numberof
daysfor
the satellite toorbit
the earth as a output of the program.@0
markablmarhs)
IESA
102t21 -8-6. (a) Dengan menjejak
segmen pengaturcaraanyang berikut, berikan
ramalan output bagi program tersebut.Anggapkan
nilai
tegangan permukaan ialah t=
10N/m dan panjang gelombang ialahy:5m.
Trace through the
following program
segments andpredict
the output.Assume an input of surface stress is
t : l0N/m
andwave length isy:5m
program wave velocitY real t,
y
d
=
1000g:9.8
read
*, t, y
v:
sqrt((2*t/2)
+ 1g'ry/y*d))print *,
'The wavevelocity
is= ', v, 'm/s'
stopend
(5
markahlmnrhs)
(b)
Terdapattiga jenis
pesawat penumpang kepunyaanMAS yang
mendaratdi
lapangan terbang,KLIA.
Pesawat tersebutialah
Boeing 747 yang membawa penumpang seramai250
orang,Airbus A380
denganbilangan
penumpang seramai 350 orang dan Boeing 777-Twbo dengan 450 orang penumpang.Three types
of MAS
commercialaircraJt arrives at KLIA terminal.
They areBoeing
747carries
250 passengers,Airbus
A380carries
350 passengersand
Boeing 777-Turbo canies
450 passengers.i. Tulis
pengaturcaraan"subroutine" FORTRAN
dengan satu argumeninput iaitu jenis pesawat. "subroutine" itv
hendaklah mengandungi pengiraan bilangan pesawat dan bilangan penumpang bagi setiapjenis
pesawat tersebutdan
mencetaknya setiapkali "subroutine"
tersebut dipanggil.Write a
FORTMN
subroutinewith
one input argument which is the typeof aircrafi.
The subroutine must count the number ofplanes
and the number of passengersfor
each type ofairtafi
and'each time the subroutine is called.
ii.
Seterusnyaotulis program utama yang
membacajenis
pesawat dan memanggil program"subroutine"
pada batragian(i),
sehingga nomborjenis
pesawatyang diberikan
adalahdi luar julat.
Padatahap ini, berikan
arahan mencetakjumlah
bilangan pesawatbagi
semuajenis
pesawat danjumlah
bilangan penlrmpangnya.Write
a
mainprogram which
readsin an aircraft
typeand calls
the subroutine(i) until
anaircraft
type numberwhich not in
the range is reod.At
thispoint write a
commandto display the total
numberof
aircraft
ofall
types andtotal
numberof
passengers.@0
markab/marks)
7.
IESA to2l2l
-9-
(a) Kod
programFortran di
bawah telatrditulis
dalam benhrk yangtidak
betul.Tulislemuta
program tersebut mengikut sintaks bahasa Fortran yang betul dan ramalkan output yang dikeluarkan.The
fotlowing Fortran program code is poorly written.
Pleaserewrite
theprogram in
aproper Fortran
Language syntax and thenpredict
the outputof
the program.
Program testing
i:1
sum=
010
do 20I = 1,50
if
(i.gt.10) go to2l sum=sum+i
20
continue2l if (i
.le. 20) thensum=sum-r
go to 20 else
sllm = 2*sum end
if
print *,
'sum= ',
sum stoPend
(5
markahlmark) Tulis
pengaturcaraan Fortran untuk membaca senarai nombor nyatapositif, N dan
seterusnyakira dan cetak nombor yang
terbesar,terkecil' purata
dan sisihan piawai dengan menggurakan rumus,Write
a Fortran program to
reada
tistof
Npositive real
numbers and then calculate andand
standard deviation using theformula,
standard
deviation
=(20
markah/marks)
-ooooooo -
(b)
ryl