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

changeDictionary or foamDictionary

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Tobermory
  • 1 Post By uosilos

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 25, 2022, 08:10
Default changeDictionary or foamDictionary
  #1
Member
 
UOCFD
Join Date: Oct 2020
Posts: 40
Rep Power: 5
uosilos is on a distinguished road
I want to perform this change in file constant/cloudProperties
From:

Code:
submodels
{
    localInteractionCoeffs
    {
        patches
        (
            "(WALL_.*|INLET)"
            {
                type rebound;
                e    1;
                mu   1;
            }
            bottom
            {
                type rebound;
                e    1;
                mu   1;
            }
        );
    }
}
To:
Code:
submodels
{
    localInteractionCoeffs
    {
        patches
        (
            "(WALL_.*|INLET)"
            {
                type rebound;
                e    1;
                mu   1;
            }
            bottom
            {
                type escape;
            }
        );
    }
}
What of these tools is appropriate and how to use it? I can't make it work
uosilos is offline   Reply With Quote

Old   February 27, 2022, 13:09
Default
  #2
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 668
Rep Power: 14
Tobermory will become famous soon enough
Yes, this is a little tricky isn't it, since the entry you want to change is buried inside the patches() list and foamDictionary will only go down as far as the list name, patches. It won't (as far as I am aware) allow you to edit a specific entry in the list.

I think that what you will need to do is to specify the full (updated) patches list (i.e. incl. the ones that are not changing), eg something like:
Code:
foamDictionary -entry submodels.localInteractionCoeffs.patches -set "WALL_.* {type rebound; e 1; mu 1;}  INLET {type rebound; e  1; mu 1;}  bottom {type escape; }"  constant/cloudProperties
Note that I expanded out the "(WALL_.*|INLET)" part since otherwise you will have repeated quotes - you might be able to get around that, but perhaps you can see the way now. Hope that helps.
uosilos likes this.
Tobermory is offline   Reply With Quote

Old   March 2, 2022, 03:30
Default
  #3
Member
 
UOCFD
Join Date: Oct 2020
Posts: 40
Rep Power: 5
uosilos is on a distinguished road
Thanks a lot!!!


With a little change but it works fine
Tobermory likes this.
uosilos 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
Accessing foamDictionary keyword ".*" Tobermory OpenFOAM Running, Solving & CFD 3 March 5, 2021 16:46
[snappyHexMesh] snappyHexMesh error "Cannot determine normal vector from patches." lethu OpenFOAM Meshing & Mesh Conversion 1 June 3, 2020 07:49
[OpenFOAM.com] OpenFOAMv1806 with amd aocc 1.2 / 1.3 compiler cfdx OpenFOAM Installation 10 February 27, 2019 04:59
Fatal error: invalid wall function specification kcc49 OpenFOAM Running, Solving & CFD 13 September 26, 2018 04:07
chtMultiRegionSimpleFoam: crash on parallel run student666 OpenFOAM Running, Solving & CFD 3 April 20, 2017 11:05


All times are GMT -4. The time now is 06:47.