View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003959 | OpenFOAM | Bug | public | 2023-02-22 13:01 | 2023-02-22 15:16 |
Reporter | marniemann | Assigned To | henry | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Platform | Unix | OS | Other | OS Version | (please specify) |
Product Version | 10 | ||||
Summary | 0003959: foamDictionary cannot set entries in wildcarded subDicts | ||||
Description | I have a fvSolution Dict containing a definition for both PISO and PIMPLE solvers: "(PIMPLE|PISO)" { transonic no; nOuterCorrectors 1; nCorrectors 2; nNonOrthogonalCorrectors 0; momentumPredictor yes; } When querying any entry in this subDict using foamDictionary I get the correct result, e.g.: foamDictionary system/fvSolution -entry PIMPLE/transonic --> transonic no; Trying to change an entry using set yields and error: foamDictionary system/fvSolution -entry PIMPLE/transonic -set no --> FOAM FATAL IO ERROR: keyword PIMPLE is undefined in dictionary "system/fvSolution" or is not a dictionary Valid keywords are 4 ( FoamFile #include solvers relaxationFactors ) file: system/fvSolution from line 10 to line 38. From function const Foam::dictionary& Foam::dictionary::scopedDict(const Foam::word&) const in file db/dictionary/dictionary.C at line 1093. FOAM exiting Is this intended behavior or should foamDictionary be able to understand wildcards? ---- On another note: I noticed that the dot access for subDicts seems to be no longer supported. At least, the call foamDictionarysystem/fvSolution -entry PIMPLE.transonic -set no --> New entry PIMPLE.transonic no; results in a new entry in the dict, no access into a subDict. From other issues that I found, I assume that this is actually intended behavior. However, a clear error message on this usage might help during migration. | ||||
Steps To Reproduce | see description. | ||||
Tags | No tags attached. | ||||
|
Try: foamDictionary system/fvSolution -entry '(PIMPLE|PISO)/transonic' -set no It works for me in OpenFOAM-dev and OpenFOAM-10 |
|
confirmed. foamDictionary system/fvSolution -entry '(PIMPLE|PISO)/transonic' -set no foamDictionary system/fvSolution -entry "(PIMPLE|PISO)/transonic" -set no foamDictionary system/fvSolution -entry '(PIMPLE|PISO)'/transonic -set no all work fine. Thanks! I tried something like foamDictionary system/fvSolution -entry \"\(PIMPLE\|PISO\)\"/transonic -set no which does fail with keyword "(PIMPLE|PISO)" is undefined in dictionary |
|
User support |
Date Modified | Username | Field | Change |
---|---|---|---|
2023-02-22 13:01 | marniemann | New Issue | |
2023-02-22 14:03 | henry | Note Added: 0012955 | |
2023-02-22 15:05 | marniemann | Note Added: 0012956 | |
2023-02-22 15:16 | henry | Assigned To | => henry |
2023-02-22 15:16 | henry | Status | new => closed |
2023-02-22 15:16 | henry | Resolution | open => no change required |
2023-02-22 15:16 | henry | Note Added: 0012957 |