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

How to put point coordinates between braces?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 10, 2012, 08:57
Default How to put point coordinates between braces?
  #1
Senior Member
 
Attesz's Avatar
 
Attesz
Join Date: Mar 2009
Location: Munich
Posts: 368
Rep Power: 17
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
__________________
I am doing CFD Consulting Services.
Ich biete CFD Strömungssimulationen an.
Attesz is offline   Reply With Quote

Old   March 12, 2012, 02:31
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,684
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
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, 02:58
Default
  #3
Senior Member
 
Attesz's Avatar
 
Attesz
Join Date: Mar 2009
Location: Munich
Posts: 368
Rep Power: 17
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
__________________
I am doing CFD Consulting Services.
Ich biete CFD Strömungssimulationen an.
Attesz is offline   Reply With Quote

Reply


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 Off
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 45 August 14, 2023 21:14
Specify wall point Kr_kim OpenFOAM Running, Solving & CFD 0 February 12, 2010 15:53
CFX Post: Problems with moving point cloud for changing time steps spatialtime CFX 0 December 7, 2009 04:56
[ICEM] Formatted Point Datafile query siw ANSYS Meshing & Geometry 2 November 3, 2009 18:05
Coordinate's tranformation tommy FLUENT 0 February 13, 2004 02:19


All times are GMT -4. The time now is 18:29.