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

cellZone not taking all the cells inside

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 7, 2019, 14:27
Default cellZone not taking all the cells inside
  #1
Member
 
rahulksoni's Avatar
 
Rahul Kumar Soni
Join Date: Oct 2013
Location: Bhubaneswar, India
Posts: 68
Rep Power: 13
rahulksoni is on a distinguished road
Send a message via Skype™ to rahulksoni
My case details can be found at Courant number issue at lower rpm in pimpleDyMFoam

i am using OpenFOAM-3.0.x. My case is very similar to the propeller tutorial of pimpleDyMFoam except for one change that is the different design of propeller. Obviously, the dimensions of innerCylinderSmall and other cylinders were updated according to the new design/dimension of the propeller. Moreover, it is a fluid-filled closed chamber now without any inlet and outlet.

The Courant number issue was resolved as per discussions stated in Courant number issue at lower rpm in pimpleDyMFoam

The simulation runs seamlessly after changes. Thereafter I wanted to define the whole simulation zone as a porous zone called porosity1. Therefore, following part was added to the file createInletOutletSets.topoSetDict

Code:
    // Load initial cellSet
    {
        name    porosity1;
        type    cellSet;
        action  new;
        source  boxToCell;
        sourceInfo
        {
            box (-0.1 0.0 -0.1) (0.1 0.18 0.1);
        }
    }

    // Setting cellZone
    {
         name    porosity1;
         type    cellZoneSet;
         action  new;
         source  setToCellZone;
         sourceInfo
         {
                 set porosity1;
        }
     }
The total number of cells in the system as stated by checkMesh is 577544. Part of checkMesh result is shown below:
Code:
Mesh stats
    points:           719644
    faces:            1873121
    internal faces:   1704405
    cells:            577544
    faces per cell:   6.19438
    boundary patches: 8
    point zones:      0
    face zones:       1
    cell zones:       1
Here, I also want to show the output of topoSet command which clearly tells that all 577544 cells get included in the cellZone 'porosity':
Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  3.0.x                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 3.0.x-ac3f6c67e02f
Exec   : topoSet -dict system/createInletOutletSets.topoSetDict
Date   : Jan 02 2019
Time   : 18:25:33
Host   : "MSLab02"
PID    : 15445
Case   : /media/mslab02/Elements/CFD/StirredMill/OpenFOAM/V11_V10_originalStirredMillRPM1000/V11_V10_originalStirredMillRPM1000
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

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

Create polyMesh for time = 0

Reading topoSetDict

Time = 0
    mesh not changed.
Created faceSet boundaryFaces
    Applying source patchToFace
    Adding all faces of patch outerCylinder ...
    Found matching patch outerCylinder with 4036 faces.
    faceSet boundaryFaces now size 4036
Created faceSet outletFaces
    Applying source faceToFace
    Adding all faces from faceSet boundaryFaces ...
    faceSet outletFaces now size 4036
Created faceSet inletFaces
    Applying source faceToFace
    Adding all faces from faceSet boundaryFaces ...
    faceSet inletFaces now size 4036
Read set faceSet outletFaces with size 4036
    Applying source normalToFace
    normalToFace : Normalized vector to (0 -1 0)
    Adding faces according to normal being aligned with (0 -1 0) (to within 0.3) ...
    faceSet outletFaces now size 1440
Read set faceSet inletFaces with size 4036
    Applying source normalToFace
    normalToFace : Normalized vector to (0 1 0)
    Adding faces according to normal being aligned with (0 1 0) (to within 0.3) ...
    faceSet inletFaces now size 0
Created cellSet porosity1
    Applying source boxToCell
    Adding cells with center within boxes 1((-0.1 0 -0.1) (0.1 0.18 0.1))
    cellSet porosity1 now size 577544
Created cellZoneSet porosity1
    Applying source setToCellZone
    Adding all cells from cellSet porosity1 ...
    cellZoneSet porosity1 now size 577544

End
In the end, I run the solver pimpleDyMFoam. Let's see the initial output in the log.pimpleDyMFoam (which gets repeated throughout the simulation):
Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  3.0.x                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 3.0.x-ac3f6c67e02f
Exec   : pimpleDyMFoam -parallel
Date   : Jan 02 2019
Time   : 18:30:05
Host   : "MSLab02"
PID    : 16340
Case   : /media/mslab02/Elements/CFD/StirredMill/OpenFOAM/V11_V10_originalStirredMillRPM1000/V11_V10_originalStirredMillRPM1000
nProcs : 4
Slaves : 
3
(
"MSLab02.16341"
"MSLab02.16342"
"MSLab02.16343"
)

Pstream initialized with:
    floatTransfer      : 0
    nProcsSimpleSum    : 0
    commsType          : nonBlocking
    polling iterations : 0
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

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

Create mesh for time = 0

Selecting dynamicFvMesh solidBodyMotionFvMesh
Selecting solid-body motion function rotatingMotion
Applying solid body motion to cellZone innerCylinderSmall

PIMPLE: no residual control data found. Calculations will employ 2 corrector loops

Reading field p

Reading field U

Reading/calculating face flux field phi

AMI: Creating addressing and weights between 31980 source faces and 31980 target faces
AMI: Patch source sum(weights) min/max/average = 0.864049, 1.06838, 0.950135
AMI: Patch target sum(weights) min/max/average = 0.777792, 1.00559, 0.942769
Selecting incompressible transport model Newtonian
Selecting turbulence model type RAS
Selecting RAS turbulence model kEpsilon
kEpsilonCoeffs
{
    Cmu             0.09;
    C1              1.44;
    C2              1.92;
    C3              -0.33;
    sigmak          1;
    sigmaEps        1.3;
}

Reading/calculating face velocity Uf

No MRF models present

Creating finite volume options from "constant/fvOptions"

Selecting finite volume options model type explicitPorositySource
    Source: porosity1
    - selecting cells using cellZone porosity1
    - selected 89136 cell(s) with volume 0.00272961
Porosity region porosity1:
    selecting model: DarcyForchheimer
    creating porous zone: porosity1
Courant Number mean: 0 max: 0

Starting time loop

Reading surface description:
    zNormal
    isoQ
    propeller

forces forces:
    Not including porosity effects

Courant Number mean: 0 max: 0
deltaT = 1.19904e-05
Time = 1.19904e-05

solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 1.19904e-05 transformation: ((0 0 0) (1 (0 0.000629496 0)))
AMI: Creating addressing and weights between 31980 source faces and 31980 target faces
AMI: Patch source sum(weights) min/max/average = 0.890328, 1.11472, 0.980946
AMI: Patch target sum(weights) min/max/average = 0.813328, 1.06253, 0.973343
PIMPLE: iteration 1
- selecting cells using cellZone porosity1
- selected 89136 cell(s) with volume 0.00272961
- selecting cells using cellZone porosity1
- selected 89136 cell(s) with volume 0.00272961
smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 0.00347262, No Iterations 1
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 0.00361454, No Iterations 1
smoothSolver:  Solving for Uz, Initial residual = 1, Final residual = 0.00357922, No Iterations 1
- selecting cells using cellZone porosity1
- selected 89136 cell(s) with volume 0.00272961
GAMG:  Solving for p, Initial residual = 1, Final residual = 0.00518406, No Iterations 5
time step continuity errors : sum local = 8.59148e-07, global = -1.54541e-10, cumulative = -1.54541e-10
- selecting cells using cellZone porosity1
- selected 89136 cell(s) with volume 0.00272961
PIMPLE: iteration 2
- selecting cells using cellZone porosity1
- selected 89136 cell(s) with volume 0.00272961
- selecting cells using cellZone porosity1
- selected 89136 cell(s) with volume 0.00272961
smoothSolver:  Solving for Ux, Initial residual = 0.030644, Final residual = 6.75332e-07, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 0.0254633, Final residual = 5.55156e-07, No Iterations 2
smoothSolver:  Solving for Uz, Initial residual = 0.030196, Final residual = 7.25131e-07, No Iterations 2
- selecting cells using cellZone porosity1
- selected 89136 cell(s) with volume 0.00272961
GAMG:  Solving for p, Initial residual = 0.171561, Final residual = 1.61213e-06, No Iterations 50
time step continuity errors : sum local = 5.96149e-10, global = -4.95493e-11, cumulative = -2.0409e-10
- selecting cells using cellZone porosity1
- selected 89136 cell(s) with volume 0.00272961
smoothSolver:  Solving for epsilon, Initial residual = 0.00240751, Final residual = 4.53715e-08, No Iterations 2
smoothSolver:  Solving for k, Initial residual = 1, Final residual = 6.08364e-07, No Iterations 3
ExecutionTime = 21.82 s  ClockTime = 28 s

forces forces output:
    sum of forces:
        pressure : (0.32169 -0.0611844 -0.31682)
        viscous  : (6.64668e-06 -2.1396e-07 -6.79721e-07)
        porous   : (0 0 0)
    sum of moments:
        pressure : (-0.556742 -0.54134 -0.344258)
        viscous  : (-1.27764e-05 -6.49338e-05 -8.20582e-06)
        porous   : (0 0 0)

Courant Number mean: 0.0219529 max: 0.173894
deltaT = 1.43712e-05
Time = 2.63616e-05
We can see only 89136 cells out of total 577544 cells get selected for cellZone porosity1. Can anyone explain why it is happening?

I tried to visualize these cellZones and found that in otal two cellZones get created 'porosity1' and 'innerCylinderSmall'. Total 577544 cells gets divided in these two cellZones. 89136 cells in 'porosity1' and rest in 'innerCylinderSmall'. The same is evident in constant/polyMesh/cellZones file.

I have made the visual comparison of complete mesh and the two cellZones as in the attached image.
I also know that the defined porosity conditions are working fine but only for the outer region. I have attached the simulation snapshot at the end of 1 second of two simulations, one with defined porosity (left) and another without porosity (right). One can see that the simulation without porosity (right) has continuous velocity field throughout the region. However, one with porosity (left) has discretely reduced velocity particulary in the discussed outer porous region.

Everything is good to go except one that why porosity1 region even after being defined for the whole region is leaving the cells contained in innerCylinderSmall region/cellZone.

Someone please explain.

Any help is greatly appreciable.
Attached Images
File Type: jpg 1.jpg (144.2 KB, 99 views)
File Type: jpg 2.jpg (117.8 KB, 77 views)
rahulksoni is offline   Reply With Quote

Old   January 20, 2019, 16:49
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: A "zone" (pointZone, faceZone or cellZone) cannot hold the same ID as another zone. So the problem is that at first you say "I wanted everything to have porosity" and later on "but I want this region of the mesh to be in another cellZone for rotation"... and the result "everything that rotates is no longer in the porosity zone".

If you want all of the mesh to have a fixed porosity, OpenFOAM does allow that without the need to define a new zone... and I can't remember if 3.0.x allows using a cellSet...

OK, before I forget: a "set" (pointSet, faceSet or cellSet) can hold the same ID as another set of the same type.

If you had provided the "fvOptions" file, it would be easier for be to point out where you can change it... now I have to look for a tutorial with it... here we go: https://github.com/OpenFOAM/OpenFOAM...tant/fvOptions

This:
Code:
        selectionMode   cellZone;
        cellZone porosity;
can be something like this:
Code:
        selectionMode   cellSet;
        cellSet porosity;
or this:
Code:
        selectionMode   all;
if my memory doesn't fail me. If in doubt: https://openfoamwiki.net/index.php/O...de/Use_bananas
__________________
wyldckat is online now   Reply With Quote

Old   January 21, 2019, 06:39
Default
  #3
Member
 
rahulksoni's Avatar
 
Rahul Kumar Soni
Join Date: Oct 2013
Location: Bhubaneswar, India
Posts: 68
Rep Power: 13
rahulksoni is on a distinguished road
Send a message via Skype™ to rahulksoni
Thanks a lot for the informative response and clarification. My toposet file and fvOptions file contents are below for your reference:

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

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

actions
(
    {
        name    boundaryFaces;
        type    faceSet;
        action  new;
        source  patchToFace;
        sourceInfo
        {
            name outerCylinder;
        }
    }

    {
        name    outletFaces;
        type    faceSet;
        action  new;
        source  faceToFace;
        sourceInfo
        {
            set boundaryFaces;
        }
    }

    {
        name    inletFaces;
        type    faceSet;
        action  new;
        source  faceToFace;
        sourceInfo
        {
            set boundaryFaces;
        }
    }

    {
        name    outletFaces;
        type    faceSet;
        action  subset;
        source  normalToFace;
        sourceInfo
        {
            normal  (0 -1 0);   // Vector
            cos     0.3;        // Tolerance (max cos of angle)
        }
    }

    {
        name    inletFaces;
        type    faceSet;
        action  subset;
        source  normalToFace;
        sourceInfo
        {
            normal  (0 1 0);    // Vector
            cos     0.3;        // Tolerance (max cos of angle)
        }
    }

    // Load initial cellSet
    {
        name    porosity1;
        type    cellSet;
        action  new;
        source  boxToCell;
        sourceInfo
        {
            box (-0.1 0.0 -0.1) (0.1 0.18 0.1);
        }
    }

    // Setting cellZone
    {
         name    porosity1;
         type    cellZoneSet;
         action  new;
         source  setToCellZone;
         sourceInfo
         {
                 set porosity1;
        }
     }
);


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

porosity1
{
    type            explicitPorositySource;
    active          yes;

    explicitPorositySourceCoeffs
    {
        selectionMode   cellZone;
        cellZone        porosity1;

        type            DarcyForchheimer;

        DarcyForchheimerCoeffs
        {
            d   (4.4e6 4.4e6 4.4e6);
            f   (1020 1020 1020);

            coordinateSystem
            {
                type    cartesian;
                origin  (0 0 0);
                coordinateRotation
                {
                    type    axesRotation;
                    e1      (1 0 0);  //x-axis
                    e2      (0 0 1);  //z-axis
                    //e3 is orthogonal to e1 and e2 and gets created automatically
                }
            }
        }
    }
}


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

Actually, I am playing with the simulation settings. In my final settings I shall need to setup more than one porous zones for assigning different porosity values. That is why I chose to have region definintion based cellZone settings.

Please guide me how can achieve that and what changes do I require to do so.

Thanks a lot in advance.
rahulksoni is offline   Reply With Quote

Old   January 22, 2019, 20:44
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: I haven't tested to confirm it, but I believe that if you change this in "fvOptions":
Code:
        selectionMode   cellZone;
        cellZone        porosity1;
to this:
Code:
        selectionMode   cellSet;
        cellSet        porosity1;
it should work, given that you have a cellSet of the same name in "topoSetDict".

But be careful, because this will allow you to have overlapping porosity regions, because you can have multiple cellSets with common cell IDs.
wyldckat is online now   Reply With Quote

Old   January 24, 2019, 06:42
Default FOAM FATAL ERROR: [1] selection mode is cellSet
  #5
Member
 
rahulksoni's Avatar
 
Rahul Kumar Soni
Join Date: Oct 2013
Location: Bhubaneswar, India
Posts: 68
Rep Power: 13
rahulksoni is on a distinguished road
Send a message via Skype™ to rahulksoni
Thanks for the info

I made changes according to your suggestion as below:

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

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

actions
(
    {
        name    boundaryFaces;
        type    faceSet;
        action  new;
        source  patchToFace;
        sourceInfo
        {
            name outerCylinder;
        }
    }

    {
        name    outletFaces;
        type    faceSet;
        action  new;
        source  faceToFace;
        sourceInfo
        {
            set boundaryFaces;
        }
    }

    {
        name    inletFaces;
        type    faceSet;
        action  new;
        source  faceToFace;
        sourceInfo
        {
            set boundaryFaces;
        }
    }

    {
        name    outletFaces;
        type    faceSet;
        action  subset;
        source  normalToFace;
        sourceInfo
        {
            normal  (0 -1 0);   // Vector
            cos     0.3;        // Tolerance (max cos of angle)
        }
    }

    {
        name    inletFaces;
        type    faceSet;
        action  subset;
        source  normalToFace;
        sourceInfo
        {
            normal  (0 1 0);    // Vector
            cos     0.3;        // Tolerance (max cos of angle)
        }
    }

    // Load initial cellSet
    {
        name    porosity1;
        type    cellSet;
        action  new;
        //source  boxToCell;
        source  cylinderToCell;
        sourceInfo
        {
            //box (-0.1 0.0 -0.1) (0.1 0.18 0.1);
            p1 (0 0 0);   // start point on cylinder axis//
            p2 (0 0.18 0);   // end point on cylinder axis//
            radius 0.1;      
        }
    }

    // Setting cellZone
    /*{
         name    porosity1;
         type    cellZoneSet;
         action  new;
         source  setToCellZone;
         sourceInfo
         {
                 set porosity1;
        }
     }*/
);


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

porosity1
{
    type            explicitPorositySource;
    active          yes;

    explicitPorositySourceCoeffs
    {
        //selectionMode   cellZone;
        //cellZone        porosity1;
        selectionMode   cellSet;
        cellSet         porosity1;

        type            DarcyForchheimer;

        DarcyForchheimerCoeffs
        {
            d   (4.4e6 4.4e6 4.4e6);
            f   (1020 1020 1020);

            coordinateSystem
            {
                type    cartesian;
                origin  (0 0 0);
                coordinateRotation
                {
                    type    axesRotation;
                    e1      (1 0 0);  //x-axis
                    e2      (0 0 1);  //z-axis
                    //e3 is orthogonal to e1 and e2 and gets created automatically
                }
            }
        }
    }
}


//************************************************************************* //
When I run the simulation I get the following error for pimpleDyMFoam solver(OpenFOAM-3.0.x)
Code:
Selecting finite volume options model type explicitPorositySource
    Source: porosity1
    - selecting cells using cellSet porosity1
    - selected 577544 cell(s) with volume 0.00551937
[3] 
[3] 
[3] --> FOAM FATAL ERROR: 
[3] The porosity region must be specified as a cellZone.  Current selection mode is cellSet
[3] 
[3]     From function void Foam::fv::explicitPorositySource::initialise()
[3]     in file sources/derived/explicitPorositySource/explicitPorositySource.C at line 66.
I also ran the same case with OpenFOAM-5.x (as said that OpenFOAM-3.0.x does not allow...). However, slightly different result was obtained:
Code:
Selecting finite volume options model type explicitPorositySource
    Source: porosity1
    - selecting cells using cellSet porosity1
    - selected 577544 cell(s) with volume 0.00551937
[1] 
[1] 
[1] --> FOAM FATAL ERROR: 
[1] selection mode is cellSet
[1] 
[1]     From function Foam::fv::explicitPorositySource::explicitPorositySource(const Foam::word&, const Foam::word&, const Foam::dictionary&, const Foam::fvMesh&)
[1]     in file sources/derived/explicitPorositySource/explicitPorositySource.C at line 66.
If I change the selectionMode to all in fvOptions then error is
Code:
[0] --> FOAM FATAL ERROR: 
[0] selection mode is all


Any hint on what I am missing.

Thanks in advance
rahulksoni is offline   Reply With Quote

Old   January 24, 2019, 21:18
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: Nooooooooooooooo.....
Sorry, I completely forgot that porous regions require that a cellZone is used...

The quickest solution then is to add as many porous regions as needed... for example, use something like this:
Code:
porosity1
{
    type            explicitPorositySource;
    active          yes;

    explicitPorositySourceCoeffs
    {
        selectionMode   cellZone;
        cellZone        porosity1;
 
        type            DarcyForchheimer;

        DarcyForchheimerCoeffs
        {
            d   (4.4e6 4.4e6 4.4e6);
            f   (1020 1020 1020);

            coordinateSystem
            {
                type    cartesian;
                origin  (0 0 0);
                coordinateRotation
                {
                    type    axesRotation;
                    e1      (1 0 0);  //x-axis
                    e2      (0 0 1);  //z-axis
                    //e3 is orthogonal to e1 and e2 and gets created automatically
                }
            }
        }
    }
}

porousRotor
{
   $porosity1;

   explicitPorositySourceCoeffs
   {
        selectionMode   cellZone;
        cellZone        rotorZone;
   }
}
"$porosity1;" indicates that it will include all of the definitions done in the "porosity1" block. Then the next lines will override only the new definitions for this new block "porousRotor". The name "rotorZone" is just an example for the cellZone that is defined for the part of the mesh that was created by snappyHexMesh, if I remember your posts correctly.
wyldckat is online now   Reply With Quote

Old   January 25, 2019, 01:11
Default
  #7
Member
 
rahulksoni's Avatar
 
Rahul Kumar Soni
Join Date: Oct 2013
Location: Bhubaneswar, India
Posts: 68
Rep Power: 13
rahulksoni is on a distinguished road
Send a message via Skype™ to rahulksoni
I can do like that 'defining as many as porous zones as needed' but whether the earlier discussed problem i.e. 'the part of the porous zone which also falls in the dynamic/AMI/rotary region can be assigned only to one cellZone and that is the rotary one' will be solved by this.

I did what you said and part of output is pasted below which says that no cell selected for rotorZone
Code:
- selecting cells using cellZone porosity1
- selected 89136 cell(s) with volume 0.00272961
- selecting cells using cellZone rotorZone
- selected 0 cell(s) with volume 0
rahulksoni 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
[snappyHexMesh] SnappyHexMesh running killed! Mark JIN OpenFOAM Meshing & Mesh Conversion 7 June 14, 2022 02:37
Problem with divergence TDK FLUENT 13 December 14, 2018 07:00
Problem with entire domain comprised of split hex cells Arzed23 Main CFD Forum 1 November 8, 2016 00:01
snappyhexmesh remove blockmesh geometry philipp1 OpenFOAM Running, Solving & CFD 2 December 12, 2014 11:58
killed "snappyHexMesh" parkh32 OpenFOAM Pre-Processing 2 April 8, 2012 18:12


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