CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [General] cellZone not shown in paraView mesh list (https://www.cfd-online.com/Forums/paraview/248044-cellzone-not-shown-paraview-mesh-list.html)

shizuka February 21, 2023 18:50

cellZone not shown in paraView mesh list
 
Hi,

I am trying to simulate a porous media following this Youtube tutorial: https://youtu.be/gAkiUMN6bqM.


I ran the same tutorial case: porousBlockage.


According to the Youtuber, I can filter the cellZone representing the porous media which is defined in the file topoSet:

However, I can't find it in my ParaView... but the topoSet did work, here's the log:


The topoSetDict I compared, is the same. Was the porous media successfully implemented in my case? or did I do something wrong?


Thank you for your help!

shizuka February 21, 2023 18:52

The OP cannot be too long, here's the log of topoSet:


Code:

    object      topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

actions
(
    // porousBlockage
    {
        name    porousBlockageCellSet;
        type    cellSet;
        action  new;
        source  boxToCell;
        box    (-0.5 -0.5 -1) (0.5 0.5 1);
    }
    {
        name    porousBlockage;
        type    cellZoneSet;
        action  new;
        source  setToCellZone;
        set    porousBlockageCellSet;
    }
);


shizuka February 21, 2023 18:54

Two screenshots that I couldn't attach in OP:
https://i.postimg.cc/Sjsx4CSc/Inked-...t-00-19-29.jpg


https://i.postimg.cc/GTHLjw7X/1.png

shizuka February 21, 2023 18:56

2 Attachment(s)
The above images are not readable, sorry. I attach them here.

AtoHM March 1, 2023 07:32

As you can see in the screen capture, he/she @youtube used PV 5.6 and ticked a field "Include Zones". This is easier to miss in newer versions: under the Mesh Regions, Cell, Point Arrays and Lagrangian Arrays there is the same checkbox now reading "Read zones". Have you toggled it on in your case?

shizuka March 1, 2023 10:56

Hi AtoHM,


Thank you for your suggestion. I googled a lot for this issue... Yes, I've tried that, tick the option "Read zones" and one extra option will appear: "Copy to cells". I tried both. Sadly, the only difference is the results then become "partial"...

AtoHM March 2, 2023 02:24

Ok, I maybe should have suggested that earlier too:
Check if it was created successfully. In your constant/polyMesh folder should be located new files when topoSet worked. The cellSet should be written in constant/polyMesh/sets/. If this folder does not exist, topoSet probably failed. Then you need to look at the output of topoSet. It is always recommended to let the utilities write log files to check in case something does not work.


Good luck!

shizuka March 2, 2023 05:01

Hi AtoHM,


Thank you. Yes, I have the logs for meshblock, toposet, and foam.


In the log file the sets are properly set up:


Code:

Create time

Create polyMesh for time = 0

Reading topoSetDict

Time = 0
    mesh not changed.
Created cellSet porousBlockageCellSet
    Applying source boxToCell
    Adding cells with centre within boxes 1((-1.5 -1.5 -1) (-0.5 1.5 1))
    cellSet porousBlockageCellSet now size 192
Created cellZoneSet porousBlockage
    Applying source setToCellZone
    Adding all cells from cellSet porousBlockageCellSet ...
    cellZoneSet porousBlockage now size 192

End

Thank you for the reminder, I checked. Yes, there is also a folder "sets" nested in the folder constant/polyMesh.



May I ask do you use a newer version of paraView? Are you able to see cellZones (if you have such implementations)? Thanks!

AtoHM March 2, 2023 05:53

Hi shizuka,


I have checked it in one of my cases and indead, I cannot see the zones where they are displayed in PV 5.6. I actually use 5.4 alot still, and there I can create a "ExtractBlock" filter on the .foam-Node which gives me the option to show the zones.


Does this work for you? Otherwise, there is a possibility to export these to VTK and then it is easily shown in Paraview.

shizuka March 2, 2023 15:12

1 Attachment(s)
Hi AtoHM,


Thank you very much for so many suggestions :D


Do you mean the tab which is highlighted in green in the attached figure?


Then unfortunately it doesn't work. I guess VTK should work. Anyway, I am rest assured that I didn't do something stupid in openfoam. And the filter "Extract Block" looks very handy in making plots!


Thank you!

AtoHM March 6, 2023 07:41

I try to help and am sorry, it does not appear to work so far. This is exactly where I can see them using cellSet and cellZoneSet conversion as you used as well.
As I mentioned, another option is vtk conversion, you may try:
Code:

foamToVtk -cellSet porousBlockageCellSet

It should create a folder "VTK" in the case and you should be able to drag&drop the vtk file into Paraview.

shizuka March 6, 2023 08:08

Hi AtoHM,


I appreciate a lot of your kindness and willing to help, and hopefully this post can be also helpful to future readers who also get confused in finding the cellzones.


Besides, I wonder if you have any experience in simulating porous media in 2D? I have another unsolved problem in this post:


https://www.cfd-online.com/Forums/op...dimension.html


Would you mind having a look at it? Thank you very much for your time and help in advance!


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