ops.wipe();
ops.model('basic', '-ndm', 2, '-ndf', 3);
%% -----------------------------
% Geometry and material
% Units: in, lb, psi
%% -----------------------------
E = 30e6; % psi
nu = 0.3; % not used in 2D elasticBeamColumn
A = 50.650; % in^2
Iz = 7892.0; % in^4 (major bending inertia)
c = 15.0; % in (distance from neutral axis to extreme fiber)
L = 120.0; % each segment length, in
w = 10000/12; % lb/in
%% -----------------------------
% Nodes
%% -----------------------------
ops.node(1, 0.0, 0.0);
ops.node(2, 120.0, 0.0);
ops.node(3, 240.0, 0.0);
ops.node(4, 360.0, 0.0);
ops.node(5, 480.0, 0.0);
%% -----------------------------
% Boundary conditions
% Same restraint intent as the reference example
%% -----------------------------
ops.fix(2, 1, 1, 0); % UX, UY fixed
ops.fix(4, 0, 1, 0); % UY fixed
%% -----------------------------
% Transformation and elements
%% -----------------------------
ops.geomTransf('Linear', 1);
ops.element('elasticBeamColumn', 1, 1, 2, A, E, Iz, 1);
ops.element('elasticBeamColumn', 2, 2, 3, A, E, Iz, 1);
ops.element('elasticBeamColumn', 3, 3, 4, A, E, Iz, 1);
ops.element('elasticBeamColumn', 4, 4, 5, A, E, Iz, 1);
%% -----------------------------
% Loads: distributed loads on the two overhangs
%% -----------------------------
ops.timeSeries('Linear', 1);
ops.pattern('Plain', 1, 1);
% 2D beamUniform: Wy along local y
% downward load => negative
ops.eleLoad('-ele', 1, '-type', '-beamUniform', -w);
ops.eleLoad('-ele', 4, '-type', '-beamUniform', -w);