CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Updating IOdictionaries from Objects

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 9, 2015, 10:30
Default Updating IOdictionaries from Objects
  #1
New Member
 
Matthias T.
Join Date: Dec 2014
Posts: 5
Rep Power: 11
mapeth is on a distinguished road
Hello everybody,

I have the following problem. I want do declare a scalar in the createFields.H by this:
Code:
// Creat dictionary of scalar variables
IOdictionary scalarDict
(
    IOobject
    (
        "scalarDict",
         runTime.timeName(),
         mesh,
         IOobject::READ_IF_PRESENT,
         IOobject::AUTO_WRITE
     )
);
scalarDict.add("bubbleError", 0);
In the main code a object is called, where the the created bubbleError variable is called from by this code:
Code:
IOdictionary& scalarDict = db.lookupObject<IOdictionary>("scalarDict");
But now I want to write a changed bubbleError variable back to the registry? How can I do this? If i use
Code:
scalarDict.set("bubbleError", ???);
I can call it just from this object, but the next time the whole object is called, the initial bubbleError is back again
Can anybody help me at this point? Thanks!

Regards
Mat

Last edited by mapeth; November 9, 2015 at 10:40. Reason: Typo
mapeth is offline   Reply With Quote

Reply


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
Multiple Floating Objects with 6DoF in OF 2.3.0 tyoung OpenFOAM Running, Solving & CFD 22 April 17, 2024 00:36
[Other] mesh generation for sloping objects yuyingyuni ANSYS Meshing & Geometry 0 March 15, 2013 02:46
Updating 1.7.x from git bhh OpenFOAM Installation 6 August 9, 2010 05:31
Some questions about mesh updating in dynamic mesh technique lzgwhy Main CFD Forum 0 June 14, 2009 08:01
Warning when I add my objects Xu Phoenics 0 November 21, 2008 12:30


All times are GMT -4. The time now is 22:01.