Jump to content
CIVILMANIA

programme en pascal pour calculer la matrice de rigidité [K]


k.amira
 Share

Recommended Posts

posté par simo2309

uses crt,graph;

var i2,j2,npro,nfn,nelt,nnt,nnel,ndim,ndl,nnb,nnapp,i,j,pilote,mode,x1,y1,x2,y2,x1f,y1f,x2f,y2f:integer;

pp,y11f,x11f,i3,k,nt,n,p,q,n1,n2,nfen:integer;

tga,qt,ql,a,b,c,pivot,cosa,sina,lx,ly,l,x21,x11,y11,x22,y22,y21,xmax,ymax:real;

alp,ro,x1c,x2c,y1c,y2c,x11c,y11c:real;

rox,roy:integer;

case1:boolean;

f1,f2,f3,f4:text;

fd,fr,fdon,fint,nature:string;

type co=array[1..6]of integer;

di=array[1..3] of real;

rest=array[1..6]of integer;

rig=array[1..6]of real;

gr=array[1..50]of real;

var corg:array[1..50]of di;

qa,qqa:array[1..6] of real;

fen:array[1..50]of rig;

f:array[1..50]of real;

ff:array[1..50]of real;

fff:array[1..50]of real;

r:array[1..50]of real;

u:array[1..50] of real;

uu:array[1..50] of real;

connec:array[1..50] of co;

res:array[1..50]of rest;

fn:array[1..50]of di;

prop:array[1..50] of di;

tr:array[1..6] of rig;

rigid:array[1..6] of rig;

grigid:array[1..6] of rig;

w:array[1..6]of integer;

grig:array[1..50]of gr;

procedure don;

begin

{Lecture des donnes generales}

readln(f1,nnt,nelt,nnel,ndim,nnapp,nfn,nfen,npro);

{Lecture des coordonnees des noeuds}

for i:=1 to nnt do

begin

for j:=1 to ndim do

begin

read(f1,corg[i,j]);

end;

end;

{Lecture de la connectivit‚}

for i:=1 to nelt do

begin

for j:=1 to nnel +1 do

begin

read(f1,connec[i,j]);

end;

end;

{Lecture des conditions d'appuis}

ndl:=3;

for i:=1 to nnapp do

begin

read(f1,nnb);

for j:=1 to ndl do

begin

read(f1,res[nnb,j]);

end;

for q:=ndl downto 1 do

begin

res[nnb,q+1]:=res[nnb,q];

end;

res[nnb,1]:=nnb;

end;

for i:=1 to nnt do

begin

res[i,1]:=i;

end;

{Lecture des charges nodales}

for i:=1 to nfn do

begin

readln(f1,fn[i,1],fn[i,2],fn[i,3]);

n1:=trunc(fn[i,1]);

n2:=trunc(fn[i,2]);

f[3*(n1-1)+n2]:= fn[i,3];

end;

{Lecture des charges entre noeuds}

for i:=1 to nfen do

begin

for j:= 1 to 5 do

begin

read(f1,fen[i,j] );

end;

end;

{Lecture des proprietes}

for i:=1 to npro do

begin

readln(f1,prop[i,1],prop[i,2],prop[i,3]);

prop[i,1]:=prop[i,1]*prop[i,2];

prop[i,2]:=prop[i,1]*sqr(prop[i,2])/12;

end;

end;

procedure impdon;

begin

writeln(f3,'Nombre de noeuds = ',nnt:2);

writeln(f3,'Nombre d''elements = ',nelt:2);

writeln(f3,'Nombre de noeuds par element = ',nnel:2);

writeln(f3,'Dimension du probleme = ',ndim:2);

Writeln(f3);

writeln(f3);

writeln(f3,'Coordonnees des noeuds');

writeln(f3,'**********************');

case ndim of

3:writeln(f3,'Noeud x y z');

2:writeln(f3,'Noeud x y' );

end;

for i:=1 to nnt do

begin

write(f3,' ',i:2);

for j:=1 to ndim do

begin

write(f3,' ',corg[i,j]:12:3);

end;

writeln(f3);

end;

writeln(f3);

writeln(f3);

writeln(f3);

writeln(f3,'Connectivite des elements');

writeln(f3,'*************************');

writeln(f3,'Element noeud 1 noeud 2 Prop');

for i:=1 to nelt do

begin

write(f3,' ',i:2);

for j:=1 to nnel+1 do

begin

write(f3,' ',connec[i,j]:10);

end;

writeln(f3) ;

end;

writeln(f3);

writeln(f3);

writeln(f3,'degres de libertes bloquees');

writeln(f3,'***************************');

writeln(f3,'noeud ux uy rz');

for i:= 1 to nnt do

begin

for j:=1 to ndl+1 do

begin

write ( f3,' ',res[i,j]:5);

end;

writeln(f3);

end;

writeln(f3);

writeln(f3);

writeln(f3,'charges nodales');

writeln(f3,'***************');

writeln(f3,'noeud dir valeur');

for i:= 1 to nfn do

begin

writeln ( f3,trunc(fn[i,1]):2,' ',fn[i,2]:0:0,' ',fn[i,3]:9:3);

end;

writeln(f3,'charges entre noeuds');

writeln(f3,'********************');

writeln(f3,'noeud valeur nature');

for i:= 1 to nfen do

begin

if fen[i,4]=2 then

nature:='CONCENTREE'

else

nature:='REPARTIE';

writeln ( f3,trunc(fen[i,1]):2,' ',fen[i,3]:9:3,' ', nature);

end;

writeln(f3);

writeln(f3);

writeln(f3,'proprietes des elements');

writeln(f3,'***********************');

writeln(f3,'elem Sec iner E');

for i:= 1 to nelt do

begin

write( f3,i:2,' ',prop[connec[i,nnel+1],1]:5:4,' ',prop[connec[i,nnel+1],2]:6:4,' ');

writeln(f3,prop[connec[i,nnel+1],3]:9:4);

end;

end;

begin

clrscr;

writeln;

writeln;

writeln;

writeln('=====================================================================');

writeln('= *************************************************************** =');

writeln('= =');

writeln('= CALCUL DES STRUCTURES PAR LA METHODE DES ELEMENTS FINIS =');

writeln('= =');

writeln('= *************************************************************** =');

writeln('= =');

writeln('= =');

writeln('= Programme de Mr: =');

writeln('= ********************************* =');

writeln('= * SIMO2309 * =');

writeln('= * ETUDIENT * =');

writeln('= * DEPARTEMENT DE GENIE CIVIL * =');

writeln('= * UNIVERSITE MOHAMED BOUDIAF * =');

writeln('= ********************************* =');

writeln('= =');

writeln('=====================================================================');

writeln;

writeln;

writeln;

writeln(' APPUIYEZ SUR << ENTER >> POUR CONTINUER');

readln;

clrscr;

WRITELN;

writeln;

writeln('DONNEZ LE NOM DU FICHIER DE DONNEES EN INDIQUANT SON CHEMIN D''ACCES');

readln(fd);

fdon:=fd+'.don';

assign(f1,fd);

assign(f3,fdon);

reset(f1);

don;

close(f1);

nt:=3*nnt;

rewrite(f3);

impdon;

close(f3);

writeln('Consultez les fichiers:');

writeln(' ',fdon,' pour les donn‚es');

writeln(' ');

writeln(' ' );

writeln(' Appyuez pour continuer');

readln;

end.

Link to comment
Share on other sites

  • 1 year later...

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...