|
[Sponsors] |
April 26, 2019, 03:54 |
Sequence of matching patches with regexes
|
#1 |
Senior Member
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9 |
If I write, for instance, a 0/p file like this:
Code:
outlet { type fixedValue; ... } ".*" { type zeroGradient; ... } Does OpenFOAM assign the first matching patch name or the last? Thanks! |
|
April 26, 2019, 08:15 |
|
#2 |
Senior Member
|
Hi,
Since boundaryField is a dictionary, first entry lookup is performed by keyword and then, if it was not found, lookup is repeated with regEx (https://github.com/OpenFOAM/OpenFOAM...tionary.C#L469). So outlet in general should become fixedValue, and everything else zeroGradient. |
|
April 26, 2019, 08:28 |
|
#3 |
Senior Member
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9 |
Thanks for the reply. I thought this was so but wasn't really sure. Also the code explains everything but is hard to find the right line.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem using AMI | vinz | OpenFOAM Running, Solving & CFD | 298 | November 13, 2023 08:19 |
Foam::error::PrintStack | almir | OpenFOAM Running, Solving & CFD | 91 | December 21, 2022 04:50 |
Possible bug with stitchMesh and cyclics in OpenFoam | Jack001 | OpenFOAM Pre-Processing | 0 | May 21, 2016 08:00 |
[mesh manipulation] mirrorMesh and undoing the joining of patches | chegdan | OpenFOAM Meshing & Mesh Conversion | 3 | October 21, 2015 08:09 |
Regarding periodic BC in ICEM generated grid | Tarak | OpenFOAM | 32 | April 30, 2013 14:46 |