cellZone not taking all the cells inside
2 Attachment(s)
My case details can be found at https://www.cfd-online.com/Forums/op...tml#post720660
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 https://www.cfd-online.com/Forums/op...tml#post720660 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 Code:
Mesh stats Code:
/*---------------------------------------------------------------------------*\ Code:
/*---------------------------------------------------------------------------*\ 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. |
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; Code:
selectionMode cellSet; Code:
selectionMode all; |
Thanks a lot for the informative response and clarification. My toposet file and fvOptions file contents are below for your reference:
topoSetDict Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
/*--------------------------------*- C++ -*----------------------------------*\ 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. |
Quick answer: I haven't tested to confirm it, but I believe that if you change this in "fvOptions":
Code:
selectionMode cellZone; Code:
selectionMode cellSet; But be careful, because this will allow you to have overlapping porosity regions, because you can have multiple cellSets with common cell IDs. |
FOAM FATAL ERROR: [1] selection mode is cellSet
Thanks for the info
I made changes according to your suggestion as below: topoSetDict Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
Selecting finite volume options model type explicitPorositySource Code:
Selecting finite volume options model type explicitPorositySource Code:
[0] --> FOAM FATAL ERROR: Any hint on what I am missing. Thanks in advance |
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 |
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 |
All times are GMT -4. The time now is 13:50. |