add element in each time step by using FOR command

HOME FORUM User Discussions add element in each time step by using FOR command

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #24022
    Nikoo
    Participant

    Hi, I have a question of using FOR in Opensees. I model a frame and want to add a brace to that and analysis it in each step.
    Below there are two options that have to same results, but they have not (one of them element was added before For, other added in the loop). I would appreciate if you could help me. Thank You.

    OPTION _ 1:
    set ABrace 5.e-3
    set MatBrace 1
    uniaxialMaterial Elastic $MatBrace $E

    for {set i 1} {$i<6564} {incr i} {
    element truss 4 1 4 $ABrace $MatBrace
    analyze 1 0.005
    remove element 4

    }
    ————————————————
    OPTION _ 2:

    set ABrace 5.e-3
    set MatBrace 1
    uniaxialMaterial Elastic $MatBrace $E
    element truss 4 1 4 $ABrace $MatBrace

    for {set i 1} {$i<6564} {incr i} {
    analyze 1 0.005

    }

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.