|
[Sponsors] |
April 5, 2015, 02:30 |
can someone explain IO in OpenFOAM
|
#1 |
Member
Karelke Yu
Join Date: Dec 2014
Posts: 96
Rep Power: 11 |
greetings to all.
i am in great interest of OF and have walked through the two guides (i.e. UG and PG), as well as some basics of C++. and also, i have looked into some source code (e.g. icoFoam). however, i found that the IO operating is of great difficulties and i nearly could not handle its mechanisms. here is something always makes me confused: (1) how does the runTime.write() works? i know runTime is an object of Class Time, but what about the function write()? how can i proceeding to that or add some code to that (if possible)? (2)how are the classes related, Time, objectRegistry, IOdictionary, IOobject, regIOobject, runTimeSelectionTables, addToRunTimeSelectionTable etc? and if certain user-defined volScalarField p is intended to be written at every writeInterval, how should i make the implementation? add it to the createFields.H file? or if i want to output myStream into a file at every writeInterval/timeStep? (3)i have went through the 'sample' utility. however, i think i should firstly overcome the two foregoing problems and then maybe i could develop mySample. thanks for the attention. any suggestion (or materials about how to IO in OF) will make my life easier. |
|
April 5, 2015, 07:56 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128 |
Quick answer: http://openfoamwiki.net/index.php/OpenFOAM_guide
|
|
April 6, 2015, 09:29 |
how to IO freewill in OF
|
#3 | |
Member
Karelke Yu
Join Date: Dec 2014
Posts: 96
Rep Power: 11 |
Quote:
just, the third consideration. if i want to output some simulation information to a file after simulation, such as something like the sample utility, i think first i should create a folder that may be named with 'samples' (but how?), and then read the time series by using functions such as runTime.setTime(), runTime.timeName() etc. but how could i write the information to a file located where expected? may i get some guidelines (as what you have kindly offered) on freewill write (do not use the overridden writeData() function) or some simple developed-utility instances? best regards, Ykjh |
||
September 20, 2015, 16:30 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128 |
Greetings,
Sorry for the really late reply, but only now did I manage to take a quick look into your question. And unfortunately I don't have a straight answer. I would need some more details in order to know what would be the best approach to suggest to you. I say this because OpenFOAM relies in a modular approach, which is why the sample application relies on libraries that have the sampling code, while the application sample only handles the bureaucracy of loading the mesh and going through the necessary time steps. On the other hand, if you simply want to output values, then perhaps the utility "applications/utilities/postProcessing/miscellaneous/pdfPlot" is one possible way to start. Best regards, Bruno
__________________
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFOAM - Validation of Results | Ahmed | OpenFOAM Running, Solving & CFD | 10 | May 13, 2018 19:28 |
Superlinear speedup in OpenFOAM 13 | msrinath80 | OpenFOAM Running, Solving & CFD | 18 | March 3, 2015 06:36 |
OpenFOAM 1.6.x, 1.7.0 and 1.7.x are not fully prepared to work with gcc-4.5.x | wyldckat | OpenFOAM Bugs | 18 | October 21, 2010 06:51 |
How to Install OpenFOAM on 64 Ubuntu 9.04 | hansel | OpenFOAM Installation | 62 | March 19, 2010 15:43 |
Summer School on Numerical Modelling and OpenFOAM | hjasak | OpenFOAM | 5 | October 12, 2008 14:14 |