EXAMPLE-1
EXAMPLE-1
%[1]____________[ GLOBAL COORDINATES ]
% {x_g} {y_g} {z_g}
node_coordinates = [ 0.00 0.00 4.00
0.00 0.00 0.00
0.00 0.00 -4.00
0.00 -5.00 0.00
0.00 5.00 0.00
6.00 0.00 0.00];
%___________________________________|
Node=size(node_coordinates,1);
%[2]______________[ POSITION MATRIX ]
% Node(i)--->--Node(j)
node_position = [1 2
2 3
4 2
2 5
2 6];
%___________________________________|
No=size(node_position,1);
%[3]_____________[ MATERIAL PROPERTIES ]
% E_x ,E_z, G (KN/m**2) (SI)
% I_x ,Iz ,I_xz ,Jp (m**4)
% A = cross sectional area (m**2)
% E_x E_z G I_x I_z I_xz A Jp
m_p = [ 2E+6 2E+6 1E+5 0.325E-3 0.325E-3 0.00 0.0625 ];
% frame_beta (B1) load_beta (B2)
p_p = [ 0.00 0.00 ];
m_p = m_p';
p_p = p_p';
%if all element properties is equal than.
for i=1:No
p_p(:,i)=p_p(:,1);
m_p(:,i)=m_p(:,1);
%Polar inertia moment
% J_p = I_x + I_z - I_xz
J_p = m_p(4,i) + m_p(5,i) - m_p(6,i);
m_p(8,i)=J_p;
end
%__________________________________|
for i=1:Node; Re(i,:)=[1 1 1 1 1 1]; end
Nom=size(Re,2); %One node's total degree of freedom.
%[4]______________[ SYSTEM SUPPORT ]
%Re(Node number,:)=[ u(x) v(y) w(z) Qxx Qyy Qzz]
Re(1,:)=[0 0 0 0 0 0];
Re(3,:)=[0 0 0 0 0 0];
Re(4,:)=[0 0 0 1 1 1];
Re(5,:)=[1 0 0 1 1 1];
Re(6,:)=[1 0 0 0 0 1];
%_________________________________|
% if not is empty P and load_matrix than hide this line else
% active this line for ;
[freedom ,R,Re] = frame_element_topology (No,Node,Nom,Re);
P(freedom) = 0;
%load_matrix = [];
%[5]_______________[ SYSTEM LOAD ]
%Re(Node number, freedoom number)[fx fy fz Mxx Myy Mzz]
P(Re(5,1)) = +5.00;
P(Re(4,5)) = +4.00;
% |---|
% Element_no qo P a b L logical , load_type ,load_case )
load_matrix=[ 1 , 2.00 , 0.00 ,0 , 0 , 4 , true , 1 , 2
2 , 2.00 , 0.00 ,0 , 0 , 4 , true , 1 , 2
5 , 0.00 , 8.00 ,0 , 0 , 6 , true , 13 , 1 ];
%________________________________|
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