the problem of update the truss initial strain(need help)

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

Moderators: silvia, selimgunay, Moderators

Post Reply
jtmretop
Posts: 11
Joined: Thu Jun 17, 2010 2:15 am
Location: scut

the problem of update the truss initial strain(need help)

Post by jtmretop »

hi everyone:
(Sorry for my poor english ) i am working on a suspension bridge ,i make a iteration process:in order to control the displacementes of mainbeam,i need to update the initial strain of the truss element (such as cable,hanger) per iteration.but there are warnings:Arrayoftaggedobjects::addcomponent<>-component with tag already exists. i am a new learner about opensees ,i wonder is there anyelse command to solve the problem. following my tcl script:

proc maxx {drr} {
upvar $drr a
set max1 [expr abs($a(1))]
for {set i 2} {$i<=8} {incr i} {
if { [expr abs($a($i))] > $max1} {
set max1 [expr abs($a($i))]
}
}
return $max1
}
set contrdispmax 0.09
for {set i 1} {$i<=3} {incr i} {
set cinsta($i) -0.0001
}
for {set i 4} {$i<=5} {incr i} {
set hinsta($i) -0.0001
}
while {$contrdispmax>=0.03} {
model BasicBuilder -ndm 2 -ndf 3
node 1 0.0 4.0
node 2 5.0 2.0
node 3 10.0 2.0
node 4 15.0 4.0
node 5 0.0 0.0
node 6 5.0 0.0
node 7 10.0 0.0
node 8 15.0 0.0
fix 1 1 1 1
fix 2 0 0 1
fix 3 0 0 1
fix 4 1 1 1
fix 5 1 1 0
fix 6 0 0 0
fix 7 0 0 0
fix 8 1 1 0
set Et 1.5e8
set Eg 2e8
#set syc 1500.0
#set syh 1000.0
#set syg 250.0
set P1 -50000.0
set P2 -50000.0
set Ac 2.25e-4
set Ah 1e-4
set Ag 2.450e-3
set Iz 0.31920920
#set b 0.01
#set Re [expr $Ac*$syc]
#set force1 expr $Ac*$syc

#########################################

##############################
for {set i 1} {$i<=3} {incr i} {
uniaxialMaterial ElasticPP $i $Et 0.009538 0 $cinsta($i)
}
for {set i 4} {$i<=5} {incr i} {
uniaxialMaterial ElasticPP $i $Eg 0.009538 0 $hinsta($i)
}
#uniaxialMaterial Elastic 1 $Et
#uniaxialMaterial Elastic 2 $Eg

# GEOMETRIC TRANSFORMATION
geomTransf Linear 1
element truss 1 1 2 $Ac 1
element truss 2 2 3 $Ac 1
element truss 3 3 4 $Ac 1
element truss 4 2 6 $Ah 2
element truss 5 3 7 $Ah 2
element elasticBeamColumn 6 5 6 $Ag $Eg $Iz 1
element elasticBeamColumn 7 6 7 $Ag $Eg $Iz 1
element elasticBeamColumn 8 7 8 $Ag $Eg $Iz 1
pattern Plain 1 Linear {
load 6 0.0 $P1 0.0
}

pattern Plain 2 Linear {
load 7 0.0 $P2 0.0
}
###########################################################################
# FINITE ELEMENT ANALYSIS MODEL
constraints Plain
numberer RCM
system ProfileSPD
test NormDispIncr 1.0e-8 6
algorithm Newton
integrator LoadControl 1
analysis Static
analyze 1
###########################################################################
for {set i 1} {$i<=8} {incr i} {
set contrdisp($i) [nodeDisp $i 2 ]
}
set contrdispmax [maxx contrdisp]

for {set i 1} {$i<=3} {incr i} {
set cinsta($i) [expr [eleResponse $i material stress] / $Ac]
}
for {set i 4} {$i<=5} {incr i} {
set hinsta($i) [expr [eleResponse $i material stress] / $Ah]
}

}
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

put a wipe before the model command in the while loop
Post Reply