COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### looping error

• Email
• 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.

```
 0

See related articles to this posting

0 Replies
196 Views

Similar Articles

12/6/2013 2:17:07 AM
[PageSpeed]