CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 10, 2013, 08:34
Default Error at runtime modification of a volScalField
  #1
New Member
 
Daniel Leichtle
Join Date: Aug 2013
Posts: 6
Rep Power: 12
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
(
IOobject
(
"modifyS",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
),
mesh
);
----------------------

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:
---------------------
--> FOAM FATAL IO 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,
Daniel

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

Old   August 14, 2013, 14:02
Default
  #2
Senior Member
 
mkraposhin's Avatar
 
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21
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

Reply

Thread Tools Search this Thread
Search this Thread:

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


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


All times are GMT -4. The time now is 13:27.