CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Pre-Processing

How to put point coordinates between braces?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   March 10, 2012, 09:57
Default How to put point coordinates between braces?
  #1
Senior Member
 
Attesz's Avatar
 
Attesz
Join Date: Mar 2009
Posts: 355
Rep Power: 8
Attesz is an unknown quantity at this point
Hi all,

I have 250 points to put into a file in OpenFOAM as coordinates. OF wants to have them between braces, but I have them in Libreoffice calc. Do you have idea how to do this automatically?

This question is more programming than CFD

Best,
Attila
__________________
CFD= Cleverly Formatted Data
Attesz is offline   Reply With Quote

Old   March 12, 2012, 03:31
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.io/
Posts: 777
Rep Power: 18
olesen will become famous soon enough
For these types of tasks, you should forget the excel/office-calc tools.
It is simpler to use standard unix tools such as awk/perl instead.
For example,
Code:
    awk '{ print "{" $0 "}" }' infile.txt
will print enclosing braces around each line.
olesen is offline   Reply With Quote

Old   March 12, 2012, 03:58
Default
  #3
Senior Member
 
Attesz's Avatar
 
Attesz
Join Date: Mar 2009
Posts: 355
Rep Power: 8
Attesz is an unknown quantity at this point
Thank you, yes I know I should know much more about linux. However, I managed to do it in calc, it was quite easy, but your solution is more elegant.

Have a nice day,
Attila
__________________
CFD= Cleverly Formatted Data
Attesz is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finite Volume Method For Cylindrical Coordinates falopsy Main CFD Forum 44 January 15, 2014 03:17
Specify wall point Kr_kim OpenFOAM Running, Solving & CFD 0 February 12, 2010 16:53
CFX Post: Problems with moving point cloud for changing time steps spatialtime CFX 0 December 7, 2009 05:56
[ICEM] Formatted Point Datafile query siw ANSYS Meshing & Geometry 2 November 3, 2009 19:05
Coordinate's tranformation tommy FLUENT 0 February 13, 2004 03:19


All times are GMT -4. The time now is 02:14.