Elastic Frame Example: Difference between revisions

From OpenSeesWiki
Jump to navigation Jump to search
(Created page with '__NOTOC__ This example is of an elastic frame structure, as shown in the figure, subject to static loads. Here is the file: ElasticFrame.tcl [[Image...')
 
No edit summary
Line 15: Line 15:
set PI  [expr 2.0 * asin(1.0)]
set PI  [expr 2.0 * asin(1.0)]
set g  386.4
set g  386.4
set m1  [expr 2370.0/(2.0*4*$g)]; # 2 frames in building, 4 nodes per floor                                                   
set ft  12.0
set m2  [expr 2370.0/(2.0*4*$g)]
set m1  [expr 1185.0/(4*$g)]; # 4 nodes per floor                                                   
set m3  [expr 1940.0/(2.0*4*$g)]
set m2  [expr 1185.0/(2.0*4*$g)]
set m3  [expr 970.0/(2.0*4*$g)]
set w1  [expr 1185.0/(90*$ft)]
set w2  [expr 1185.0/(90*$ft)]
set w3  [expr  970.0/(90*$ft)]
</pre>
</pre>


Line 29: Line 33:
wipe
wipe


# Create ModelBuilder (with two-dimensions and 2 DOF/node)                                                                  
# Create ModelBuilder (with two-dimensions and 3 DOF/node)  
model BasicBuilder -ndm 2 -ndf 3
model BasicBuilder -ndm 2 -ndf 3


Line 35: Line 39:
# Create nodes & add to Domain -  
# Create nodes & add to Domain -  
# command: node nodeId xCrd yCrd <-mass $massX $massY $massRz>                                 
# command: node nodeId xCrd yCrd <-mass $massX $massY $massRz>                                 
# NOTE: mass is optional                                                                                                    
#   NOTE: mass is optional                                          
node 1    0.0  0.0
node 1    0.0  0.0
node 2  360.0  0.0
node 2  360.0  0.0
Line 53: Line 57:
node 16 1080.0 486.0 -mass $m3 $m3 0.0
node 16 1080.0 486.0 -mass $m3 $m3 0.0


# Set the boundary conditions - command: fix nodeID xResrnt? yRestrnt? rZRestrnt?                                            
# Set the boundary conditions - command: fix nodeID xResrnt? yRestrnt? rZRestrnt?  
fix 1 1 1 1
fix 1 1 1 1
fix 2 1 1 1
fix 2 1 1 1
Line 59: Line 63:
fix 4 1 1 1
fix 4 1 1 1


# Define geometric transformations for beam-column elements                                                                  
# Define geometric transformations for beam-column elements                                    
geomTransf Linear 1; # beams                                                                                                
geomTransf Linear 1; # beams                                                                  
geomTransf PDelta 2; # columns                                                                                              
geomTransf PDelta 2; # columns                


# Define elements                                                                                                            
# Define elements                                                                            
# Create elastic beam-column elements -  
# Create elastic beam-column elements -  
# command: element elasticBeamColumn eleID node1 node2 A E Iz geomTransfTag                       
# command: element elasticBeamColumn eleID node1 node2 A E Iz geomTransfTag                       


# Define the Columns                                                                                                        
# Define the Columns                                                  
element elasticBeamColumn  1  1  5 75.6 29000.0 3400.0 2; # W14X257                                                          
element elasticBeamColumn  1  1  5 75.6 29000.0 3400.0 2; # W14X257            
element elasticBeamColumn  2  5  9 75.6 29000.0 3400.0 2; # W14X257                                                          
element elasticBeamColumn  2  5  9 75.6 29000.0 3400.0 2; # W14X257  
element elasticBeamColumn  3  9 13 75.6 29000.0 3400.0 2; # W14X257                                                          
element elasticBeamColumn  3  9 13 75.6 29000.0 3400.0 2; # W14X257          
element elasticBeamColumn  4  2  6 91.4 29000.0 4330.0 2; # W14X311                                                          
element elasticBeamColumn  4  2  6 91.4 29000.0 4330.0 2; # W14X311          
element elasticBeamColumn  5  6 10 91.4 29000.0 4330.0 2; # W14X311                                                          
element elasticBeamColumn  5  6 10 91.4 29000.0 4330.0 2; # W14X311            
element elasticBeamColumn  6 10 14 91.4 29000.0 4330.0 2; # W14X311                                                          
element elasticBeamColumn  6 10 14 91.4 29000.0 4330.0 2; # W14X311            
element elasticBeamColumn  7  3  7 91.4 29000.0 4330.0 2; # W14X311                                                          
element elasticBeamColumn  7  3  7 91.4 29000.0 4330.0 2; # W14X311                
element elasticBeamColumn  8  7 11 91.4 29000.0 4330.0 2; # W14X311                                                          
element elasticBeamColumn  8  7 11 91.4 29000.0 4330.0 2; # W14X311                    
element elasticBeamColumn  9 11 15 91.4 29000.0 4330.0 2; # W14X311                                                          
element elasticBeamColumn  9 11 15 91.4 29000.0 4330.0 2; # W14X311                
element elasticBeamColumn 10  4  8 75.6 29000.0 3400.0 2; # W14X257                                                          
element elasticBeamColumn 10  4  8 75.6 29000.0 3400.0 2; # W14X257        
element elasticBeamColumn 11  8 12 75.6 29000.0 3400.0 2; # W14X257                                                          
element elasticBeamColumn 11  8 12 75.6 29000.0 3400.0 2; # W14X257                                        
element elasticBeamColumn 12 12 16 75.6 29000.0 3400.0 2; # W14X257                                                          
element elasticBeamColumn 12 12 16 75.6 29000.0 3400.0 2; # W14X257                                    


# Define the Beams                                                                                                          
# Define the Beams                                                                                  
element elasticBeamColumn 13  5  6 34.7 29000.0 5900.0 1; # W33X118                                                          
element elasticBeamColumn 13  5  6 34.7 29000.0 5900.0 1; # W33X118      
element elasticBeamColumn 14  6  7 34.7 29000.0 5900.0 1; # W33X118                                                          
element elasticBeamColumn 14  6  7 34.7 29000.0 5900.0 1; # W33X118      
element elasticBeamColumn 15  7  8 34.7 29000.0 5900.0 1; # W33X118                                                          
element elasticBeamColumn 15  7  8 34.7 29000.0 5900.0 1; # W33X118                                        
element elasticBeamColumn 16  9 10 34.2 29000.0 4930.0 1; # W30X116                                                          
element elasticBeamColumn 16  9 10 34.2 29000.0 4930.0 1; # W30X116                                          
element elasticBeamColumn 17 10 11 34.2 29000.0 4930.0 1; # W30X116                                                          
element elasticBeamColumn 17 10 11 34.2 29000.0 4930.0 1; # W30X116                                        
element elasticBeamColumn 18 11 12 34.2 29000.0 4930.0 1; # W30X116                                                          
element elasticBeamColumn 18 11 12 34.2 29000.0 4930.0 1; # W30X116                                            
element elasticBeamColumn 19 13 14 20.1 29000.0 1830.0 1; # W24X68                                                          
element elasticBeamColumn 19 13 14 20.1 29000.0 1830.0 1; # W24X68                                          
element elasticBeamColumn 20 14 15 20.1 29000.0 1830.0 1; # W24X68                                                          
element elasticBeamColumn 20 14 15 20.1 29000.0 1830.0 1; # W24X68                                        
element elasticBeamColumn 21 15 16 20.1 29000.0 1830.0 1; # W24X68   
element elasticBeamColumn 21 15 16 20.1 29000.0 1830.0 1; # W24X68  
 
# Create a Plain load pattern with a linear TimeSeries:                                       
#  command pattern Plain $tag $timeSeriesTag { $loads }                             
pattern Plain 1 1 {
    eleLoad -ele 13 14 15 -type -beamUniform -$w1
    eleLoad -ele 16 17 18 -type -beamUniform -$w2
    eleLoad -ele 19 20 21 -type -beamUniform -$w3
}
   
</pre>
</pre>


Line 118: Line 131:
</pre>
</pre>


=== Output Specification ===


For this analysis, we will record the displacement at node 4, and all the element forces expressed both in the global coordinate system and the local system.
=== Perform The Gravity Analysis ===
 
<pre>
 
</pre>
 
=== Perform The Analysis ===


After the objects for the model, analysis and output has been defined we now perform the analysis.  
After the objects for the model, analysis and output has been defined we now perform the analysis.  
Line 135: Line 141:




=== Print Information to Screen ===
=== Print Info to Screen to Allow User to Check Results ===


In addition to using recorders, it is possible to specify output using the print and puts commands. When no file identifiers are provided, these commands will print results to the screen.
In addition to using recorders, it is possible to specify output using the print and puts commands. When no file identifiers are provided, these commands will print results to the screen.


<pre>
<pre>
puts "node 4 displacement: [nodeDisp 4]"
# invoke command to determine nodal reactions                                                                               
print node 4
reactions
print element
 
set node1Rxn [nodeReaction 1]; # nodeReaction command returns nodal reactions for specified node in a list 
set node2Rxn [nodeReaction 2]
set node3Rxn [nodeReaction 3]
set node4Rxn [nodeReaction 4]
 
set inputedFy  [expr $Load1+$Load2+$Load3]
set computedFx [expr [lindex $node1Rxn 0]+[lindex $node2Rxn 0]+[lindex $node3Rxn 0]+[lindex $node4Rxn 0]]
set computedFy [expr [lindex $node1Rxn 1]+[lindex $node2Rxn 1]+[lindex $node3Rxn 1]+[lindex $node4Rxn 1]]
 
puts "\nEqilibrium Check:"
puts "SumX: Inputed: 0.0 versus Computed: $computedFx"
puts "SumY: Inputed: $inputedFy versus Computed: $computedFy"
</pre>
</pre>



Revision as of 21:11, 15 March 2011

This example is of an elastic frame structure, as shown in the figure, subject to static loads. Here is the file: ElasticFrame.tcl

NOTE:

  1. The lines in the dashed boxes are lines that appear in the input file.
  2. all lines that begin with # are comments, they are ignored by the program (interpreter) but are useful for documenting the code. When creating your own input scripts you are highly encouraged to use comments.

Parameters

Before we build the model we are going to set some parameters using tcl variables and expression evaluation. We are going to set variables for PI, the gravtational constant g, and variables for each of our floor masses.

set PI  [expr 2.0 * asin(1.0)]
set g   386.4
set ft  12.0
set m1  [expr 1185.0/(4*$g)]; # 4 nodes per floor                                                   
set m2  [expr 1185.0/(2.0*4*$g)]
set m3  [expr  970.0/(2.0*4*$g)]
set w1  [expr 1185.0/(90*$ft)]
set w2  [expr 1185.0/(90*$ft)]
set w3  [expr  970.0/(90*$ft)]

Model

The model consists of sixteen nodes, twenty one elastic beam-column elements, a single load pattern with distributed loads, and constraints totally fixing the nodes at the base of the building. There are no material objects associated with the elastic elements, but there are geometric transformations. For this example all the columns have a PDelta transformation, and all the beams a linear transformation.


# Units: kips, in, sec
# Remove existing model                                                                                                       
wipe

# Create ModelBuilder (with two-dimensions and 3 DOF/node)   
model BasicBuilder -ndm 2 -ndf 3

                                                                                                           
# Create nodes & add to Domain - 
# command: node nodeId xCrd yCrd <-mass $massX $massY $massRz>                                 
#   NOTE: mass is optional                                           
node 1     0.0   0.0
node 2   360.0   0.0
node 3   720.0   0.0
node 4  1080.0   0.0
node 5    0.0  162.0 -mass $m1 $m1 0.0
node 6  360.0  162.0 -mass $m1 $m1 0.0
node 7  720.0  162.0 -mass $m1 $m1 0.0
node 8 1080.0  162.0 -mass $m1 $m1 0.0
node 9     0.0 324.0 -mass $m2 $m2 0.0
node 10  360.0 324.0 -mass $m2 $m2 0.0
node 11  720.0 324.0 -mass $m2 $m2 0.0
node 12 1080.0 324.0 -mass $m2 $m2 0.0
node 13    0.0 486.0 -mass $m3 $m3 0.0
node 14  360.0 486.0 -mass $m3 $m3 0.0
node 15  720.0 486.0 -mass $m3 $m3 0.0
node 16 1080.0 486.0 -mass $m3 $m3 0.0

# Set the boundary conditions - command: fix nodeID xResrnt? yRestrnt? rZRestrnt?    
fix 1 1 1 1
fix 2 1 1 1
fix 3 1 1 1
fix 4 1 1 1

# Define geometric transformations for beam-column elements                                     
geomTransf Linear 1; # beams                                                                    
geomTransf PDelta 2; # columns                  

# Define elements                                                                              
# Create elastic beam-column elements - 
# command: element elasticBeamColumn eleID node1 node2 A E Iz geomTransfTag                      

# Define the Columns                                                    
element elasticBeamColumn  1  1  5 75.6 29000.0 3400.0 2; # W14X257              
element elasticBeamColumn  2  5  9 75.6 29000.0 3400.0 2; # W14X257    
element elasticBeamColumn  3  9 13 75.6 29000.0 3400.0 2; # W14X257           
element elasticBeamColumn  4  2  6 91.4 29000.0 4330.0 2; # W14X311           
element elasticBeamColumn  5  6 10 91.4 29000.0 4330.0 2; # W14X311             
element elasticBeamColumn  6 10 14 91.4 29000.0 4330.0 2; # W14X311              
element elasticBeamColumn  7  3  7 91.4 29000.0 4330.0 2; # W14X311                 
element elasticBeamColumn  8  7 11 91.4 29000.0 4330.0 2; # W14X311                     
element elasticBeamColumn  9 11 15 91.4 29000.0 4330.0 2; # W14X311                  
element elasticBeamColumn 10  4  8 75.6 29000.0 3400.0 2; # W14X257         
element elasticBeamColumn 11  8 12 75.6 29000.0 3400.0 2; # W14X257                                          
element elasticBeamColumn 12 12 16 75.6 29000.0 3400.0 2; # W14X257                                     

# Define the Beams                                                                                   
element elasticBeamColumn 13  5  6 34.7 29000.0 5900.0 1; # W33X118        
element elasticBeamColumn 14  6  7 34.7 29000.0 5900.0 1; # W33X118        
element elasticBeamColumn 15  7  8 34.7 29000.0 5900.0 1; # W33X118                                          
element elasticBeamColumn 16  9 10 34.2 29000.0 4930.0 1; # W30X116                                           
element elasticBeamColumn 17 10 11 34.2 29000.0 4930.0 1; # W30X116                                          
element elasticBeamColumn 18 11 12 34.2 29000.0 4930.0 1; # W30X116                                             
element elasticBeamColumn 19 13 14 20.1 29000.0 1830.0 1; # W24X68                                            
element elasticBeamColumn 20 14 15 20.1 29000.0 1830.0 1; # W24X68                                          
element elasticBeamColumn 21 15 16 20.1 29000.0 1830.0 1; # W24X68 

# Create a Plain load pattern with a linear TimeSeries:                                        
#  command pattern Plain $tag $timeSeriesTag { $loads }                               
pattern Plain 1 1 {
    eleLoad -ele 13 14 15 -type -beamUniform -$w1
    eleLoad -ele 16 17 18 -type -beamUniform -$w2
    eleLoad -ele 19 20 21 -type -beamUniform -$w3
}
 

Analysis - Gravity Load

We will now show the commands to perform a gravity load analysis. As the model is elastic we will use a Linear solution algorithm and use a single step of load control to get us to the desired load level.


# Create the system of equation
system BandSPD
    
# Create the DOF numberer, the reverse Cuthill-McKee algorithm
numberer RCM
    
# Create the constraint handler, a Plain handler is used as homo constraints
constraints Plain

# Create the integration scheme, the LoadControl scheme using steps of 1.0
integrator LoadControl 1.0

# Create the solution algorithm, a Linear algorithm is created
algorithm Linear

# create the analysis object 
analysis Static 


Perform The Gravity Analysis

After the objects for the model, analysis and output has been defined we now perform the analysis.

analyze 1


Print Info to Screen to Allow User to Check Results

In addition to using recorders, it is possible to specify output using the print and puts commands. When no file identifiers are provided, these commands will print results to the screen.

# invoke command to determine nodal reactions                                                                                 
reactions

set node1Rxn [nodeReaction 1]; # nodeReaction command returns nodal reactions for specified node in a list  
set node2Rxn [nodeReaction 2]
set node3Rxn [nodeReaction 3]
set node4Rxn [nodeReaction 4]

set inputedFy  [expr $Load1+$Load2+$Load3]
set computedFx [expr [lindex $node1Rxn 0]+[lindex $node2Rxn 0]+[lindex $node3Rxn 0]+[lindex $node4Rxn 0]]
set computedFy [expr [lindex $node1Rxn 1]+[lindex $node2Rxn 1]+[lindex $node3Rxn 1]+[lindex $node4Rxn 1]]

puts "\nEqilibrium Check:"
puts "SumX: Inputed: 0.0 versus Computed: $computedFx"
puts "SumY: Inputed: $inputedFy versus Computed: $computedFy"

Results

When you run this script, you should see the following printed to the screen:

In addition, your directory should contain the following 3 files with the data shown: