Professional Documents
Culture Documents
75
x1 x2 x3 . . . xnnp
y1 y2 y3 . . . y nnp
with ndim = 2 and x being a matrix and no longer a vector and the body force b being a ndim 1-vector and no longer a scalar.
1 1 = 3
1 3
1 , 2 = 3
1 3
1 , 3 = 3
1 3
1 , 4 = 3
1 3
. (9.1)
Within the code they have to be implemented as row vectors of the nqp ndim matrix qpt.
1 2 3 4 5 6 7 8 9 10 11 12 13
% number of quadrature points nqp = 4; % quadrature points qpt = zeros(nqp,ndm); qpt(1,:) = [sqrt(3.0)/3.0 qpt(2,:) = [ sqrt(3.0)/3.0 qpt(3,:) = [sqrt(3.0)/3.0 qpt(4,:) = [ sqrt(3.0)/3.0 % weights w8 = zeros(nqp,1); w8(1) = 1;
76
14 15 16
(9.2)
(1 + )(1 + ) (1 )(1 + ) = , N 4 (, ) = 4 4
1 (, ) = 3 (, ) =
, 2 (, ) =
(1 ) 4 (1 + ) 4
(1 + ) 4 (1 ) 4
.
T
(9.3)
(1 + ) 4
4 (, ) =
Within the code the values of the shape functions and their gradients are implemented as vectors and matrices in the structural array masterelement which is associated with each quadrature point q.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
% shape functions and derivatives masterelement = repmat(struct('N', zeros(nen,1), 'gamma', zeros(nen,ndm)), nqp,1); for q = 1:nqp xi = qpt(q,1); eta = qpt(q,2); masterelement(q).N(1) masterelement(q).N(2) masterelement(q).N(3) masterelement(q).N(4) = = = = 0.25*(1.0xi)*(1.0eta); 0.25*(1.0+xi)*(1.0eta); 0.25*(1.0+xi)*(1.0+eta); 0.25*(1.0xi)*(1.0+eta); = = = = [0.25*(1.0eta) [ 0.25*(1.0eta) [ 0.25*(1.0+eta) [0.25*(1.0+eta) 0.25*(1.0xi)]; 0.25*(1.0+xi)]; 0.25*(1.0+xi)]; 0.25*(1.0xi)];
77
figure(1); for e=1:nel xe = zeros(ndm, nen); for idm = 1:ndm xe(idm,:) = x(elem(e).cn,idm); end patch(xe(1,:), xe(2,:), save_av_stress{e}(1,1)) hold on end title('\sigma_{11}'); colorbar axis equal hold off
The results of the plate with a hole are visualised below. 11 N mm2 1 0.5 0 -0.5 -1 -1.5 -2 -2.5 -3 -3.5 -4
(a) normal stress 11 (b) normal stress 22
22
N mm2 12 10 8 6 4 2 0
12
Figure 9.1: Plate with hole subjected to nonzero displacement boundary conditions: contour-plot of the dierent stress-components (a)-(c).
78