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

Repeated keywords in the dictionary - useful info

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 15, 2020, 04:21
Default Repeated keywords in the dictionary - useful info
  #1
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 727
Rep Power: 14
Tobermory will become famous soon enough
I was editing my relaxation factors, when a doubt crept into my mind. The factors that I started with were simply a REGEXP:

Code:
    equations
    {
        ".*"     1;
    }
i.e. no relaxation, just enforcement of diagonalisation on all equations, and I wanted to add relaxation on K for stability, viz:

Code:
    equations
    {
        ".*"     1;
        K.*     0.9;
    }
Now here's the rub - which keyword wins out for the K equation? The first line sets the RF to 1, the second to 0.9. Is it the first keyword that is listed, or the last? And what would the code use if I had:

Code:
    equations
    {
        K.*     0.7;
        ".*"     1;
        K.*     0.9;
    }
As far as I know, you cannot get the code to tell you what factor it is using - please correct me if you know better.

The answer, according to the user guide (4.2.13), is that the code uses the last instance of any keyword, and that a keyword entry always overrides a REGEXP entry regardless of their order.

I thought that that was pretty useful info, and worth sharing. Enjoy!
Tobermory is offline   Reply With Quote

Reply


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
[Gmsh] gmshToFoam generates patches with 0 faces and 0 points Simurgh OpenFOAM Meshing & Mesh Conversion 4 August 25, 2023 07:58
ill defined primitiveEntry starting at keyword 'value' on line 197 ChangeDictionary Struggle_Achieve OpenFOAM Pre-Processing 2 December 20, 2017 03:58
[Gmsh] 3D coil mesh: can't create the volume? RomainBou OpenFOAM Meshing & Mesh Conversion 3 July 18, 2016 05:09
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 06:51
OpenFOAM with Cygwin kitchener OpenFOAM Installation 6 April 24, 2006 23:09


All times are GMT -4. The time now is 23:42.