Export/Load file.txt in OpenFoam
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 |
I found the answers. See below:
#inlcude <IFstream.H> . . . . IFstream dataStream("ux.tx") dataStream >> ux; |
All times are GMT -4. The time now is 19:28. |