hW7_SOLS_2011_R2

hW7_SOLS_2011_R2 - ’ Souxn OH 3 HWfi7 1 RPM/4 €Xcvasw...

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

View Full Document Right Arrow Icon
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

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

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

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

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7

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

View Full DocumentRight Arrow Icon
Background image of page 8
Background image of page 9

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

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

Unformatted text preview: ’;\ Souxn OH 3 HWfi7 1. RPM/4 €Xcvasw ‘13 «fawn ’Hra. +’&x+book buff NW4 we, mask (9 Whafl is +148 veWhvt- batty/L32 0,? +016 Modal Tmplvaduu at}? barman Exevasa 45: avth Tugmf @ @ © “sud/ts? 'L‘ So|v¢ +1’ +142 “TM/szmifmvt in ‘hrm "\‘HMSMM damai‘n 1/9 TIM? Fwd!“va with is S‘ohncfimus mum "Modafl". Wl’m‘oifi ‘lea inTLgrfi/fl‘oh method "from («I’M/Fill?" ‘0 NOV-94’" use, MS demre. mix/1- ' CWT . USI N6. MARAg OMWT " ii, $321 >[ mm , _§' 7: 7 Q 2/24/11 2:57 PM MATLAB Command Window ,rx >> hw7 T_present = 32. 31 34 25. 24. 21 0881 .0920 .8659 7471 5402 .8391 T2_present /\.T2 Percent_Error >> 31 32. 30. 35 25. 24 21. _48 3O 0 .0920 6102 8094 .3879 1006 .8420 8822 H .8094 .9171 < PAGE: H 0F”: q fiat-50032. SWW, , ' f , i “m {an (50“) = *th kf‘oMBQZI OBEWECHT » , E) WWI-zimwlwlf‘w“WM, , ¥ , ‘ '4 'éTLW‘l? “ ,, 6V f, CO [,, f H A ,w , , H ,, _ , ” [Z i W] #Ai-JQ * f 1’ ' M ,, 7 ‘.;§3\>")\B/$ ' fl _ » g _ 47% ,V ,[VfZa j .1 M Q i if gi Q, 7‘, $3:ng «itca‘ssWixk = ’ ¥ ;A&,7+-_1__Cmficm_mn, “xixaév A ,, kw/ 7, mg; imam ' f i ‘ ff {K61 @YAET/q’féiafi 0] ‘- ' ” ‘ A mi f' LKkHfiTXfiSLw 193.957) 9‘! Cfir. metal 6 2/24/11 4:04 PM MATLAB Command Window éfiiflPfl W /-\ ‘>> hw7 T = 7.7362 19.5843 44.5843 >> OBEEEECBT , i .. . f ,. HMJQM. .NODAL _‘ _ ._ . ._ _ ,, ‘___L(Q.9}__ ., , . ,_ . ._ , ,_ 7 _ (#52:) ‘ EINWSQQYDAELI '_ “ ‘ ‘ _ ' {La—'11)“? [id-Sm}mmfifmféifl .Q '. F _ 1”. “4.....1SQrSrmm ‘ . .S’?..,__ . 7 W .. .. ' mx-m‘xm. . 7 VE'Kl‘r.‘E-f\ii(85§,fft%bii 7 000 ;P”# ébbob%fi900§ 9 340305010?” ' 1 5 ‘ oldo‘bioioioofi V .. . . NESS,,F€%_WTJ§1$QI H H V use. WAI—O_..E)’\LEL I F“ "M 'EFHC'mfi sang; (Q ts name? 1 1 I ‘ y , ‘ . ‘ ‘ ‘ - I i , - ‘ I - z , I ‘ . l L ' ’ , ' - ‘ , v I , ‘ v V‘ 1 W. ... ,L‘. '_-< , . v .. v m H .. w ' .._- ' . y 2' i ‘ v ; f x /\ 2/24/11 4:04 PM /home/steve/Documents/SE131/hw7.m 19W 8 oF‘jl % HW7 SE 131 WI 2011 clear all; close all; a=1;kappa=1.8;h=2*kappa;dz=1;Q=15;Ta=20; % syms kappa h=2*kappa; mesh=a*[0 1;1 1;0 2;O 0;1 O;2 O]; CONN_T3=[1 4 2;4 5 2;5 6 2;1 2 3]; CONN_L2=[4 5;5 6];Nder=[—1 —1;1 O;0 1]; nel_T3=4;ne1_L2=2;n_nodes=6;Xe=a*zeros(3,2);Le=a*zeros(2,l); LQe=kappa*zeros(3,1);L=kappa*zeros(n_nodes,1);LQ=L;Lq3=L; K=kappa*zeros(n_nodes,n_nodes);Ke1=kappa*zeros(3,3); for i=1:nel_T3 Xe(:,1)=mesh(CONN_T3(i,:)’,1);Xe(:,2)=mesh(CONN_T3(i,:)’,2); Je=Xe’*Nder;Jde=det(Je);Jie=inv(Je); GradNe=Nder*Jie; Ke=dz*kappa*Jde*(l/2)*GradNe*GradNe’; K(CONN_T3(i,:),CONN_T3(i,:))=K(CONN_T3(i,:),CONN_T3(i,:))+Ke; LQe=dz*Q*Jde/6*[l;1;1]; LQ(CONN_T3(i,:),1)=LQ(CONN_T3(i,:),1)+LQe; end Xe=a*zeros(2,l); for i=1:nel_L2 Xe(:,1)=mesh(CONN_L2(i,:)’,1); l=Xe(2,l)—Xe(l,1);He=dz*h*l/6*[2 1;1 2]; K(CONN_L2(i,:),CONN_LZ(i,:))=K(CONN_L2(i, Leq3=Ta*dz*h*l/2*[l;l]; Lq3(CONN_L2(i,:),1)=Lq3(CONN_L2(i, end L=Lq3+LQ; T_present=inv(K)*L; T2_present=T_present(2,1); f ___________ __ %Solve again with the connectivity of problems 47 and 48 CONN_T3=[1 4 5;l 5 2;5 6 2;1 2 3]; ne1_T3=4;ne1_L2=2;n_nodes=6;Xe=a*zeros(3,2);Le=d*zeros(2,l); LQeekappa*zeros(3,l);L=kappa*zeros(n_nodes,l);LQ=L;Lq3=L; K=kappa*zeros(n_nodes,n_nodes);Ke1=kappa*zeros(3,3); for i=1:nel_T3 Xe(:,1)=mesh(CONN_T3(i,:)’,1);Xe(:,2)=mesh(CONN_T3(i,:)’,2); Je=Xe’*Nder;Jde=det(Je);Jie=inv(Je); GradNe=Nder*Jie; Ke=dz*kappa*Jde*(1/2)*GradNe*GradNe’; K(CONN_T3(i,:),CONN_T3(i,:))=K(CONN_T3(i, LQe=dz*Q*Jde/6*[1;l;1]; LQ(CONN_T3(i,:),1)=LQ(CONN_T3(i,:),1)+LQe; end Xe=a*zeros(2,l); for i=1:nel_L2 Xe(:,1)=mesh(CONN_L2(i,:)’,1); l=Xe(2,1)—Xe(1,l);He=dz*h*l/6*[2 1;1 2]; K(CONN_L2(i,:),CONN_L2(i,:))=K(CONN_L2(i, Leq3=Ta*dz*h*1/2*[l;l]; Lq3(CONN_L2(i,:),1)=Lq3(CONN_L2(i,:),1)+Leq3; end L=Lq3+LQ; T_48=inv(K)*L; T2_48=T_48(2,1); .6____..__.________..—_._._.________.__.....___.__.__._______________________ :),CONN_L2(i,:))+He; :),1)+Leq3; :),CONN_T3(i,:))+Ke; :),CONN_L2(i,:))+He; Percent_Error=abs((T2_48~T2_pfesent)/T2_48)*100; meet or must 2/24/11 4:04 PM /home/steve/Documents/SEl3l/hw7.m Haflflahfl "\\ %P2 kappa=l;h=5;Ta=5;Q=lOO;b=3; Xe=b*[0 0;1/2 0;1/2 sqrt(3)/6]; Je=Xe’*Nder;Jd=det(Je); Ji=inv(Je); GradN=Nder*Ji; K=kappa*Jd/2*GradN*GradN’; H=h*b/2/6*[2 1;1 2]; K(l:2,l:2)=K(l:2,l:2)+H; LQ=Q*Jd/6*[l;1;l];Lq3=h*Ta*b/2/2*[l;l;0]; L=LQ+Lq3; T=inv (K) *L return ...
View Full Document

This note was uploaded on 04/09/2012 for the course SE 131 taught by Professor Staff during the Spring '08 term at UCSD.

Page1 / 10

hW7_SOLS_2011_R2 - ’ Souxn OH 3 HWfi7 1 RPM/4 €Xcvasw...

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

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