CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Creation of cyclic baffles fails with OpenFOAM 10 (https://www.cfd-online.com/Forums/openfoam-pre-processing/245439-creation-cyclic-baffles-fails-openfoam-10-a.html)

billie October 6, 2022 06:23

Creation of cyclic baffles fails with OpenFOAM 10
 
I am trying to migrate my models from OpenFOAM 8 to OpenFOAM 10. I noticed the following commit which required changes to the input syntax for baffle creation.

Previously the baffle was defined using e.g.:
Code:

internalFacesOnly true;
fields true;

baffles
{
    inte_eval_baffle
    {
        region          fluid_body;
        type            faceZone;
        zoneName        inte_eval;
        patchPairs
        {
            type            cyclic;
            transformType  none;
        }
    }
}

For OpenFAOM 10 I changed it to e.g.:
Code:

internalFacesOnly true;
fields true;

baffles
{
    inte_eval_baffle
    {
        region          fluid_body;
        type            faceZone;
        zoneName        inte_eval;
        owner
        {
            name            inte_eval_baffle_side0;
            type            cyclic;
            neighbourPatch  inte_eval_baffle_side1;
            transform      none;
        }
        neighbour
        {
            name            inte_eval_baffle_side1;
            type            cyclic;
            neighbourPatch  inte_eval_baffle_side0;
            transform      none;
        }
    }
}

When running createBaffles using the new format with OpenFOAM 10 I get the following error:
Quote:

--> FOAM FATAL ERROR:
problem : my edge:(0 1) in master points:(0 1) v.s. masterEdgeVerts:(2147483647 2147483647)

From function void Foam::globalMeshData::calcGlobalEdgeOrientation() const
in file meshes/polyMesh/globalMeshData/globalMeshData.C at line 1209.
If necessary I can attach the full log and an example case.

When using "fields false" in createBafflesDict the operation succeeds but later decomposePar fails because obviously the fields are not defined for the baffle sides.


It would be great if anybody could shed light onto this. I am trying to figure out the problem since a few days now without success. Apparently it is not a bug because my issue was closed as a user support request. Unfortunately I fail to see what I am doing wrong.

An online search for the error message also did not yield anything useful and the only issue I found here in the forum is this which is unresolve. also it is related to extrudeToRegion and not createBaffles.


There is a question related to this. I am creating the cyclic baffle because I want to evaluate the pressure at a faceZone. This does not work (or at least I found no way to do so directly) thus I created the cyclic baffle to evaluate the pressure like for a boundary patch.

Code:

facePressure_inte_eval_baffle
{
    region          fluid_duct;
    type            surfaceFieldValue;
    writeFields    false;
    log            true;
    regionType      patch;
    fields          (p_rgh);
    operation      weightedAverage;
    name            inte_eval_baffle_side0;
}

Is there a way to avoid the creation of the patches and evaluate the pressur edirectly? If yes the problem wouldn't be relevant anymore.

billie October 7, 2022 11:21

Not verified this completely but it looks like since recent versions of OpenFOAM it is possible to evaluate scalars at a surface even without interpolation.

Code:

    pressure_eval
    {
        type            surfaceFieldValue;
        writeFields    false;
        log            true;
        regionType      faceZone;
        fields          (p_rgh);
        operation      areaAverage;
        name            eval;
    }

FYI: The ticket was reopened and will be examined again. Maybe there is a problem after all regarding the cyclic baffles.


All times are GMT -4. The time now is 11:59.