Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

T

PE3DEMETHODEINF
ORMAT
IQUEDE
DI
ME NS
IONNEME
NT

E
TUDI
ANT:
Gui
mdj
euT
akoudj
ouE
mma
nue
l
MAT
RICUL
E:15G02470
F
ILI
ERE:
TCI
4
OPT
ION:
PI

E
NSE
IGNANT:
DrNGAY
IHI
CLAUDE
ANNE
EACADE
MIQUE:
2019/
2020

EXERCICE1

I- CODEMATLAB
%tr
uss.
m
%
%LINEARSTATI CANALYSI SOFATRUSSSTRUCTURE
%clc
%Clears
cr
een
cl
ear%Cle
aral
lva
ria
b l
esi
nmemor
y%
%Ma ket
hes
evar
iab
le
s g
lob
also
the
yca
nbes
hare
d
%byot
herfu
nct
ion
sgl
o b
alnndn
eln
neno
dof
eld
ofn
gl
obalg
eomco
nnec
propnfl
oad
%
di
sp(
'Exec
uti
ngt
rus
s.
m')
%
%%
%ALTERTHENEXTLI NESTOCHOOSEANOUTPUTFI LEFORTHERESULTS
%Op e
nf il
e fo
r out
p utofres
ults
%
fi
d=f open (
't
russ_1_r es
ults
.t
x t
'
,'
w '
);
disp
('
Re sult
sprintedinf i
le:tr
uss_1_resu
lts
.t
x t
')
;
%
%ALTERTHENEXTLI NETOCHOOSEANI NPUTFI LE
%trus
s_1_d ata%Lo adth ei
nputfile
%p r
int
_t russ
_mo del%Pr i
ntmodeld at
a%
KK=z eros
(n);%I nitial
izeglob
al s
tiffne
ss
%ma t
rixtoz e
ro
%
F=z e
ros(
n ,
1);
%I nitializegl
obalforce
%vect
ortozero
%fori=1:nelkl=truss_kl(i
);%Forme le
mentma tr
ixinlo
calx
y
%C=t russ_C(i);%Fo rmtransfor
ma tio
nma tr
ix
%%k g=C* kl*C';%Tr ansfor
mt heelementmatri
xf r
om
%localt
og l
obalcoordinates
g=trus
s_g (
i);%Re trievethe
element s
tee
ring
%vect
or
%
KK=f orm_KK( KK, kg,g)
;%a s
semblegl
obalst
iffness
%ma t
rix%
end
%%F=f orm_t r
uss_F( F);%Fo r
mg lob
a l
force
v e
ctor
%
%
%%%%%%%%%%%%En do fass
emb l
y%%%%%%%%%%%
%%d el
ta=KK\F; %solvef
o ru
n knowndis
p l
acements%
%Ex t
ractn odaldispl
a cements
%fori=1:nndf orj
=1 :nodofn o
d e_disp
(i,
j)
=
0;i fnf(i,
j)
~=0 ;
node_d i
sp(i,
j)=d el
ta(nf(i
,j
));e nde ndend
%
%Ca l
culatetheforcesactingoneachelement
%inlocalcoor
d i
na t
es,andstoret
h eminthe%vecto
rforce
()
.
%fori=1:nelk l=truss_kl(i
);%Fo r
me le
mentma t
rixinlo
cal
xyC=t russ
_C(i)
;%Form
tr
a ns
forma ti
onma trixk g
=C* kl*C';%Transformtheel
eme
ntmatr
ixfrom
%loc
a l
to glo
balcoordina t
es
g=tr
u s
s_g (i
);%Re trievet
he e
lemen t
stee
ringve
ctorf o
rj=1
:e
ldo
fi fg(
j)
==0
e
dg(j
)=0 .;
%d ispl
a cement=0 .
f o
r r
est
rainedfree
dom e l
se edg(j)
=d e
lt
a(g(
j)
);e n
de ndf
g=kg
fl=C'*e
d g'
;%El emen tforc
evect
or i
ng l
obalXY f g;%Eleme
ntfo
rce
vecto
rinl
ocal
xyf or
ce(
i)
=fl
(3
);e
nd%
prin
t_truss_resul
ts;
%fclo
se(fid);

II- SOLUTIONDEL’
EXERCICE1

*
***
***
PRI
NTI
NGMODELDATA*
***
***
***
***
*

-
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
-

Nu
mbe
rofn
ode
s:
9
Nu
mbe
rofe
le
men
ts:
15

Nu
mbe
rofn
ode
spe
rel
eme
nt:
2

Nu
mbe
rofd
egr
ees
off
ree
domp
ern
ode
:2

Nu
mbe
rofd
egr
ees
off
ree
domp
ere
le
men
t:4

-
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
-

No
deX Y

1
,00
00.
00,
000
0.0
0

2
,00
01.
00,
000
2.0
0

3
,00
02.
00,
000
0.0
0

4
,00
03.
00,
000
2.0
0

5
,00
04.
00,
000
0.0
0

6
,00
05.
00,
000
2.0
0

7
,00
06.
00,
000
0.0
0

8
,00
07.
00,
000
2.0
0

9
,00
08.
00,
000
0.0
0

--
--
---
--
---
--
---
--
--
--
---
---
--
--
--
--
--
--
--
--
--
--
--
--
-
Ele
mentNode
_1 Node_2
1, 1
, 2

2
, 1
, 3

3
, 2
, 3

4
, 2
, 4

5
, 3
, 4

6
, 3
, 5

7
, 4
, 5

8
, 4
, 6

9
, 5
, 6

1
0, 5
, 7

1
1, 6
, 7

1
2, 6
, 8

1
3, 7
, 8

1
4, 7
, 9

1
5, 8
, 9

-
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
-

El
eme
ntE A

1
,3e
+07
,0.
02
2
,3e
+07
,0.
0453
,3e
+07
,0.
02

4
,3e
+07
,0.
0455
,3e
+07
,0.
02

6
,3e
+07
,0.
045

7
,3e
+07
,0.
02

8
,3e
+07
,0.
045

9
,3e
+07
,0.
02

1
0,3
e+0
7,0
.04
5

1
1,3
e+0
7,0
.02

1
2,3
e+0
7,0
.04
5

1
3,3
e+0
7,0
.02

1
4,3
e+0
7,0
.04
5

1
5,3
e+0
7,0
.02

-
--
--
---
--
----
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
----
--
Nodedi
sp_U di
sp_V

1
, 0
, 0

2
, 1
, 2

3
,3, 4

4
,5, 6

5
,7, 8

6
,9,
7,1
1,1
2 1
0

8
, 1
3, 1
4

9
, 1
5, 0

-
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
-

No
del
oad
_X l
oad
_Y

1
,00
00.
00,0
000
.00

2
,00
15.
00,0
000
.00

3
,00
00.
00,-
005
.00

4
,00
00.
00,-
007
.00

5
,00
00.
00,0
000
.00

6
,00
00.
00,0
000
.00

7
,00
00.
00,-
010
.00

8
,00
00.
00,0
000
.00

9
,00
00.
00,0
000
.00
-
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
-

To
tal
numb
ero
fac
ti
ved
egr
ees
off
ree
dom,
n=1
5

-
--
--
--
--
--
--
--
---
--
---
--
---
--
--
--
--
--
--
--
--
--
--
--
--
--
--*
***
***
PRINTINGANALYSIS
RESULTS**
***
****
***
**

-
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
-

Gl
oba
lfo
rce
vec
tor
F

1
5

-
50

-
7

-
10

-
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
-

Di
spl
ace
men
tso
lut
io
nve
cto
r:d
elt
a

0
.00
014

-
0.
000
10

0
.00
003

-
0.
000
19

0
.00
010

-
0.
000
23

0
.00
006

-
0.
000
23

0
.00
007

-
0.
000
21

0
.00
009
-
0.
000
18

0
.00
005

-
0.
000
09

0
.00
010

-
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
-

No
dal
dis
pla
ceme
nts

No
ded
isp
_X d
isp
_Y

1
,0.
000
00,
0.
000
00

2
,0.
000
14,
-0.
000
10

3
,0.
000
03,
-0.
000
19

4
,0.
000
10,
-0.
000
23

5
,0.
000
06,
-0.
000
23

6
,0.
000
07,
-0.
000
21

7
,0.
000
09,
-0.
000
18

8
,0.
000
05,
-0.
000
09

9
,0.
000
10,
0.
000
00

-
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
-Me
mbe
rsa
cti
onse
leme
ntf
orc
eac
ti
on

1
,-0
.00
,Co
mpr
es
si
on

2
,0.
00,
Ten
sio
n

3
,0.
00,
Ten
sio
n

4
,0.
00,
Ten
sio
n

5
,-0
.00
,Co
mpr
es
si
on

6
,0.
00,
Ten
sio
n

7
,0.
00,
Ten
sio
n

8
,0.
00,
Ten
sio
n

9
,-0
.00
,Co
mpr
es
si
on

1
0,0
.00
,Te
nsi
on

1
1,0
.00
,Te
nsi
on

1
2,0
.00
,Te
nsi
on

1
3,-
0.
00,
Comp
res
si
on

1
4,0
.00
,Te
nsi
on

1
5,0
.00
,Te
nsi
on
EXERCICE2

I
- CODEMATLAB

%Fil
e:
tr
u s
s_pro
bl
em_2_data
.m
%
%Thefo
llo
w i
ngva
ria
ble
sar
e d
ecl
are
dasgl
ob
alinor
der
%to
beus
edbyall
thef
unct
io
n s
(M-fi
le
s)c
ons
ti
tuti
ng
%th
epro
gram%
gl
ob
alnndnel
nnenod
ofel
dofngl
oba
lgeo
mconn
e c
pro
pnfl
oad

%
fo
rmatsh
o r
te%
%%%%%%%%%%%%%%Be g
inn
ingofdat
ainp
ut%%%%%%%%%%%%%%%%
%nnd=6;%Nu mb
erofno
des
:nel=9;
%Nu mbe
rofel
ement
s:
nne=2;%
Numberofnod
esp
erel
ement
:
nod
of=2;%Nu mbe
rofde
gre
esoffr
eed
omperno
deel
dof=nne*
nodof
;%Numb
ero
fde
gre
eso
f
fre
edo
m
%pere
le
me nt
%
%Nodesc
o o
rdi
nat
esXandYg e
om=zero
s(
nnd,
2)
;geo
m=[ 0.
0.;
..
.%XandY
coo
rd.node1240 0.
180 0.
;.
..
%Xa ndYc oord
.nod
e 2
2400.
540 0.
;.
..%Xa n dYc o
o r
d.node3
4800.
360 0.
;.
..
%Xa n dYc o
ord.node4
4800.
540 0.
;.
..%Xa n dYc oor
d.n o
de5
7200.
540 0.
];%Xa n dYc oord.
no de6
%
%Elemen tc
onn ec
tivi
ty
%
conn
ec=z er
os(
n el
,2
);c o
nn e
c=[ 12;..
.%1s
t a
nd2ndnodeofele
ment1
13 ;
..
.%1 s
tan d2ndn odeofel
e ment2
23 ;
..
.%1 s
tan d2ndn odeofel
e ment3
2 4; .
..
%1 s
ta nd2ndn odeofel
e ment4
3 4; .
..
%1 s
ta nd2ndn odeofel
e ment5
35 ;
..
.%1 s
tan d2ndn odeofel
e ment6
45 ;
..
.%1 s
tan d2ndn odeofel
e ment7
5 6;...
%1 s
tan d2ndn odeofel
e ment8
46];%1stand2 ndnod eofel
eme nt9
%
%Geome tr
icalproperti
es
%
%prop(
1,1)
=E; pr
op(1,2)
=A
%prop=z e
ros
(n el
,
2);prop=[ 30000.20000.
;.
..
%Ea ndAo fel
ement
1
30000
.20 000.
;..
.%Ea ndAo felement2
30000
.20 000.
;..
.%Ea ndAo felement3
30000
.20 000.
;..
.%Ea ndAo felement4
30000
.20 000.
;..
.%Ea ndAo felement5
30000
.20 000.
;..
.%Ea ndAo felement6
30000
.20 000.
;..
.%Ea ndAo felement7
30000
.20 000.
;..
.%Ea ndAo felement8
30000
.20 000.
];%Ea ndAo felement9
%
%Bo undaryconditions
%
nf=ones(nnd,nodof);%I n
itial
izethema t
ri
xnfto1nf(
1,
2 )
=0;%Pres
cri
bedn
oda
lfre
edo
mofno
de1
nf(
6,1
)=0; nf(6,
2)=0; %Pr esc
ribednodalfr
eedomofnode6%
%Countingofth e
free degr
eesoffree
d om
%
n=0;fori=1:
n ndfor
j=1:
nodofifnf (
i,
j)~=0
n=n+1;nf(i
,j
)=n ;ende nd
end%
%loadi
n g%
loa
d=z eros
(nn d,
2);
loa
d(2,
:)
=[ 0.-10000.
] ;
%f o
rcesinXa ndYd ir
ect
ion
s a
tnode2lo
ad(3
,:
)=[
-750
00.
];%f
orc
esi
nXandYd
ire
ct
io
ns
atnode3load(4,:
)
=[ 0.-10000.
];%f o
rces
inXa ndYd i
rec
tions
atno
de4%
%%%%%%%%%%%%%%%%%%%%%%%En dofin
put%%%%%%%%%%%%%%%%%%%%%%

I
I- S
OLUTI
ONDEL
’EXERCI
CE2
*
***
***
PRI
NTI
NGMODELDATA*
***
***
***
***
*

-
--
---
--
----
--
---
--
---
--
----
---
--
---
---
--
--
---
--
--
--
--
Numbe
rofno
des
:6
Numbe
rofel
eme
nts
:9
Numbe
rofno
desp
ere
lement
:2
Numbe
rofde
gre
eso
ffree
domper
node
:2
Numbe
rofde
gre
eso
ffree
domper
ele
ment
:4

-
---
--
--
--
--
--
--
--
--
--
---
--
---
---
--
---
---
--
--
---
--
--
--
Node X Y
1, 0
000.
00,
0000.
00
2, 2
400.
00,
180
0.00
3, 2
400.
00,
5400
.00
4, 4
800.
00,
3600
.00
5, 4
800.
00,
5400.
00
6, 7
200.
00,
5400
.00

--
--
---
--
---
--
--
---
--
--
--
- -
--
---
--
--
--
--
--
--
--
--
--
--
--
Ele
mentNode
_1Node_2
1, 1,
2

2
, 1
,3

3
, 2
,3

4
, 2
,4

5
, 3
,4

6
, 3
,5

7
, 4
,5

8
, 5
,6

9
, 4
,6

-
--
--
---
---
--
--
---
---
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
-El
eme
ntE A
1,30
000,200
00
2,300
00,2000
0
3,300
00,2000
0
4,3000
0,20000
5,300
00,2000
0
6,300
00,2000
0
7,300
00,2000
0
8,300
00,2000
0
9,300
00,2000
0

-
--
---
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
---
--
--
--
-No
ded
isp
_U d
isp
_V
1
,1, 0

2
,2, 3

3
,4, 5
4
,6, 7

5
,8, 9

6
,0, 0

-
--
--
---
---
---
--
---
--
---
--
--
--
---
--
---
--
--
---
--
---
--
--No
del
oad
_X l
oad
_Y
1,0
000.
00,0000.
00
2,00
00.0
0,-10
000.
003,-
750
0.0
0,000
0.0
0
4,000
0.0
0,-10
000.
00
5,00
00.0
0,0000.
00
6,00
00.0
0,0000.
00
-
--
--
---
---
---
--
---
--
---
--
--
--
---
--
---
--
--
---
--
---
--
--

To
tal
numb
ero
fac
ti
ved
egr
ees
off
ree
dom,
n=9

-
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
-

***
***
*PRI NTINGANALYSI
SRESULTS*
***
***
***
***
* -
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
-
--
--
---
--
---
---
--
---
Glo
balf
orc
evec
tor
F
0
0
-1
0000
-7
500
0
0
-1
0000
0
0

-
--
---
---
---
--
---
--
---
---
--
--
---
---
--
---
--
--
--
--
--
--
--
Dis
pla
cement
sol
uti
onv
ect
or:
del
ta

-
0.
80865
-
0.
26183
-
0.
65965
0.
18
000
-
0.
61631
0.
17
710-0.
95
294
0.
090
0 0
-
0.9
529 4
-
--
---
--
--
---
--
--
---
--
---
--
--
--
--
--
--
----
--
--
--
--
--
--
-
Nod
aldi
spl
ace
ment
s
Nod
edis
p_X di
sp_Y

1
,-
0.8
0865,
0.00
000
2
,-0
.26
183,
-0.
659
65
3
,0.
180
00,-0
.61
631
4
,0.
177
10,-
0.
95294
5
,0.
09000
,-0
.95
294
6
,0.
00000
,0.
00000
-
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
-

Me
mbe
rsa
cti
ons
ele
men
tfo
rce
act
io
n

1
,83
33.
33, Te
nsi
on
2
,-1
641
4.7
6, Co
mpre
ss
io
n
3
,72
22.
22, Te
nsi
on
4
,10
243.
94, Te
nsi
on
5
,245
95.
49, Te
nsi
on
6
,-2
2500.
00, Co
mpre
ss
io
n
7
,-0
.00, Co
mpre
ss
io
n
8
,-2
2500.
00, Co
mpre
ss
io
n
9
,31
622.
78, Te
nsi
on

You might also like