|
[Sponsors] |
May 17, 2013, 14:06 |
runTimeMOdifiable
|
#1 |
Senior Member
Join Date: Jan 2013
Posts: 372
Rep Power: 14 |
Dear All,
I generate an additional file in constant folder, and I wrote some flag parameter in it. However, although I set the option runTimeMOdifiable to true, I cannot make OpenFOAM read in the modified parameters again if I change some parameters in that file. How can I make running Openfoam know that modification during the run time? |
|
May 18, 2013, 12:04 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Greetings openfoammaofnepo,
Can you describe how you are loading the parameters from the new dictionary file? Best regards, Bruno
__________________
|
|
May 18, 2013, 12:09 |
|
#3 |
Senior Member
Join Date: Jan 2013
Posts: 372
Rep Power: 14 |
Hello,
In the createFields.H file, there are the following lines: Info<< "Reading Parameters from Dictionary additionalControls \n" << endl; IOdictionary additionalControls ( IOobject ( "additionalControls", runTime.constant(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE ) ); dimensionedScalar OmegaRelax ( additionalControls.lookup("OmegaRelax") ); In that file, I wrote it like this: OmegaRelax OmegaRelax [ 0 0 0 0 0 0 0 ] 0.5; Using this method, I found that I cannot make it modifiable during the simulation. Thank you. |
|
May 18, 2013, 12:48 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Hi openfoammaofnepo,
Try switching "MUST_READ" to "MUST_READ_IF_MODIFIED". For reference, check the solver icoFoam, more specifically the file "createFields.H": https://github.com/OpenFOAM/OpenFOAM...createFields.H Best regards, Bruno
__________________
|
|
July 24, 2013, 10:11 |
|
#5 | |
Senior Member
Join Date: Jan 2013
Posts: 372
Rep Power: 14 |
Dear Bruno,
When I use MUST_READ_IF_MODIFIED option, when I change that parameter during the run time period, the new value for it is still updated in the simulations. But from the output, the dictionary has already been read again. This is a little strange. Did I forget the change something in the createFields.H? Thank you very much. Quote:
|
||
August 18, 2013, 16:56 |
|
#6 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Hi openfoammaofnepo,
I've been very busy for the past few weeks. I don't know if you have solved this. Either way, I'm not sure I understand what you wrote: Quote:
If this is the case, I suggest that you test the "cavity" tutorial case with icoFoam and a very long simulation time; then change the "nu" property in the file "constant/transportProperties" while it's running. Check the results and whether the viscous influence changed the flow profile or not.
Bruno
__________________
|
||
November 3, 2015, 12:57 |
|
#7 | |
Senior Member
Join Date: Jan 2013
Posts: 372
Rep Power: 14 |
Dear Bruno,
I checked this test case. It indeed has the following for the icoFoam solver: Code:
IOdictionary transportProperties ( IOobject ( "transportProperties", runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); dimensionedScalar nu ( transportProperties.lookup("nu") ); OFFO. Quote:
|
||
November 29, 2015, 11:28 |
|
#8 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Quick note - Answered here: http://www.cfd-online.com/Forums/ope...tml#post575490 - post #7
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
RunTimeModifiable did not work | maka | OpenFOAM Running, Solving & CFD | 5 | July 26, 2021 16:56 |
runTimeModifiable | Djub | OpenFOAM | 3 | December 13, 2012 10:27 |
runTimeModifiable directories | daniquefintelman | OpenFOAM Running, Solving & CFD | 0 | August 23, 2012 04:55 |