0001 function Ke=CreateKMatrix(beamelem,grids,materials,inputs,analysis_type)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 if strcmpi(analysis_type,'diagnostic_hutter'),
0012
0013 Ke=CreateKMatrixHutter(beamelem,grids,materials,inputs);
0014
0015 else
0016 error('CreateKMatrix/beam error message: analysis type not supported yet')
0017 end
0018 end
0019
0020 function Ke=CreateKMatrixHutter(beamelem,grids,materials,inputs)
0021
0022
0023 numgrids=2;
0024 DOFPERGRID=2;
0025 numdof=numgrids*DOFPERGRID;
0026
0027
0028 Ke=elemmatrix(numdof);
0029
0030
0031 for i=1:numgrids,
0032 doflist=grids(beamelem.g(i)).grid.doflist;
0033 for j=1:DOFPERGRID,
0034 dof=doflist(j);
0035 Ke.row_indices((i-1)*DOFPERGRID+j)=dof;
0036 end
0037
0038 dof=doflist(1);
0039 end
0040
0041
0042 if (beamelem.onbed==1),
0043 Ke.terms=[ 1 0 0 0
0044 0 1 0 0
0045 -1 0 1 0
0046 0 -1 0 1];
0047 else
0048 Ke.terms=[ 0 0 0 0
0049 0 0 0 0
0050 -1 0 1 0
0051 0 -1 0 1];
0052 end
0053 end