| space_frame.html |
Description of space_frame

space_frame.m
PURPOSE
SPACE ELASTIC-FRAME SYSTEM ANALYSIS WITH LINEAR STATIC
SYNOPSIS
function [Pg,Pl,Hu] = space_frame
DESCRIPTION
SPACE ELASTIC-FRAME SYSTEM ANALYSIS WITH LINER STATIC
METHOD.
H.C.E. Ali ÖZGÜL (C) (R) 08-09-2007
Description:
In this matlap application had descriptioned, space elastic
frame system of structural analysis as linear static methods.
Base-Algorithm:
Example: [K] solution
_______________________________
| Local axis system per element | [K]_local
|________stiffness matrix_______|
|
| [T]
______________________________\|/____________________________
| Tranformation matrix for global to local axis system and |
|____ Conversion matrix for local to global axis system and___|
|
_________________________\|/_______________________
| Global axis system per element stiffness matrix |
|___________________________________________________|
| [K]global
_________________________\|/_______________________
| System stiffness matrix with superposition |
|__________________________________________________|
| [K]sis
_________________________\|/_______________________
| System loads vector with superposition |
|__________________________________________________|
| [Q]sis & [P]sis
_________________________\|/_______________________
| System displacements [K]{D}+{f}={P} |
|__________________________________________________|
| [K]sis*{D}={P-Q}sis
|
_____________________________\|/____________________________
| Global axis system node reactions {P}global |
| Local axis system node reactions {P}local =[T].{P}global|
|___________________________________________________________|
Example :
Pglobal =
[ 0.0000] [ 0.0000 ] [ 0.0000 ] [ 0.0000 ] fx
[ 6.7015] [-6.7015 ] [ 8.4030 ] [-6.5970 ] fy
[ 0.0000] [-0.0000 ] [ 0.0000 ] [-0.0000 ] fz
[16.7537] [-16.7537] [-0.0000 ] [-0.0000 ] Mxx
[-0.0000] [-0.0000 ] [-0.0000 ] [ 0.0000 ] Myy
[ 1.2092]1(i) [-1.2092 ]2(i) [ 2.4184 ]3(i) [-11.1934]4(i) Mzz
[-0.0000] [-0.0000 ] [-0.0000 ] [-0.0000 ]
[-6.7015] [ 6.7015 ] [1.5970 ] [ 6.5970 ]
[-0.0000] [ 0.0000 ] [-0.0000 ] [ 0.0000 ]
[16.7537] [-16.7537] [ 0.0000 ] [-0.0000 ]
[-0.0000] [-0.0000 ] [-0.0000 ] [ 0.0000 ]
[-1.2092]1(j) [ 1.2092 ]2(j) [ 11.1934]4(j) [-15.1947]4(j)
References:
{
CROSS-REFERENCE
INFORMATION
This function calls:
This function is called by:
SUBFUNCTIONS
function
[freedom,R,Re] = frame_element_topology (No,Node,Nom,Re)
function
[global_loads, Qsis ] =
function
[T,K_g,Hu] = frame_system_stiffness (m_p,p_p,No,P,R,Qsis)
function [Pg,Pl]
= frame_node_reactions(No,K_g,T,Hu,global_loads)
function
[node_coor_x , node_coor_y ,node_coor_z]=frame_node_move(s)
function
[loads_transformation_matrix] = load_transformation(s,betan)
function
[frame_transformation_matrix L] = frame_transformation(betan,s)
function
frame_local_stiffness = local_stiffness(A,L,E_x,E_z,G,I_x,I_z,J_p)
function
uniform_load_vector = uniform_load_1(qo,P,a,b,L,logical,load_type)
function
uniform_load_vector = uniform_load_2(qo,P,a,b,L,logical,load_type)
function uniform_load_vector_n =
load_logical(fx_i , fy_i , Mz_i ,
SOURCE CODE
0001 function [Pg,Pl,Hu] = space_frame
0002 % SPACE ELASTIC-FRAME SYSTEM ANALYSIS WITH LINER STATIC
0003 % METHOD.
0004 % H.C.E. Ali ÖZGÜL (C) (R) 08-09-2007
0005 % Description:
0006 %
0007 % In this matlap application had descriptioned, space elastic
0008 % frame system of structural analysis as linear static methods.
0009 %
0010 % Base-Algorithm:
0011 % Example: [K] solution
0012 % _______________________________
0013 % | Local axis system per element | [K]_local
0014 % |________stiffness matrix_______|
0015 % |
0016 % | [T]
0017 % ______________________________\|/____________________________
0018 % | Tranformation matrix for global to local axis system and |
0019 % |____ Conversion matrix for local to global axis system and___|
0020 % |
0021 % _________________________\|/_______________________
0022 % | Global axis system per element stiffness matrix |
0023 % |___________________________________________________|
0024 % | [K]global
0025 % _________________________\|/_______________________
0026 % | System stiffness matrix with superposition |
0027 % |__________________________________________________|
0028 % | [K]sis
0029 % _________________________\|/_______________________
0030 % | System loads vector with superposition |
0031 % |__________________________________________________|
0032 % | [Q]sis & [P]sis
0033 % _________________________\|/_______________________
0034 % | System displacements [K]{D}+{f}={P} |
0035 % |__________________________________________________|
0036 % | [K]sis*{D}={P-Q}sis
0037 % |
0038 % _____________________________\|/____________________________
0039 % | Global axis system node reactions {P}global |
0040 % | Local axis system node reactions {P}local =[T].{P}global|
0041 % |___________________________________________________________|
0042 %
0043 %
0044 % Example :
0045 % Pglobal =
0046 %
0047 % [ 0.0000] [ 0.0000 ] [ 0.0000 ] [ 0.0000 ] fx
0048 % [ 6.7015] [-6.7015 ] [ 8.4030 ] [-6.5970 ] fy
0049 % [ 0.0000] [-0.0000 ] [ 0.0000 ] [-0.0000 ] fz
0050 % [16.7537] [-16.7537] [-0.0000 ] [-0.0000 ] Mxx
0051 % [-0.0000] [-0.0000 ] [-0.0000 ] [ 0.0000 ] Myy
0052 % [ 1.2092]1(i) [-1.2092 ]2(i) [ 2.4184 ]3(i) [-11.1934]4(i) Mzz
0053 %
0054 % [-0.0000] [-0.0000 ] [-0.0000 ] [-0.0000 ]
0055 % [-6.7015] [ 6.7015 ] [1.5970 ] [ 6.5970 ]
0056 % [-0.0000] [ 0.0000 ] [-0.0000 ] [ 0.0000 ]
0057 % [16.7537] [-16.7537] [ 0.0000 ] [-0.0000 ]
0058 % [-0.0000] [-0.0000 ] [-0.0000 ] [ 0.0000 ]
0059 % [-1.2092]1(j) [ 1.2092 ]2(j) [ 11.1934]4(j) [-15.1947]4(j)
0060 %
0061 % References:
0062 %{
0063 [1] Robert D. Cook, David S. Malkus, Michael E. Plesha, Concepts and
0064 Applications of Finite Element Analysis, John-Wiley Sons,1989,
0065 no:88-27929.
0066
0067 [2] T.Y. Yang, Finite Element Structural Analysis, Prentice-Hall
0068 International Series in Civil Engineering and Engineering Mechanics,
0069 1986, ISBN:0-13-317116-7.
0070
0071 [3] Kasimzade A.A., Finite Element Method : Foundation and Application to
0072 Earthquake Engineering (is included education and finite element
0073 analysis programs CD), Istanbul, Beta Publication,(First edition 1997)
0074 Second edition, 2004, p.827.(ISBN 975-511-379-7).
0075
0076 [4] Kasimzade A.A., Structural Dynamics : Theory and Application to
0077 Earthquake Engineering (is included education and dynamic analysis
0078 programs CD) , Istanbul, Beta Publication, (First edition 1998) Second
0079 edition, 2004, p.527. (ISBN 975-511-381-9).
0080
0081 [5] J.N.Reddy, D.K. Gartling, The Finite Element Method in Heat Transfer
0082 and Fluid Dynamics, Second edition,CRC Press,no:DE-AC04-76DP00789.
0083
0084 [6] Chuen-Yuan Chia, Nonlinear Analysis of Plates, McGraww-Hill Press,1980,
0085 ISBN: 0-07-010746-7.
0086
0087 [7] Harry Kraus, Thin Elastic Shells, John Wiley &Sons inc.,1967,Library
0088 of Congress Catalog Card Number: 67-23328.
0089
0090 [8] William Weaver, Paul R. Johnston, Finite Elementsd for Structural
0091 Analysis Prentice-Hall Inc.,1984, ISBN: 0-13-317099-3.
0092
0093
0094 [9] A. Laulusa,O.A. Bauchau ,J-Y. Choi,V.B.C. Tan c, L. Li, Evaluation of
0095 some shear deformable shell elements, Elsevier Science, 18 October
0096 2005,pp:43-(2006)-5033-5054
0097
0098
0099 [10] Kasimzade A.A., Theory of Elasticity and Structural Analysis of space
0100 frame, membrane, plate, shell, asolid, solid systems (is included
0101 education and finite element analysis programs-2 diskettes ) ,
0102 Istanbul ,"Beta" Publication, 2000, p.401 . (ISBN 975-486-866-2).
0103 %}
0104
0105
0106 global node_coordinates
0107 global node_position
0108 global freedom
0109
0110
0111 clc
0112
0113 %____________________________
0114 % INPUT-VERIABLES [1,2,3,4,5]
0115 %_________________|
0116
0117
0118
0119 %
0120 %[1]____________[ GLOBAL COORDINATES ]
0121 % {x_g} {y_g} {z_g}
0122 node_coordinates = [ 0.00 0.00 5.00
0123 0.00 0.00 0.00
0124 0.00 0.00 -5.00
0125 4.00 0.00 0.00
0126 8.00 3.00 0.00];
0127 %___________________________________|
0128 Node=size(node_coordinates,1);
0129
0130
0131
0132
0133 %[2]______________[ POSITION MATRIX ]
0134 % Node(i)--->--Node(j)
0135 node_position = [1 2
0136 2 3
0137 2 4
0138 4 5];
0139
0140 %___________________________________|
0141 No=size(node_position,1);
0142
0143
0144
0145 %[3]_____________[ MATERIAL PROPERTIES ]
0146 % E_x ,E_z, G (KN/m**2) (SI)
0147 % I_x ,Iz ,I_xz ,Jp (m**4)
0148 % A = cross sectional area (m**2)
0149
0150 % E_x E_z G I_x I_z I_xz A Jp
0151 m_p = [ 2E+6 2E+6 1E+5 2.6E-3 0.651E-3 0.00 0.125 ];
0152
0153
0154
0155 % frame_beta (B1) load_beta (B2)
0156 p_p = [ 0.00 0.00 ];
0157
0158
0159 m_p = m_p';
0160 p_p = p_p';
0161
0162
0163 %if all element properties is equal than.
0164 for i=1:No
0165 p_p(:,i)=p_p(:,1);
0166 m_p(:,i)=m_p(:,1);
0167
0168 %Polar inertia moment
0169 % J_p = I_x + I_z - I_xz
0170 J_p = m_p(4,i) + m_p(5,i) - m_p(6,i);
0171 m_p(8,i)=J_p;
0172 end
0173 %__________________________________|
0174
0175 for i=1:Node; Re(i,:)=[1 1 1 1 1 1]; end
0176 Nom=size(Re,2); %One node's total degree of freedom.
0177
0178
0179
0180
0181
0182 %[4]______________[ SYSTEM SUPPORT ]
0183 %Re(Node number,:)=[ u(x) v(y) w(z) Qxx Qyy Qzz]
0184 Re(1,:)=[1 0 0 0 0 0];
0185 Re(3,:)=[1 0 0 0 0 0];
0186 Re(5,:)=[0 0 0 0 0 0];
0187 %_________________________________|
0188
0189
0190
0191
0192 % if not is empty P and load_matrix than hide this line else
0193 % active this line for ;
0194 [freedom ,R,Re] = frame_element_topology (No,Node,Nom,Re);
0195
0196 P(freedom) = 0;
0197 %load_matrix = [];
0198
0199
0200
0201 %[5]_______________[ SYSTEM LOAD ]
0202
0203 %Re(Node number, freedoom number)[fx fy fz Mxx Myy Mzz]
0204 P(Re(2,2)) = -5.00;
0205 P(Re(4,2)) = -5.00;
0206
0207 % |---|
0208 % Element_no qo P a b L logical , load_type ,load_case )
0209 load_matrix=[ 3 , 2.00 , 0.00 ,0 , 0 , 5 , true , 1 , 2 ];
0210 % 2 , 2.00 , 0.00 ,0 , 0 , 5 , true , 1 , 1 ];
0211 % 4 , 4.00 , 0.00 ,0 , 0 , 5 , true , 12 , 1 ];
0212
0213 %________________________________|
0214
0215
0216
0217 %Analysis Space-Frame system
0218
0219 %[freedom ,R] = frame_element_topology (No,Node,Nom,Re);
0220
0221 [global_loads, Qsis ] = frame_system_loads (R,load_matrix,p_p ,freedom ,No);
0222
0223 [T,K_g,Hu] = frame_system_stiffness (m_p,p_p,No,P,R,Qsis) ;
0224
0225 [Pg,Pl] = frame_node_reactions(No,K_g,T,Hu,global_loads);
0226
0227
0228
0229
0230
0231 %==========================
0232 % PROGRAM SUB-FUNCTIONS
0233 %==========================
0234
0235 %____________________________________________________________|||||||||||||
0236 function [freedom,R,Re] = frame_element_topology (No,Node,Nom,Re)
0237 %
0238 % Description:
0239 % In this sub-function calculated per element reology matrix
0240 %
0241 % Syntax:
0242 % Node = System total node value
0243 % Nom = one node total freedom value.
0244
0245
0246 global node_position
0247
0248 %Accumulate method
0249 freedom=0;
0250 for i=1:Node;
0251 for j=1:Nom;
0252 if Re(i,j)==1 ;
0253 freedom = freedom +1;
0254 Re(i,j) = freedom;
0255 end
0256 end
0257 end
0258
0259
0260 %Topology method.
0261 for i=1:No
0262 R(i,:)=[Re(node_position(i,1),:) Re(node_position(i,2),:) ];
0263 end
0264 %________________________________|
0265
0266
0267
0268
0269
0270
0271
0272
0273 %________________________________________________________________||||||||||
0274 function [global_loads, Qsis ] = ...
0275 frame_system_loads (R,load_matrix,p_p ,freedom ,No)
0276 %
0277 % Description:
0278 %
0279 % In sub-function produced system internal-load vector with
0280 % global and local node reactions.
0281 %
0282 % Syntax :
0283 % load_matrix = Uniform loads description matrix
0284 % p_p = beta angle matrix
0285 % freedom = total system freedom
0286 % No = total element no
0287
0288 % [ERROR ]
0289 if isempty(load_matrix) == true
0290 global_loads= 0;
0291 Qsis = 0;
0292 return
0293 end
0294
0295
0296 %Open dimension for cumulative variables.
0297 Qsis(freedom) = 0 ;
0298 global_loads(No,:) = zeros(1,12);
0299 local_loads(No,:) = zeros(1,12);
0300
0301
0302 for i=1:size(load_matrix,1)
0303
0304 if load_matrix(i,9)==1 %look system_load_1.pdf
0305 load_vector = uniform_load_1( load_matrix(i,2), ...
0306 load_matrix(i,3), ...
0307 load_matrix(i,4), ...
0308 load_matrix(i,5), ...
0309 load_matrix(i,6), ...
0310 load_matrix(i,7), ...
0311 load_matrix(i,8));
0312
0313 else %look system_load_2.pdf
0314 load_vector = uniform_load_2( load_matrix(i,2), ...
0315 load_matrix(i,3), ...
0316 load_matrix(i,4), ...
0317 load_matrix(i,5), ...
0318 load_matrix(i,6), ...
0319 load_matrix(i,7), ...
0320 load_matrix(i,8));
0321 end
0322
0323 %degree
0324 betan = p_p(2,i);
0325 s = load_matrix(i,1);
0326
0327 %[loads_transformation_matrix] = load_transformation(s,betan);
0328 T = load_transformation(s,betan);
0329
0330
0331 %global load_vector
0332 global_load_vector = T'*load_vector;
0333
0334
0335 %This matrix need global and local system node reactions
0336 global_loads(load_matrix(i,1),:) = global_load_vector;
0337 local_loads(load_matrix(i,1),:) = load_vector;
0338
0339
0340 %Global axis per element uniform out load superposition
0341 %Qsis(freedom)=0;
0342 for n=1:No;
0343 for sat=1:12;
0344 if (R(n,sat)~=0)
0345 Qsis(R(n,sat))=Qsis(R(n,sat)) + global_loads(n,sat);
0346 end
0347 end
0348 end
0349
0350 end % if-than
0351 %____________________________________|
0352
0353
0354
0355
0356
0357 %________________________________________________________________||||||||||
0358 function [T,K_g,Hu] = frame_system_stiffness (m_p,p_p,No,P,R,Qsis)
0359 %
0360 % Description:
0361 % In this sub-function calculated frame-element local and
0362 % global system stiffness matrix, system stiffness matrix,
0363 % global to local axis system transformation matrix and
0364 % global nodes model displacement matrix [Hu].
0365 %
0366 % Syntax:
0367 % m_p = material properties matrix.
0368 % p_p = axial rotation matrix angle.
0369 % betan = axial rotation angle
0370 % s = elemet no.
0371 %
0372 % K_l = Local axis system stiffness matrix
0373 % T = Tranformation matrix
0374 % K_g = Global axis system per element global stiffness matrix
0375 % Ksis = System stiffness matrix
0376 % Hu = Per nodes global system modal displacement matrix
0377 global freedom
0378 for s=1:No
0379 %Material base properties
0380 E_x = m_p(1,s) ; E_z = m_p(2,s) ; G = m_p(3,s) ;
0381 I_x = m_p(4,s) ; I_z = m_p(5,s) ; J_p = m_p(8,s) ;
0382 A = m_p(7,s) ; betan = p_p(1,s) ;
0383
0384
0385 %Global--->Local transformation matrix [T]
0386 [T(:,:,s) L] = frame_transformation( betan , s) ;
0387
0388
0389 %Local axis system stiffness matrix
0390 K_l(:,:,s) = local_stiffness(A,L,E_x,E_z,G,I_x,I_z,J_p);
0391
0392
0393 %Global axis system stiffness matrix
0394 K_g(:,:,s)=T(:,:,s)'*K_l(:,:,s)*T(:,:,s);
0395
0396 end %--s
0397
0398
0399 %System stiffness matrix superposing with topology method.
0400 Ksis(freedom,freedom)=0;
0401 for n=1:No;
0402 for sat=1:12;
0403 for sut=1:12;
0404 if (R(n,sat)~=0)
0405 if (R(n,sut)~=0);
0406 Ksis(R(n,sut),R(n,sat))=Ksis(R(n,sut),R(n,sat)) + K_g(sat,sut,n);
0407 end
0408 end
0409 end
0410 end
0411 end
0412
0413
0414
0415 %System stiffness matrix singularity control [ERROR - 2]
0416 if size(Ksis,2) == rank(Ksis)
0417 D = Ksis^-1*(P-Qsis)';
0418 else
0419 disp('Warning: System stiffness matrix solution error')
0420 disp('Control the system boundary conditions')
0421 disp(R);
0422 return
0423 end
0424
0425
0426 %Moving per node freedom-displacement global system
0427 for v = 1 : No;
0428 for m = 1 :12;
0429 u = R(v, m);
0430 if u ~=0
0431 Hu(v, m,:) = D(u) ;
0432 else
0433 Hu(v,m)=0;
0434 end
0435 end
0436 end
0437 %_____________________________|
0438
0439
0440
0441
0442
0443
0444 %_______________________________________________________________|||||||||||
0445 function [Pg,Pl] = frame_node_reactions(No,K_g,T,Hu,global_loads)
0446 %
0447 % Description:
0448 % In this sub-function calculated frame element has
0449 % global and local node reactions
0450 % Syntax:
0451 % No = Total frame-element no
0452 % Kg = Global axis system stiffness matrix
0453 % T = Transformation matrix global--->local
0454 % Hu = Global system modal displacement matrix
0455 % global_loads = Uniform load edge node reactions on frame element
0456
0457
0458 for s=1 :No;
0459 % [K]{D} + {f} = {P}
0460 %Global reactions
0461 if global_loads==0;
0462 Pg(:,s) = K_g(:,:,s)*Hu(s,:)';
0463 else
0464 Pg(:,s) = K_g(:,:,s)*Hu(s,:)'+global_loads(s,:)';
0465 end
0466 %Local axis reactions.
0467 %local_loads(:,v)=T(:,:,v)*global_loads(v,:)
0468 Pl(:,s) = T(:,:,s)*Pg(:,s);
0469 end
0470 %__________________________________|
0471
0472
0473
0474
0475
0476
0477
0478
0479
0480
0481
0482
0483 %________________________________________________________________||||||||||
0484 function [node_coor_x , node_coor_y ,node_coor_z]=frame_node_move(s)
0485 % Description:
0486 % In this matlab sub-function moved global system nodes to
0487 % local frame-element (i) and (j) nodes.
0488 %
0489 % Syntax:
0490 % s = Frame element no:
0491 % Here other variables are global
0492
0493
0494 global node_coordinates
0495 global node_position
0496
0497 %Moving global-axis-system coordinates frame local axis
0498 node_coor_x = [node_coordinates(node_position(s,1),1) ...
0499 node_coordinates(node_position(s,2),1)];
0500
0501 node_coor_y = [node_coordinates(node_position(s,1),2) ...
0502 node_coordinates(node_position(s,2),2)];
0503
0504 node_coor_z = [node_coordinates(node_position(s,1),3) ...
0505 node_coordinates(node_position(s,2),3)];
0506
0507 %_______________________________|
0508
0509
0510
0511
0512
0513 %________________________________________________________________||||||||||
0514 function [loads_transformation_matrix] = load_transformation(s,betan)
0515 % Description:
0516 % In this sub-function is produce tranformation matrix for
0517 % local axis system of uniform load reactions.
0518 %
0519 % Syntax:
0520 % s = Uniform load on frame element no
0521 % betan = Rotation matrix for uniform loads x-local axis
0522
0523
0524 %global node_coordinates
0525 %global node_position
0526
0527 [load_coor_x load_coor_y load_coor_z]= frame_node_move(s);
0528
0529
0530 %Cartesian coordinates
0531 x1 = load_coor_x(1); x2 = load_coor_x(2);
0532 y1 = load_coor_y(1); y2 = load_coor_y(2);
0533 z1 = load_coor_z(1); z2 = load_coor_z(2);
0534
0535
0536 %Direction cosinesses
0537 L = sqrt((x2-x1)^2+(y2-y1)^2+(z2-z1)^2) ;
0538 ly = (x2-x1) / L ;
0539 my = (y2-y1) / L ;
0540 ny = (z2-z1) / L ;
0541 Q = sqrt(1 - ny ^ 2) ;
0542
0543
0544 %radii<-----degree
0545 betan=betan*pi/180;
0546
0547
0548
0549 %"x" axis direction direction cosinesses for load position
0550 %base_transform = [ly my ny
0551 % -my ly 0
0552 % -ny 0 ly ];
0553 switch abs(ny)
0554 case{+1}
0555
0556 base_transform = [ 0.00 0.00 1.00
0557 0.00 1.00 0.00
0558 1.00 0.00 0.00 ];
0559 otherwise
0560
0561 base_transform = [ ly my ny
0562 my / Q ly / Q 0.00
0563 -ly*ny / Q -my*ny / Q Q ]';
0564 end
0565
0566 %x local axis rotation matrix
0567 load_rotation = [ 1.00 0.00 0.00
0568 0.00 cos(betan) -sin(betan)
0569 0.00 sin(betan) cos(betan)];
0570
0571 %Multi transformation
0572 Tn=load_rotation*base_transform;
0573
0574 %Frame element [T]
0575 loads_transformation_matrix= [ Tn zeros(3,3) zeros(3,3) zeros(3,3)
0576 zeros(3,3) Tn zeros(3,3) zeros(3,3)
0577 zeros(3,3) zeros(3,3) Tn zeros(3,3)
0578 zeros(3,3) zeros(3,3) zeros(3,3) Tn ];
0579
0580 %____________________________________|
0581
0582
0583
0584
0585
0586 %_______________________________________________________________|||||||||||
0587 %
0588 % Description:
0589 % In this sub-function had produced of elastic-space-frame element
0590 % conversion matrix local to global axis system ( [C] matrix )
0591 % transform matrix global to local axis system ( [T] matrix )
0592 % for local axis "y" direction ny==-+1 of special station and
0593 % ny<>-+1 general frame of space-position.
0594 %
0595 % Syntax: node_coordinates: System all node's global cartesian coordinates
0596 % node_position : System all frame-element (i) and (j) node's
0597 % position matrix.
0598 %
0599 % betan : Frame-element has surface rotation angle as
0600 % right-hand-rule.
0601 %
0602
0603
0604 function [frame_transformation_matrix L] = frame_transformation(betan,s)
0605 %global node_coordinates
0606 %global node_position
0607
0608 [node_coordinates_x ,...
0609 node_coordinates_y ,...
0610 node_coordinates_z]= frame_node_move(s);
0611
0612 %Cartesian coordinates
0613 x1 = node_coordinates_x(1); x2 = node_coordinates_x(2);
0614 y1 = node_coordinates_y(1); y2 = node_coordinates_y(2);
0615 z1 = node_coordinates_z(1); z2 = node_coordinates_z(2);
0616
0617 %Direction cosinesses
0618 L = sqrt((x2-x1)^2+(y2-y1)^2+(z2-z1)^2) ;
0619 ly = (x2-x1) / L ;
0620 my = (y2-y1) / L ;
0621 ny = (z2-z1) / L ;
0622 Q = sqrt(1 - ny ^ 2) ;
0623
0624 %radii<-----degree
0625 betan=betan*pi/180;
0626
0627
0628
0629 % |||||||
0630 % |_______ny==+1
0631 if ny==1 ; %In special conversion for ny=+1 and Q=0 than
0632 % Local axis system->>[C]-->> Special axis system
0633 % x_s = x_o*cos(betan) - z_o*sin(betan)
0634 % y_s = y_o
0635 % z_s = x_o*sin(betan) + z_o*cos(betan)
0636
0637
0638 %Special station of frame_transformation matrix
0639 % {X} [0.00 0.00 1.00] {x_s}
0640 % { } [ ] { }
0641 % {Y} = [1.00 0.00 0.00]*{y_s}
0642 % { } [ ] { }
0643 % {Z}global [0.00 1.00 0.00] {z_s}local
0644
0645 % {f}global = [C].{f}local
0646 %(Conversion matrix local------>global)
0647
0648
0649 frame_rotation_matrix = [cos(betan) 0.00 -sin(betan)
0650 0.00 1.00 0.00
0651 sin(betan) 0.00 cos(betan)];
0652
0653
0654 frame_transform = [ 1.00 0.00 0.00
0655 0.00 0.00 -1.00
0656 0.00 1.00 0.00 ];
0657
0658 %Conversion matrix local to global axis system
0659 frame_conversion_matrix = frame_transform*frame_rotation_matrix;
0660
0661 %Transformation matrix global to local axis system
0662 frame_trans = frame_conversion_matrix^-1;
0663 end
0664
0665
0666 % |||||||
0667 % |_______ny==-1
0668 if ny==-1 %In special conversion for ny=-1 and Q=0 than
0669
0670
0671 %Conversion matrix for axial (y-y) rotation as betan (right-hand-rule)
0672 frame_rotation_matrix =[ cos(betan) 0.00 sin(betan)
0673 0.00 1.00 0.00
0674 -sin(betan) 0.00 cos(betan) ];
0675
0676 frame_transform = [ 1.00 0.00 0.00
0677 0.00 0.00 1.00
0678 0.00 -1.00 0.00];
0679
0680 %{x'} {xo}
0681 %{y'} = [C]Rotation*{yo} => [XYZ]'=[C]r*[XYZ]o
0682 %{z'}special {zo}local
0683 %
0684 %{xo} {X}
0685 %{yo} = [C]conversion{Y} => [XYZ]o=[C]c*[XYZ]g =>
0686 %{zo}special {Z}global
0687 %
0688 %[XYZ]special = [C]r*[C]c*[XYZ]global (Conversion method)
0689
0690
0691 %Conversion matrix local to global axis system
0692 frame_conversion_matrix = frame_transform*frame_rotation_matrix;
0693
0694 %Transformation matrix global to local axis system
0695 frame_trans = frame_conversion_matrix^-1;
0696
0697 end
0698
0699
0700 % |||||||
0701 % |_______ny<>-1 and ny<>+1
0702
0703 if abs(ny)~= +1 %General conversion for ny<>-1 and ny<>+1,Q<>0 than
0704 %Conversion matrix for axial (y-y) rotation as betan (right-hand-rule)
0705 % my:"y" axis direction direction cosines
0706
0707 frame_rotation_matrix =[ cos(betan) 0.00 -my*sin(betan)
0708 0.00 1.00 0.00
0709 my*sin(betan) 0.00 cos(betan) ];
0710
0711 %Conversion matrix [C]=[T]'=[T]^-1
0712 frame_transform = [ my / Q -ly / Q 0.00
0713 ly my ny
0714 -ly*ny / Q -my*ny / Q Q ]';
0715
0716 %Conversion matrix local-->global [C]
0717 frame_conversion_matrix = frame_transform*frame_rotation_matrix;
0718
0719 %Transformation matrix global--->local [T]
0720 frame_trans = frame_conversion_matrix^-1;
0721
0722 end
0723
0724
0725 zero = zeros(3,3); % f[x,y,z]i M[x,y,z]i f[x,y,z]j M[x,y,z]j
0726 frame_transformation_matrix = [ frame_trans zero zero zero
0727 zero frame_trans zero zero
0728 zero zero frame_trans zero
0729 zero zero zero frame_trans];
0730
0731 %________________________________|
0732
0733
0734
0735
0736
0737 %_______________________________________________________________||||||||||
0738 function frame_local_stiffness = local_stiffness(A,L,E_x,E_z,G,I_x,I_z,J_p)
0739 %
0740 % Description:
0741 % In this sub-function is produce elastic space-frame
0742 % element has local axis stiffness matrix.
0743 %
0744 % Syntax:
0745 % A = Cross section area (m**2) (SI).
0746 % E_x = "x" axis elasticity module (KN/m**2).
0747 % E_z = "z" axis elasticity module (KN/m**2).
0748 % G = Shear elasticity module (KN/m**2).
0749 % I_x = "x" axis inertia moment (m**4).
0750 % I_z = "y" axis inertia moment (m**4).
0751 % J_p = I_x+I_z-I_xz Polar inertia moment (m**4).
0752 % L = Element's length. (m).
0753
0754
0755 % u_x(i) v_y(i) w_z(i) Qx_x(i) Qy_y(i) Qz_z(i)
0756 K_i_i = [ 12*E_z*I_z/(L^3) 0.00 0.00 0.00 0.00 -6*E_z*I_z/(L^2) %u_x (i)
0757 0.00 A*E_x/L 0.00 0.00 0.00 0.00 %v_y (i)
0758 0.00 0.00 12*E_x*I_x/(L^3) 6*E_x*I_x/(L^2) 0.00 0.00 %w_z (i)
0759 0.00 0.00 6*E_x*I_x/(L^2) 4*E_x*I_x/L 0.00 0.00 %Qx_x(i)
0760 0.00 0.00 0.00 0.00 G*J_p/L 0.00 %Qy_y(i)
0761 -6*E_z*I_z/(L^2) 0.00 0.00 0.00 0.00 4*E_z*I_z/L ]; %Qz_z(i)
0762
0763
0764 % u_x(j) v_y(j) w_z(j) Qx_x(j) Qy_y(j) Qz_z(j)
0765 K_i_j = [ -12*E_z*I_z/(L^3) 0.00 0.00 0.00 0.00 -6*E_z*I_z/(L^2) %u_x (i)
0766 0.00 -A*E_x/L 0.00 0.00 0.00 0.00 %v_y (i)
0767 0.00 0.00 -12*E_x*I_x/(L^3) 6*E_x*I_x/(L^2) 0.00 0.00 %w_z (i)
0768 0.00 0.00 -6*E_x*I_x/(L^2) 2*E_x*I_x/L 0.00 0.00 %Qx-x(i)
0769 0.00 0.00 0.00 0.00 -G*J_p/L 0.00 %Qy_y(i)
0770 6*E_z*I_z/(L^2) 0.00 0.00 0.00 0.00 2*E_z*I_z/L ]; %Qz_z(i)
0771
0772
0773 % u_x(i) v_y(i) w_z(i) Qx_x(i) Qy_y(i) Qz_z(i)
0774 K_j_i = [ -12*E_z*I_z/(L^3) 0.00 0.00 0.00 0.00 6*E_z*I_z/(L^2) %u_x (j)
0775 0.00 -A*E_x/L 0.00 0.00 0.00 0.00 %v_y (j)
0776 0.00 0.00 -12*E_x*I_x/(L^3) -6*E_x*I_x/(L^2) 0.00 0.00 %w_z (j)
0777 0.00 0.00 6*E_x*I_x/(L^2) 2*E_x*I_x/L 0.00 0.00 %Qx-x(j)
0778 0.00 0.00 0.00 0.00 -G*J_p/L 0.00 %Qy-y(j)
0779 -6*E_z*I_z/(L^2) 0.00 0.00 0.00 0.00 2*E_z*I_z/L ]; %Qz-z(j)
0780
0781
0782 % u_x(j) v_y(j) w_z(j) Qx_x(j) Qy_y(j) Qz_z(j)
0783 K_j_j = [ 12*E_z*I_z/(L^3) 0.00 0.00 0.00 0.00 6*E_z*I_z/(L^2) %u_x (j)
0784 0.00 A*E_x/L 0.00 0.00 0.00 0.00 %v_y (j)
0785 0.00 0.00 12*E_x*I_x/(L^3) -6*E_x*I_x/(L^2) 0.00 0.00 %w_z (j)
0786 0.00 0.00 -6*E_x*I_x/(L^2) 4*E_x*I_x/L 0.00 0.00 %Qx_x(j)
0787 0.00 0.00 0.00 0.00 G*J_p/L 0.00 %Qy_y(j)
0788 6*E_z*I_z/(L^2) 0.00 0.00 0.00 0.00 4*E_z*I_z/L ]; %Qz_z(j)
0789
0790
0791 %Space frame-element local axis system stiffness matrix
0792 frame_local_stiffness = [ K_i_i K_i_j
0793 K_j_i K_j_j ];
0794
0795 %__________________________________|
0796
0797
0798
0799
0800
0801 %_________________________________________________________________|||||||||
0802 function uniform_load_vector = uniform_load_1(qo,P,a,b,L,logical,load_type)
0803 %
0804 % Description:
0805 %
0806 % In this function had calculated internal force effects under
0807 % the uniform or single load on elastic frame system.
0808 %
0809 % Syntax:
0810 % qo = Uniform or not-uniform distribute load (KN/m)
0811 % P = Single loads
0812 % a,b,L = Frame element lenght components
0813 % logical = Frame system load position
0814 % if you see (i)-->---(j) logical = true or =1
0815 % if you see (i)--<---(j) logical = false or =0
0816 %
0817 % load_type = Please look loads combinations in "load_types1.pdf"
0818 %
0819
0820 switch load_type
0821 case {1}
0822 fx_i = 0.00 ;
0823 fy_i = 1/2*qo*L ;
0824 Mz_i = 1/8*qo*L^2;
0825 fx_j = 0.00 ;
0826 fy_j = 1/2*qo*L ;
0827 Mz_j = 0.00 ;
0828 case{2}
0829 fx_i = 0.00 ;
0830 fy_i = qo*a-(qo*a^2)/(2*L) ;
0831 Mz_i = 1/8*qo*a^2*(2-a/L)^2 ;
0832 fx_j = 0.00 ;
0833 fy_j = 1/2*qo*a^2/L;
0834 Mz_j = 0.00 ;
0835 case{3}
0836 c=L;L=a+b;
0837 fx_i = 0.00 ;
0838 fy_i = 1/2*qo*c ;
0839 Mz_i = 1/(16*L)*qo*c*(3*L^2-c^2) ;
0840 fx_j = 0.00 ;
0841 fy_j = 1/2*qo*c ;
0842 Mz_j = 0.00 ;
0843 case{4}
0844 c=L;L=a+b;
0845 fx_i = 0.00;
0846 fy_i = qo*b*c/L;
0847 Mz_i = 1/8*qo*b*c/L^2*(4*(L^2-b^2)-c^2);
0848 fx_j = 0.00;
0849 fy_j = qo*b*c/L;
0850 Mz_j = 0.00;
0851 case{5}
0852 fx_i = 0.00 ;
0853 fy_i = qo*a ;
0854 Mz_i = 1/(4*L)*qo*a^2*(3*L-2*a);
0855 fx_j = 0.00 ;
0856 fy_j = qo*a ;
0857 Mz_j = 0.00 ;
0858 case{6}
0859 fx_i = 0.00;
0860 fy_i = 1/4*qo*L;
0861 Mz_i = 5/64*qo*L^2;
0862 fx_j = 0.00;
0863 fy_j = 1/4*qo*L;
0864 Mz_j = 0.00;
0865 case{7}
0866 fx_i = 0.00;
0867 fy_i = qo*a/2-qo*a^2/(3*L)+qo*b^2/(3*L);
0868 Mz_i = qo*L/120*(L+b)*(7-3*b^2/L^2);
0869 fx_j = 0.00;
0870 fy_j = qo*b/2 + qo*a^2/(3*L)-qo*b^2/(3*L);
0871 Mz_j = 0.00;
0872 case{8}
0873 fx_i = 0.00;
0874 fy_i = 1/3*qo*L;
0875 Mz_i = 1/15*qo*L^2;
0876 fx_j = 0.00;
0877 fy_j = 1/6*qo*L;
0878 Mz_j = 0.00;
0879 case{9}
0880 fx_i = 0.00;
0881 fy_i = 1/2*qo*a;
0882 Mz_i = 1/(8*L)*qo*a^2*(2*L-a);
0883 fx_j = 0.00;
0884 fy_j = 1/2*qo*a;
0885 Mz_j = 0.00;
0886 case{10}
0887 fx_i = 0.00;
0888 fy_i = qo*L;
0889 Mz_i = 1/8*qo*(L^2-a^2*(2-a/L));
0890 fx_j = 0.00;
0891 fy_j = qo*L;
0892 Mz_j = 0.00;
0893 case{11}
0894 fx_i = 0.00;
0895 fy_i = qo(1)*L/3 + qo(2)*L/6;
0896 Mz_i = L^2/120*(8*qo(1)+7*qo(2));
0897 fx_j = 0.00;
0898 fy_j = qo(1)*L/6 + qo(2)*L/3;
0899 Mz_j = 0.00;
0900 case{12}
0901 fx_i = 0.00;
0902 fy_i = qo*L/pi;
0903 Mz_i = 1/10*qo*L^2;
0904 fx_j = 0.00;
0905 fy_j = qo*L/pi;
0906 Mz_j = 0.00;
0907 case{13}
0908 fx_i = 0.00;
0909 fy_i = 1/(L^3)*(P*b+1/2*P*a*b*(b+L));
0910 Mz_i = (1/2*P*a*b*(b+L))/(L^2);
0911 fx_j = 0.00;
0912 fy_j = 1/(L^3)*(P*a-1/2*P*a*b*(b+L));
0913 Mz_j = 0.00;
0914 case{14}
0915 %qo=n
0916 %
0917 fx_i = 0.00;
0918 fy_i = 1/qo*sum(P*(1:qo-1));
0919 Mz_i = 1/8*P*L*(1-1/qo);
0920 fx_j = 0.00;
0921 fy_j = 1/qo*sum(P*(1:qo-1));
0922 Mz_j = 0.00;
0923 end
0924
0925
0926 uniform_load_vector = load_logical(fx_i,fy_i,Mz_i,fx_j,fy_j,Mz_j,logical);
0927 %______________________________|
0928
0929
0930
0931
0932
0933 %________________________________________________________________|||||||||
0934 function uniform_load_vector = uniform_load_2(qo,P,a,b,L,logical,load_type)
0935 %
0936 % Description:
0937 %
0938 % In this function is calculate internal force effects under
0939 % the uniform or single load on elastic frame system.
0940 %
0941 % Syntax:
0942 % qo = Uniform or not-uniform distribute load (KN/m)
0943 % P = Single loads
0944 % a,b,L = Frame element lenght components
0945 % logical = Frame system load position
0946 % if you see (i)-->---(j) logical = true or =1
0947 % if you see (i)--<---(j) logical = false or =0
0948 %
0949 % load_type = Please look loads combinations in "load_types2.pdf"
0950 %
0951
0952
0953 switch load_type
0954 case {1}
0955 fx_i = 0.00;
0956 fy_i = 1/2*qo*L;
0957 Mz_i = 1/12*qo*L^2;
0958 fx_j = 0.00;
0959 fy_j = 1/2*qo*L;
0960 Mz_j =-1/12*qo*L^2;
0961 case{2}
0962 fx_i = 0.00 ;
0963 fy_i = qo*a-(qo*a^2)/(2*L);
0964 Mz_i = qo*a^2/4*(2-a*L*(8/3-a/L));
0965 fx_j = 0.00;
0966 fy_j = qo*a/(2*L);
0967 Mz_j =-qo/a^2/(12*L^2)*(4*L-3*a);
0968 case{3}
0969 c=L/qo;
0970 fx_i = 0.00;
0971 fy_i = 1/2*qo*c;
0972 Mz_i = 1/(24*L)*qo*c*(3*L^2-c^2);
0973 fx_j = 0.00;
0974 fy_j = 1/2*qo*c;
0975 Mz_j =-1/(24*L)*qo*c*(3*L^2-c^2);
0976 case{4}
0977 c=L;L=a+b;
0978 fx_i = 0.00;
0979 fy_i = qo*c/L*(b-c/2);
0980 Mz_i = qo*c/(12*L^2)*((4*L^2-c^2)*(2*b-a)-4*(2*b^3-a^3));
0981 fx_j = 0.00;
0982 fy_j = qo*c/L(a-c*2);
0983 Mz_j =-qo*c/(12*L^2)*((4*L^2-c^2)*(2*b-a)-4*(2*a^3-b^3));
0984 case{5}
0985 fx_i = 0.00;
0986 fy_i = qo*a;
0987 Mz_i = 1/(6*L)*qo*a^2*(3*L-2*a);
0988 fx_j = 0.00;
0989 fy_j = qo*a;
0990 Mz_j =-1/(6*L)*qo*a^2*(3*L-2*a);
0991 case{6}
0992 fx_i = 0.00;
0993 fy_i = 1/4*qo*L;
0994 Mz_i = 5/64*qo*L;
0995 fx_j = 0.00;
0996 fy_j = 1/4*qo*L;
0997 Mz_j =-5/64*qo*L^2;
0998 case{7}
0999 fx_i = 0.00;
1000 fy_i = 1/3*qo*(b^2-a^2)+qo*a/2;
1001 Mz_i = qo/(180*L)*(7*L^3-7*L^2*(2*b-a)+3*L*(2*a^2-b^2)-3*(2*a^3-b^3));
1002 fx_j = 0.00;
1003 fy_j = 1/3*qo*(b^2-a^2)+qo*a/2;
1004 Mz_j =-qo/(180*L)*(7*L^3+7*L^2*(2*b-a)-3*L*(2*a^2-b^2)-3*(2*a^3-b^3));
1005 case{8}
1006 fx_i = 0.00;
1007 fy_i = 2/3*qo*L;
1008 Mz_i = 1/20*qo*L^2;
1009 fx_j = 0.00;
1010 fy_j = 1/3*qo*L;
1011 Mz_j =-1/30*qo*L^2;
1012 case{9}
1013 fx_i = 0.00;
1014 fy_i = 1/2*qo*a;
1015 Mz_i = 1/(12*L)*qo*a^2*(2*L-a);
1016 fx_j = 0.00;
1017 fy_j = 1/2*qo*a;
1018 Mz_j =-1/(12*L)*qo*a^2*(2*L-a);
1019 case{10}
1020 fx_i = 0.00;
1021 fy_i = qo*a/2-qo*L/2;
1022 Mz_i = 1/12*qo*(L^2-a^2*(2-a/L));
1023 fx_j = 0.00;
1024 fy_j = qo*L;
1025 Mz_j =-1/(12)*qo*(L^2-a^2*(2-a/L));
1026 case{11}
1027 fx_i = 0.00;
1028 fy_i = qo(1)*L/6+qo(2)*L/3;
1029 Mz_i = L^2/60*(3*qo(1)+qo(2));
1030 fx_j = 0.00;
1031 fy_j = qo(1)*L/3 + qo(2)*L/6;
1032 Mz_j =-L^2/60*(2*qo(1)+3*qo(2));
1033 case{12}
1034 fx_i = 0.00;
1035 fy_i = qo*L/pi;
1036 Mz_i = 1/15*qo*L^2;
1037 fx_j = 0.00;
1038 fy_j = qo*L/pi;
1039 Mz_j =-1/15*qo*L^2;
1040 case{13}
1041 fx_i = 0.00;
1042 fy_i = P*b/L;
1043 Mz_i = P*a*b^2/L^2;
1044 fx_j = 0.00;
1045 fy_j = P*a/L;
1046 Mz_j =-P*b*a^2/L^2;
1047 case{14}
1048 fx_i = 0.00;
1049 fy_i = 1/qo*sum(P*(1:qo-1));
1050 Mz_i = 1/12*P*L*(qo+1/(2*qo));
1051 fx_j = 0.00;
1052 fy_j = 1/qo*sum(P*(1:qo-1));
1053 Mz_j =-1/12*P*L*(qo+1/(2*qo));
1054
1055 end
1056
1057 uniform_load_vector = load_logical(fx_i,fy_i,Mz_i,fx_j,fy_j,Mz_j,logical);
1058 %________________________________|
1059
1060
1061
1062
1063
1064 %_________________________________________________________________|||||||||
1065 function uniform_load_vector_n = load_logical(fx_i , fy_i , Mz_i ,...
1066 fx_j , fy_j , Mz_j ,...
1067 logical)
1068
1069 % Desctiption:
1070 % In this sub-function is selecting frame-element's uniform load
1071 % station. Here is possible two different station for loads.
1072 % logical = true
1073 % (i)-----<---||||support-(j) node edges
1074 % logical = false
1075 % (i)||||support----->--(j) node edges
1076 %
1077 % Syntax:
1078 % fx,fy...Mz = Local axis system uniform load reactions
1079 % logical = Local axis system uniform load station.
1080
1081
1082
1083 switch logical
1084 case {false}
1085 % (i)-----<---||||support-(j) node edges
1086 uniform_load_vector_n = [fx_j fy_j 0.00 0.00 0.00 -Mz_j ...
1087 fx_i fy_i 0.00 0.00 0.00 -Mz_i ]';
1088 case {true}
1089 % (i)||||support----->--(j) node edges
1090 uniform_load_vector_n = [fx_i fy_i 0.00 0.00 0.00 Mz_i ...
1091 fx_j fy_j 0.00 0.00 0.00 Mz_j]';
1092
1093 end
1094 %_________________________________|
Generated on Thu 09-Aug-2007 18:36:18 by Open Office-GPL ©
2007
ANALYSIS
RESULTS
%==========================
[Pg,Pl,Hu] = space_frame
%=========================
Pg =
0.0000 0.0000 0.0000 0.0000
6.7015 -6.7015 8.4030 -6.5970
0.0000 -0.0000 0.0000 -0.0000
16.7537 -16.7537 -0.0000 -0.0000
-0.0000 -0.0000 -0.0000 0.0000
1.2092 -1.2092 2.4184 -11.1934
-0.0000 -0.0000 -0.0000 -0.0000
-6.7015 6.7015 1.5970 6.5970
-0.0000 0.0000 -0.0000 0.0000
16.7537 -16.7537 0.0000 -0.0000
-0.0000 -0.0000 -0.0000 0.0000
-1.2092 1.2092 11.1934 -15.1947
Pl =
0.0000 0.0000 -8.4030 5.2776
-0.0000 0.0000 0.0000 -3.9582
6.7015 -6.7015 0.0000 -0.0000
16.7537 -16.7537 0.0000 -0.0000
-1.2092 1.2092 -0.0000 0.0000
-0.0000 -0.0000 2.4184 -11.1934
-0.0000 -0.0000 -1.5970 -5.2776
0.0000 -0.0000 -0.0000 3.9582
-6.7015 6.7015 -0.0000 0.0000
16.7537 -16.7537 0.0000 -0.0000
1.2092 -1.2092 0.0000 -0.0000
-0.0000 -0.0000 11.1934 -15.1947
Hu =
0.0368 0 0 0 0 0 0.0368 -0.0134 -0.0000 0.0000 -0.0000 -0.0186
0.0368 -0.0134 -0.0000 0.0000 -0.0000 -0.0186 0.0368 0 0 0 0 0
0.0368 -0.0134 -0.0000 0.0000 -0.0000 -0.0186 0.0368 -0.0492 -0.0000 0.0000 0.0000 0.0077
0.0368 -0.0492 -0.0000 0.0000 0.0000 0.0077 0 0 0 0 0 0
|
|