CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

how to convert .txt files to OpenFOAM format

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 25, 2021, 14:48
Default how to convert .txt files to OpenFOAM format
  #1
Senior Member
 
Alan w
Join Date: Feb 2021
Posts: 259
Rep Power: 6
boffin5 is on a distinguished road
Hi,
Recently I found a site showing some simulation case files for 0, constant and system, so I copied them as text (.txt) files. Now, I need to convert them to OpenFOAM format files. I thought the method would be easy to find, but after much searching, all I can find is some cryptic info, along with the comment, "just go write a program". But I'm not a programmer, and would appreciate some examples of how to do this.

btw, Thanks to all who have been an indispensable help to me, as I jump from problem to problem.
boffin5 is offline   Reply With Quote

Old   July 26, 2021, 00:44
Default
  #2
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
OF accepts plain ASCII.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   July 26, 2021, 01:13
Default
  #3
Member
 
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5
DevilX is on a distinguished road
Hey Alan,


you don´t need any special file type for OF, so just name f.e. your velocity file "U" instead of "U.txt" and it works.
DevilX is offline   Reply With Quote

Old   July 28, 2021, 14:06
Default gave up prematurely
  #4
Senior Member
 
Alan w
Join Date: Feb 2021
Posts: 259
Rep Power: 6
boffin5 is on a distinguished road
Danke Schön and Thanks!
I appreciate your help, but I just used brute force and re-typed the files; thankfully they weren't too big. So I could have just renamed them to remove the .txt? What does f.e. mean?
boffin5 is offline   Reply With Quote

Old   July 28, 2021, 14:16
Default
  #5
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
>just renamed them to remove the .txt?

Yes, that's it.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 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
OpenFOAM files into csv format kd55 OpenFOAM Post-Processing 4 May 16, 2023 03:58
[Technical] How to convert Corner-grid format to OpenFOAM mesh ELwardi OpenFOAM Meshing & Mesh Conversion 0 April 20, 2019 12:05
[Commercial meshers] starccm+ solution data convert into OpenFOAM format akshaybagi OpenFOAM Meshing & Mesh Conversion 1 June 2, 2017 05:09
OpenFOAM Training, London, Chicago, Munich, Houston 2016-2017 cfd.direct OpenFOAM Announcements from Other Sources 0 September 14, 2016 03:19
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 09:04


All times are GMT -4. The time now is 20:59.