fiber section cant creat.why?
Moderators: silvia, selimgunay, Moderators
fiber section cant creat.why?
dear friends, why this proc for RC fiber section cant create?
#Define sections----------------------------------------------------------------------------------------------------------------------------
proc buildrcrectsection {ID H B cover $concrete $steel numbartop1 numbartop2 numbarbot1 numbarbot2 numbarint barareatop1 barareatop2 barareabot1 barareabot2 barareaint nfy nfz} {
set covery [expr $H/2];
set coverz [expr $B/2];
set corey [expr $covery-$cover];
set corez [expr $coverz-$cover];
set locaddedbar [expr $corez/2];
section fiber $ID {
patch quadr $concrete 2 20 -$corey $corez -$corey -$corez $corey -$corez $corey $corez;
patch quadr $concrete 20 20 -$covery $coverz -$corey $corez $corey $corez $covery $coverz;
patch quadr $concrete 2 20 -$corey -$corez -$covery -$coverz $covery -$coverz $corey $corez;
patch quadr $concrete 20 2 -$covery $coverz -$covery -$coverz -$corey -$corez -$corey $corez;
patch quadr $concrete 20 2 $corey $corez $corey -$corez $covery -$coverz $covery $coverz;
layer straight $steel $numbarint $barareaint -$corey $corez $corey $corez;
layer straight $steel $numbarint $barareaint -$corey -$corez $corey -$corez;
layer straight $steel $numbartop1 $barareatop1 $corey $corez $corey -$corez;
layer straight $steel $numbartop2 $barareatop2 $corey $locaddedbar $corey -$locaddedbar;
layer straight $steel $numbarbot1 $barareabot1 -$corey $corez -$corey -$corez;
layer straight $steel $numbarbot2 $barareabot2 -$corey $locaddedbar -$corey -$locaddedbar;
};
};
----------------------------------------------------------------------------------
#Build model-----------------------------------------------------------------------------------------------------------------------------
wipe
model BasicBuilder -ndm 2 -ndf 3;
source libunits.tcl;
source DisplayPlane.tcl; # procedure for displaying a plane in model
source DisplayModel2D.tcl; # procedure for displaying 2D perspective of model
source buildrcrectsection.tcl;
#Define Geometry;
set Lcol [expr 3*$m];
set Lbeam [expr 5*$m];
set Nstory 4;
set Nbay 3;
#Define nodal coordinates
for {set level 1} {$level <= [expr $Nstory+1]} {incr level 1} {
set y [expr ($level-1)*$Lcol];
for {set pier 1} {$pier <= [expr $Nbay+1]} {incr pier 1} {
set x [expr ($pier-1)*$Lbeam];
set nodeID [expr $level*10+$pier];
node $nodeID $x $y;
}
};
fix 11 1 1 1;
fix 12 1 1 1;
fix 13 1 1 1;
fix 14 1 1 1;
#Define sections
source libmaterials.tcl;
buildrcrectsection 44 [expr 35*$cm] [expr 25*$cm] [expr 5.3*$cm] 1 2 3 0 2 0 0 [expr 2*$cm2] 0 [expr 2*$cm2] 0 0 20 20;
buildrcrectsection 33 [expr 35*$cm] [expr 25*$cm] [expr 5.3*$cm] 1 2 4 0 3 0 0 [expr 2*$cm2] 0 [expr 2*$cm2] 0 0 20 20;
buildrcrectsection 22 [expr 35*$cm] [expr 25*$cm] [expr 5.3*$cm] 1 2 2 2 3 0 0 [expr 2*$cm2] [expr 3.14*$cm2] [expr 2*$cm2] 0 0 20 20;
buildrcrectsection 11 [expr 35*$cm] [expr 25*$cm] [expr 5.3*$cm] 1 2 2 2 3 0 0 [expr 2*$cm2] [expr 3.14*$cm2] [expr 2*$cm2] 0 0 20 20;
buildrcrectsection 00 [expr 35*$cm] [expr 35*$cm] [expr 5.4*$cm] 1 2 3 0 3 0 3 [expr 2.54*$cm2] 0 [expr 2.54*$cm2] 0 [expr 2.54*$cm2] 20 20;
.
.
.
.
.
.
#Define sections----------------------------------------------------------------------------------------------------------------------------
proc buildrcrectsection {ID H B cover $concrete $steel numbartop1 numbartop2 numbarbot1 numbarbot2 numbarint barareatop1 barareatop2 barareabot1 barareabot2 barareaint nfy nfz} {
set covery [expr $H/2];
set coverz [expr $B/2];
set corey [expr $covery-$cover];
set corez [expr $coverz-$cover];
set locaddedbar [expr $corez/2];
section fiber $ID {
patch quadr $concrete 2 20 -$corey $corez -$corey -$corez $corey -$corez $corey $corez;
patch quadr $concrete 20 20 -$covery $coverz -$corey $corez $corey $corez $covery $coverz;
patch quadr $concrete 2 20 -$corey -$corez -$covery -$coverz $covery -$coverz $corey $corez;
patch quadr $concrete 20 2 -$covery $coverz -$covery -$coverz -$corey -$corez -$corey $corez;
patch quadr $concrete 20 2 $corey $corez $corey -$corez $covery -$coverz $covery $coverz;
layer straight $steel $numbarint $barareaint -$corey $corez $corey $corez;
layer straight $steel $numbarint $barareaint -$corey -$corez $corey -$corez;
layer straight $steel $numbartop1 $barareatop1 $corey $corez $corey -$corez;
layer straight $steel $numbartop2 $barareatop2 $corey $locaddedbar $corey -$locaddedbar;
layer straight $steel $numbarbot1 $barareabot1 -$corey $corez -$corey -$corez;
layer straight $steel $numbarbot2 $barareabot2 -$corey $locaddedbar -$corey -$locaddedbar;
};
};
----------------------------------------------------------------------------------
#Build model-----------------------------------------------------------------------------------------------------------------------------
wipe
model BasicBuilder -ndm 2 -ndf 3;
source libunits.tcl;
source DisplayPlane.tcl; # procedure for displaying a plane in model
source DisplayModel2D.tcl; # procedure for displaying 2D perspective of model
source buildrcrectsection.tcl;
#Define Geometry;
set Lcol [expr 3*$m];
set Lbeam [expr 5*$m];
set Nstory 4;
set Nbay 3;
#Define nodal coordinates
for {set level 1} {$level <= [expr $Nstory+1]} {incr level 1} {
set y [expr ($level-1)*$Lcol];
for {set pier 1} {$pier <= [expr $Nbay+1]} {incr pier 1} {
set x [expr ($pier-1)*$Lbeam];
set nodeID [expr $level*10+$pier];
node $nodeID $x $y;
}
};
fix 11 1 1 1;
fix 12 1 1 1;
fix 13 1 1 1;
fix 14 1 1 1;
#Define sections
source libmaterials.tcl;
buildrcrectsection 44 [expr 35*$cm] [expr 25*$cm] [expr 5.3*$cm] 1 2 3 0 2 0 0 [expr 2*$cm2] 0 [expr 2*$cm2] 0 0 20 20;
buildrcrectsection 33 [expr 35*$cm] [expr 25*$cm] [expr 5.3*$cm] 1 2 4 0 3 0 0 [expr 2*$cm2] 0 [expr 2*$cm2] 0 0 20 20;
buildrcrectsection 22 [expr 35*$cm] [expr 25*$cm] [expr 5.3*$cm] 1 2 2 2 3 0 0 [expr 2*$cm2] [expr 3.14*$cm2] [expr 2*$cm2] 0 0 20 20;
buildrcrectsection 11 [expr 35*$cm] [expr 25*$cm] [expr 5.3*$cm] 1 2 2 2 3 0 0 [expr 2*$cm2] [expr 3.14*$cm2] [expr 2*$cm2] 0 0 20 20;
buildrcrectsection 00 [expr 35*$cm] [expr 35*$cm] [expr 5.4*$cm] 1 2 3 0 3 0 3 [expr 2.54*$cm2] 0 [expr 2.54*$cm2] 0 [expr 2.54*$cm2] 20 20;
.
.
.
.
.
.
-
- Posts: 5
- Joined: Thu May 01, 2008 6:21 am
- Location: UC Berkeley