Hi, I'm trying to have a for/while loop to specify fiber location when creating fiber section. The loop works but once I try to put it inside the section expression OpenSees crashes (but I see it manages to spit out the for loop in the text area before it shuts down). So it goes something like this
section FiberInt 2 -NStrip 1 $thickness $NS2 $thickness 1 $thickness {
#vertical fibers
for {set i 0} {$i < $nrStrips} {incr i} {
puts "fiber [expr -$length/2.0+$lStrip*(0.5+$i)] 0 $A_c 1; fiber [expr -$length/2.0+$lStrip*(0.5+$i)] 0 $A_s 1001;"
}
#horiz. reinf.
Hfiber 0 0 $totReinforcement 1001;
}
Perchance this is not possible so is there a method I can source in the fibers?
Using for inside section creation
Moderators: silvia, selimgunay, Moderators
Re: Using for inside section creation
You do not need puts command in front of fiber command.