|
[Sponsors] |
February 14, 2014, 04:17 |
input .txt file (vector list) to OpenFOAM
|
#1 |
New Member
MWu
Join Date: Nov 2013
Posts: 10
Rep Power: 12 |
Hi, every, I am a new Openfoam user
If I want to read vector-list(.txt file) into openfoam, and identify each vector, How can I manage to do this, please? ie, positions vector list (4.0446766158e+00 3.5020000000e+00 4.0000000000e+00) (3.9430552591e+00 3.5060000000e+00 4.0521660473e+00) (4.0086987498e+00 3.5100000000e+00 3.9008822329e+00) ... ... ... And I want to get positions[0] = (4.0446766158e+00 3.5020000000e+00 4.0000000000e+00) positions[1] = (3.9430552591e+00 3.5060000000e+00 4.0521660473e+00) positions[2] = (4.0086987498e+00 3.5100000000e+00 3.9008822329e+00) ... ... ... ... Is there any one know how to read this data from .txt file and identify each vector? Thanks |
|
February 14, 2014, 04:55 |
|
#2 |
New Member
Luca
Join Date: Feb 2014
Posts: 19
Rep Power: 12 |
You have to give us more information. What do u need to do with that file? Is it for build your mesh?
However, I think you should do a little script in c++ , write it with gedit and save it "script" , then make it an executable with "chmod +x script" and execute it "./script" . BUT: I don't know if this way will works, I'm a little (but creative) newbie |
|
February 14, 2014, 05:00 |
|
#3 | |
New Member
MWu
Join Date: Nov 2013
Posts: 10
Rep Power: 12 |
Quote:
Hi, Thanks for reply. I don't use it for building mesh, I use there positions for interpolate velocities. (interpolate velocities to each markers positions) Thanks again |
||
February 14, 2014, 09:51 |
|
#4 |
New Member
MWu
Join Date: Nov 2013
Posts: 10
Rep Power: 12 |
any one can tell me?
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 | keepfit | ParaView | 60 | September 18, 2013 03:23 |
[swak4Foam] swak4Foam-groovyBC build problem | zxj160 | OpenFOAM Community Contributions | 18 | July 30, 2013 13:14 |
friction forces icoFoam | ofslcm | OpenFOAM | 3 | April 7, 2012 10:57 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 19:08 |
ParaView Compilation | jakaranda | OpenFOAM Installation | 3 | October 27, 2008 11:46 |