IOobject NO_READ error
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::printStack(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 |
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 :D
|
If you specify NO_READ you have to provide an initial field for the variable:
Code:
volScalarField Nusselt |
Thank you very much sir for your reply, it worked successfully...
|
@nimasan
it does not work that way, I tried it out yesterday only....anyways thnks for your reply |
hi
me too id did not work that way it also tell me that must read from the /0 folder |
It does work.
What did you do? Show your code. |
My Code
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 !!! |
It works for me.
Are you sure the error occurs at that point of your code? |
hi
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 |
All times are GMT -4. The time now is 11:22. |