CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

how does the I/O work in OpenFOAM?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By goodkid

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 17, 2011, 10:38
Post how does the I/O work in OpenFOAM?
  #1
New Member
 
J.Y.Cheng
Join Date: Mar 2011
Posts: 15
Rep Power: 15
goodkid is on a distinguished road
Send a message via MSN to goodkid
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.
goodkid is offline   Reply With Quote

Old   September 17, 2011, 16:06
Default
  #2
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22
marupio is on a distinguished road
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...
__________________
~~~
Follow me on twitter @DavidGaden
marupio is offline   Reply With Quote

Old   September 18, 2011, 05:59
Default
  #3
New Member
 
J.Y.Cheng
Join Date: Mar 2011
Posts: 15
Rep Power: 15
goodkid is on a distinguished road
Send a message via MSN to goodkid
Is there any differences between IOstream in the OpenFoam with that in the STL of c++?
goodkid is offline   Reply With Quote

Old   September 18, 2011, 09:36
Default
  #4
New Member
 
J.Y.Cheng
Join Date: Mar 2011
Posts: 15
Rep Power: 15
goodkid is on a distinguished road
Send a message via MSN to goodkid
Now I have found some clues about the I/O。Please ignore the third floor.Thank you very much.
goodkid is offline   Reply With Quote

Old   September 19, 2011, 05:31
Default
  #5
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21
tomislav_maric is on a distinguished road
Quote:
Originally Posted by goodkid View Post
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.
tomislav_maric is offline   Reply With Quote

Old   September 19, 2011, 10:24
Default
  #6
New Member
 
J.Y.Cheng
Join Date: Mar 2011
Posts: 15
Rep Power: 15
goodkid is on a distinguished road
Send a message via MSN to goodkid
Quote:
Originally Posted by tomislav_maric View Post
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.
granzer likes this.
goodkid is offline   Reply With Quote

Old   September 19, 2011, 16:10
Default
  #7
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21
tomislav_maric is on a distinguished road
Quote:
Originally Posted by goodkid View Post
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
tomislav_maric is offline   Reply With Quote

Old   October 27, 2011, 03:29
Default
  #8
New Member
 
J.Y.Cheng
Join Date: Mar 2011
Posts: 15
Rep Power: 15
goodkid is on a distinguished road
Send a message via MSN to goodkid
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
goodkid is offline   Reply With Quote

Old   October 27, 2011, 11:39
Default
  #9
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22
marupio is on a distinguished road
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.
__________________
~~~
Follow me on twitter @DavidGaden
marupio is offline   Reply With Quote

Reply

Tags
i/o


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM - Validation of Results Ahmed OpenFOAM Running, Solving & CFD 10 May 13, 2018 18:28
ATTENTION! Reliability problems in CFX 5.7 Joseph CFX 14 April 20, 2010 15:45
Cross-compiling OpenFOAM 1.6 on Linux for Windows 32 and 64bits with Mingw-w64 wyldckat OpenFOAM Announcements from Other Sources 7 January 19, 2010 15:39
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 18:07
The OpenFOAM extensions project mbeaudoin OpenFOAM 16 October 9, 2007 09:33


All times are GMT -4. The time now is 00:26.