Skip to content

Commit

Permalink
RC update
Browse files Browse the repository at this point in the history
  • Loading branch information
amaelkady committed Dec 21, 2021
1 parent 5996797 commit 35aaa3d
Show file tree
Hide file tree
Showing 34 changed files with 1,463 additions and 72 deletions.
Binary file modified FM2D_Installer.exe
Binary file not shown.
Binary file modified src/Build_MRF_App.mlapp
Binary file not shown.
2 changes: 1 addition & 1 deletion src/CREATOR_MODEL_CBF.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function CREATOR_MODEL_CBF (AnalysisTypeID,TempPOrun)

write_ResultsFolder (INP, AnalysisTypeID,TempPOrun,Uncertainty);

write_BasicInput (INP, FrameType,NStory,NBay,CompositeX,Comp_I,Comp_I_GC,Units,E,mu,fy,fyBrace,fyGP,EL_Multiplier,SteelMatID,TransformationX,nSegments,initialGI,nIntegration,Sigma, Uncertainty);
write_BasicInput (INP, FrameType,NStory,NBay,CompositeX,Comp_I,Comp_I_GC,Units,E,mu,fy,fyBrace,fyGP,Er,fyR,muR,Ec,fc,muC,EL_Multiplier,SteelMatID,TransformationX,nSegments,initialGI,nIntegration,Sigma, Uncertainty);

write_PreCalculatedGeometry (INP, NStory, NBay, HStory, WBay, WBuilding, MF_BEAMS, CGP_RigidOffset, MGP_RigidOffset, a, b, FrameType, Units);

Expand Down
2 changes: 1 addition & 1 deletion src/CREATOR_MODEL_MRF.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function CREATOR_MODEL_MRF (AnalysisTypeID,TempPOrun)

write_ResultsFolder (INP, AnalysisTypeID,TempPOrun,Uncertainty);

write_BasicInput (INP, FrameType,NStory,NBay,CompositeX,Comp_I,Comp_I_GC,Units,E,mu,fy,fyBrace,fyGP,EL_Multiplier,SteelMatID,TransformationX,nSegments,initialGI,nIntegration,Sigma, Uncertainty);
write_BasicInput (INP, FrameType,NStory,NBay,CompositeX,Comp_I,Comp_I_GC,Units,E,mu,fy,fyBrace,fyGP,Er,fyR,muR,Ec,fc,muC,EL_Multiplier,SteelMatID,TransformationX,nSegments,initialGI,nIntegration,Sigma, Uncertainty);

write_PreCalculatedGeometry (INP, NStory, NBay, HStory, WBay, WBuilding, MF_BEAMS, CGP_RigidOffset, MGP_RigidOffset, a, b, FrameType, Units);

Expand Down
59 changes: 59 additions & 0 deletions src/CREATOR_MODEL_MRF_RC.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
function CREATOR_MODEL_MRF_RC (AnalysisTypeID,TempPOrun)
global MainDirectory ProjectName ProjectPath
clc;
cd(ProjectPath)
load(ProjectName)
cd(MainDirectory)

if TempPOrun==1; PM_Option=2; end

% Open File to Write Code
if AnalysisTypeID==1
PO=0;
ELF=0;
EQ=0;
INP = fopen('TempModel.tcl','w+');
elseif TempPOrun==1 && AnalysisTypeID==2
PO=1;
ELF=0;
EQ=0;
INP = fopen('TempModelPO.tcl','w+');
else
INP = fopen(OpenSEESFileName,'w+');
end

if Analysisstatus==1
write_OpenArguments(INP, NStory, FrameType, EQ, PO, ELF, MaxRunTime, CompositeX, Animation, MainDirectory, RFpath, ModePO, DriftPO, DampModeI, DampModeJ, zeta, BuildOption, AnalysisTypeID);
else
write_OpenArguments(INP, NStory, FrameType, 0, 0, 0, 60, CompositeX, 0, MainDirectory, RFpath, 1, 0.1, 1, NStory, 0.02, 2, AnalysisTypeID);
end

write_SourceSubroutine (INP, FrameType,AnalysisTypeID,ColElementOption,GFX,PZ_Multiplier);

write_ResultsFolder (INP, AnalysisTypeID,TempPOrun,Uncertainty);

write_BasicInput (INP, FrameType,NStory,NBay,CompositeX,Comp_I,Comp_I_GC,Units,E,mu,fy,fyBrace,fyGP,Er,fyR,muR,Ec,fc,muC,EL_Multiplier,SteelMatID,TransformationX,nSegments,initialGI,nIntegration,Sigma, Uncertainty);

write_PreCalculatedGeometry (INP, NStory, NBay, HStory, WBay, WBuilding, MF_BEAMS, CGP_RigidOffset, MGP_RigidOffset, a, b, FrameType, Units);

write_Nodes (INP, NStory, NBay, FrameType, BraceLayout, MF_COLUMNS, MF_BEAMS, MGP_W, EBF_W, Splice, HStory, PZ_Multiplier, MFconnection, Units);

[EL_ELEMENTS] = write_ElasticBeamsColumns_RC (INP, NStory, NBay, ColElementOption, BeamElementOption, MF_COLUMNS, MF_BEAMS, nIntegration, coeff_cracked);

write_PZ_RC(INP,NStory,NBay,MF_COLUMNS,MF_BEAMS);

write_BeamSpring_MRF_RC (INP, NStory, NBay, WBay, ModelELOption, MF_COLUMNS, MF_BEAMS, a_sl, Units);

[Py_Col]=write_ColumnSpring_RC (INP, NStory, NBay, HStory, ColElementOption, PM_Option, MF_COLUMNS, MF_BEAMS, fc, a_sl, Units);

write_FloorLinks (INP,NStory,NBay,WBay,PZ_Multiplier,FloorLink,Fs,Fs_Profile);

write_EGFelements_RC (INP,NStory,NBay,HStory,GFX,Orientation,nMF,nGC,nGB,MF_COLUMNS,GF_COLUMNS,GF_BEAMS, coeff_cracked);

write_EGFsprings_RC (INP,NStory,NBay,HStory,GFX,Orientation,nMF,nGC,nGB,MF_COLUMNS,GF_COLUMNS,GF_BEAMS, coeff_cracked);

write_BCs (INP,FrameType,NStory,NBay,PZ_Multiplier,RigidFloor,Support,MidSpanConstraint,BraceLayout);

write_Recorders(INP, NStory, NBay, Recorders, Filename, FrameType, BraceLayout, Splice, FloorLink, AnalysisTypeID);

write_Mass(INP, EL_ELEMENTS);
53 changes: 53 additions & 0 deletions src/CREATOR_MODEL_MRF_RC_Fiber.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
function CREATOR_MODEL_MRF_RC_Fiber (AnalysisTypeID,TempPOrun)
global MainDirectory ProjectName ProjectPath
clc;
cd(ProjectPath)
load(ProjectName)
cd(MainDirectory)

if TempPOrun==1; PM_Option=2; end

% Open File to Write Code
if AnalysisTypeID==1
PO=0;
ELF=0;
EQ=0;
INP = fopen('TempModel.tcl','w+');
elseif TempPOrun==1 && AnalysisTypeID==2
PO=1;
ELF=0;
EQ=0;
INP = fopen('TempModelPO.tcl','w+');
else
INP = fopen(OpenSEESFileName,'w+');
end

if Analysisstatus==1
write_OpenArguments(INP, NStory, FrameType, EQ, PO, ELF, MaxRunTime, CompositeX, Animation, MainDirectory, RFpath, ModePO, DriftPO, DampModeI, DampModeJ, zeta, BuildOption, AnalysisTypeID);
else
write_OpenArguments(INP, NStory, FrameType, 0, 0, 0, 60, CompositeX, 0, MainDirectory, RFpath, 1, 0.1, 1, NStory, 0.02, 2, AnalysisTypeID);
end

write_SourceSubroutine (INP, FrameType,AnalysisTypeID,ColElementOption,GFX,PZ_Multiplier);

write_ResultsFolder (INP, AnalysisTypeID,TempPOrun,Uncertainty);

write_BasicInput (INP, FrameType,NStory,NBay,CompositeX,Comp_I,Comp_I_GC,Units,E,mu,fy,fyBrace,fyGP,Er,fyR,muR,Ec,fc,muC,EL_Multiplier,SteelMatID,TransformationX,nSegments,initialGI,nIntegration,Sigma, Uncertainty);

write_PreCalculatedGeometry (INP, NStory, NBay, HStory, WBay, WBuilding, MF_BEAMS, CGP_RigidOffset, MGP_RigidOffset, a, b, FrameType, Units);

write_Nodes_FiberFrame (INP, NStory, NBay, HStory);

[EL_ELEMENTS] = write_BeamsColumns_FiberFrame (INP, NStory, NBay, ColElementOption, MF_COLUMNS, MF_BEAMS, nIntegration);

write_FloorLinks_FiberFrame (INP,NStory,NBay,WBay,FloorLink,Fs,Fs_Profile);

write_EGFelements_FiberFrame (INP,NStory,NBay,GFX,Orientation,nMF,nGC,nGB,MF_COLUMNS,GF_COLUMNS,GF_BEAMS)

write_EGFsprings_FiberFrame (INP,NStory,NBay,GFX);

write_BCs_FiberFrame (INP,NStory,NBay,RigidFloor,Support);

write_Recorders_FiberFrame(INP, NStory, NBay, Recorders, Filename, FloorLink, AnalysisTypeID);

write_Mass_FiberFrame(INP, EL_ELEMENTS);
4 changes: 2 additions & 2 deletions src/ConstructFiberBeam.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ set L [expr sqrt(pow(($X2-$X1),2)+ pow(($Y2-$Y1),2))];
if {$Splice_status==0} {

# Set nodeID for the first intermediate node
set nodeID [expr 100000+$Node1]
set nodeID [expr 500000+$Node1]

for {set i 1} {$i <= [expr $numSeg-1]} {incr i 1} {
set nodeid [expr $nodeID+$i]
Expand All @@ -47,7 +47,7 @@ if {$Splice_status==0} {

# Define segments
# set initial elementID
set ElementID [expr $eleID]
set ElementID [expr $eleID+500]
#puts "S0 $ElementID"

if {$numSeg>1} {
Expand Down
16 changes: 15 additions & 1 deletion src/ConstructPanel_Cross.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@
# d_Col Column section depth
# d_Beam Beam section depth
# transfTag Geometric transformation ID
# ShapeID The panel shape ID: 0: No elements are removed
# 2: Left element is removed
# 3: Top element is removed
# 4: Right element is removed
# 23: Left and Top elements are removed
# 34: Right and Top elements are removed
#
# Written by: Dr. Ahmed Elkady, University of Southampton, UK
#
##################################################################################################################

proc ConstructPanel_Cross {Axis Floor X_Axis Y_Floor E A_Panel I_Panel d_Col d_Beam transfTag} {
proc ConstructPanel_Cross {Axis Floor X_Axis Y_Floor E A_Panel I_Panel d_Col d_Beam transfTag ShapID} {

# Construct Panel Node Notation
set NodeCL [expr ($Floor*10+$Axis)*10]; # Grid Line Dummy Node
Expand All @@ -42,15 +48,23 @@ proc ConstructPanel_Cross {Axis Floor X_Axis Y_Floor E A_Panel I_Panel d_Col d_
# node [NodeID] [XCoordinate] [YCoordinate]
node $NodeCL $X_Axis $Y_Floor;
node $Node_XY01 [expr $X_Axis] [expr $Y_Floor - $d_Beam/2];
if {$ShapeID != 2 && $ShapeID != 23} {
node $Node_XY02 [expr $X_Axis - $d_Col/2] [expr $Y_Floor];
}
if {$ShapeID != 3 && $ShapeID != 23 && $ShapeID != 34} {
node $Node_XY03 [expr $X_Axis] [expr $Y_Floor + $d_Beam/2];
}
node $Node_XY04 [expr $X_Axis + $d_Col/2] [expr $Y_Floor];

# Construct Panel Element Property
# tag ndI ndJ A_PZ E I_PZ transfTag
element elasticBeamColumn $P_Elm_100XY01 $NodeCL $Node_XY01 $A_Panel $E $I_Panel $transfTag;
if {$ShapeID != 2 && $ShapeID != 23} {
element elasticBeamColumn $P_Elm_100XY02 $NodeCL $Node_XY02 $A_Panel $E $I_Panel $transfTag;
}
if {$ShapeID != 3 && $ShapeID != 23 && $ShapeID != 34} {
element elasticBeamColumn $P_Elm_100XY03 $NodeCL $Node_XY03 $A_Panel $E $I_Panel $transfTag;
}
element elasticBeamColumn $P_Elm_100XY04 $NodeCL $Node_XY04 $A_Panel $E $I_Panel $transfTag;

}
81 changes: 81 additions & 0 deletions src/ConstructPanel_RC.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
##################################################################################################################
# ConstructPanel_RC.tcl
#
# SubRoutine to construct nodes, rigid elements and elastic rotational spring for an RC joint panel zone
#
##################################################################################################################
#
# Input Arguments:
#------------------
# Axis Axis number ID
# Floor Floor number ID
# E Young's modulus
# A_Panel Area of rigid link that creates the panel zone
# I_Panel Moment of inertia of rigid link that creates the panel zone
# d_Col Column section depth
# d_Beam Beam section depth
# transfTag Geometric transformation ID
# ShapeID The panel shape ID: 0: No elements are removed
# 2: Left element is removed
# 3: Top element is removed
# 4: Right element is removed
# 23: Left and Top elements are removed
# 34: Right and Top elements are removed
#
# Written by: Dr. Ahmed Elkady, University of Southampton, UK
#
##################################################################################################################

proc ConstructPanel_RC {Axis Floor X_Axis Y_Floor E A_Panel I_Panel d_Col d_Beam transfTag ShapeID} {

# Construct Panel Node Notation
set NodeCL [expr ($Floor*10+$Axis)*10]; # Grid Line Dummy Node
set NodeCL2 [expr ($Floor*10+$Axis)*100+1]; # Grid Line Dummy Node #2
set NodeID [expr 400000+$Floor*1000+$Axis*100]; # Grid Line Dummy Node
set Node_XY01 [expr $NodeID + 1];
set Node_XY02 [expr $NodeID + 2];
set Node_XY03 [expr $NodeID + 3];
set Node_XY04 [expr $NodeID + 4];


# Construct Panel Element Notation
set P_Elm_100XY00 [expr 7000000 + $Floor*1000 + $Axis*100]; # ID for ZeroLength Panel Element
set P_Elm_100XY01 [expr $P_Elm_100XY00 + 1];
set P_Elm_100XY02 [expr $P_Elm_100XY00 + 2];
set P_Elm_100XY03 [expr $P_Elm_100XY00 + 3];
set P_Elm_100XY04 [expr $P_Elm_100XY00 + 4];

# Construct Panel Node Coordinates
# node [NodeID] [XCoordinate] [YCoordinate]
node $NodeCL $X_Axis $Y_Floor;
node $NodeCL2 $X_Axis $Y_Floor;
node $Node_XY01 [expr $X_Axis] [expr $Y_Floor - $d_Beam/2];
if {$ShapeID != 2 && $ShapeID != 23} {
node $Node_XY02 [expr $X_Axis - $d_Col/2] [expr $Y_Floor];
}
if {$ShapeID != 3 && $ShapeID != 23 && $ShapeID != 34} {
node $Node_XY03 [expr $X_Axis] [expr $Y_Floor + $d_Beam/2];
}
#if {$ShapeID != 4 && $ShapeID != 34} {
node $Node_XY04 [expr $X_Axis + $d_Col/2] [expr $Y_Floor];
#}
# Construct Panel Element Property
# tag ndI ndJ A_PZ E I_PZ transfTag
element elasticBeamColumn $P_Elm_100XY01 $NodeCL $Node_XY01 $A_Panel $E $I_Panel $transfTag;
if {$ShapeID != 2 && $ShapeID != 23} {
element elasticBeamColumn $P_Elm_100XY02 $NodeCL2 $Node_XY02 $A_Panel $E $I_Panel $transfTag;
}
if {$ShapeID != 3 && $ShapeID != 23 && $ShapeID != 34} {
element elasticBeamColumn $P_Elm_100XY03 $NodeCL $Node_XY03 $A_Panel $E $I_Panel $transfTag;
}
#if {$ShapeID != 4 && $ShapeID != 34} {
element elasticBeamColumn $P_Elm_100XY04 $NodeCL2 $Node_XY04 $A_Panel $E $I_Panel $transfTag;
#}

# Construct Panel Spring
set SpringID [expr 9000000 + $Floor*1000 + $Axis*100]; # ID for ZeroLength Panel Spring Element
#set Kshear *****;
#uniaxialMaterial Elastic $SpringID $Kshear; #Flexible Material
element zeroLength $SpringID $NodeCL $NodeCL2 -mat 99 99 99 -dir 1 2 6 -doRayleigh 1;

}
50 changes: 50 additions & 0 deletions src/Define_Material_RC.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
##################################################################################################################
# Define_Material_RC.tcl
#
# SubRoutine to create an RC uniaxial material using the Concrete04 model
#
##################################################################################################################
#
# Input Arguments:
#------------------
# matTag Material ID
# Ec Young's modulus
# fc Compressive strength
# type Confined or Unconfined
#
# Written by: Dr. Ahmed Elkady, University of Southampton, UK
#
##################################################################################################################

proc Define_Material_RC {matTag Ec fc type} {

set lambda 0.1; # ratio between unloading slope at ec and initial slope $Ec
set beta 0.1; # parameter to define the residual stress (as a factor of $ft) at ultimate tensile strain

if {$type == "confined"} {
# confined concrete
set Kfc 1.3; # ratio of confined to unconfined concrete strength
set Kres 0.2; # ratio of residual/ultimate to maximum stress
set fc [expr -1.*$Kfc*$fc]; # Confined concrete (mander model), maximum stress
set ec [expr 2.*$fc/$Ec]; # strain at maximum stress (computed assuming that the secant stiffness $ec is half the initial stiffness $E)
set fcu [expr $Kres*$fc]; # ultimate stress
set ecu [expr 20*$ec]; # strain at residual/failure stress
set ft [expr -0.14*$fc]; # tensile strength
set et [expr $ft/$Ec]; # strain at ultimate tensile stress
set ets [expr $ft/0.002]; # tension softening stiffness (absolute value) (slope of the linear tension softening branch)
} else {
# unconfined concrete
set Kres 0.2; # ratio of residual/ultimate to maximum stress
set fc [expr -1.*$fc]; # Unconfined concrete (todeschini parabolic model), maximum stress
set ec -0.003; # strain at maximum strength of unconfined concrete
set fcu [expr $Kres*$fc]; # ultimate stress
set ecu -0.01; # strain at ultimate stress
set ft [expr -0.14*$fc]; # tensile strength
set et [expr $ft/$Ec]; # strain at ultimate tensile stress
set ets [expr $ft/0.002]; # tension softening stiffness (absolute value) (slope of the linear tension softening branch)
}

#uniaxialMaterial Concrete02 $matTag $fc $ec $fcu $ecu $lambda $ft $ets;
uniaxialMaterial Concrete04 $matTag $fc $ec $ecu $Ec $ft $et $beta;

}
19 changes: 17 additions & 2 deletions src/Execution_Commands.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@ function Execution_Commands(app, FrameType, ExecutionOption, OpenSEESFileName, R
CREATOR_MODEL_MRF(AnalysisTypeID,0);
CREATOR_ANALYSIS (AnalysisTypeID,0);

elseif FrameType==4

if EV~=1
app.ProgressText.Text='Running Preliminary Eigenvalue Analysis...'; drawnow;
CREATOR_MODEL_MRF_RC(1,0);
CREATOR_ANALYSIS(1,0);
eval(strcat('! OpenSees.exe TempModel.tcl'));
fclose all;
end

app.ProgressText.Text='Creating Main tcl File...'; drawnow;

CREATOR_MODEL_MRF_RC(AnalysisTypeID,0);
CREATOR_ANALYSIS (AnalysisTypeID,0);
else

app.ProgressText.Text='Running Preliminary Eigenvalue Analysis...'; drawnow;
Expand Down Expand Up @@ -75,8 +89,9 @@ function Execution_Commands(app, FrameType, ExecutionOption, OpenSEESFileName, R
app.Image.Visible = 'on';
app.ProgressText.Text = 'Running Preliminary Eigenvalue Analysis...'; drawnow;

if FrameType==1; CREATOR_MODEL_MRF(1,0); end
if FrameType~=1; CREATOR_MODEL_CBF(1,0); end
if FrameType==1; CREATOR_MODEL_MRF(1,0);
elseif FrameType==4; CREATOR_MODEL_MRF_RC(1,0);
else CREATOR_MODEL_CBF(1,0); end
CREATOR_ANALYSIS (1,0);
eval(strcat('! OpenSees.exe TempModel.tcl'));
fclose all;
Expand Down
Binary file modified src/FM2D_App.mlapp
Binary file not shown.
Loading

0 comments on commit 35aaa3d

Please sign in to comment.