List of nodes assigned to rigid Diaphragm

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

Moderators: silvia, selimgunay, Moderators

Post Reply
soko
Posts: 5
Joined: Mon Aug 26, 2013 10:43 pm
Location: AUTH

List of nodes assigned to rigid Diaphragm

Post by soko »

Hello,

It is my first attempt to create a 3D model of a building and I have made lists of nodes according to floor level.
Then I tried setting rigid Diaphragm on each floor using the following command:

set perpDirn 2:
rigidDiaphragm $perpDirn [lindex $mn 0] [$dph1]

where $mn is a list containing the node Tags of all master nodes.

However, when I run it there is a warning saying: invalid command name "0 1 2 3 ...etc"
where "0 1 2 3 ...etc" are the node Tags included in the list $dph1

Is there a way to connect the node Tags of each list to its corresponding master node and thus to the corresponding diaphragm?

Thank you in advance!
Panos
Posts: 23
Joined: Fri Jul 20, 2012 10:28 am
Location: National Technical University of Athens

Re: List of nodes assigned to rigid Diaphragm

Post by Panos »

I am not familiar with the rigidDiaphragm command, but this looks like a tcl-scripting error. If I understand correctly, the programme tries to implement a command defined by string "0 1 2 ....". Since there's no such command, an error is encountered. You can either try to remove the brackets (write only $dph1) and see if the rigid diaphragm is correctly constructed, or use the lindex command, like you did with the $mn list.
soko
Posts: 5
Joined: Mon Aug 26, 2013 10:43 pm
Location: AUTH

Re: List of nodes assigned to rigid Diaphragm

Post by soko »

When I remove the brackets and run the file there is a different warning saying:

WARNING rigidLink perpDirn rNode cNodes - could not read cNode
expected integer but got "0 1 2 3 ... etc"

Concerning the second option of using lindex command, I will practically use the same number of lindex commands as the numbers of the nodes inside the list. Therefore I will not take advantage of the list command which I created in order to avoid typing about 100 nodeTags.
Is there a way that I'm missing to use lindex command without having to type the command for each one individually (except the "foreach" command which I tried and didn't work)?
Panos
Posts: 23
Joined: Fri Jul 20, 2012 10:28 am
Location: National Technical University of Athens

Re: List of nodes assigned to rigid Diaphragm

Post by Panos »

By the sound of it, the slaveNodeTag argument accepts only variables and cannot discriminate the elements of a given list. The only solution that I can think of right now is to greadually construct the diaphragm, using multiple rigidDiaphragm commands. Put the command within a loop and use the lindex commnad for both master and slave nodes. The loop will go through all the elements of the dph list and you 'll have created the constraints individually for each node. Is this acceptable as a modelling principle?
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: List of nodes assigned to rigid Diaphragm

Post by fmk »

you are passing a list and not a number of tags .. to make what you want work, puts the commmand inside an eval, i.e.:

eval "rigidDiaphragm $perpDirn [lindex $mn 0] $dph1"
soko
Posts: 5
Joined: Mon Aug 26, 2013 10:43 pm
Location: AUTH

Re: List of nodes assigned to rigid Diaphragm

Post by soko »

Thank you so much for your time and your answers!
Problem solved with the eval command.
Have a nice day!
Post Reply