command for

Forum for OpenSees users to post questions, comments, etc. on the use of the OpenSees interpreter, OpenSees.exe

Moderators: silvia, selimgunay, Moderators

Post Reply
asra
Posts: 31
Joined: Sat Apr 12, 2008 4:20 am
Location: tehran
Contact:

command for

Post by asra »

i want to run my model with different values of PGA so i input ALL of command and model in cycle with command for.when the first cycle finished and the second value of PGA start i got this error :node with tag 1 already exist in model warning failed to add node to model.
in analysis i didnt change the properties of node,element,section in cycles and only i would to change PGA so what i can do?
for solving this problem i use command wipe at the end of cycle to destroy my model at the end of each cycle but i cant succes !what can i do?
thanks alot
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

try to put wipe right before you build the model.
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
asra
Posts: 31
Joined: Sat Apr 12, 2008 4:20 am
Location: tehran
Contact:

Post by asra »

i placed the wipe before my model but it didnt run and wrote invalid command name:node what can i do?
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

use the modelBuilder command....
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
asra
Posts: 31
Joined: Sat Apr 12, 2008 4:20 am
Location: tehran
Contact:

Post by asra »

i use this command later in first line program i send you the program .i should run more than 1000 analysis and i should use from FOR command.but i think the opensees cant delete previous data of model in each cycle.help me please

Code: Select all

# OpenSees model
#
# Units: ton, m, sec
# ----------------------------
# Start of model generation
# ----------------------------
# Create ModelBuilder with 3 dimensions and 6 DOF/node
model BasicBuilder -ndm 3 -ndf 6
# ---------------
# -----------------------------TYPE OF ANALYSIS----------------  
#set ANALYSISS "LINEAR";      #                                 /
set ANALYSISS "NONLINEAR";    #                               / 
# -------------------------------------------------------------- 


# ============Define parameters
set fy 2.4e4 ;        # Yield stress  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
set E 2.1e7   ;    # Young's modulus
set G 8.08e6;        # Shear modulus
set bx 18.0;   #diaphragm length
set by 15.0;  #Diaphragm width
set h  3.3;  #Model height
set PGA 0.5; #Maximum Eq acceleration per g
set pga 0.2557; #Maximum Eq acceleration of file per g
set m 18.96; #mass=weight/9.81
set em 0.0; #mass eccentricity
set landa 0.2; 
set L      6 ;  #length of brace
set Ib     1.21E-6; #moment of inertia of brace
 set fp       [expr (3.14*3.14*$E*$Ib)/($L*$L)]; #point 3 of hystertic in compression(force)
set slip       [expr ($fp-(0.15*$fp))];  #total slip load

for {set SL 1} {$SL <= $slip} {incr SL 1} {


#some calculations
set Isymmet [expr $m*($bx*$bx+$by*$by)/12.0];  # symmetric floor moment of inertia
set eta [expr $em/($landa*$landa-$landa)];
set m1 [expr $m*$landa*(1+$eta)];
set m2 [expr $m*(1.0-2.0*$landa)];
set m3 [expr $m*$landa*(1.0-$eta)];
set a1 [expr ($landa*$landa*$bx*$bx+$by*$by)/12.0];
set b1 [expr ($bx/2.0-$landa*$bx/2.0-$em*$bx)*($bx/2.0-$landa*$bx/2.0-$em*$bx)];
set a2 [expr (($bx-2.0*$landa*$bx)*($bx-2.0*$landa*$bx)+$by*$by)/12.0];
set b2 [expr $em*$em*$bx*$bx];
set a3 [expr ($landa*$landa*$bx*$bx+$by*$by)/12.0];
set b3 [expr ($bx/2.0-$landa*$bx/2.0+$em*$bx)*($bx/2.0-$landa*$bx/2.0+$em*$bx)];
set Icm [expr $m1*($a1+$b1)+$m2*($a2+$b2)+$m3*($a3+$b3)]; # assymetric floor moment of inertia

#for brace


set A      7.57E-4;     #area of brace
set dataDir ed-0SL$SL;			       	# set up name of data directory
file mkdir $dataDir;
puts $SL


set dl     [expr ($SL*$L)/($A*$E)];    #deformation of brace when slip
set hole    .02; #hole of FD
set er      0.0; #error of this method  
set ft       [expr ($A * $fy)];  #point 3 of hystertic in tension (force)
set dtf      [expr ($ft -$SL) * $L/($E*$A)];
set dtot     [expr ($dl+$hole+$dtf)] ; #total displacement in tension

set dnf      [expr ($fp -$SL) * $L/($E*$A)];
set dn       [expr ($dl+$hole+$dnf)]; #total displacement in compression



wipe;
# =============Define geometry

#bottomn of columns points
node  1      [expr -$bx/2]  [expr -$by/2]    0.0     # 
      
node  2      [expr -$bx/6]  [expr -$by/2]    0.0     #                       
node  3      [expr  $bx/6]  [expr -$by/2]    0.0     #                       
node  4      [expr  $bx/2]  [expr -$by/2]    0.0     #  
node  5      [expr -$bx/2]  [expr -$by/6]    0.0     #                            
node  6      [expr -$bx/6]  [expr -$by/6]    0.0     #                       
node  7      [expr  $bx/6]  [expr -$by/6]    0.0     #                       
node  8      [expr  $bx/2]  [expr -$by/6]    0.0     #
node  9      [expr -$bx/2]  [expr  $by/6]    0.0     #                            
node  10     [expr -$bx/6]  [expr  $by/6]    0.0     #                       
node  11     [expr  $bx/6]  [expr  $by/6]    0.0     #                       
node  12     [expr  $bx/2]  [expr  $by/6]    0.0     # 
node  13     [expr -$bx/2]  [expr  $by/2]    0.0     #                            
node  14     [expr -$bx/6]  [expr  $by/2]    0.0     #                       
node  15     [expr  $bx/6]  [expr  $by/2]    0.0     #                       
node  16     [expr  $bx/2]  [expr  $by/2]    0.0     # 

#top of columns points
node  101     [expr -$bx/2]  [expr -$by/2]    $h     #       
node  102     [expr -$bx/6]  [expr -$by/2]    $h     #                       
node  103     [expr  $bx/6]  [expr -$by/2]    $h     #                       
node  104     [expr  $bx/2]  [expr -$by/2]    $h     #  
node  105     [expr -$bx/2]  [expr -$by/6]    $h     #                            
node  106     [expr -$bx/6]  [expr -$by/6]    $h     #                       
node  107     [expr  $bx/6]  [expr -$by/6]    $h     #                       
node  108     [expr  $bx/2]  [expr -$by/6]    $h     #
node  109     [expr -$bx/2]  [expr  $by/6]    $h     #                            
node  110     [expr -$bx/6]  [expr  $by/6]    $h     #                       
node  111     [expr  $bx/6]  [expr  $by/6]    $h     #                       
node  112     [expr  $bx/2]  [expr  $by/6]    $h     # 
node  113     [expr -$bx/2]  [expr  $by/2]    $h     #                            
node  114     [expr -$bx/6]  [expr  $by/2]    $h     #                       
node  115     [expr  $bx/6]  [expr  $by/2]    $h     #                       
node  116     [expr  $bx/2]  [expr  $by/2]    $h     # 




#master joint
node  500       [expr -$em*$bx]       0.0       [expr $h]

# Set base constraints
#   tag     DX DY DZ RX RY RZ
fix  1      1  1  1  1  1  1
fix  2      1  1  1  1  1  1
fix  3      1  1  1  1  1  1
fix  4      1  1  1  1  1  1
fix  5      1  1  1  1  1  1
fix  6      1  1  1  1  1  1
fix  7      1  1  1  1  1  1
fix  8      1  1  1  1  1  1
fix  9      1  1  1  1  1  1
fix  10     1  1  1  1  1  1
fix  11     1  1  1  1  1  1
fix  12     1  1  1  1  1  1
fix  13     1  1  1  1  1  1
fix  14     1  1  1  1  1  1
fix  15     1  1  1  1  1  1
fix  16     1  1  1  1  1  1


## Define rigid diaphragm multi-point constraints
#           normalDir  master     slaves
rigidDiaphragm     3    500   101 102 103 104 105 106 107 108 109 110
rigidDiaphragm     3    500   111 112 113 114 115 116 

# Constraints for rigid diaphragm master nodes
#   tag   DX DY DZ RX RY RZ
fix  500   0  0  1  1  1  0
#
puts $ANALYSISS
if {$ANALYSISS == "NONLINEAR"} {
#Defining material
uniaxialMaterial Steel01  1   $fy  $E   .02  
#========================================

#------------------------------------------------------------------------------------

#COL 1                                         bbox,tfbox                   y
set dbox1 0.224; #box height                ///////////////                 |
set bbox1 0.224; #box width                 //           //                 | 
set tfbox1 0.012; #box flange t             //           //                 |
set twbox1 0.012; #box web t                //           // dbox,twbox      |
set nfdwbox1 10; #box web lenght cuts       //           //                 |--------z 
set nftwbox1 3; #box web thickness cuts     //           //
set nfbfbox1 10; #box flange length cuts    //           //
set nftfbox1 3; #box flange thickness cuts  ///////////////

#COL 2
set dbox2 0.224; #box height                 
set bbox2 0.224; #box width                         
set tfbox2 0.012; #box flange t                     
set twbox2 0.012; #box web t                        
set nfdwbox2 10; #box web lenght cuts              
set nftwbox2 3; #box web thickness cuts            
set nfbfbox2 10; #box flange length cuts           
set nftfbox2 3; #box flange thickness cuts          


#_________________________________FELAN NA!!!!!
#COL 3                                        ! 
set dbox3 0.224; #box height                  !                       
set bbox3 0.224; #box width                   !                    
set tfbox3 0.012; #box flange t               !              
set twbox3 0.012; #box web t                  !                    
set nfdwbox3 10; #box web lenght cuts         !             
set nftwbox3 3; #box web thickness cuts       !          
set nfbfbox3 10; #box flange length cuts      !         
set nftfbox3 3; #box flange thickness cuts    !
#                                             !  
#COL 4                                        !
set dbox4 0.224; #box height                  !              
set bbox4 0.224; #box width                   !          
set tfbox4 0.012; #box flange t               !               
set twbox4 0.012; #box web t                  !                   
set nfdwbox4 10; #box web lenght cuts         !               
set nftwbox4 3; #box web thickness cuts       !         
set nfbfbox4 10; #box flange length cuts      !         
set nftfbox4 3; #box flange thickness cuts    !
#__________________________________FELAN NA!!!!



source BOXsection.tcl

BOXsection  1 1 $dbox1 $bbox1 $tfbox1 $twbox1 $nfdwbox1 $nftwbox1 $nfbfbox1 $nftfbox1
BOXsection  2 1 $dbox2 $bbox2 $tfbox2 $twbox2 $nfdwbox2 $nftwbox2 $nfbfbox2 $nftfbox2
BOXsection  3 1 $dbox3 $bbox3 $tfbox3 $twbox3 $nfdwbox3 $nftwbox3 $nfbfbox3 $nftfbox3
BOXsection  4 1 $dbox4 $bbox4 $tfbox4 $twbox4 $nfdwbox4 $nftwbox4 $nfbfbox4 $nftfbox4

#---------------------------------------------------------------------------------------

#-------------------X BEAMS
#                                               bfI,tfI
# BEAM1 1--------NO!!!!!!!!                 //////////////   \              y
set dI1 0.224; #I height                          //         |              |
set bfI1 0.20; #I flange width                    //         |              |
set tfI1 0.012; #I flange t                       //         |              |
set twI1 0.008; #I web t                     twI  //          \  dI         |-------z
set nfdwI1 10; #I web lenght cuts                 //          /   
set nftwI1 3; #I web thickness cuts               //          |
set nfbfI1 10; #I flange length cuts              //          |
set nftfI1 3; #I flange thickness cuts      //////////////   /


# BEAM 2----------NO!!!!!!!!!!
set dI2 0.224; #I height
set bfI2 0.20; #I flange width
set tfI2 0.012; #I flange t
set twI2 0.008; #I web t
set nfdwI2 10; #I web lenght cuts
set nftwI2 3; #I web thickness cuts
set nfbfI2 10; #I flange length cuts
set nftfI2 3; #I flange thickness cuts




#---------------------y BEAMS
# BEAM 3
set dI3 0.224; #I height
set bfI3 0.20; #I flange width
set tfI3 0.012; #I flange t
set twI3 0.008; #I web t
set nfdwI3 10; #I web lenght cuts
set nftwI3 3; #I web thickness cuts
set nfbfI3 10; #I flange length cuts
set nftfI3 3; #I flange thickness cuts

# BEAM 4
set dI4 0.224; #I height
set bfI4 0.20; #I flange width
set tfI4 0.012; #I flange t
set twI4 0.008; #I web t
set nfdwI4 10; #I web lenght cuts
set nftwI4 3; #I web thickness cuts
set nfbfI4 10; #I flange length cuts
set nftfI4 3; #I flange thickness cuts


source Isection.tcl

Isection 11 1 $dI1 $bfI1 $tfI1 $twI1 $nfdwI1 $nftwI1 $nfbfI1 $nftfI1
Isection 12 1 $dI2 $bfI2 $tfI2 $twI2 $nfdwI2 $nftwI2 $nfbfI2 $nftfI2
Isection 13 1 $dI3 $bfI3 $tfI3 $twI3 $nfdwI3 $nftwI3 $nfbfI3 $nftfI3
Isection 14 1 $dI4 $bfI4 $tfI4 $twI4 $nfdwI4 $nftwI4 $nfbfI4 $nftfI4

#------------------------------------------------------------------------------
# geometric transform 
geomTransf Linear  1   1  0  0 
geomTransf Linear  2   0  1  0   
geomTransf Linear  3   1  0  0  

#----------------------------------------------------------------------------
# Torsion and shear for columns
#COL1
set Am1 [expr ($dbox1-$tfbox1)*($bbox1-$twbox1)]
set Lm1 [expr 2.0*(($dbox1-$tfbox1)+($bbox1-$twbox1))]
set tave1 [expr ($tfbox1+$twbox1)/2.0]
set Jcol1 [expr 4.0*$Am1*$Am1*$tave1/$Lm1]
set GJcol1 [expr $Jcol1*$G]
set Ascoly1 [expr 2.0*$twbox1*$dbox1]
set Ascolz1 [expr 2.0*$tfbox1*$bbox1]
set GAcoly1 [expr $Ascoly1*$G]
set GAcolz1 [expr $Ascolz1*$G]

#COL2
set Am2 [expr ($dbox2-$tfbox2)*($bbox2-$twbox2)]
set Lm2 [expr 2.0*(($dbox2-$tfbox2)+($bbox2-$twbox2))]
set tave2 [expr ($tfbox2+$twbox2)/2.0]
set Jcol2 [expr 4.0*$Am2*$Am2*$tave2/$Lm2]
set GJcol2 [expr $Jcol2*$G]
set Ascoly2 [expr 2.0*$twbox2*$dbox2]
set Ascolz2 [expr 2.0*$tfbox2*$bbox2]
set GAcoly2 [expr $Ascoly2*$G]
set GAcolz2 [expr $Ascolz2*$G]

#_________________________________FELAN NA!!!!!
#COL3                                         
set Am3 [expr ($dbox3-$tfbox3)*($bbox3-$twbox3)]
set Lm3 [expr 2.0*(($dbox3-$tfbox3)+($bbox3-$twbox3))]
set tave3 [expr ($tfbox3+$twbox3)/2.0]
set Jcol3 [expr 4.0*$Am3*$Am3*$tave3/$Lm3]
set GJcol3 [expr $Jcol3*$G]
set Ascoly3 [expr 2.0*$twbox3*$dbox3]
set Ascolz3 [expr 2.0*$tfbox3*$bbox3]
set GAcoly3 [expr $Ascoly3*$G]
set GAcolz3 [expr $Ascolz3*$G]

#COL4
set Am4 [expr ($dbox4-$tfbox4)*($bbox4-$twbox4)]
set Lm4 [expr 2.0*(($dbox4-$tfbox4)+($bbox4-$twbox4))]
set tave4 [expr ($tfbox4+$twbox4)/2.0]
set Jcol4 [expr 4.0*$Am4*$Am4*$tave4/$Lm4]
set GJcol4 [expr $Jcol4*$G]
set Ascoly4 [expr 2.0*$twbox4*$dbox4]
set Ascolz4 [expr 2.0*$tfbox4*$bbox4]
set GAcoly4 [expr $Ascoly4*$G]
set GAcolz4 [expr $Ascolz4*$G]
#_________________________________FELAN NA!!!!!


#uniaxialMaterial Elastic $matTag  $E 
uniaxialMaterial Elastic    2     $GJcol1
uniaxialMaterial Elastic    3     $GAcoly1
uniaxialMaterial Elastic    4     $GAcolz1

uniaxialMaterial Elastic    5     $GJcol2
uniaxialMaterial Elastic    6     $GAcoly2
uniaxialMaterial Elastic    7     $GAcolz2

uniaxialMaterial Elastic    8     $GJcol3
uniaxialMaterial Elastic    9     $GAcoly3
uniaxialMaterial Elastic    10    $GAcolz3

uniaxialMaterial Elastic    11    $GJcol4
uniaxialMaterial Elastic    12    $GAcoly4
uniaxialMaterial Elastic    13    $GAcolz4

#----------------------------------------------------------------------------
# Torsion and shear for beams

#---------------------------X BEAMS
#BEAM 1
set Jbeam1 [expr .3333*(($dI1-2.0*$tfI1)*$twI1*$twI1*$twI1+2.0*$bfI1*$tfI1*$tfI1*$tfI1)]  
set GJbeam1 [expr $Jbeam1*$G]
set Asbeamy1 [expr $twI1*$dI1]
set Asbeamz1 [expr 1.6666*$bfI1*$tfI1]
set GAbeamy1 [expr $Asbeamy1*$G]
set GAbeamz1 [expr $Asbeamz1*$G]

#BEAM 2
set Jbeam2 [expr .3333*(($dI2-2.0*$tfI2)*$twI2*$twI2*$twI2+2.0*$bfI2*$tfI2*$tfI2*$tfI2)]  
set GJbeam2 [expr $Jbeam2*$G]
set Asbeamy2 [expr $twI2*$dI2]
set Asbeamz2 [expr 1.6666*$bfI2*$tfI2]
set GAbeamy2 [expr $Asbeamy2*$G]
set GAbeamz2 [expr $Asbeamz2*$G]


#---------------------------y BEAMS
#BEAM 3
set Jbeam3 [expr .3333*(($dI3-2.0*$tfI3)*$twI3*$twI3*$twI3+2.0*$bfI3*$tfI3*$tfI3*$tfI3)]  
set GJbeam3 [expr $Jbeam3*$G]
set Asbeamy3 [expr $twI3*$dI3]
set Asbeamz3 [expr 1.6666*$bfI3*$tfI3]
set GAbeamy3 [expr $Asbeamy3*$G]
set GAbeamz3 [expr $Asbeamz3*$G]

#BEAM 4
set Jbeam4 [expr .3333*(($dI4-2.0*$tfI4)*$twI4*$twI4*$twI4+2.0*$bfI4*$tfI4*$tfI4*$tfI4)]  
set GJbeam4 [expr $Jbeam4*$G]
set Asbeamy4 [expr $twI4*$dI4]
set Asbeamz4 [expr 1.6666*$bfI4*$tfI4]
set GAbeamy4 [expr $Asbeamy4*$G]
set GAbeamz4 [expr $Asbeamz4*$G]

#uniaxialMaterial Elastic $matTag  $E 
uniaxialMaterial Elastic    22     $GJbeam1
uniaxialMaterial Elastic    23     $GAbeamy1
uniaxialMaterial Elastic    24     $GAbeamz1

uniaxialMaterial Elastic    25     $GJbeam2
uniaxialMaterial Elastic    26     $GAbeamy2
uniaxialMaterial Elastic    27     $GAbeamz2

uniaxialMaterial Elastic    28     $GJbeam3
uniaxialMaterial Elastic    29     $GAbeamy3
uniaxialMaterial Elastic    30     $GAbeamz3

uniaxialMaterial Elastic    31     $GJbeam4
uniaxialMaterial Elastic    32     $GAbeamy4
uniaxialMaterial Elastic    33     $GAbeamz4
#hystertic material
#uniaxialMaterial Hysteretic $matTag    $s1p     $e1p          $s2p                    $e2p            $s3p  $e3p       $s1n      $e1n        $s2n                      $e2n                $s3n              $e3n            $pinchX $pinchY $damage1 $damage2
 uniaxialMaterial Hysteretic    34      $SL      $dl     [expr ($SL+$er)]       [expr ($dl+$hole)]     $ft   $dtot      -$SL     -$dl     [expr -($SL+$er)]       [expr -($dl+$hole)]    [expr (-$fp)]   [expr (-$dn)]           1       1         0        0;

#========================================
#section Aggregator $secTag $matTag1 $string1 $matTag2 $string2 ....... <-section $sectionTag>

#------------COLUMNS
section Aggregator    5        2       T      3       Vy      4    Vz      -section 1
section Aggregator    6        5       T      6       Vy      7    Vz      -section 2

#_________________________________FELAN NA!!!!
section Aggregator    7        8       T      9       Vy      10   Vz      -section 3
section Aggregator    8        11      T      12      Vy      13   Vz      -section 4
#_________________________________FELAN NA!!!!


#------------BEAMS
#------X BEAMS
section Aggregator    15       22      T      23      Vy      24  Vz      -section 11
section Aggregator    16       25      T      26      Vy      27  Vz      -section 12

#------Y BEAMS
section Aggregator    17       28      T      29      Vy      30  Vz      -section 13
section Aggregator    18       31      T      32      Vy      33  Vz      -section 14

#-------brace
#section Uniaxial $secTag    $matTag $string

section Uniaxial     19         34      P 

#========================================
#column element assignment
set npc  5 
#element nonlinearBeamColumn $eleTag $iNode $jNode $numIntgrPts $secTag $transfTag <-mass $massDens> <-iter $maxIters $tol> 
element nonlinearBeamColumn  1         1    101     $npc          5        1                          -iter 10 1.0e-1
element nonlinearBeamColumn  2         2    102     $npc          5        1                          -iter 10 1.0e-1
element nonlinearBeamColumn  3         3    103     $npc          6        1                          -iter 10 1.0e-1
element nonlinearBeamColumn  4         4    104     $npc          6        1  
element nonlinearBeamColumn  5         5    105     $npc          5        1                          -iter 10 1.0e-1
element nonlinearBeamColumn  6         6    106     $npc          5        1                          -iter 10 1.0e-1
element nonlinearBeamColumn  7         7    107     $npc          6        1                          -iter 10 1.0e-1
element nonlinearBeamColumn  8         8    108     $npc          6        1 
element nonlinearBeamColumn  9         9    109     $npc          5        1                          -iter 10 1.0e-1
element nonlinearBeamColumn  10        10   110     $npc          5        1                          -iter 10 1.0e-1
element nonlinearBeamColumn  11        11   111     $npc          6        1                          -iter 10 1.0e-1
element nonlinearBeamColumn  12        12   112     $npc          6        1 
element nonlinearBeamColumn  13        13   113     $npc          5        1                          -iter 10 1.0e-1
element nonlinearBeamColumn  14        14   114     $npc          5        1                          -iter 10 1.0e-1
element nonlinearBeamColumn  15        15   115     $npc          6        1                          -iter 10 1.0e-1
element nonlinearBeamColumn  16        16   116     $npc          6        1 
#
#x beam element assignment    (for y asymmetry)
set npb  5 
element nonlinearBeamColumn  101         101   102     $npb          15       2                          -iter 10 1.0e-1
element nonlinearBeamColumn  102         102   103     $npb          15       2                          -iter 10 1.0e-1
element nonlinearBeamColumn  103         103   104     $npb          15       2                          -iter 10 1.0e-1
element nonlinearBeamColumn  104         105   106     $npb          15       2  
element nonlinearBeamColumn  105         106   107     $npb          15       2                          -iter 10 1.0e-1
element nonlinearBeamColumn  106         107   108     $npb          15       2                          -iter 10 1.0e-1
element nonlinearBeamColumn  107         109   110     $npb          16       2                          -iter 10 1.0e-1
element nonlinearBeamColumn  108         110   111     $npb          16       2 
element nonlinearBeamColumn  109         111   112     $npb          16       2                          -iter 10 1.0e-1
element nonlinearBeamColumn  110         113   114     $npb          16       2                          -iter 10 1.0e-1
element nonlinearBeamColumn  111         114   115     $npb          16       2                          -iter 10 1.0e-1
element nonlinearBeamColumn  112         115   116     $npb          16       2 
#
#y beam element assignment   (for x asymmetry)
#
element nonlinearBeamColumn  121         101   105     $npb          17       3                          -iter 10 1.0e-1
element nonlinearBeamColumn  122         105   109     $npb          17       3                          -iter 10 1.0e-1
element nonlinearBeamColumn  123         109   113     $npb          17       3                          -iter 10 1.0e-1
element nonlinearBeamColumn  124         102   106     $npb          17       3  
element nonlinearBeamColumn  125         106   110     $npb          17       3                          -iter 10 1.0e-1
element nonlinearBeamColumn  126         110   114     $npb          17       3                          -iter 10 1.0e-1
element nonlinearBeamColumn  127         103   107     $npb          18       3                          -iter 10 1.0e-1
element nonlinearBeamColumn  128         107   111     $npb          18       3 
element nonlinearBeamColumn  129         111   115     $npb          18       3                          -iter 10 1.0e-1
element nonlinearBeamColumn  130         104   108     $npb          18       3                          -iter 10 1.0e-1
element nonlinearBeamColumn  131         108   112     $npb          18       3                          -iter 10 1.0e-1
element nonlinearBeamColumn  132         112   116     $npb          18       3 
#element truss $eleTag   $iNode $jNode $secTag
element truss  133         1     105    19
element truss  134         2     106    19
element truss  135         3     107    19
element truss  136         4     108    19
element truss  137         5     109    19
element truss  138         6     110    19
element truss  139         7     111    19
element truss  140         8     112    19
element truss  141         9     113    19
element truss  142         10    114    19
element truss  143         11    115    19
element truss  144         12    116    19








#
} else {
# col 1
set Acol1 1.02e-2
set Icolz1 7.647e-5
set Icoly1 7.647e-5
set Jcol1 1.143e-4  
# col 2
set Acol2 1.02e-2
set Icolz2 7.647e-5
set Icoly2 7.647e-5
set Jcol2 1.143e-4  

# col 3
set Acol3 1.02e-2
set Icolz3 7.647e-5
set Icoly3 7.647e-5
set Jcol3 1.143e-4  

# col 4
set Acol4 1.02e-2
set Icolz4 7.647e-5
set Icoly4 7.647e-5
set Jcol4 1.143e-4  

#
# Beam 1
set Abeam1 6.4e-3
set Ibeamz1 5.932e-5
set Ibeamy1 1.601e-5
set Jbeam1 2.55e-7

# Beam 2
set Abeam2 6.4e-3
set Ibeamz2 5.932e-5
set Ibeamy2 1.601e-5
set Jbeam2 2.55e-7
 
# Beam 3
set Abeam3 6.4e-3
set Ibeamz3 5.932e-5
set Ibeamy3 1.601e-5
set Jbeam3 2.55e-7

# Beam 4
set Abeam4 6.4e-3
set Ibeamz4 5.932e-5
set Ibeamy4 1.601e-5
set Jbeam4 2.55e-7

#
# geometric transform 
geomTransf Linear  1   1  0  0 
geomTransf Linear  2   0  1  0   
geomTransf Linear  3   1  0  0  
#
#column elastic elements
##element             eleTag i  j       A      E     G      J     Iy      Iz       TransfTag
element elasticBeamColumn 1  1  101   $Acol1   $E    $G   $Jcol1  $Icoly1  $Icolz1    1
element elasticBeamColumn 2  2  102   $Acol1   $E    $G   $Jcol1  $Icoly1  $Icolz1    1
element elasticBeamColumn 3  3  103   $Acol2   $E    $G   $Jcol2  $Icoly2  $Icolz2    1
element elasticBeamColumn 4  4  104   $Acol2   $E    $G   $Jcol2  $Icoly2  $Icolz2    1
element elasticBeamColumn 5  5  105   $Acol1   $E    $G   $Jcol1  $Icoly1  $Icolz1    1
element elasticBeamColumn 6  6  106   $Acol1   $E    $G   $Jcol1  $Icoly1  $Icolz1    1
element elasticBeamColumn 7  7  107   $Acol2   $E    $G   $Jcol2  $Icoly2  $Icolz2    1
element elasticBeamColumn 8  8  108   $Acol2   $E    $G   $Jcol2  $Icoly2  $Icolz2    1
element elasticBeamColumn 9  9  109   $Acol1   $E    $G   $Jcol1  $Icoly1  $Icolz1    1
element elasticBeamColumn 10 10 110   $Acol1   $E    $G   $Jcol1  $Icoly1  $Icolz1    1
element elasticBeamColumn 11 11 111   $Acol2   $E    $G   $Jcol2  $Icoly2  $Icolz2    1
element elasticBeamColumn 12 12 112   $Acol2   $E    $G   $Jcol2  $Icoly2  $Icolz2    1
element elasticBeamColumn 13 13 113   $Acol1   $E    $G   $Jcol1  $Icoly1  $Icolz1    1
element elasticBeamColumn 14 14 114   $Acol1   $E    $G   $Jcol1  $Icoly1  $Icolz1    1
element elasticBeamColumn 15 15 115   $Acol2   $E    $G   $Jcol2  $Icoly2  $Icolz2    1
element elasticBeamColumn 16 16 116   $Acol2   $E    $G   $Jcol2  $Icoly2  $Icolz2    1

#

#x Beam elastic elements
element elasticBeamColumn 101  101  102   $Abeam1   $E    $G   $Jbeam1  $Ibeamy1  $Ibeamz1   2
element elasticBeamColumn 102  102  103   $Abeam1   $E    $G   $Jbeam1  $Ibeamy1  $Ibeamz1   2
element elasticBeamColumn 103  103  104   $Abeam1   $E    $G   $Jbeam1  $Ibeamy1  $Ibeamz1   2
element elasticBeamColumn 104  105  106   $Abeam1   $E    $G   $Jbeam1  $Ibeamy1  $Ibeamz1   2
element elasticBeamColumn 105  106  107   $Abeam1   $E    $G   $Jbeam1  $Ibeamy1  $Ibeamz1   2
element elasticBeamColumn 106  107  108   $Abeam1   $E    $G   $Jbeam1  $Ibeamy1  $Ibeamz1   2
element elasticBeamColumn 107  109  110   $Abeam2   $E    $G   $Jbeam2  $Ibeamy2  $Ibeamz2   2
element elasticBeamColumn 108  110  111   $Abeam2   $E    $G   $Jbeam2  $Ibeamy2  $Ibeamz2   2
element elasticBeamColumn 109  111  112   $Abeam2   $E    $G   $Jbeam2  $Ibeamy2  $Ibeamz2   2
element elasticBeamColumn 110  113  114   $Abeam2   $E    $G   $Jbeam2  $Ibeamy2  $Ibeamz2   2
element elasticBeamColumn 111  114  115   $Abeam2   $E    $G   $Jbeam2  $Ibeamy2  $Ibeamz2   2
element elasticBeamColumn 112  115  116   $Abeam2   $E    $G   $Jbeam2  $Ibeamy2  $Ibeamz2   2

#y Beam elastic elements
element elasticBeamColumn 121  101  105   $Abeam3   $E    $G   $Jbeam3  $Ibeamy3  $Ibeamz3   3
element elasticBeamColumn 122  105  109   $Abeam3   $E    $G   $Jbeam3  $Ibeamy3  $Ibeamz3   3
element elasticBeamColumn 123  109  113   $Abeam3   $E    $G   $Jbeam3  $Ibeamy3  $Ibeamz3   3
element elasticBeamColumn 124  102  106   $Abeam3   $E    $G   $Jbeam3  $Ibeamy3  $Ibeamz3   3
element elasticBeamColumn 125  106  110   $Abeam3   $E    $G   $Jbeam3  $Ibeamy3  $Ibeamz3   3
element elasticBeamColumn 126  110  114   $Abeam3   $E    $G   $Jbeam3  $Ibeamy3  $Ibeamz3   3
element elasticBeamColumn 127  103  107   $Abeam4   $E    $G   $Jbeam4  $Ibeamy4  $Ibeamz4   3
element elasticBeamColumn 128  107  111   $Abeam4   $E    $G   $Jbeam4  $Ibeamy4  $Ibeamz4   3
element elasticBeamColumn 129  111  115   $Abeam4   $E    $G   $Jbeam4  $Ibeamy4  $Ibeamz4   3
element elasticBeamColumn 130  104  108   $Abeam4   $E    $G   $Jbeam4  $Ibeamy4  $Ibeamz4   3
element elasticBeamColumn 131  108  112   $Abeam4   $E    $G   $Jbeam4  $Ibeamy4  $Ibeamz4   3
element elasticBeamColumn 132  112  116   $Abeam4   $E    $G   $Jbeam4  $Ibeamy4  $Ibeamz4   3
} 




## Set mass at the master nodes
#    tag  MX  MY  MZ RX RY RZ
mass 500  $m  $m  0  0  0 $Icm 


set pi 3.1415
puts "";puts "";puts "";puts "";puts ""
puts T1(Sec)=
puts [expr 2*$pi/ pow ([eigen 1],.5)]


#
#
#set pi 3.1415
#puts "";puts "";puts "";puts "";puts ""
#puts T1 (Sec)=
#puts [expr 2*$pi/ pow ([eigen 1],.5)]
#
#

# Define gravity loads
# --------------------
#
pattern Plain 1 Constant {
  

eleLoad -ele 101 -type -beamUniform -1.73 0.0

eleLoad -ele 102 -type -beamUniform  0.0  0.0
eleLoad -ele 103 -type -beamUniform -1.73 0.0
eleLoad -ele 104 -type -beamUniform -1.73 0.0
eleLoad -ele 105 -type -beamUniform -1.73 0.0
eleLoad -ele 106 -type -beamUniform -1.73 0.0
eleLoad -ele 107 -type -beamUniform -1.73 0.0
eleLoad -ele 108 -type -beamUniform -1.73 0.0
eleLoad -ele 109 -type -beamUniform -1.73 0.0

eleLoad -ele 110 -type -beamUniform -1.73 0.0
eleLoad -ele 111 -type -beamUniform  0.0  0.0
eleLoad -ele 112 -type -beamUniform -1.73 0.0
#
eleLoad -ele 121 -type -beamUniform  0.0  0.0

eleLoad -ele 122 -type -beamUniform -2.07 0.0
eleLoad -ele 123 -type -beamUniform  0.0  0.0
eleLoad -ele 124 -type -beamUniform -2.07 0.0
eleLoad -ele 125 -type -beamUniform -2.07 0.0
eleLoad -ele 126 -type -beamUniform -2.07 0.0
eleLoad -ele 127 -type -beamUniform -2.07 0.0
eleLoad -ele 128 -type -beamUniform -2.07 0.0
eleLoad -ele 129 -type -beamUniform -2.07 0.0

eleLoad -ele 130 -type -beamUniform  0.0  0.0
eleLoad -ele 131 -type -beamUniform -2.07 0.0
eleLoad -ele 132 -type -beamUniform  0.0  0.0
}

# Define earthquake excitation
# ----------------------------
# Set up the acceleration records for Tabas fault normal and fault parallel
set fac [expr ($PGA/$pga)*9.81]
set north "Path -filePath  1.txt -dt 0.02 -factor $fac"

# D = $alphaM * M + $betaK * Kcurrent +$betaKinit * Kinit + $betaKcomm * KlastCommit 
#set xDamp 0.02; # damping ratio (0.02-0.05-typical) 
#set lambda [eigen 1]
#set omega [expr pow($lambda,0.5)]
 
#  Ty, Tx =0.41  T teta =0.32   ksi=.03 for 0.41 and 0.32
set alphaM  0.5164
set betaK   1.72e-3
set betaKcomm   1.72e-3
set betaKinit  1.72e-3;   
rayleigh $alphaM $betaK $betaKinit $betaKcomm 
#
#                         tag dir   accel series args
pattern UniformExcitation  2   2  -accel      $north
# ----------------------------
# Create the convergence test
#                tol   maxIter  printFlag
test EnergyIncr 1.0e-8   20         3
# Create the solution algorithm
algorithm Newton
# Create the system of equation storage and solver
system SparseGeneral -piv
# Create the constraint handler
constraints Transformation
# Create the time integration scheme
#                   gamma beta
integrator Newmark   0.5  0.25
# Create the DOF numberer
numberer RCM
# Create the transient analysis
analysis Transient
# --------------------------
# End of analysis generation
# --------------------------
# ----------------------------
# Start of recorder generation
# ----------------------------
# Record DOF 1 and 2 displacements at nodes 9, 14, and 19
#recorder Node -file node13-5.out -time -node 13 -dof 6  disp

if {$ANALYSISS == "NONLINEAR"} {

recorder Node -file $dataDir/uycm1.txt     -node 500 -dof 2 disp
recorder Node -file $dataDir/utetcm1.txt   -node 500 -dof 6 disp
recorder Node -file $dataDir/uyleft1.txt   -node 113 -dof 2 disp
recorder Node -file $dataDir/uyright1.txt  -node 116 -dof 2 disp

recorder Node -file $dataDir/aycm1.txt     -node 500 -dof 2 accel
recorder Node -file $dataDir/atetcm1.txt   -node 500 -dof 6 accel
recorder Node -file $dataDir/ayleft1.txt   -node 113 -dof 2 accel
recorder Node -file $dataDir/ayright1.txt  -node 116 -dof 2 accel

recorder Node -file $dataDir/vx1.txt -node 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 -dof 1 reaction
recorder Node -file $dataDir/vy1.txt -node 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 -dof 2 reaction
recorder Node -file $dataDir/M1.txt -node 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 -dof 6 reaction

#####DISPLAY RECORDER
recorder Node -file $dataDir/display1.txt   -time -node 500 -dof 2 disp

} else {
recorder Node -file uycml1.txt    -node 500 -dof 2 disp
recorder Node -file utetcml1.txt  -node 500 -dof 6 disp
recorder Node -file uyleftl1.txt  -node 113 -dof 2 disp
recorder Node -file uyrightl1.txt  -node 116 -dof 2 disp

recorder Node -file aycml1.txt    -node 500 -dof 2 accel
recorder Node -file atetcml1.txt  -node 500 -dof 6 accel
recorder Node -file ayleftl1.txt  -node 113 -dof 2 accel
recorder Node -file ayrightl1.txt  -node 116 -dof 2 accel
}

recorder display animation 10 10 600 600 -file 1
prp 20 90 60
vup 0 0 2
fill 4 
display 10 -1 1000  

# a window to plot the nodal displacements versus time for node 500
recorder plot $dataDir/display1.txt Node_500_Ydisp 620 340 350 300 -columns 1 2 


# --------------------------
# End of recorder generation
# --------------------------
# --------------------
# Perform the analysis
# --------------------
# Analysis duration of 20 seconds
#       numSteps  dt



analyze  100  .02

#
set pi 3.1415
puts "";puts "";puts "";puts "";puts ""
puts T1(Sec)=
puts [expr 2*$pi/ pow ([eigen 1],.5)]
}
#puts [eigen 1]
#puts T2(Sec)=
#puts [expr 2*$pi/ pow ([eigen 2],.5)]

##puts "";puts "";puts "";puts "";puts ""
#puts T2(Sec)=
#puts "";puts "";puts "";puts "";puts ""
#puts [expr 2*$pi/ pow ([eigen 2],.5)]
#puts [eigen 3]
##
##
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

what's wrong with this command:

node 1 [expr -$bx/2] [expr -$by/2] 0.0 #

????

you have to figure this one out, please.
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
asra
Posts: 31
Joined: Sat Apr 12, 2008 4:20 am
Location: tehran
Contact:

Post by asra »

i cant understand your command.if i remove FOR in this program i can run and no problem but in cycle i hava this problem.is the command that i wrote error which one?if one of them wrong why work true if i choose no cycle/
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

try putting in a semicolon (;) before your # at the end of the node commands....
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
asra
Posts: 31
Joined: Sat Apr 12, 2008 4:20 am
Location: tehran
Contact:

Post by asra »

thanks alot .the problem solve.im putting FOR and wipe first command of progrom and the cycles act.
Post Reply