Basic Truss Example: Difference between revisions
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
constraints fixing the movement at the other three nodes in the model. As each Truss element has the same Young's Modulus, | constraints fixing the movement at the other three nodes in the model. As each Truss element has the same Young's Modulus, | ||
a single elastic material is created. | a single elastic material is created. | ||
< | <pre> | ||
# Remove existing model | # Remove existing model | ||
wipe | wipe | ||
Line 55: | Line 55: | ||
load 4 100 -50 | load 4 100 -50 | ||
} | } | ||
</ | </pre> | ||
=== Analysis === | === Analysis === | ||
Line 70: | Line 70: | ||
For this problem, a Static Analysis object is used. | For this problem, a Static Analysis object is used. | ||
<pre> | |||
< | |||
# Create the system of equation | # Create the system of equation | ||
system BandSPD | system BandSPD | ||
Line 89: | Line 88: | ||
# create the analysis object | # create the analysis object | ||
analysis Static | analysis Static | ||
</ | </pre> | ||
=== Output Specification === | === Output Specification === | ||
Line 96: | Line 95: | ||
and the local system. | and the local system. | ||
<pre> | |||
< | |||
# create a Recorder object for the nodal displacements at node 4 | # create a Recorder object for the nodal displacements at node 4 | ||
recorder Node -file example.out -time -node 4 -dof 1 2 disp | recorder Node -file example.out -time -node 4 -dof 1 2 disp | ||
Line 104: | Line 102: | ||
recorder Element -file eleGlobal.out -time -ele 1 2 3 forces | recorder Element -file eleGlobal.out -time -ele 1 2 3 forces | ||
recorder Element -file eleLocal.out -time -ele 1 2 3 basicForces | recorder Element -file eleLocal.out -time -ele 1 2 3 basicForces | ||
</ | </pre> | ||
=== Perform The Analysis === | === Perform The Analysis === | ||
After the objects for the model, analysis and outut has been defined we now perform the analysis. | After the objects for the model, analysis and outut has been defined we now perform the analysis. | ||
---- | ---- | ||
< | <pre> | ||
analyze 1 | analyze 1 | ||
</pre> | |||
=== Print Information to Scree === | === Print Information to Scree === | ||
In addition to using recorders, it is possible to specify output using the print and puts commands. | In addition to using recorders, it is possible to specify output using the print and puts commands. | ||
<pre> | |||
< | |||
print node 4 | print node 4 | ||
print element | print element | ||
puts "node 4 displacement: [nodeSip 4]" | puts "node 4 displacement: [nodeSip 4]" | ||
</ | </pre> | ||
=== Results === | === Results === |
Revision as of 00:09, 15 March 2011
This example is of a linear-elastic three bar truss, as shown in the figure, subject to static loads.
Model
The model consists of four nodes, three truss elements, a single load pattern with a load acting at node 4, and constraints fixing the movement at the other three nodes in the model. As each Truss element has the same Young's Modulus, a single elastic material is created.
# Remove existing model wipe # Create ModelBuilder (with two-dimensions and 2 DOF/node) model BasicBuilder -ndm 2 -ndf 2 # Create nodes # ------------ # Create nodes & add to Domain - command: node nodeId xCrd yCrd node 1 0.0 0.0 node 2 144.0 0.0 node 3 168.0 0.0 node 4 72.0 96.0 # Set the boundary conditions - command: fix nodeID xResrnt? yRestrnt? fix 1 1 1 fix 2 1 1 fix 3 1 1 # Define materials for truss elements # ----------------------------------- # Create Elastic material prototype - command: uniaxialMaterial Elastic matID E uniaxialMaterial Elastic 1 3000 # # Define elements # # Create truss elements - command: element truss trussID node1 node2 A matID element Truss 1 1 4 10.0 1 element Truss 2 2 4 5.0 1 element Truss 3 3 4 1 # Define loads # ------------ # # create a Linear TimeSeries with a tag of 1 timeSeries Linear 1 # Create a Plain load pattern associated with the TimeSeries: command pattern Plain $patternTag $timeSeriesTag { load commands } pattern Plain 1 1 { # Create the nodal load - command: load nodeID xForce yForce load 4 100 -50 }
Analysis
We will now show the commands to perform a static analysis using a linear solution algorithm The model is linear, so we use a solution Algorithm of type Linear. Even though the solution is linear, we have to select a procedure for applying the load which is called an Integrator. For this problem, a LoadControl integrator advances the solution. The equations are formed using a banded system so the System is BandSPD, banded symmetric positive definite This is a good choice for most small size models. The equations have to be numbered so the widely used RCM (Reverse Cuthill-McKee) numberer is used. The constraints are most easily represented with a Plain constraint handler. Once all the components of an analysis are defined, the Analysis object itself is created. For this problem, a Static Analysis object is used.
# 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
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.
# create a Recorder object for the nodal displacements at node 4 recorder Node -file example.out -time -node 4 -dof 1 2 disp # create a Recorder for element forces, one for global system and the other for local system recorder Element -file eleGlobal.out -time -ele 1 2 3 forces recorder Element -file eleLocal.out -time -ele 1 2 3 basicForces
Perform The Analysis
After the objects for the model, analysis and outut has been defined we now perform the analysis.
analyze 1
Print Information to Scree
In addition to using recorders, it is possible to specify output using the print and puts commands.
print node 4 print element puts "node 4 displacement: [nodeSip 4]"
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: