Nodal Coordinate

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

Moderators: silvia, selimgunay, Moderators

Post Reply
peyman1358
Posts: 7
Joined: Fri Dec 04, 2009 6:21 pm
Location: UCI
Contact:

Nodal Coordinate

Post by peyman1358 »

Hi all,

Can I have an output file (made by recorder) from opensees that contains only nodal information as follows:

Node number- X,Y and Z coordinate of nodes


Thanks
Peyman
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

here is what frank has about the print command:

Print Command
From OpenSeesWiki
Jump to: navigation, search
This command is used to print output.

To print all objects of the domain:

print <$fileName>


To print node information:




print <$fileName> -node <-flag $flag> <$node1 $node2 ...>


To print element information:




print <$fileName> -ele <-flag $flag> <$ele1 $ele2 ...>





--------------------------------------------------------------------------------
$fileName (optional) name of file to which data will be sent. overwrites existing file. default is to print to stderr)
$flag integer flag to be sent to the print() method, depending on the node and element type (optional)
$node1 $node2 .. (optional) integer tags of nodes to be printed. default is to print all.
$ele1 $ele2 .. (optional) integer tags of elements to be printed. default is to print all.

EXAMPLE:

print -ele; # print all elemenmts

print -node 1 2 3; # print data for nodes 1,2 & 3
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
peyman1358
Posts: 7
Joined: Fri Dec 04, 2009 6:21 pm
Location: UCI
Contact:

Post by peyman1358 »

Thank you Silvia

I used the print command and it wrks but what I exactly need is a file which can be used as an input data for my Matlab code: each line in that txt file should have the following format:
Node number _ X coordinate - Y coordinate - Z coordinate

Best
Peyman
hugo_esquivel
Posts: 71
Joined: Fri Nov 06, 2009 6:40 am
Location: Universidad del Norte, Colombia

Post by hugo_esquivel »

Hi Silvia. Where is placed the OpenSeesWiki you name above? I remember a while ago you were very interested in building a WIKI for OpenSees. Are you still working on this project? Is this an advance of what we'll see soon at the OpenSees Board?

Many thanks in advance! :)
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

we're working on it, yes, it's almost done.
funny thing, most of the other items on it are done, the manual is dragging on -- as it is the heaviest component!

:)
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
hugo_esquivel
Posts: 71
Joined: Fri Nov 06, 2009 6:40 am
Location: Universidad del Norte, Colombia

Post by hugo_esquivel »

I'm glad to hear that, Silvia.

Hi Peyman... If you have an unix-based system, then you can use the following script-line at the end of your model file.
exec bash -c { while read line; do if [[ $(echo $line | awk '{print $1}') == node ]]; then echo $line >> nodesFile.out; fi done < modelFile.tcl }

Instructions:
1. Replace the word modelFile.tcl by the path of your model file.
2. Replace the word nodesFile.out by the path of your 'nodes file' (this is the output file).
For example,
- Path of your model file: /Users/hresquivelo/modelFile.tcl.
- Path of your 'nodes file': /Users/hresquivelo/nodesFile.out.

Assumptions:
1. There's not spaces before the definition of command node. I mean,
(incorrect)
.... node 1 0.00 0.00 (suppose that dots are spaces)
(correct)
node 1 0.00 0.00

2. If command node is defined inside a logical-loop statement, then it will not work as expected.


The best way is to make a c++ code.


>> Let me know if that works for you. <<

Regards,
peyman1358
Posts: 7
Joined: Fri Dec 04, 2009 6:21 pm
Location: UCI
Contact:

Post by peyman1358 »

Thanks Hugo for your guidance!
Post Reply