|
[Sponsors] |
April 2, 2008, 22:56 |
Hi all,
The IO in openfoam
|
#1 |
Member
Heng Xiao
Join Date: Mar 2009
Location: Zurich, Switzerland
Posts: 58
Rep Power: 17 |
Hi all,
The IO in openfoam seems to be complicated for me. I have been struggling for a while. Any hint on the following questions would be greatly appreciated. 1. The follow statement is from the file "CreateFile.H". Where did the code was "told" to find the suitable file and read the values for pressure from the right file? Is this the so called "demandDrivenData"? ---------------------------- volScalarField p ( IOobject ( "p", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); ---------------------------- 2. Related to the question above, the following function is from "solidParticleIO.C". Does the statement IOField<scalar> d(fieldIOobject("d"), np); also create a field from a file? What data does the object "d" contain? Thanks very much! ---------------------------- void Cloud<solidparticle>::writeFields() const { label np = size(); IOField<scalar> d(fieldIOobject("d"), np); IOField<vector> U(fieldIOobject("U"), np); label i = 0; for ( Cloud<solidparticle>::const_iterator iter = begin(); iter != end(); ++iter, ++i ) { const solidParticle& p = iter(); d[i] = p.d_; U[i] = p.U_; } d.write(); U.write(); } }; ---------------------------- The function "fieldIOobject" is a member function of "Cloud", defined in CloudIO.C: template<class> IOobject Cloud<particletype>::fieldIOobject(const word& fieldName) const { return IOobject ( fieldName, polyMesh_.time().timeName(), "lagrangian", polyMesh_, IOobject::MUST_READ, IOobject::NO_WRITE, false ); } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
IOobject | r2d2 | OpenFOAM Running, Solving & CFD | 20 | May 5, 2016 09:16 |
A question on IOObject | ivan_cozza | OpenFOAM | 0 | September 16, 2008 04:24 |
Create GeometricField without IOobject | nadine | OpenFOAM Running, Solving & CFD | 3 | August 15, 2008 10:24 |
Use of IOobject to Output | irishdave | OpenFOAM Pre-Processing | 1 | January 8, 2008 12:12 |
IOobject constructor problem | iyer_arvind | OpenFOAM Running, Solving & CFD | 3 | November 19, 2006 07:39 |