Error in modeling 3DOF

HOME FORUM User Discussions Error in modeling 3DOF

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #26946
    Nyangi
    Participant

    Hi everyone.

    I have tried to implement this code using opensees navigator and I get these errors(image attached).Please  I need help to overcome those errors.Error message

    # Coded by Prafulla Malla, Sichuan University
    # Structural Response 3DOF
    # Report Vibration Control
    # X–*************–X –************–X—-************–X
    # 1Fix(m,k,c) 2 m,k,c) 3 (m,k,c) 4 Top Floor
    wipe all;
    set Tn 1.0
    set K 2.0e8
    set M 4.0e5
    set dampRatio 0.02
    #number of modes
    set numModes 3

    #set some constants
    set g 9.810
    set PI [expr 2.0 * asin(1.0)]

    #derived quantaties
    set Wn [expr 2.0 * $PI / $Tn]
    set c [expr 2.0*$M*$Wn*$dampRatio]

    # create the model
    wipe
    model basic -ndm 1 -ndf 1

    node 1 0.0
    node 2 1.0 -mass $M
    node 3 2.0 -mass $M
    node 4 3.0 -mass $M

    fix 1 1

    uniaxialMaterial Elastic 1 $K 0.0
    uniaxialMaterial Elastic 2 0.0 $c
    uniaxialMaterial Parallel 3 1 2

    #element truss eleno -i -j area matt
    element truss 1 1 2 1.0 3
    element truss 2 2 3 1.0 3
    element truss 3 3 4 1.0 3

    # perform eigen analysis
    #—————————–
    set lambda [eigen -fullGenLapack $numModes];

    # calculate frequencies and periods of the structure
    #—————————————————
    set omega {}
    set f {}
    set T {}
    set pi 3.141593

    foreach lam $lambda {
    lappend omega [expr sqrt($lam)]
    lappend f [expr sqrt($lam)/(2*$pi)]
    lappend T [expr (2*$pi)/sqrt($lam)]
    }
    puts “omega are $omega”
    puts “periods are $T”
    print node 4;
    print node 3;
    print node 2;

    set dT 0.02;
    set nPts 1500;
    set factor $g

    timeSeries Path 1 -filePath Elcentro.dat -dt $dT -factor $g
    pattern UniformExcitation 1 1 -accel 1

    # create the analysis
    constraints Plain
    integrator Newmark 0.5 [expr 1.0/6.0]
    system ProfileSPD
    test NormUnbalance 1.0e-12 6 0
    algorithm Newton
    numberer RCM
    analysis Transient
    rayleigh 0.7334 0.0026 0. 0.

    set t 0.0
    set maxT [expr (1+$nPts)*$dT];
    set ok 0.0
    set maxD 0.0
    recorder Node -file disp4.out -time -node 4 -dof 1 disp
    recorder Node -file vel4.out -time -node 4 -dof 1 vel
    recorder Node -file accel4.out -time -node 4 -dof 1 accel
    recorder Drift -file drift4.out -time -iNode 3 -jNode 4 -dof 1 -perpDirn 1
    recorder Node -file mode.out -nodeRange 2 4 -dof 1 eigen ;

    while {$ok == 0 && $t < $maxT} {
    set ok [analyze 1 $dT]
    if {$ok != 0} {
    test NormDispIncr 1.0e-12 100 0
    algorithm ModifiedNewton -initial
    set ok [analyze 1 .01]
    test NormDispIncr 1.0e-12 10
    algorithm Newton
    }

    set time [getTime]
    set d [nodeDisp 4 1]

    if {$d > $maxD} {
    set maxD $d
    } elseif {$d < [expr -$maxD]} {
    set maxD [expr -$d]
    }
    set t [expr $t + $dT]
    }

    puts “record: $record period: $Tn damping ratio: $dampRatio max disp: $maxD”
    wipe all;
    Prafullamalla

    Posts: 34
    Joined: Mon Feb 02, 2015 7:32 pm

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