CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   changeDictionaryDict post-processing wall>patch (https://www.cfd-online.com/Forums/openfoam-post-processing/168128-changedictionarydict-post-processing-wall-patch.html)

kingjewel1 March 16, 2016 07:27

changeDictionaryDict post-processing wall>patch
 
Hi everyone,

Short explanation: Is there a way of changing boundary patch type after running your case? I need to go from wall to patch in order to sample my surfaces

Long:

After doing snappyHexMesh it makes my stl objects into walls. I've run my case and now want to sample the pressure on the surface of my stl walls with sampleDict.

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.3.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      sampleDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

setFormat raw;
surfaceFormat vtk;

interpolationScheme cellPoint;

// Fields to sample.
fields
(
    p
);

sets
(
);

surfaces
(
    cubes
    {
        type            wall;
        patches        ("cubes");
    }
);


// *********************************************************************** //

But it won't sample a wall. So need to use changeDictionaryDict to change the constant/polyMesh/boundary for cubes from wall to patch.

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | foam-extend: Open Source CFD                    |
|  \\    /  O peration    | Version:    3.0                                |
|  \\  /    A nd          | Web:        http://www.extend-project.de      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      changeDictionaryDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dictionaryReplacement
{
    boundary
    {
        cubes
        {
            type            patch;
        }
    }
}

// ************************************************************************* //

This doesn't work.


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