CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Decomposing error simple method

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 26, 2021, 09:32
Default Decomposing error simple method
  #1
New Member
 
Dan
Join Date: Jul 2021
Posts: 2
Rep Power: 0
DanGode is on a distinguished road
Hi there,
this is my first thread so feel free to give feedback on how I can improve posting about questions.

I encounter an error when trying to decompose my case in order to run snappyHexMesh and afterwards simpleFoam in parallel. The "plan" was to simulate my case with the following commands:

1. blockMesh
2. surfaceFeatures
3. decomposePar
4. mpirun -np 6 snappyHexMesh -parallel -overwrite
(4.1. reconstructParMesh -constant --> not sure I need this command, didn't get to trying it)
5. checkMesh
6. mpirun -np 6 simpleFoam -parallel
(6.1. recontructPar --> same as command 4.1)

As mentioned, I encountered the error when trying to execute the decomposePar command.
Code:
Code:
daniel@Daniel-Linux:~/Documents/compact_rdf_test$ decomposePar 
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  8
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : 8-1c9b5879390b
Exec   : decomposePar
Date   : Jul 26 2021
Time   : 15:07:13
Host   : "Daniel-Linux"
PID    : 15864
I/O    : uncollated
Case   : /home/daniel/Documents/compact_rdf_test
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time





 Decomposing mesh region0

Create mesh

Calculating distribution of cells
Selecting decompositionMethod simple

Finished decomposition in 0.03 s

Calculating original mesh data

Distributing cells to processors

Distributing faces to processors

Distributing points to processors

Constructing processor meshes

Processor 0
    Number of cells = 9229
    Number of faces shared with processor 1 = 611
    Number of faces shared with processor 3 = 427
    Number of faces shared with processor 4 = 1
    Number of processor patches = 3
    Number of processor faces = 1039
    Number of boundary faces = 1699

Processor 1
    Number of cells = 9113
    Number of faces shared with processor 0 = 611
    Number of faces shared with processor 2 = 603
    Number of faces shared with processor 4 = 427
    Number of faces shared with processor 5 = 1
    Number of processor patches = 4
    Number of processor faces = 1642
    Number of boundary faces = 1080

Processor 2
    Number of cells = 8996
    Number of faces shared with processor 1 = 603
    Number of faces shared with processor 5 = 427
    Number of processor patches = 2
    Number of processor faces = 1030
    Number of boundary faces = 1676

Processor 3
    Number of cells = 8996
    Number of faces shared with processor 0 = 427
    Number of faces shared with processor 4 = 603
    Number of processor patches = 2
    Number of processor faces = 1030
    Number of boundary faces = 1676

Processor 4
    Number of cells = 9112
    Number of faces shared with processor 0 = 1
    Number of faces shared with processor 1 = 427
    Number of faces shared with processor 3 = 603
    Number of faces shared with processor 5 = 611
    Number of processor patches = 4
    Number of processor faces = 1642
    Number of boundary faces = 1080

Processor 5
    Number of cells = 9229
    Number of faces shared with processor 1 = 1
    Number of faces shared with processor 2 = 427
    Number of faces shared with processor 4 = 611
    Number of processor patches = 3
    Number of processor faces = 1039
    Number of boundary faces = 1699

Number of processor faces = 3711
Max number of cells = 9229 (1.27846% above average 9112.5)
Max number of processor patches = 4 (33.3333% above average 3)
Max number of faces between processors = 1642 (32.7405% above average 1237)

Time = 0


--> FOAM FATAL IO ERROR: 
Cannot find patchField entry for x_minus

file: /home/daniel/Documents/compact_rdf_test/0/p/boundaryField from line 25 to line 170.

    From function void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::readField(const Foam::DimensionedField<TypeR, GeoMesh>&, const Foam::dictionary&) [with Type = double; PatchField = Foam::fvPatchField; GeoMesh = Foam::volMesh]
    in file /home/ubuntu/OpenFOAM/OpenFOAM-8/src/OpenFOAM/lnInclude/GeometricBoundaryField.C at line 184.

FOAM exiting
decomposeParDict:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  8
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

numberOfSubdomains 6;

method          simple;

simpleCoeffs
{
    n               (3 2 1);
    delta           0.001;
}

hierarchicalCoeffs
{
    n               (1 1 1);
    delta           0.001;
    order           xyz;
}

manualCoeffs
{
    dataFile        "";
}

distributed     no;

roots           ( );


// ************************************************************************* //
I tried running the case in single and that was not a problem, just took quite a while

So I guess the problem lies somewhere in the creation of the blockMesh. When executing this command, the boundaries set in the blockMeshDict are copied into the boundary file in the polyMesh directory.

blockMeshDict:
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      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices
(
    ( 0     0     0 )
    (0.6    0     0 )
    (0.6   0.6    0 )
    ( 0    0.6    0 )
    ( 0     0   0.35)
    (0.6    0   0.35)
    (0.6   0.6  0.35)
    ( 0    0.6  0.35)
);

blocks
(
    hex (0 1 2 3 4 5 6 7) (45 45 27) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
    x_minus
    {
        type wall;
        faces
        (
            (0 4 7 3)
        );
    }

    x_plus
    {
        type wall;
        faces
        (
            (1 2 6 5)
        );
    }

    y_minus
    {
        type wall;
        faces
        (
            (0 1 5 4)
        );
    }

    y_plus
    {
        type wall;
        faces
        (
            (2 3 7 6)
        );
    }

    z_minus
    {
        type wall;
        faces
        (
            (0 3 2 1)
        );
    }

    z_plus
    {
        type wall;
        faces
        (
            (4 5 6 7)
        );
    }

);

mergePatchPairs
(
);

// ************************************************************************* //
boundary file in polyMesh directory after execution of the commands above:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  8
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       polyBoundaryMesh;
    location    "constant/polyMesh";
    object      boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

6
(
    x_minus
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          1215;
        startFace       159570;
    }
    x_plus
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          1215;
        startFace       160785;
    }
    y_minus
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          1215;
        startFace       162000;
    }
    y_plus
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          1215;
        startFace       163215;
    }
    z_minus
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          2025;
        startFace       164430;
    }
    z_plus
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          2025;
        startFace       166455;
    }
)

// ************************************************************************* //
What OpenFOAM complains about in the error message is that there is no specification for the boundaries created with blockMesh in the 0/p (and also 0/U too I guess) directory.

0/p:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  8
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform 1e5;

boundaryField
{
    x_min
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }
    
    x_max
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }
    
    y_min
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }
    
    y_max
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }
    
    z_min
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }
    
    z_max
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }
    
    tragschiene_l
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }
    
    tragschiene_r
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }
    
    stuetzer_l_1
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }
    
    stuetzer_r_1
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }
    
    steg_1
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }
    
    stuetzer_l_2
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }
    
    stuetzer_r_2
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }
    
    steg_2
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }
    
    stuetzer_l_3
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }
    
    stuetzer_r_3
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }
    
    steg_3
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }
    
    stuetzer_l_4
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }
    
    stuetzer_r_4
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }
    
    steg_4
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }
    
    luefterbank_2
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }
    
    lueftereinlass_21
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }
    
    lueftereinlass_22
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }
    
    luefterauslass_21
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }
    
    luefterauslass_22
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }
}

// ************************************************************************* //
What I dont get is: why do those boundaries need to be mentioned and defined in 0/p and 0/U when trying to decompose? I didnt have to do it when running in single. Can someone explain? And maybe have a solution for the problem?

Thank you very much in advance!

P.S.: If you find any other errors in the code or the commands I use, please tell me! I am quite new to OpenFOAM and its only my first non-tutorial project.
DanGode is offline   Reply With Quote

Old   July 27, 2021, 06:58
Default Update
  #2
New Member
 
Dan
Join Date: Jul 2021
Posts: 2
Rep Power: 0
DanGode is on a distinguished road
I have found a workaround/solution. I guess when trying to decompose the program tried to somehow include the 0 directory into the decomposition even if it was not needed at this point. So I tried decomposing and meshing without the 0 directory and all the steps shown above (including all and one additional reconstruct commands) worked just fine and saved a lot of time. I just put the 0 directory back into my case folder after I finished reconstructing the mesh. Then decomposing was not a problem anymore because the boundaries in the polyMesh/boundary file and those in the 0/p und 0/U files were identical.

I still encounter problems with my boundary conditions and I am not even sure the meshing worked on all the surfaces I intended to mesh but that is something for a different thread I think.

If someone still has some tips to give or feedback, feel free to give it!
DanGode 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
Inaccurate gradient results from continuous Adjoint method Yminjo SU2 1 January 11, 2014 22:08
multiphaseEulerFoam: method mag(...) withing method solveAlphase() maybee OpenFOAM Programming & Development 0 December 21, 2013 10:13
Help about the preconditioner in gmres method Dan Gao Main CFD Forum 3 July 5, 2008 01:18
About flowfield-dependent variation(FDV) method? Jinwon Main CFD Forum 1 December 4, 2007 21:13
tidal flow simulation using finite volume method Jason Qiu Main CFD Forum 0 October 20, 2002 02:34


All times are GMT -4. The time now is 08:02.