Skip to content

2D Portal Frame¤

See the original example in opsvis.

1
2
clear
clc

First, instantiate the class and obtain the OpenSees interface.

1
2
opsMAT = OpenSeesMatlab();
ops = opsMAT.opensees;

Model construction and load application¤

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
ops.wipe();
ops.model('basic', '-ndm', 2, '-ndf', 3);


colL = 4.0;
girL = 6.0;


Acol  = 2.0e-3;
Agir  = 6.0e-3;
IzCol = 1.6e-5;
IzGir = 5.4e-5;


E = 200.0e9;


ops.node(1, 0.0,   0.0);
ops.node(2, 0.0,   colL);
ops.node(3, girL,  0.0);
ops.node(4, girL,  colL);


ops.fix(1, 1, 1, 1);
ops.fix(3, 1, 1, 0);


ops.geomTransf('Linear', 1);


% columns
ops.element('elasticBeamColumn', 1, 1, 2, Acol, E, IzCol, 1);
ops.element('elasticBeamColumn', 2, 3, 4, Acol, E, IzCol, 1);


% girder
ops.element('elasticBeamColumn', 3, 2, 4, Agir, E, IzGir, 1);


% ops.section('Elastic', 1, E, Agir, IzGir, E/2, 0.75)
% ops.beamIntegration('Lobatto', 1, 1, 5)
% ops.element('forceBeamColumn', 3, 2, 4, 1, 1)


Px =  2.0e3;
Wy = -10.0e3;
Wx =  0.0;
ops.timeSeries('Linear', 1);
ops.pattern('Plain', 1, 1);
ops.load(2, Px, 0.0, 0.0);
ops.eleLoad('-ele', 3, '-type', '-beamUniform', Wy, Wx);
1
modelData = opsMAT.post.getModelData();
1
2
3
4
5
opts = opsMAT.vis.defaultPlotModelOptions;
opts.loads.showNodal = true;
opts.loads.showElement = true;
opts.loads.scale = 1.2;
opsMAT.vis.plotModel(opts=opts);
Output
[OpenSeesMatlab] Model summary Nodes: 4 Beam elements: 3
figure_0.png

Static analysis¤

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
ODB = opsMAT.post.createODB("myODB", interpolateBeamDisp=11);


Nsteps = 2;
ops.constraints('Transformation');
ops.numberer('RCM');
ops.system('BandGeneral');
ops.test('NormDispIncr', 1.0e-6, 6, 2);
ops.algorithm('Linear');
ops.integrator('LoadControl', 1 / Nsteps);
ops.analysis('Static');
1
ops.analyze(Nsteps);

Results visualization¤

1
2
3
4
5
nodeResp = opsMAT.post.getNodalResponse("myODB");


opsMAT.vis.plotNodalResponse(nodeResp, stepIdx="absMax");
grid off
figure_1.png
1
2
3
4
5
6
eleResp = opsMAT.post.getElementResponse("myODB", eleType="Frame");


opsMAT.vis.plotFrameResponse(eleResp, ...
    stepIdx="absMax", respType="sectionForces", respComponent="MZ");
grid off
figure_2.png
1
2
3
4
5
6
opts = opsMAT.vis.defaultPlotFrameResponseOptions;
opts.style = "wireframe";
opsMAT.vis.plotFrameResponse(eleResp, ...
    stepIdx="absMax", respType="sectionForces", respComponent="Mz",...
    opts=opts);
grid off
figure_3.png
1
2
3
4
5
opts.color.useColormap = false;
opsMAT.vis.plotFrameResponse(eleResp, ...
    stepIdx="absMax", respType="sectionForces", respComponent="N",...
    opts=opts);
grid off
figure_4.png
1
2
3
4
opsMAT.vis.plotFrameResponse(eleResp, ...
    stepIdx="absMax", respType="sectionForces", respComponent="VY",...
    opts=opts);
grid off
figure_5.png