Large LIST OF NODES to record

Forum for asking and answering questions related to use of the OpenSeesPy module

Moderators: silvia, selimgunay, Moderators

Post Reply
ymerino
Posts: 2
Joined: Sun Oct 29, 2017 3:53 pm
Location: Chile
Contact:

Large LIST OF NODES to record

Post by ymerino »

Hi everyone,

I'm trying to record node displacements in a large 3D model, so I used:

op.recorder('Node', '-file','nodeICols.txt', '-time', '-node', 878,884,...,891, '-dof', 1, 'disp')

It works, but it was neccesary to write a large number of node tags :(
So I tried:

>> op.recorder ( 'Node' , '-file' , 'nodeICols.txt' , '-time' , '-node' , list ((colNodes[:,0])) , '-dof' , 1, 'disp')

Where 'colNodes' is a connectivity array with 1500 lines, roughly. I tried with strings, arrays, lists, etc.

IT DID NOT WORK , have you ever had a problem like this ??

Thanks!
mhscott
Posts: 880
Joined: Tue Jul 06, 2004 3:38 pm
Location: Corvallis, Oregon USA
Contact:

Re: Large LIST OF NODES to record

Post by mhscott »

You can put the nodes in a list, e.g., colNodes = [878,884,...,891] then use *colNodes in the recorder command

ops.recorder('Node','-file',...,'-node',*colNodes,...)
ymerino
Posts: 2
Joined: Sun Oct 29, 2017 3:53 pm
Location: Chile
Contact:

Re: Large LIST OF NODES to record

Post by ymerino »

Thanks Dr! It didn't work in that exact way, but it helped me so much to find the solution!

Now I'm having the same problem in OpenSees tcl :(

I'm trying to record so many node responses using a list in tcl, but it doesn't recognize it:

# -------------------------------------------------
set colNod_I {}
set colNod_J {}
foreach i1 $colC { # $colC is a file with columns connectivity
set rows1 [split $i1]
lassign $rows1 \
cName ptIc ptJc
lappend colNod_I [expr int($ptIc)]
lappend colNod_J [expr int($ptJc)]
}

recorder Node -file colNod_I_1.txt -time -node $colNod_I -dof 1 disp
# -------------------------------------------------

Do you have any idea of what's going on?

Thanks a lot!
Post Reply