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

IOobject NO_READ error

Register Blogs Community New Posts Updated Threads Search

Like Tree9Likes
  • 9 Post By l_r_mcglashan

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 25, 2010, 09:19
Unhappy IOobject NO_READ error
  #1
New Member
 
Snehal Janwe
Join Date: May 2010
Location: Stuttgart
Posts: 10
Rep Power: 15
snehal is on a distinguished road
hello everybody,
I am a new openfoam user and am trying to simulate vortex sheeding of a cylinder in cross flow.
I have modified my solver pisofoam to calculate Nusselt number. This is how I have defined the Nusselt no in create fields.h file of the solver
volScalarField Nusselt
(
IOobject
(
"Nusselt",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh
);
ofcourse i hav added the necessary eqns to the my_pisofoam.c file......the solver is compiled with no error at all. But once i run the case I get the following error:
--> FOAM FATAL ERROR:
NO_READ specified for read-constructor of object Nusselt of class IOobject

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 47.

FOAM aborting

#0 Foam::error:rintStack(Foam::Ostream&) in "/home/stss5/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/stss5/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 Foam::regIOobject::readStream() in "/home/stss5/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#3 Foam::regIOobject::readStream(Foam::word const&) in "/home/stss5/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#4 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&) in "/home/stss5/OpenFOAM/OpenFOAM-1.6.x/applications/bin/linux64GccDPOpt/my_pisoFoam"
#5 main in "/home/stss5/OpenFOAM/OpenFOAM-1.6.x/applications/bin/linux64GccDPOpt/my_pisoFoam"
#6 __libc_start_main in "/lib64/libc.so.6"
#7 _start at /usr/src/packages/BUILD/glibc-2.10.1/csu/../sysdeps/x86_64/elf/start.S:116
Abgebrochen

Any help would be appreciated.
Thank you
snehal is offline   Reply With Quote

Old   May 25, 2010, 11:13
Default
  #2
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24
nimasam is on a distinguished road
why dont you use a fake initial condition for nusselt in zero folder? ,so you can change code into MUST READ , i guess it will work ofcourse its not perfect way
nimasam is offline   Reply With Quote

Old   May 25, 2010, 11:32
Default
  #3
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23
l_r_mcglashan will become famous soon enough
If you specify NO_READ you have to provide an initial field for the variable:

Code:
volScalarField Nusselt
    (
        IOobject
        (
            "Nusselt",
            runTime.timeName(),
            mesh,
            IOobject::NO_READ,
            IOobject::AUTO_WRITE
        ),
        mesh,
        dimensionedScalar("Nusselt", dimless, scalar(0.0))
    );
__________________
Laurence R. McGlashan :: Website
l_r_mcglashan is offline   Reply With Quote

Old   May 26, 2010, 03:56
Default
  #4
New Member
 
Snehal Janwe
Join Date: May 2010
Location: Stuttgart
Posts: 10
Rep Power: 15
snehal is on a distinguished road
Thank you very much sir for your reply, it worked successfully...
snehal is offline   Reply With Quote

Old   May 26, 2010, 03:58
Default
  #5
New Member
 
Snehal Janwe
Join Date: May 2010
Location: Stuttgart
Posts: 10
Rep Power: 15
snehal is on a distinguished road
@nimasan
it does not work that way, I tried it out yesterday only....anyways thnks for your reply
snehal is offline   Reply With Quote

Old   October 13, 2010, 10:30
Default
  #6
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 16
T.D. is on a distinguished road
hi
me too id did not work that way
it also tell me that must read from the /0 folder
T.D. is offline   Reply With Quote

Old   October 13, 2010, 10:34
Default
  #7
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23
l_r_mcglashan will become famous soon enough
It does work.

What did you do? Show your code.
__________________
Laurence R. McGlashan :: Website
l_r_mcglashan is offline   Reply With Quote

Old   October 13, 2010, 10:39
Post My Code
  #8
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 16
T.D. is on a distinguished road
Hi this is my code:

volScalarField gammadot
(
IOobject
(
"gammadot",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("gammadot", dimless, scalar(0.0))
);
and when i run the solver:
it says FOAM FATAL IO ERROR:
cannot open file
...../0/gammadot

!!!
T.D. is offline   Reply With Quote

Old   October 13, 2010, 10:47
Default
  #9
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23
l_r_mcglashan will become famous soon enough
It works for me.

Are you sure the error occurs at that point of your code?
__________________
Laurence R. McGlashan :: Website
l_r_mcglashan is offline   Reply With Quote

Old   October 13, 2010, 10:53
Post hi
  #10
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 16
T.D. is on a distinguished road
hi
really it's strange i don't know why it's not working at me.
Any way forget it, can you help me please in my at end of the following thread(link down), it is a major problem
and may be useful for every one please:

http://www.cfd-online.com/Forums/ope...ity-model.html


thanks a lot
T.D. is offline   Reply With Quote

Reply


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
compile errors of boundary condition "expDirectionMixed" liying02ts OpenFOAM Bugs 2 February 1, 2010 20:11
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 20:30
[Netgen] Compiling Netgen on Fedora Core is driving me crazy jango OpenFOAM Meshing & Mesh Conversion 3 November 9, 2007 13:29
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51
user defined function cfduser CFX 0 April 29, 2006 10:58


All times are GMT -4. The time now is 12:33.