|
[Sponsors] |
Error at runtime modification of a volScalField |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 10, 2013, 08:34 |
Error at runtime modification of a volScalField
|
#1 |
New Member
Daniel Leichtle
Join Date: Aug 2013
Posts: 6
Rep Power: 12 |
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. |
|
August 14, 2013, 14:02 |
|
#2 |
Senior Member
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21 |
"
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 |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
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 |