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

How to set string with double quotes using foamDictionary

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 4, 2022, 22:07
Default How to set string with double quotes using foamDictionary
  #1
Member
 
WY
Join Date: Mar 2020
Posts: 36
Rep Power: 6
WUYing is on a distinguished road
Part of my controlDict looks like:

Code:
functions
{
    ...
    fileUpdate1
    {
        type            timeActivatedFileUpdate;
        functionObjectLibs ( "libutilityFunctionObjects.so" );
        writeControl    timeStep;
        writeInterval   1;
        fileToUpdate    "./Ur/system/controlDict";
        timeVsFile      ( ( -1 "./Ur/system/controlDict_1" ) ( 0.8 "Ur/system/controlDict_2" ) );
    }
}
And I'd like to change the entry timeVsFile using below command:

Code:
foamDictionary ./Ur/system/controlDict -entry functions.fileUpdate1.timeVsFile -set "( ( -1 "./Ur/system/controlDict_1" ) ( $A "./Ur/system/controlDict_2" ) )"
But I always receive the error " No such file or directory". I think it is related with the usage of double quotes in the string.

Any idea is welcome~ Thanks!
WUYing is offline   Reply With Quote

Reply

Tags
foamdictionary, openfoam


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
[snappyHexMesh] snappyHexMesh error "Cannot determine normal vector from patches." lethu OpenFOAM Meshing & Mesh Conversion 1 June 3, 2020 08:49
[OpenFOAM.com] OpenFOAMv1806 with amd aocc 1.2 / 1.3 compiler cfdx OpenFOAM Installation 10 February 27, 2019 05:59
Interpret-Real Gas UDF ndabir Fluent UDF and Scheme Programming 3 November 18, 2015 08:29
[swak4Foam] #codeStream options & includes, swak4Foam dEntropy OpenFOAM Community Contributions 10 July 29, 2015 06:10
what's wrong about my code for 2d burgers equation morxio Main CFD Forum 3 April 27, 2007 11:38


All times are GMT -4. The time now is 08:38.