% Example 1.16: One element example XYZ=[0 0 0;1 0 0;1 1 0;0 1 0;0 0 1;1 0 1;1 1 1;0 1 1]; % Nodal coordinates (mm) LE=[1 2 3 4 5 6 7 8]; % Element connectivity EXTFORCE=[5 3 100; 6 3 100; 7 3 100; 8 3 100]; % Applied forces [N, DOF, Value] SDISPT=[1 1 0;1 2 0;1 3 0;2 2 0;2 3 0;3 3 0;4 1 0;4 3 0]; % Fixed displacements MID=0; PROP=[206.9E3, 0.3]; % Linear elastic material PROP=[E, NU] TIMS=[0.0 1.0 1.0 0.0 1.0]'; % Load increments [t0 T Dt f0 fL] PARAM=struct('ITRA',30,'ATOL',1.0E5,'NTOL',6,'TOL',1E-6,'TIMS',TIMS); clc; NOUT=fopen('output.txt','w'); % Output file NLFEA(PARAM,NOUT,MID,PROP,EXTFORCE,SDISPT,XYZ,LE,[],[]); % Calling NLFEA fclose(NOUT); % % Problem 1.40 Bending of five elements: linear elastic XYZ=[0 0 0;1 0 0 ;1 1 0;0 1 0; 0 0 2 ;1 0 2 ;1 1 2 ;0 1 2 ; % Nodal coord. 0 0 4;1 0 4 ;1 1 4;0 1 4; 0 0 6 ;1 0 6 ;1 1 6 ;0 1 6 ; 0 0 8;1 0 8 ;1 1 8;0 1 8; 0 0 10;1 0 10;1 1 10;0 1 10]; LE=[ 1 2 3 4 5 6 7 8; 5 6 7 8 9 10 11 12; % Element connectivity 9 10 11 12 13 14 15 16;13 14 15 16 17 18 19 20; 17 18 19 20 21 22 23 24]; EXTFORCE=[21 2 1E5; 22 2 1E5; 23 2 1E5; 24 2 1E5]; % External forces SDISPT=[1 1 0;1 2 0;1 3 0;2 1 0;2 2 0;2 3 0; % Prescribed displacements 3 1 0;3 2 0;3 3 0;4 1 0;4 2 0;4 3 0]; MID=0; PROP=[2E11 0.3]; % Material properties TIMS=[0.0 1.0 1.0 0.0 1.0]'; % Load increments [t0 T Dt f0 fL] PARAM=struct('ITRA',30,'ATOL',1.0E5,'NTOL',6,'TOL',1E-6,'TIMS',TIMS); clc; NOUT=fopen('output.txt','w'); % Output file NLFEA(PARAM,NOUT,MID,PROP,EXTFORCE,SDISPT,XYZ,LE,[],[]); % Calling NLFEA fclose(NOUT); [SMAX,SMIN]=PLOTELEM(XYZ,LE,'output.txt',1.0,2,[]) % Plot stress S22 contour % % Problem 1.51 Bending of a beam (3D solid elements) W=0.1; H=0.1; L=2; F=250; % Dimensions of the beam and applied load XYZ=[W 0 0;W L/5 0;0 L/5 0;0 0 0; % Nodal coordinates W 0 H;W L/5 H;0 L/5 H;0 0 H; % W 2*L/5 0;0 2*L/5 0;W 2*L/5 H;0 2*L/5 H; % W 3*L/5 0;0 3*L/5 0;W 3*L/5 H;0 3*L/5 H; % W 4*L/5 0;0 4*L/5 0;W 4*L/5 H;0 4*L/5 H; % W L 0;0 L 0;W L H;0 L H]; % LE=[ 1 2 3 4 5 6 7 8; 2 9 10 3 6 11 12 7; % Element connectivity 9 13 14 10 11 15 16 12; 13 17 18 14 15 19 20 16; % 17 21 22 18 19 23 24 20]; % FORCE=[21 1 -F; 22 1 -F; 23 1 -F; 24 1 -F]; % Applied forces [Node,DOF,Value] SDISPT=[1 1 0;1 2 0;1 3 0;4 1 0;4 2 0;4 3 0; % Prescribed displacements 5 1 0;5 2 0;5 3 0;8 1 0;8 2 0;8 3 0];% [Node, DOF, Value] TIMS=[0.0 1.0 1.0 0 1.0]'; % One-step linear elastic analysis MID=0; PROP=[200E9 0.3]; % Linear elastic material PARAM=struct('ITRA',20,'ATOL',1.0E5,'NTOL',5,'TOL',1E-6,'TIMS',TIMS); % clc; NOUT = fopen('output.txt','w'); % Output file NLFEA(PARAM,NOUT,MID,PROP,FORCE,SDISPT,XYZ,LE,[],[]); % Calling NLFEA fclose(NOUT); % Closing output file [GMAX,GMIN]=PLOTELEM(XYZ,LE,'output.txt',1.0,-1,[]) % Plot undeformed geometry [DMAX,DMIN]=PLOTELEM(XYZ,LE,'output.txt',1.0,0,[]) % Plot deformed geometry [SMAX,SMIN]=PLOTELEM(XYZ,LE,'output.txt',1.0,2,[]) % Plot stress S22 contour