why in this script the output of elements is zero?It seems that gravity analysis does not run!
Thanks before
#Define units-----------------------------------------------------------------------------------------
set cm 1;
set kg 1;
set m [expr 100*$cm];
set cm2 [expr $cm*$cm];
set mm [expr $m/1000];
set kgpcm2 [expr $kg/$cm2];
set kgpm [expr $kg/$m];
set ubig 1e10;
set usmall [expr 1/$ubig];
#LibMaterials: define a library of materials------------------------------------------------------
#General material parameters
set G $ubig;
set j 1;
set Gj [expr $G*$j];
#concrete material
set fpc [expr -250*$kgpcm2];
set epsco -0.003;
set fpcu [expr -84*$kgpcm2];
set epsu -0.012;
set concrete 1;
uniaxialMaterial Concrete01 $concrete $fpc $epsco $fpcu $epsu;
#Steel material
set Es [expr 2.06e6*$kgpcm2];
set Fy [expr 4000*$kgpcm2];
set epsY 0.00194;
set Fy1 [expr 1.5*$Fy];
set Bs 0.01;
set epsY1 [expr $epsY+($Fy1-$Fy)/($Bs*$Es)];
set Fu $Fy;
set epsU 0.025;
set pinchX 1; # pinching parameter for hysteretic model
set pinchY 1; # pinching parameter for hysteretic model
set damage1 0.0; # damage parameter for hysteretic model
set damage2 0.0; # damage parameter for hysteretic model
set betaMUsteel 0.0; # degraded unloading stiffness for hysteretic material based on MU^(-beta) -- make more like
set steel 2;
uniaxialMaterial Hysteretic $steel $Fy $epsY $Fu $epsU -$Fy -$epsY -$Fu -$epsU $pinchX $pinchY $damage1 $damage2 $betaMUsteel;
#Build model-----------------------------------------------------------------------------------------------------------------------------
wipe
model BasicBuilder -ndm 2 -ndf 3;
source libunits.tcl;
set dataDir Data;
file mkdir $dataDir;
source DisplayPlane.tcl; # procedure for displaying a plane in model
source DisplayModel2D.tcl; # procedure for displaying 2D perspective of model
#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;
source buildrcrectsection.tcl;
buildrcrectsection 44 [expr 35*$cm] [expr 25*$cm] [expr 5.3*$cm] $concrete $steel 3 [expr 2*$cm2] 0 0 2 [expr 2*$cm2] 0 0 2 [expr 2*$cm2] nfY nfZ
buildrcrectsection 33 [expr 35*$cm] [expr 25*$cm] [expr 5.3*$cm] $concrete $steel 4 [expr 2*$cm2] 0 0 3 [expr 2*$cm2] 0 0 2 [expr 2*$cm2] nfY nfZ
buildrcrectsection 22 [expr 35*$cm] [expr 25*$cm] [expr 5.3*$cm] $concrete $steel 2 [expr 2*$cm2] 2 [expr 3.14*$cm2] 3 [expr 2*$cm2] 0 0 2 [expr 2*$cm2] nfY nfZ
buildrcrectsection 11 [expr 35*$cm] [expr 25*$cm] [expr 5.3*$cm] $concrete $steel 2 [expr 2*$cm2] 2 [expr 3.14*$cm2] 3 [expr 2*$cm2] 0 0 2 [expr 2*$cm2] nfY nfZ
buildrcrectsection 99 [expr 35*$cm] [expr 35*$cm] [expr 5.3*$cm] $concrete $steel 3 [expr 2.54*$cm2] 0 0 3 [expr 2.54*$cm2] 0 0 3 [expr 2.54*$cm2] nfY nfZ
#Define transformation
geomTransf Linear 1;
geomTransf PDelta 2;
#Define Beam-Column Elements
#beams
element nonlinearBeamColumn 2122 21 22 5 11 1;
element nonlinearBeamColumn 2223 22 23 5 11 1;
element nonlinearBeamColumn 2324 23 24 5 11 1;
element nonlinearBeamColumn 3132 31 32 5 22 1;
element nonlinearBeamColumn 3233 32 33 5 22 1;
element nonlinearBeamColumn 3334 33 34 5 22 1;
element nonlinearBeamColumn 4142 41 42 5 33 1;
element nonlinearBeamColumn 4243 42 43 5 33 1;
element nonlinearBeamColumn 4344 43 44 5 33 1;
element nonlinearBeamColumn 5152 51 52 5 44 1;
element nonlinearBeamColumn 5253 52 53 5 44 1;
element nonlinearBeamColumn 5354 53 54 5 44 1;
#columns
element nonlinearBeamColumn 1121 11 21 5 99 2;
element nonlinearBeamColumn 1222 12 22 5 99 2;
element nonlinearBeamColumn 1323 13 23 5 99 2;
element nonlinearBeamColumn 1424 14 24 5 99 2;
element nonlinearBeamColumn 2131 21 31 5 99 2;
element nonlinearBeamColumn 2232 22 32 5 99 2;
element nonlinearBeamColumn 2333 23 33 5 99 2;
element nonlinearBeamColumn 2434 24 34 5 99 2;
element nonlinearBeamColumn 3141 31 41 5 99 2;
element nonlinearBeamColumn 3242 32 42 5 99 2;
element nonlinearBeamColumn 3343 33 43 5 99 2;
element nonlinearBeamColumn 3444 34 44 5 99 2;
element nonlinearBeamColumn 4151 41 51 5 99 2;
element nonlinearBeamColumn 4252 42 52 5 99 2;
element nonlinearBeamColumn 4353 43 53 5 99 2;
element nonlinearBeamColumn 4454 44 54 5 99 2;
#Gravity ,weights
set weightfloor1 [expr 43369.8*$kg];
set weightfloor2 [expr 43369.8*$kg];
set weightfloor3 [expr 43369.8*$kg];
set weightfloor4 [expr 35404.8*$kg];
set Vbs [expr 51588.735*$kg];
#Define recorders
recorder Element -file $dataDir/gravity.out -ele 3233 section 3 deformation
#Define Gravity loads
pattern Plain 1 Linear {
eleLoad -ele 2122 2324 3132 3334 4142 4344 -type -beamUniform [expr -846.73*$kgpm];
eleLoad -ele 2223 3233 4243 -type -beamUniform [expr -2366.73*$kgpm];
eleLoad -ele 5152 5354 -type -beamUniform [expr -201.73*$kgpm];
eleLoad -ele 5253 -type -beamUniform [expr -1721.73*$kgpm];
eleLoad -ele 1121 1222 1323 1424 2131 2232 2333 2434 3141 3242 3343 3444 4151 4252 4353 4454 -type -beamUniform 0 [expr -306.25*$kgpm];
};
set ViewScale 5;
DisplayModel2D DeformedShape $ViewScale ; # display deformed shape, the scaling factor needs to be adjusted for each model
recorder plot $dataDir/DFree.out ForceDisp 600 2 400 400 -columns 2 1; # a window to plot the load vs. nodal displacement
#Gravity analysis parameters--------LoadControl static analysis
set Tol 1.0e-8;
constraints Plain;
numberer RCM;
system BandGeneral;
test NormDispIncr $Tol 6;
algorithm Newton;
set NstepGravity 10;
set DGravity [expr 1/$NstepGravity]; #first load increment
integrator LoadControl $DGravity; #first load increment (pseudo-time step) in the next invocation of the analysis command.
analysis Static;
analyze $NstepGravity;
set gravityok [analyze $NstepGravity];
if {$gravityok == 0} {
puts "Gravity load analysis completed SUCCESSFULLY";
} else {
puts "Gravity load analysis completed FAILED";
}