Vous êtes sur la page 1sur 31

Polyhedral Grids

In STAR-CCM+

Milovan Perić

www.cd-adapco.com
Finite-Volume Method, I

● The solution domain must be subdivided into contiguous cells (control


volumes) by a grid...
● ...which can be
 structured,
 block-structured (with either matching or non-matching interfaces,
overlapping or non-overlapping blocks),
 or fully unstructured...

● The cells can be tetrahedra, prisms, pyramids, hexahedra, or arbitrary


polyhedra...

● They can be fixed, moving as a rigid body, or moving and deforming…


Finite-Volume Method, II

Examples of grid types that can be created in


STAR-CCM+: An unstructured grid, made of
tetrahedra and prism layers along walls (top
left); a trimmed hexahedral grid with prism
layers along walls (top right); a polyhedral grid
with prism layers along walls (left)
Polyhedral Control Volumes, I

● The most general approach in a finite-volume method is to treat every


CV as if it were an arbitrary polyhedron – than the same code can
handle any grid.

● Data structure for arbitrary polyhedral cells:


 Vertex (defined by grid coordinates; saved)
 Line (connects two vertices; not saved)
 Face (a closed polygon of lines; defined by an
ordered list of vertices; saved)
 Volume (enclosed by faces; defined by a list of faces; saved)

• We distinguish between internal (shared by two CVs) or boundary


faces (attached to one cell).
• Cells must be “watertight”: each edge must appear twice…
Polyhedral Control Volumes, II

● The solver operates with three kinds of loops:


 Loop over volumes (approximation of volume integrals; linear equations
solver…)

 Loop over internal faces (approximation of surface integrals – fluxes


from one cell to another; linear equations solver..)

 Loop over boundary faces (boundary fluxes; implementation of


boundary conditions)

● Some data is associated with faces, some with cells…

It is often said that STAR-CCM+ is face-based solver: This term is


used to distinguish solvers that operate mostly on face loops and
have no limit to the number of faces that a CV can have, contrary
to solvers for unstructured grids that operate on cell loops and the
number of faces per cell is limited (STAR-CD was like this until it
was re-written for Version 4).
Polyhedral Control Volumes, III

● Data associated with cell faces:


 Face centroid position;

 Pointers to cells on either side (left and right);

 Surface vector (pointing from left to right cell);

 Interpolation factors, coefficients multiplying neighbour values…

● Data associated with cells:


 Cell centroid position, cell volume;

 Central coefficient and source term;

 Variable values (unknowns);

 Continuum properties…
Polyhedral Control Volumes, IV

● Two kinds of polyhedral control volumes are in use in commercial codes:


 Computational point is the vertex of the generated/imported grid, around
which a control volume is created by solver; it is not in the CV-centroid.
 Both surface and volume integrals are computed element-wise (grid cells
are interpolation “elements”; e.g. in ANSYS-CFX, see left figure).

Left: 12 surface
integration points, 6
volume integration
points (in this 2D
example; in 3D,
typically around 60
surface integration
points and around 12
volume integration
points; multiple faces ANSYS-CFX STAR-CCM+
shared by the same
control volumes).
Polyhedral Control Volumes, V

● The other approach (used in STAR-CCM+):


 Computational point is at the cell-centroid of the generated/imported grid.
 The grid represents boundaries of control volumes ; interpolation is
performed between computational points using shape functions.
 The number of integration points is minimized (see right figure).

Right: 6 surface
integration points, one
volume integration
point (at cell centroid).
One common face for
two neighbor cells.
Note: the number of
neighbor nodes is the
same in both cases, the
algebraic equation ANSYS-CFX STAR-CCM+
system looks the same…
Polyhedral Control Volumes, VI
● The first approach requires special treatment at boundaries, since a
control volume is also created around boundary nodes…
Polyhedral Control Volumes, VII

● In the case of arbitrary polyhedral cells, faces are not planar…


● Face centroid and surface vector are needed to compute fluxes.
● Surface vector is unique when edges are straight (which is usually the
case) – vector components are face projections onto coordinate
planes…
● Face definition must be unique for both cells it belongs to…
● Triangulation is used to uniquely define face properties…

h: Face hub point


In order to define cell faces and cell H: Cell hub point
volume uniquely, STAR-CCM+
introduces “hub points”, which are
used to split faces into triangles and
volume into tetrahedra (only for the
purpose of computing surface
vectors and cell volume).
Discretization

● Three levels of approximation are necessary in a finite volume method:


● Integral approximation (quadrature; for surface, volume and time
integrals)
● Interpolation (computing variable values at locations other than cell
centroid – primarily for face centroids when computing surface integrals)
● Differentiation (gradients; needed at cell centroid and at face centroids)

● The most widely used integral approximations:


● Midpoint rule (2D space, 3D space, time; used in STAR-CCM+ and all
other commercial codes): 2nd-order approximation on any grid type
● Trapezoid rule (2D space, time; used in research 2D codes); 2nd-order
● Simpson rule (2D space ; used in research 2D codes); 4th-order
Why Polyhedral Grids?, I

● Allowing for polyhedral grids (using the appropriate data structure


outlined before) simplifies the solver – there is no need for any special
treatment for these special situations:
 Local grid refinement interfaces;
 Non-conformal grid interfaces;
 Sliding grid interfaces.
● In order to handle these situations, one only needs to define the faces
at interfaces appropriately (which is not always trivial…).
● Each piece of interface – which can be an arbitrary polygon – that is
common to two neighbour cells must be identified and added to the
list of internal faces.
Non-Conformal Grid Interfaces, I

● Example of non-conformal grid interfaces – local grid refinement (easy


to handle, since the definition of new faces is trivial)…
Non-Conformal Grid Interfaces, II

● Examples of non-conformal grid interfaces – non-matching grid blocks,


sliding interfaces (identification of new faces can be tricky – tolerance
sensitive…).

Non-conformal grid interface Interface between two sliding grids


Why Polyhedral Grids?, II

● There are also good reasons for generating and using polyhedral grids,
especially for internal flows:
 It is easier to control grid size changes (zonal refinement or coarsening) –
this can take place gradually, without sudden changes as with trimmed
hexahedral grids (advantage in LES, acoustics etc.);
 The variation of grid size at walls (in tangential direction) can also be
better controlled than with trimmed grids, where often jumps in face
size occur;
 When using midpoint-rule integral approximation and the usual gradient
approximations, higher accuracy is obtained than with tetrahedral grids
(more immediate neighbours, better gradients);
 Gradients are not smeared like when using more distant neighbours to
compute gradients on tetrahedral grids (polyhedral grid has more
immediate neighbours since it has more faces).
Why Polyhedral Grids?, III

● There are also good reasons for generating and using polyhedral grids,
especially for internal flows (continued):
 When using polyhedral control volumes, conformal grids can easily be
generated at solid-fluid interfaces (important for heat transfer and some
other processes);
 This is also true for tetrahedral grids, but not for trimmed hexahedral
grids…
 When the flow is nearly orthogonal to a pair of opposite faces, convection
flux approximation has the highest accuracy (minimum numerical
diffusion) – especially important in recirculating flows...
 In polyhedral grids, there are more directions which can be aligned with
flow direction in the sense just described (typically 6) than in hexahedral
(three) or tetrahedral grids (none).
 In principle it is easier to optimize grid quality than with any other grid
type (more freedom to split, merge, deform etc.).
Conformal Grid at Fluid-Solid Interface

● Most frequent interaction between fluid and solid structure is the


conjugate heat transfer…
● For efficiency reasons, it is important to solve the energy equation in
both continua simultaneously…
● A conformal grid at the interface between continua is important,
because cells are usually very thin on fluid side (prism layer near wall),
and solid walls are sometimes also thin…

Solid Interface

Interface
Fluid
Solid
Grid Section

With a polyhedral grid, one


usually obtains a more
uniform face size at walls than
when a trimmed grid is used,
where often small trimmed
faces cause jumps in face size
(see marked zone and similar
places elsewhere)…
Comparison of Hex-, Tet- and Poly-Grid, I

● Flow in a 90° pipe elbow is considered (turbulent flow with heat


transfer) with the following data:
 The pipe wall is hot (400 K). Fluid is water with inlet temperature 300 K
and velocity of 5 m/s (Re = 200,000).
 A half of the geometry is considered, with a symmetry boundary condition
(3D-flow, with pronounced secondary flow effects due to bend). Wall
functions are used, y+ is around 50.
 Pipe diameter: D = 0.04 m; mean bend radius: R = 0.04 m
 Pipe length upstream of bend: 4 D; pipe length downstream of bend: 7 D
 Three grids are created, with BaseSize: 0.002 m, 0.001 m and 0.0005 m
(reduction by a factor of 2);
 6 prism layers are created; thickness of the layer next to wall the same, 3e-
4 m, while the total thickness of all layers was 0.004 m, 0.003 m and 0.002
m, respectively. Extrusion used both upstream and downstream of elbow.
Comparison of Hex-, Tet- and Poly-Grid, II

Cross-section through the finest grid:


polyhedral (top left), tetrahedral (top
right) and trimmed (bottom left).
Comparison of Hex-, Tet- and Poly-Grid, III

Grid Type Grid Level Base Size No. of Cells No. of Faces
Tetrahedral 1 0.002 128,823 297,077
Tetrahedral 2 0.001 680,544 1,489,269
Tetrahedral 3 0.0005 3,734,138 7,894,478
Polyhedral 1 0.002 60,805 244,046
Polyhedral 2 0.001 231,544 1,035,947
Polyhedral 3 0.0005 984,343 5,286,580
Trimmed 1 0.002 42,079 120,837
Trimmed 2 0.001 171,021 496,402
Trimmed 3 0.0005 933,686 2,744,399

Data for three levels of refinement for all three grid types (the same grid generation
parameters are used).
Comparison of Hex-, Tet- and Poly-Grid, IV

Tetrahedral Polyhedral

Grid 1 Grid 2 Grid 3 Grid 1 Grid 2 Grid 3

Convergence of the iterative solution


Trimmed process: computation on the next finer
grid is started with automatically
extrapolated solution from the next
coarser grid. The same under-relaxation
factors are used in all cases (0.2 for
Grid 1 Grid 2 Grid 3 pressure, 0.9 for temperature, 0.8 for all
other variables). On tetrahedral grids, one
needs more iterations to reach steady
integral values – residuals cannot be
reduced beyond certain limit, they
oscillate…
Comparison of Hex-, Tet- and Poly-Grid, V

Grid Heat Flux Pressure Drop Force Fx Force Fy

Tetrahedral 1 60,175.5 4,808.62 18.742 -49.035


Tetrahedral 2 60,004.9 4,717.61 18.705 -47.806
Tetrahedral 3 59,805.6 4,680.66 18.684 -47.370
Polyhedral 1 60,004.9 4,729.08 18.658 -48.656
Polyhedral 2 59,891.1 4,682.88 18.674 -47.515
Polyhedral 3 59,805.4 4,671.63 18.675 -47.285
Trimmed 1 60,037.6 4,763.99 18.648 -48.532
Trimmed 2 60,095.4 4,705.41 18.679 -47.713
Trimmed 3 60,006.4 4,687.90 18.680 -47.516

Results obtained on three levels of each grid type:


- Total heat flux through pipe wall
- Pressure drop between inlet and outlet (specified constant velocity at inlet)
- Force on pipe wall in x- and y-direction
Comparison of Hex-, Tet- and Poly-Grid, VI

Tetrahedral Polyhedral

Grid 1 Grid 2 Grid 3 Grid 1 Grid 2 Grid 3

Variation of pressure drop (equal to inlet


Trimmed
pressure, since p=0 is specified at outlet)
during iterations on all grids.
On tetrahedral grids 1 and 2, the solution
is not completely steady (residuals
Grid 1 Grid 2 Grid 3 oscillate).
Solution on the polyhedral grid 2 is as
accurate as the solutions on finer
tetrahedral or trimmed grids.
Comparison of Hex-, Tet- and Poly-Grid, VII

Tetrahedral Polyhedral

Grid 1 Grid 2 Grid 3 Grid 1 Grid 2 Grid 3

Variation of force on pipe wall in x-


Trimmed
direction during iterations on all grids.
On tetrahedral grids 1 and 2, the solution
is not completely steady (residuals
oscillate).
Grid 1 Grid 2 Grid 3 Solutions on polyhedral and trimmed grids
are similar (the force increases with grid
refinement); on tetrahedral grids, the force
reduces as the grid is refined. On the finest
level, results are close on all grids.
Comparison of Hex-, Tet- and Poly-Grid, VIII

Tetrahedral Polyhedral

Grid 1 Grid 2 Grid 3 Grid 1 Grid 2 Grid 3

Variation of force on pipe wall in y-


Trimmed
direction during iterations on all grids.
On tetrahedral grids 1 and 2, the solution
is not completely steady (residuals
oscillate).
Grid 1 Grid 2 Grid 3 On the finest level, results are close on all
grids (within 0.5%).
Comparison of Hex-, Tet- and Poly-Grid, IX

Tetrahedral Polyhedral

Grid 1 Grid 2 Grid 3 Grid 1 Grid 2 Grid 3

Variation of heat flux through pipe wall


Trimmed
during iterations on all grids.
On all grid levels, results are close (within
0.3%).

Grid 1 Grid 2 Grid 3


Comparison of Hex-, Tet- and Poly-Grid, X

Tetrahedral Polyhedral

Wall pressure computed on level-3 grids.


On all grid levels, results are close (within
0.3%).
Minimum and maximum pressure values
Trimmed are close – within 0.3%.
Comparison of Hex-, Tet- and Poly-Grid, XI

Tetrahedral Polyhedral

Flow pattern in symmetry plane, computed


on level-3 grids.
On all grid levels, maximum velocity values
are close – within 0.15%.

Trimmed
Comparison of Hex-, Tet- and Poly-Grid, XII

Tetrahedral Polyhedral

Flow pattern in the cross-section at the


bend exit, computed on level-3 grids.
On all grid levels, maximum secondary
velocity values are close – within 0.6%.

Trimmed
Comparison of Hex-, Tet- and Poly-Grid, XIII

● Results for this test case confirm observations from earlier studies using
STAR-CCM+:
 When a tetrahedral grid is converted to polyhedral grid (which is roughly
what we get when generating grids using the same base size), the number
of cells is 4-5 times lower, and the number of faces is also substantially
lower.
 When the same under-relaxation factors are used, iterations converge
better on polyhedral than on tetrahedral grids (on tetrahedral grids,
residuals often oscillate and do not go below certain level).
 The computing time on the polyhedral grid is ca. 5 times lower (partly
because substantially less iterations are needed, partly because of less
cells and faces). In the cases studied here, the total computing time on
polyhedral grids was 637 s and on tetrahedral grids it was 3030 s.
 When the grid is sufficiently fine, results are very close; however, the cost
of obtaining them is lower on polyhedral grids.

Vous aimerez peut-être aussi