looping error

  • Follow


I would like to calculate displacement for each point where the axis is at the middle of the beam as shown in figure 

         ^ y
%         |
   (0,L)  --------------------------------------------- (L,c)
%         |                                           |
%         |                                           |
%         ---------> x                                | D
%         |                                           |
%         |                      L                    |
%         ---------------------------------------------
         (0,-c)                                       (L,-c)

the c value ranging from -c to c and i commented as below ;

ely=(2*c)/numY; % element length at y axis 
elx=L/numX; % element length at x axis 

aa = 0;
bb = -c;

for xc = 1:nodey % starting the loop by determine the nodes in x axis
    for yc = 1:nodex;
        XX = aa;
        YY = bb; 
        pei=-P/(6*E*I);
        u_x(xc,yc)=pei*YY*(((6*L-3*XX)*XX)+((2+nu)*((YY*YY)-(c*c)))); % exact displacement for x axis
        u_y(xc,yc)=-pei*((3*nu*YY*YY*(L-XX))+((4+5*nu)*(c*c)*XX)+((3*L-XX)*(XX*XX))); % exact displacement for y axis
        aa = aa + elx;
    end
    bb = bb + ely;
end

the problem is the value that I obtained is totally wrong once I implemented the meshing. meshing is 7 x 5 where i have 6 x 4 element and the arrangement of the numbering is from left to right continuously. 

look forward for your help.thnx 
0
Reply ilyani 9/22/2010 2:47:20 PM


0 Replies
178 Views

(page loaded in 0.026 seconds)

Similiar Articles:













7/18/2012 9:23:33 PM


Reply: