|
[Sponsors] |
November 2, 2020, 18:40 |
Export/Load file.txt in OpenFoam
|
#1 |
New Member
Mehrshad Amini
Join Date: Sep 2017
Posts: 10
Rep Power: 9 |
Hello,
I am writing a new BC for time varying inlet velocity. I could write a vectorfield as a text file by following command in the .C file: #incude <OFstream.H> . . . Ofstream myfile ("ux.txt."); myfile << ux << endl; However, I do not know how to load a text file! is there any way to do it? btw I am new in the OpenFoam programing. Thank you in advance. Best, Mehrshad |
|
November 3, 2020, 12:47 |
|
#2 |
New Member
Mehrshad Amini
Join Date: Sep 2017
Posts: 10
Rep Power: 9 |
I found the answers. See below:
#inlcude <IFstream.H> . . . . IFstream dataStream("ux.tx") dataStream >> ux; |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Frequently Asked Questions about Installing OpenFOAM | wyldckat | OpenFOAM Installation | 3 | November 14, 2023 12:58 |
OpenFOAM Training Jan-Jul 2017, Virtual, London, Houston, Berlin | CFDFoundation | OpenFOAM Announcements from Other Sources | 0 | January 4, 2017 07:15 |
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 | cfd.direct | OpenFOAM Announcements from Other Sources | 2 | August 31, 2015 14:36 |
OpenFOAM Foundation releases OpenFOAM 2.2.2 | opencfd | OpenFOAM Announcements from ESI-OpenCFD | 0 | October 14, 2013 08:18 |
[Gmsh] 2D Mesh Generation Tutorial for GMSH | aeroslacker | OpenFOAM Meshing & Mesh Conversion | 12 | January 19, 2012 04:52 |