Beruflich Dokumente
Kultur Dokumente
Assembler
Assembler
m 1 of 2
function [ ...
... % equivalent nodal load, stiffness
F, K] = assembler( ...
... % data relative to nodes and nodal loads
n_n, coor_n, load_n, ...
... % data relative to element materials
tab_mat, ...
... % data relative to element and element loads
element, n_el, conn, mat, load)
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% initialization
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% stiffness matrix
K = zeros(n_dof,n_dof);
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% elements
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% cycle on elements
for el = 1:n_el
% element node
conn_el = conn(:,el);
% element material
mat_el = tab_mat(:,mat(el));
% element routine
[... % material stiffness matrix,
27/06/19 13.56 C:\Users\user\Desktop\F...\assembler.m 2 of 2
K_el, ...
... % nodal forces equivalent to applied loads,
f_l] = feval(element, ...
... % nodal coordinates,
coor_el, ...
... % applied loads,
load_el, ...
... % material parameters,
mat_el);
end
% aggiunta del vincolo molla
K_molla= 10000; % [kN/m]
% posta verticalmente al nodo 5
K(14,14)= K(14,14) + K_molla;
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% contribution of nodal forces and couples
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
end