ONE BAY, TWO STORY 3D BRACED FRAME MODEL

Contents

Create Model

% all units in kip and inches

Node coordinates (in feet!)

height = 12;
width  = 20;
XYZ([ 1: 3],:) =  [zeros(3,1)         zeros(3,1)        linspace(0,2*height,3)'];
XYZ([ 4: 6],:) =  [width*ones(3,1)    zeros(3,1)        linspace(0,2*height,3)'];
XYZ([ 7: 9],:) =  [width*ones(3,1)    width*ones(3,1)   linspace(0,2*height,3)'];
XYZ([10:12],:) =  [zeros(3,1)         width*ones(3,1)   linspace(0,2*height,3)'];
XYZ([13:14],:) =  [width/2*ones(2,1)  zeros(2,1)        linspace(height,2*height,2)'];
XYZ([15:16],:) =  [width*ones(2,1)    width/2*ones(2,1) linspace(height,2*height,2)'];
XYZ([17:18],:) =  [width/2*ones(2,1)  width*ones(2,1)   linspace(height,2*height,2)'];
XYZ([19:20],:) =  [zeros(2,1)         width/2*ones(2,1) linspace(height,2*height,2)'];
% convert coordinates to inches
XYZ = XYZ.*12;

Connectivity array

no_columns = 4;
for i = 0:3
    n = i+1;
    % first story columns
    CON(n,:)                = num2cell([3*i+1  3*i+2],2);
    % second story columns
    CON(n + no_columns,:)   = num2cell([3*i+2  3*i+3],2);
    % first story beams
    CON(n + 2*no_columns,:) = num2cell([3*i+2  2*i+13],2);
    CON(n + 3*no_columns,:) = num2cell([3*i+2  2*i+11],2);
    CON{13} = [2 19];
    % second story beams
    CON(n + 4*no_columns,:) = num2cell([3*i+3  2*i+14],2);
    CON(n + 5*no_columns,:) = num2cell([3*i+3  2*i+12],2);
    CON{21} = [3 20];
    % first floor braces
    CON(n + 6*no_columns,:) = num2cell([3*i+1  2*i+13],2);
    CON(n + 7*no_columns,:) = num2cell([3*i+1  2*i+11],2);
    CON{29} = [1 19];
    % second floor braces
    CON(n + 8*no_columns,:) = num2cell([3*i+2  2*i+14],2);
    CON(n + 9*no_columns,:) = num2cell([3*i+2  2*i+12],2);
    CON{37} = [2 20];
end

Boundary conditions

% (specify only restrained dof's)
BOUN( 1,:) = ones(1,3);     % (1 = restrained,  0 = free)
BOUN( 4,:) = ones(1,3);
BOUN( 7,:) = ones(1,3);
BOUN(10,:) = ones(1,3);

Element type

[ElemName{ 1:24}] = deal('Lin3dFrm_NLG');    % 3d linear frame element
[ElemName{25:40}] = deal('LinTruss_NLG');    %    linear truss element

Create model data structure

Model = Create_Model(XYZ,CON,BOUN,ElemName);

Display model and show node/element numbering (optional)

figA = Create_Window (0.70,0.70);  % open figure window named figA
Plot_Model  (Model);               % plot model (optional)
Label_Model (Model);               % label model (optional)