CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   how does the I/O work in OpenFOAM? (http://www.cfd-online.com/Forums/openfoam/92548-how-does-i-o-work-openfoam.html)

goodkid September 17, 2011 10:38

how does the I/O work in OpenFOAM?
 
I am going to study detials of the I/O in OpenFoam.I have known the class of IOstream.However, I just can not figure out an idea.The frame must be too complex for me to learn about it.Hope that someone give me some datas about it.

marupio September 17, 2011 16:06

Most I/O is handled by the objectRegistry.

http://openfoamwiki.net/index.php/Op...objectRegistry

If an object inherits the IOobject clsss, it has automatic input / output functions. Look for IOobject in the doxygen documentation. An IOobject has a writeData function that writes out its data to the time directory. IOobjects can also read their associated files to get their current state.

Just for starters...

goodkid September 18, 2011 05:59

Is there any differences between IOstream in the OpenFoam with that in the STL of c++?

goodkid September 18, 2011 09:36

Now I have found some clues about the I/O。Please ignore the third floor.Thank you very much.

tomislav_maric September 19, 2011 05:31

Quote:

Originally Posted by goodkid (Post 324558)
Now I have found some clues about the I/O。Please ignore the third floor.Thank you very much.

Hi! If you have found some documentation-tutorial on this, please do post the link. ;)

T.

goodkid September 19, 2011 10:24

Quote:

Originally Posted by tomislav_maric (Post 324642)
Hi! If you have found some documentation-tutorial on this, please do post the link. ;)

T.

The link given by the marupio in the second floor is very good and it gives a brief explain about the I/O.I have to say that the class of IOobject is an important character of OpenFoam.IF we want to add a new field or dictionary to the equation in the solver , just add that to the IOobect ,in the language of OpenFOAM,register the new field or dictionary to a given objectRegistry.The link of IOobject wiki is http://openfoamwiki.net/index.php/In...IOobject_class

However, the details of the I/O are all in the docs in the offical website.
http://www.openfoam.com/docs/cpp/ You can find the class of IOobject in the website.

In addition ,the IOstream in the OpenFOAM is not the same class in the standard library.The OpenFOAM has its IOstream by itself.As far as I know, one function of the class of IOstream is distinguishment of the type of data whatever in the standard library or in the OpenFoam .You can get more information in the offical website.

tomislav_maric September 19, 2011 16:10

Quote:

Originally Posted by goodkid (Post 324689)
The link given by the marupio in the second floor is very good and it gives a brief explain about the I/O.I have to say that the class of IOobject is an important character of OpenFoam.IF we want to add a new field or dictionary to the equation in the solver , just add that to the IOobect ,in the language of OpenFOAM,register the new field or dictionary to a given objectRegistry.The link of IOobject wiki is http://openfoamwiki.net/index.php/In...IOobject_class

However, the details of the I/O are all in the docs in the offical website.
http://www.openfoam.com/docs/cpp/ You can find the class of IOobject in the website.

In addition ,the IOstream in the OpenFOAM is not the same class in the standard library.The OpenFOAM has its IOstream by itself.As far as I know, one function of the class of IOstream is distinguishment of the type of data whatever in the standard library or in the OpenFoam .You can get more information in the offical website.

Thanks a lot! I thought that there may be some other document explaining the "why" of the code in that aspect. I've read most of those, but still, thank you! :)

Tomislav

goodkid October 27, 2011 03:29

I have read the classes of IOobject.But i am confused.Can you explain to me that how does it work.For example in the case of icoFoam

marupio October 27, 2011 11:39

You are asking a very general question, and we have given you some general answers. Maybe you'll get the answer you want if you ask something a little more specific.

What do you want to know. For example:

How does icoFoam read from files?
What is a "dictionary" file?
Where is the "data" stored?
and so on.


All times are GMT -4. The time now is 09:07.