-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathModElasticFrameElement.m
78 lines (68 loc) · 2.7 KB
/
ModElasticFrameElement.m
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
classdef ModElasticFrameElement < handle
properties
openseesTag
iNode
jNode
A
E
IzFrmElmnt
Iz
K11
K33
K44
massDens
uniformLoad = 0;
end
methods
function this = ModElasticFrameElement(tag,iNodeTag,jNodeTag,A,E,IzFrmElmnt,varargin)
mm2Tom2 = 1e-6;
mm4Tom4 = 1e-12;
MPa2Pa = 1e+6;
this.openseesTag = tag;
this.iNode = iNodeTag;
this.jNode = jNodeTag;
this.A = A * mm2Tom2;
this.E = E * MPa2Pa;
this.IzFrmElmnt = IzFrmElmnt * mm4Tom4;
n = Domain.stfnsModFac;
this.Iz = this.IzFrmElmnt * (n + 1)/n;
this.K44 = 6 * (1 + n)/(2 + 3 * n);
this.K11 = this.K44 * (1 + 2 * n)/(1 + n);
this.K33 = this.K11;
isOnBasement = varargin{1};
if isOnBasement
% code gets here only if SUBBASE_ZERO_WEIGHT flag has a
% value of 1 (i.e. subbase elements' weight is ignored)
this.massDens = 0;
else
this.massDens = this.A * Domain.concUnitVolumeMass;
end
end
function writeOpenseesCmmnd(this,fileID)
commandFormat = ModElasticFrameElement.openseescommnd();
% inputArgs = this.getInputArray();
txt = sprintf(commandFormat,this.openseesTag,this.iNode,this.jNode,this.A,this.E,this.Iz,this.K11,this.K33,this.K44,this.massDens);
% txt = sprintf(commandFormat,inputArgs);
fprintf(fileID,txt);
end
function inputArray = getInputArray(this)
inputArray = [this.openseesTag,this.iNode,this.jNode,this.A,this.E,this.Iz,this.K11,this.K33,this.K44,this.massDens];
end
function writeBeamLoadToFile(this,fileID)
% HUGE WARNING!!!!!!!!!!!!!!!
% $Wy load is the load applied to element in "POSITIVE
% DIRECTION" of element's "LOCAL Y AXIS"
% SO THE GRAVITY LOADS ARE "NEGATIVE"
if this.uniformLoad ~= 0
% eleLoad -ele $eleTag -type -beamUniform $Wy
txt = sprintf('\teleLoad -ele %s -type -beamUniform %d\n',this.openseesTag,-1*this.uniformLoad);
fprintf(fileID,txt);
end
end
end
methods (Static)
function commandFrmt = openseescommnd()
commandFrmt = 'element ModElasticBeam2d %s %s %s %d %d %d %d %d %d $transfTag -mass %d \n';
end
end
end