Retaining mesh groups from cgns file with cs_preprocess
Posted: Sat Sep 17, 2016 11:18 am
Hello,
First off I'm not sure I understand the terminology employed by code_saturne so forgive me if I confuse things.
I have a mesh in cgns format that I convert to something code_saturne can read by using This gives the following output:
Now the groups that are listed (BLADE, INFLOW, OUTFLOW...) are quite useful to be able to select individually from a post processing standpoint in paraview which I usually do (via scripting) by using . I think this can also be done by using the extract block filter (I'm not sure what the difference is so if someone could clarify that would be great!)
However when I try to do this in paraview I can only select "Fluid Domain" and/or "Boundary" and so it seems all the other groups originally present in my mesh have all been lumped into this single "Boundary" group. The things I have tried so far are playing around with the options I can pass to cs_preprocess like
- --grp-cel <keyword>
- --grp-fac <keyword>
but It doesn't make a difference.
Is there a simple way to retain the boundary groups present in my original mesh?
First off I'm not sure I understand the terminology employed by code_saturne so forgive me if I confuse things.
I have a mesh in cgns format that I convert to something code_saturne can read by using
Code: Select all
cs_preprocess <cgns_file>
Code: Select all
.------------------------------.
| |
| Code_Saturne Preprocessor |
| |
`------------------------------'
code_saturne version 4.0.5 (built Tue 02 Aug 2016 16:26:49 BST)
CGNS 3.3.0 file format support
Reading of compressed files ('.gz') with Zlib 1.2.3
Case configuration
------------------
Date : Sat 17 Sep 2016 09:52:43 BST
System : Linux 2.6.32-573.26.1.el6.x86_64
Machine : login-sand6
Processor : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
Memory : 131712492
User : ow222 (Oscar Wilsby)
Directory : /scratch/ow222/codeSaturneWork/AnnularCascade/MESH
Case name : preprocess
Mesh file : rotor_annular_cascade_ref1.cgns
Reading mesh from file in CGNS format
----------------------
Mesh file: rotor_annular_cascade_ref1.cgns
CGNS version : 2.4
Base name : Base
Physical dimension : 3
Cell dimension : 3
Number of zones : 1
Zone 1: "Passage"; type "Unstructured"
2011878 vertices; 1924224 cells
(cartesian coordinates, "RealDouble" precision, unit "Null")
Section 1: "Passage Main";
(indices 1 to 1924224, type "HEXA_8")
Section 2: "HUB";
(indices 1924225 to 1984356, type "QUAD_4")
Section 3: "SHROUD";
(indices 1984357 to 2044488, type "QUAD_4")
Section 4: "INFLOW";
(indices 2044489 to 2048520, type "QUAD_4")
Section 5: "OUTFLOW";
(indices 2048521 to 2052168, type "QUAD_4")
Section 6: "BLADE";
(indices 2052169 to 2073288, type "QUAD_4")
Section 7: "PER1";
(indices 2073289 to 2085576, type "QUAD_4")
Section 8: "PER2";
(indices 2085577 to 2097864, type "QUAD_4")
CGNS boundary condition information:
Zone 1
BC 1: "HUB" ("Null" on "FaceCenter")
BC 2: "SHROUD" ("Null" on "FaceCenter")
BC 3: "INFLOW" ("Null" on "FaceCenter")
BC 4: "OUTFLOW" ("Null" on "FaceCenter")
BC 5: "BLADE" ("Null" on "FaceCenter")
BC 6: "PER1" ("Null" on "FaceCenter")
BC 7: "PER2" ("Null" on "FaceCenter")
Number of vertices : 2011878
Number of faces : 173640
Number of cells : 1924224
Group "HUB"
Number of faces : 60132
Group "SHROUD"
Number of faces : 60132
Group "INFLOW"
Number of faces : 4032
Group "OUTFLOW"
Number of faces : 3648
Group "BLADE"
Number of faces : 21120
Group "PER1"
Number of faces : 12288
Group "PER2"
Number of faces : 12288
Wall-clock time: 0.921560 s; CPU time: 0.727890 s
Done reading mesh
-----------------
Theoretical mesh size: 124.070 Mb
Theoretical current memory: 170.117 Mb
Theoretical peak memory: 315.546 Mb
Total memory used: 451.336 Mb
Domain coordinate extents:
[-4.00000e-02, -2.38927e-02, 4.00000e-02]
[-3.14510e-02, 1.43144e-02, 8.00000e-02]
Number of elements quad4 : 173640
Number of elements hexa8 : 1924224
Defining families
-----------------
Element orientation check.
End of conversion to descending connectivity
--------------------------------------------
Theoretical mesh size: 289.254 Mb
Theoretical current memory: 335.302 Mb
Theoretical peak memory: 865.414 Mb
Total memory used: 1016.766 Mb
Main mesh properties
--------------------
Number of cells: 1924224
Number of internal faces: 5685852
Number of boundary faces: 173640
Number of vertices: 2011878
Definition of face and cell families
------------------------------------
Family 1
Group "BLADE"
Number of boundary faces : 21120
Family 2
Group "HUB"
Number of boundary faces : 60132
Family 3
Group "INFLOW"
Number of boundary faces : 4032
Family 4
Group "OUTFLOW"
Number of boundary faces : 3648
Family 5
Group "PER1"
Number of boundary faces : 12288
Family 6
Group "PER2"
Number of boundary faces : 12288
Family 7
Group "SHROUD"
Number of boundary faces : 60132
Family 7
Default family
(no group)
Number of cells : 1924224
Number of internal faces : 5685852
Write output for Kernel
-----------------------
Opening file: mesh_input
Wrote: "start_block:dimensions"
Wrote: "n_cells" ; Type: "u8"; Size: 1
Wrote: "n_faces" ; Type: "u8"; Size: 1
Wrote: "n_vertices" ; Type: "u8"; Size: 1
Wrote: "face_vertices_size" ; Type: "u8"; Size: 1
Wrote: "n_group_classes" ; Type: "i8"; Size: 1
Wrote: "n_group_class_props_max" ; Type: "i8"; Size: 1
Wrote: "n_groups" ; Type: "u8"; Size: 1
Wrote: "group_name_index" ; Type: "i8"; Size: 8
Wrote: "group_name" ; Type: "c "; Size: 42
Wrote: "group_class_properties" ; Type: "i8"; Size: 8
Wrote: "end_block:dimensions"
Wrote: "start_block:data"
Wrote: "face_cells" ; Type: "i8"; Size: 11718984
Wrote: "cell_group_class_id" ; Type: "i8"; Size: 1924224
Wrote: "face_group_class_id" ; Type: "i8"; Size: 5859492
Wrote: "face_vertices_index" ; Type: "u8"; Size: 5859493
Wrote: "face_vertices" ; Type: "i8"; Size: 23437968
Wrote: "vertex_coords" ; Type: "r8"; Size: 6035634
Wrote: "end_block:data"
Wrote: "EOF"
Closing file: mesh_input
Time and memory summary
-----------------------
User CPU time (sec) : 2.72
System CPU time (sec) : 36.02
Total time (sec) : 39.28
Total CPU time / Total time : 0.99
Memory use summary:
Total memory used: 1016.766 Mb
Theoretical instrumented dynamic memory: 865.414 Mb
.-----------------------.
| |
| Preprocessor finish |
| |
`-----------------------'
Code: Select all
PVReader.MeshRegions = ['DesiredGroupName']
However when I try to do this in paraview I can only select "Fluid Domain" and/or "Boundary" and so it seems all the other groups originally present in my mesh have all been lumped into this single "Boundary" group. The things I have tried so far are playing around with the options I can pass to cs_preprocess like
- --grp-cel <keyword>
- --grp-fac <keyword>
but It doesn't make a difference.
Is there a simple way to retain the boundary groups present in my original mesh?