CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   decomposePar looses patchField entries (http://www.cfd-online.com/Forums/openfoam-solving/126389-decomposepar-looses-patchfield-entries.html)

letzel November 15, 2013 19:02

decomposePar looses patchField entries
 
Dear Foamers,

my following workflow does not work, I hope it just requires a simple correction:

Code:

blockMesh > blockMesh.log 2>&1
decomposePar -force > decomposePar1.log 2>&1
surfaceFeatureExtract > surfaceFeatureExtract.log 2>&1
foamJob -parallel snappyHexMesh
foamJob -parallel checkMesh -latestTime
cp -pv 0/* 0.2 > cp.log 2>&1
setFields > setFields.log 2>&1
decomposePar -fields -latestTime -constant > decomposePar2.log 2>&1
foamJob -parallel pimpleFoam

snappy performs two steps, dt is 0.1 s, hence I copy the initial fields from 0 to latestTime=0.2.

pimpleFoam complains:
Code:

Create mesh for time = 0.2

Reading field p

[0]
[0]
[0] --> FOAM FATAL IO ERROR:
[0] Cannot find patchField entry for alexanderplatz_alexanderplatz
[0]
[0] file: /home/meineruser/OpenFOAM/meineruser-2.2.2/run/[...]/processor0/0.2/p.boundaryField from line 26 to line 41.
[0]
[0]    From function GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::readField(const DimensionedField<Type, GeoMesh>&, const dictionary&)
[0]    in file /opt/openfoam222/src/OpenFOAM/lnInclude/GeometricBoundaryField.C at line 206.
[0]
FOAM parallel run exiting

p in processor0/0.2 simply reads
Code:

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

dimensions      [0 2 -2 0 0 0 0];

internalField  uniform 0;

boundaryField
{
    defaultName
    {
        type            zeroGradient;
    }
    procBoundary0to1
    {
        type            processor;
        value          uniform 0;
    }
    procBoundary0to2
    {
        type            processor;
        value          uniform 0;
    }
    procBoundary0to3
    {
        type            processor;
        value          uniform 0;
    }
}


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

But p in the 0.2 subdirectory of the case directory still has all the patches specified:
Code:

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

dimensions      [0 2 -2 0 0 0 0];

internalField  uniform 0;

libs (
        "libgroovyBC.so"
    );

boundaryField
{
    alexanderplatz_patch_ausgang_db
    {
        type            groovyBC;
        value          uniform 0;
        valueExpression "0";
        gradientExpression "0";
        fractionExpression "inVel<0 ? 1 : 0";
        timelines (
          {
            name        inVel;
            outOfBounds clamp;
            fileName    "$FOAM_CASE/input_data/patch_ausgang_db.txt";
          }
                  );
    }

    "(alexanderplatz_patch_ausgang_a.*|alexanderplatz_patch_ausgang_b.*|alexanderplatz_patch_ausgang_l.*|alexanderplatz_patch_ausgang_u.*|alexanderplatz_patch_t.*)"
    {
        type            fixedValue;
    value        uniform 0;
    }

    "(alexanderplatz_alexanderplatz|treppen_treppen|saeulen_saeulen|defaultName)"
    {
        type            zeroGradient;
    }
}

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

Looking forward to hear any suggestions to revise my workflow.

Cheers,
Marcus

letzel November 18, 2013 05:06

Forgot to add that a slightly modified workflow including a reconstructParMesh step works as follows:
Code:

blockMesh > blockMesh.log 2>&1
decomposePar -force > decomposePar1.log 2>&1
surfaceFeatureExtract > surfaceFeatureExtract.log 2>&1
foamJob -parallel snappyHexMesh
foamJob -parallel checkMesh -latestTime
reconstructParMesh -latestTime -mergeTol 1e-06
cp -pv 0/* 0.2 > cp.log 2>&1
setFields > setFields.log 2>&1
decomposePar -latestTime -force > decomposePar2.log 2>&1
foamJob -parallel pimpleFoam

Is it possible to avoid this extra step?


All times are GMT -4. The time now is 00:57.