CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Creating file dict during a routine

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

LinkBack Thread Tools Search this Thread Display Modes
Old   January 29, 2021, 11:28
Default Creating file dict during a routine
New Member
Join Date: Sep 2020
Posts: 6
Rep Power: 5
furystep is on a distinguished road
Hi All!
I have searched for this problem but none asked before me.
I am trying to build and write a new dictionary inside my OF solver to pass some values to another solver. In simple words, I want to create something like "transportProperties" but it must be written by my solver. I defined the IOdictionary in my code and set a subdict and some keys with their values:

IOdictionary newProperties(

dictionary& subdict = newProperties.subDict(subname);
subdict.set("key2", value2);
I am trying to write this newProperties dictionary but even if compile, it crashes because it searches for the dictionary inside the folders (the error is something like "can't find the entry subname"). How can I write a dictionary and solve this problem? Thanks in advance.
furystep is offline   Reply With Quote


dictionary, iodictionary, ioobject, ioobject write, runtime

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
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 03:30
[] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 ordinary OpenFOAM Installation 19 September 3, 2019 18:13
[] Compile OF 2.3 on Mac OS X .... the patch gschaider OpenFOAM Installation 225 August 25, 2015 19:43
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 16:02
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 keepfit ParaView 60 September 18, 2013 03:23

All times are GMT -4. The time now is 00:28.