平面刚架静力分析有限元程序

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

有限单元法

平面刚架静力分析程序

#include

#include"string.h"

#include"stdlib.h"

#include"stdio.h"

#include"math.h"

void hbw();

void sncs(int nel);

void fix(int np);

void trmat();

void fis(int nel);

void fpj();

void force();

void stiff();

void addsm();

void restr();

void matmul();

void soleq();

void outdis();

float sm[6][6],tsm[300][30],res[60][2],pj[300],t[6][6],d[6][6],r[300],

fo[6],foj[6],pf[200][4],x[100],y[100],ae[10][3],sl,sn,cs,eal,eil;

int nj,ne,nt,nr,npj,npf,nn,mbw,jel[100][2],nae[100],is[6];

FILE *infile,*outfile;

/************主函数**************/

void main()

{

char name1[30],name2[30];

int i,j,nel,np;

printf("please enter data-filename\n");

scanf("%s",name1);

printf("please enter result-filename\n");

scanf("%s",name2);

if((infile=fopen(name1,"r"))!=NULL)

{

fscanf(infile,"%d%d%d%d%d%d",&nj,&ne,&nt,&nr,&npj,&npf);

for(i=0;i

for(i=0;i

for(i=0;i

for(i=0;i

}

else

{

printf("the data-file not exit!");

exit(1);

}

nn=3*nj;

outfile=fopen(name2,"w");

if(outfile==NULL)

{printf("the result-file not exist!");exit(1);}

fprintf(outfile," statis analysis of plane frame\n");

fprintf(outfile,"input data\n");

fprintf(outfile,"************\n");

fprintf(outfile,"control data\n");

fprintf(outfile,"the num.of node:%3d\n",nj);

fprintf(outfile,"the num.of mem:%3d\n",ne);

fprintf(outfile,"the num.of type of section characteristic:%3d\n",nt);

fprintf(outfile,"the num.of restricted degrees of freedom:%3d\n",nr);

fprintf(outfile,"the num.of nodal loads:%3d\n",npj);

fprintf(outfile,"the num.of non-nodal loads:%3d\n",npf);

fprintf(outfile,"the num.of nodal degrees of freedom:%3d\n",nn);

fprintf(outfile,"information of mem.\n");

fprintf(outfile,"mem. start node end node type\n");

for(i=0;i

fprintf(outfile,"%5d%10d%10d%10d\n",i+1,jel[i][0],jel[i][1],nae[i]);

fprintf(outfile,"coordinates x and y of nodes\n");

fprintf(outfile,"node x y\n");

for(i=0;i

fprintf(outfile,"%10d%10.2f%10.2f\n",i+1,x[i],y[i]);

fprintf(outfile,"information of cross section each mem.\n");

fprintf(outfile,"type aera moment of interia elastic modulus\n");

for(i=0;i

fprintf(outfile,"%8d%15.5f%15.5f%20.2f\n",i+1,ae[i][0],ae[i][1],ae[i][2]);

fprintf(outfile,"information restriction\n");

fprintf(outfile,"rester.-no r estr.-disp.-no restr.-disp.\n");

for(i=0;i

fprintf(outfile,"%10d%19.3f%19.3f\n",i+1,res[i][0],res[i][1]);

hbw();

for(i=0;i

if(npj==0) goto aa;

fprintf(outfile,"nodal loads\n");

fprintf(outfile,"node px py zm\n");

for(i=0;i

{ int no;

相关文档
最新文档