CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Error at runtime modification of a volScalField

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   August 10, 2013, 08:34
Default Error at runtime modification of a volScalField
New Member
Daniel Leichtle
Join Date: Aug 2013
Posts: 6
Rep Power: 6
Scofield is on a distinguished road
Hi Foamers,

this is my first thread. I try to modify a volScalarField called "modifyS" during runtime of a simulation. "modifyS" is a uniform field and located in the "constant" directory of my case.

I specify this field by using following IOobject definition:
volScalarField modifyS

I have tried two variations:
1) I have defined this IOobject in "creativeFields.H".
2) I have tried to define this IOobject at the beginning of the time loop of my solver.

Just in case 2) the modification is read in. But I could recognize following:
In both cases, if If i change the uniform field "modifyS" during runtime, mostly the simulation goes on, but sometimes the simulation is aborted with following error:
cannot open file

file: /home/BAUINFORMATIK/scheffold/OpenFOAM/scheffold-2.2.0/run/interactivity/PflegerTestModifyS/constant/modifyS at line 0.

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

FOAM exiting

I have compared it with a IOdictionary using "MUST_READ_IF_MODIFIED". There, the simulation never stops after making modifications in the case.

I would really appreciate if anybody knows, why the simulation sometimes is terminated when i modify a volScalField?

Best regards,

Last edited by Scofield; August 11, 2013 at 13:56.
Scofield is offline   Reply With Quote

Old   August 14, 2013, 14:02
Senior Member
mkraposhin's Avatar
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 330
Rep Power: 12
mkraposhin is on a distinguished road
2) I have tried to define this IOobject at the beginning of the time loop of my solver.

when you create your field at the new time step, you are creating the new object, so it will be initialized anyway.

IOobject and regIOobject classes for this problem are under discussion here
mkraposhin is offline   Reply With Quote


Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Probes/Sensors in runtime gabitinho OpenFOAM Post-Processing 9 August 14, 2015 12:55
Problem in3D model processing mebinitap OpenFOAM 2 December 12, 2014 05:40
runTime out of scope in functionObject Sune OpenFOAM Programming & Development 2 September 26, 2012 02:11
runTime deji OpenFOAM 1 October 16, 2010 13:06
compressible modification of nearwall turbulence Quain Tchew Main CFD Forum 0 March 4, 2002 02:29

All times are GMT -4. The time now is 14:02.