|
[Sponsors] |
January 29, 2021, 12:28 |
Creating file dict during a routine
|
#1 |
New Member
Join Date: Sep 2020
Posts: 6
Rep Power: 6 |
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: Code:
IOdictionary newProperties( IOobject("newProperties", runTime.constant(), mesh, IOobject::NO_READ, IOobject::NO_WRITE)); dictionary& subdict = newProperties.subDict(subname); subdict.set("key1",value1); subdict.set("key2", value2); newProperties.regIOobject::write(); |
|
Tags |
dictionary, iodictionary, ioobject, ioobject write, runtime |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] funkyDoCalc with OF2.3 massflow | NiFl | OpenFOAM Community Contributions | 14 | November 25, 2020 04:30 |
[foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 | ordinary | OpenFOAM Installation | 19 | September 3, 2019 19:13 |
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch | gschaider | OpenFOAM Installation | 225 | August 25, 2015 20:43 |
[swak4Foam] swak4foam building problem | GGerber | OpenFOAM Community Contributions | 54 | April 24, 2015 17:02 |
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 | keepfit | ParaView | 60 | September 18, 2013 04:23 |