|
[Sponsors] |
July 11, 2018, 23:37 |
update dictionary within runTime loop
|
#1 |
New Member
Join Date: Jun 2018
Posts: 2
Rep Power: 0 |
Hello.
Following this and this I'm trying to update a subdictionary of dynamicMeshDict whitin the runTime loop of pimpleDyMFoam.C with Code:
myDict.set("name",value); Code:
const word dictName("dynamicMeshDict"); const word subDictName("solidBodyMotionFvMeshCoeffs"); const word subsubDictName("rotatingMotionCoeffs"); fileName dictPath; dictPath =runTime.constant()/dictName; IOdictionary dynamicMeshDict ( IOobject ( dictPath, mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE, false ) ); Code:
newomega = newomega + domegadt; vector omegav = vector(dynamicMeshDict.subDict(subDictName) .subDict(subsubDictName) .lookup("axis"))* readScalar(dynamicMeshDict.subDict(subDictName) .subDict(subsubDictName) .lookup("omega")); dynamicMeshDict.subDict(subDictName).subDict(subsubDictName).set("omega",newomega); Any help in figuring out why "omega" is not being updated in dynamicMeshDict with really be appreciated. Thanks for reading. |
|
September 8, 2018, 23:35 |
|
#2 |
Member
Pavan
Join Date: Jan 2016
Posts: 53
Rep Power: 10 |
Sam
were you able to figureout this issue. I need to implement the same functionality |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field | lakeat | OpenFOAM Community Contributions | 58 | December 23, 2021 03:36 |
ill defined primitiveEntry starting at keyword 'value' on line 197 ChangeDictionary | Struggle_Achieve | OpenFOAM Pre-Processing | 2 | December 20, 2017 04:58 |
Implicit mesh update restriction for faster calculation | burning_bert | Fluent UDF and Scheme Programming | 1 | May 28, 2017 17:59 |
Problem in3D model processing | mebinitap | OpenFOAM | 2 | December 12, 2014 05:40 |
Understanding the PISO loop of icoFoam | ooo | OpenFOAM Programming & Development | 0 | March 14, 2014 10:28 |