-
Notifications
You must be signed in to change notification settings - Fork 7
/
ustmesh.tex
463 lines (414 loc) · 14.1 KB
/
ustmesh.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
% (C) 2022 Yung-Yu Chen. All rights reserved.
% chktex-file 3
% chktex-file 13
\RequirePackage[2020-02-02]{latexrelease}
\documentclass[11pt,dvips]{article}
%\documentclass[12pt,dvips]{article}
%\documentclass[preprint,dvips,numbers,sort&compress]{elsarticle}
%\documentclass[12pt,review,dvips,numbers,sort&compress]{elsarticle}
% Geometry.
\usepackage{geometry}
\geometry{a4paper,
left=2cm,
right=2cm,
top=2cm,
bottom=2cm,
}
% Global functionalities.
\usepackage[numbers,sort&compress]{natbib}
\usepackage{hyperref}
% encoding.
\usepackage[utf8]{inputenc}
% Mathematics.
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{arydshln}
% Authoring.
%\usepackage{authblk}
\usepackage[printwatermark]{xwatermark}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{subfigure}
\usepackage{paralist}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{setspace}
%\usepackage{lmodern}
\newwatermark[allpages,color=black!30,angle=45,scale=3,xpos=0,ypos=0]%
{DRAFT}
%\doublespacing
\graphicspath{{turgon_eps/}}
\renewcommand{\figurename}{Fig.}
\newcommand{\topcaption}{%
\setlength{\abovecaptionskip}{0pt}%
\setlength{\belowcaptionskip}{10pt}%
\caption}
\numberwithin{equation}{section}
\newcommand{\defeq}{\ensuremath{\buildrel {\text{def}}\over{=}}}
\title{
%
(Drafting) Unstructured Meshes for the Conservation Element and Solution
Element Method
%
}
\author{
%
Yung-Yu Chen
%
}
\begin{document}
\maketitle
\begin{abstract}
%
Describe how the unstructured meshes work for the conservation element and
solution element (CESE) method and SOLVCON.
%
\end{abstract}
\section{Unstructured Meshes Concepts}
%
\label{s:concept}
The conservation element and solution element (CESE) method is developed
against the set-up of unstructured meshes in multi-dimensional
space\cite{mavriplis_unstructured_1997, wang_2d_1999}. In contrast to
structured meshes, unstructured meshes allow flexible connectivity and simplex
elements. The implementation, i.e., the data structures and the computer code
for their algorithms, of unstructured meshes dictate how simulation software
operates. It serves two purposes: numerical methods for simulation and mesh
generation. SOLVCON already includes code for the former and starts to plan
for the latter.
The library for unstructured meshes offers three functionalities:
%
\begin{enumerate}
%
\item Resource management: allocation, deallocation, and tracking.
%
\item Geometrical entity creation, read, update, and deletion (CRUD).
%
\item Spatial indexing.
%
\end{enumerate}
\clearpage
%
\section{Data Store}
%
\label{s:storage}
Most operations on meshes done by the simulation are reading. The mesh is
usually assumed to be constant. Numerical methods may use moving meshes, but
it is an advanced topic that should be treated separately.
SOLVCON uses a set of lookup tables to store the unstructured mesh. The
technique is commonly seen in unstructured-mesh solvers for the efficient
memory use. The CESE method is finite-volume-based and associates variables
with volume centers. The data store optimizes for easily reading values for
discrete volume, and thus defines \textit{cell}, \textit{face}, and
\textit{node}. Cells are the discrete volume for the space of interest. Faces
are the interface between two cells. Nodes represent the coordinates in space.
A mesh is also a Voronoi diagram, and the ``cell'' is a \textit{Voronoi
cell}\cite{berg_computational_2010}. At this point, it's not straight-forward
why the three concepts are fundamental to the CESE method. It may be revealed
in detail discussions later.
SOLVCON allows mixing elements of different shapes. The mesh definition data
are are listed in Table~\ref{t:elm:meta}, \ref{t:subent1d}, \ref{t:subent2d},
\ref{t:subent3d} and Figure~\ref{f:elm2d}, \ref{f:elm3d}. The code for
unstructured meshes in SOLVCON has been organized to a C++ library
\href{https://github.com/solvcon/solvcon/tree/master/libmarch}{\texttt{libmarch}}.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\begin{table}[h]
\centering
\topcaption{
%
Meta data of the unstructured-mesh elements.
%
}
\label{t:elm:meta}
\begin{tabular}{lrrrrr}
\toprule
Name & Type & Dimension & Number of & Number of & Number of \\
& & & Points & Lines & Surfaces \\
\midrule
Point & 0 & 0 & 1 & (n/a) 0 & (n/a) 0 \\
Line & 1 & 1 & 2 & (n/a) 0 & (n/a) 0 \\
Quadrilateral & 2 & 2 & 4 & 4 & (n/a) 0 \\
Triangle & 3 & 2 & 3 & 3 & (n/a) 0 \\
Hexahedron & 4 & 3 & 8 & 12 & 6 \\
Tetrahedron & 5 & 3 & 4 & 6 & 4 \\
Prism & 6 & 3 & 6 & 9 & 5 \\
Pyramid & 7 & 3 & 5 & 8 & 5 \\
\bottomrule
\end{tabular}
\end{table}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\begin{table}[h]
\centering
\topcaption{
%
The relation between a one-dimensional element and its sub-entities.
%
}
\label{t:subent1d}
\begin{tabular}{lll}
\toprule
Shape (type) & Face & = Node \\
\midrule
Line (1) & 0 & 0 \\
& 1 & 1 \\
\bottomrule
\end{tabular}
\end{table}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\begin{table}[h]
\centering
\topcaption{
%
The relations between two-dimensional elements and their sub-entities. Both of
two-dimensional elements are enclosed by straight lines. Node orientation of
two-dimensional elements is defined in Fig.~\ref{f:elm2d}.
%
}
\label{t:subent2d}
\begin{tabular}{lll}
\toprule
Shape (type) & Face & = Line formed by nodes \\
\midrule
Quadrilateral (2) & 0 & $\diagup$ 0 1 \\
& 1 & $\diagup$ 1 2 \\
& 2 & $\diagup$ 2 3 \\
& 3 & $\diagup$ 3 0 \\
\midrule
Triangles (3) & 0 & $\diagup$ 0 1 \\
& 1 & $\diagup$ 1 2 \\
& 2 & $\diagup$ 2 0 \\
\bottomrule
\end{tabular}
\end{table}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\begin{table}[h]
\centering
\topcaption{
%
The relations between three-dimensional elements and their sub-entities.
Three-dimensional elements are enclosed by triangles or quadrilaterals, or a
combination of them. $\square$ in the third column denotes quadrilaterals,
while $\triangle$ triangles. Nodes in the third column are ordered so that the
normal vector of a surface points outward from the volume by following
right-hand rule. Node orientation of three-dimensional elements is defined in
Fig.~\ref{f:elm3d}.
%
}
\label{t:subent3d}
\begin{tabular}{lll}
\toprule
Shape (type) & Face & = Surface formed by nodes \\
\midrule
Hexahedron (4) & 0 & $\square$ 0 3 2 1 \\
& 1 & $\square$ 1 2 6 5 \\
& 2 & $\square$ 4 5 6 7 \\
& 3 & $\square$ 0 4 7 3 \\
& 4 & $\square$ 0 1 5 4 \\
& 5 & $\square$ 2 3 7 6 \\
\midrule
Tetrahedron (5) & 0 & $\triangle$ 0 2 1 \\
& 1 & $\triangle$ 0 1 3 \\
& 2 & $\triangle$ 0 3 2 \\
& 3 & $\triangle$ 1 2 3 \\
\midrule
Prism (6) & 0 & $\triangle$ 0 1 2 \\
& 1 & $\triangle$ 3 5 4 \\
& 2 & $\square$ 0 3 4 1 \\
& 3 & $\square$ 0 2 5 3 \\
& 4 & $\square$ 1 4 5 2 \\
\midrule
Pyramid (7) & 0 & $\triangle$ 0 4 3 \\
& 1 & $\triangle$ 1 4 0 \\
& 2 & $\triangle$ 2 4 1 \\
& 3 & $\triangle$ 3 4 2 \\
& 4 & $\square$ 0 3 2 1 \\
\bottomrule
\end{tabular}
\end{table}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\begin{figure}[h]
\centering
\subfigure[]{
\includegraphics{elm_ln.eps}
\label{f:elm2d:ln}
}
\subfigure[]{
\includegraphics{elm_quad.eps}
\label{f:elm2d:quad}
}
\subfigure[]{
\includegraphics{elm_tri.eps}
\label{f:elm2d:tri}
}
\caption{
%
Node definition of one- and two-dimensional mesh elements in SOLVCON:
%
\subref{f:elm2d:ln} Line (type number 1).
%
\subref{f:elm2d:quad} Quadrilateral (type number 2).
%
\subref{f:elm2d:tri} Triangle (type number 3).
%
}
\label{f:elm2d}
\end{figure}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\begin{figure}[h]
\centering
\subfigure[]{
\includegraphics{elm_hex.eps}
\label{f:elm3d:hex}
}
\subfigure[]{
\includegraphics{elm_tet.eps}
\label{f:elm3d:tet}
}
\subfigure[]{
\includegraphics{elm_psm.eps}
\label{f:elm3d:psm}
}
\subfigure[]{
\includegraphics{elm_pym.eps}
\label{f:elm3d:pym}
}
\caption{
%
Node definitions of three-dimensional mesh elements in SOLVCON:
%
\subref{f:elm3d:hex} Hexahedron (type number 4).
%
\subref{f:elm3d:tet} Tetrahedron (type number 5).
%
\subref{f:elm3d:psm} Prism (type number 6).
%
\subref{f:elm3d:pym} Pyramid (type number 7).
%
}
\label{f:elm3d}
\end{figure}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\clearpage
\section{The CESE Method Dual Mesh}
\label{s:cese_dual}
Figure~\ref{f:mesh_2d_tri} exhibits 6 triangles as an example of mesh elements
for the CESE method. The CESE method evaluates the solutions at the centroids
of conservation elements (CEs). The centroids are the solution points and are
used to construct the solution elements (SEs). The element centers and the
mesh vertices consist of the conservation elements. The conservation element
is the space-time dual mesh defined on the unstructured mesh for the CESE
method. See Figure~\ref{f:mesh_2d_ce}.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\begin{figure}[h]
\centering
\includegraphics{mesh_2d_tri.eps}
\caption{Triangular mesh in two-dimensional space.}
\label{f:mesh_2d_tri}
\end{figure}
\begin{figure}[h]
\centering
\includegraphics{mesh_2d_ce.eps}
\caption{Conservation elements of triangular meshes.}
\label{f:mesh_2d_ce}
\end{figure}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\clearpage
The CESE method $c$-scheme composes of evaluations of conservation and
gradients. The first part assumes the gradients of the previous half time step
as known to calculate the primary variables. The second part calculates the
first-order derivative. To calculate the first-order derivative, we define
\textit{gradient elements} (GEs)\cite{chen_multi-physics_2011}. There are two
types of GEs: \textit{fundamental GE} (FGE) and \textit{generalized GE} (GGE).
A FGE is an simplex in $\mathbb{E}^N$ space. It always has $N+1$ vertices. A
GGE is a convex element composes of multiple non-overlapping FGEs that are
separated by the GGE centroid.
In a FGE, the gradient of a scalar function $\phi(\mathbf{x})$ is assumed to be
constant, and denoted by
\begin{align}
\mathbf{g} \defeq \nabla\phi \label{e:fge:grad}
\end{align}
Let $\mathbf{x}^{(i)}$, $i = 0, 1, \ldots, N$ be the coordinates of the
vertices of a FGE. The coordinates define $N$ \textit{displacement vectors}
\begin{align}
\mathbf{d}^{(i)} \defeq \mathbf{x}^{(i)} - \mathbf{x}^{(0)},
\quad i = 1, \ldots, N \label{e:fge:dis_vec}
\end{align}
Combine all the displacement vectors to write the \textit{displacement matrix}
\begin{align}
D \defeq \left(\begin{array}{ccc}
d^{(1)}_1 & \hdots & d^{(1)}_N \\
\vdots & \ddots & \vdots \\
d^{(N)}_1 & \hdots & d^{(N)}_N
\end{array}\right) \label{e:fge:dis_mat}
\end{align}
Define
\begin{align}
\mathbf{q} \defeq \left(\begin{array}{c}
\phi(\mathbf{x}^{(1)}) - \phi(\mathbf{x}^{(0)}) \\
\vdots \\
\phi(\mathbf{x}^{(N)}) - \phi(\mathbf{x}^{(0)})
\end{array}\right) \label{e:fge:dif_vec}
\end{align}
and call it the \textit{difference vector}. The system equation $\mathbf{q} =
\mathrm{D}\mathbf{g}$ can be written. $\mathbf{q}$ and $\mathrm{D}$ are known
and $\mathbf{g}$ is unknown. Write
\begin{align}
\mathbf{g} = \mathrm{D}^{-1}\mathbf{q} \label{e:fge:solve_grad}
\end{align}
The gradient $\mathbf{g}$ defined in Eq.~(\ref{e:fge:grad}) is determined by
Eqs~(\ref{e:fge:dis_vec}), (\ref{e:fge:dis_mat}), (\ref{e:fge:dif_vec}), and
(\ref{e:fge:solve_grad}).
The gradient of a GGE is approximated by the average gradient at its centroid
\begin{align}
\mathbf{g}^c \defeq \frac{1}{M} \sum_{i=0}^{M-1} \mathbf{g}^{(i)}
\label{e:gge:grad:centroid}
\end{align}
where $\mathbf{g}^{(0)}, \mathbf{g}^{(1)}, \ldots, \mathbf{g}^{(M-1)}$ are the
gradient of its FGEs. If the GGE is a simplex, i.e., $M = N+1$, it can be
shown that $\mathbf{g}^c$ is equal to the gradient calculated by treating the
GGE as a FGE and applying Eq.~\ref{e:fge:solve_grad}.
Equation \ref{e:gge:grad:centroid} leads to more interesting weighting
functions for approximating GGE gradient for treating discontinuity. The W-1
scheme uses
\begin{align}
\mathbf{g}^{c} \approx \dfrac{
\sum\limits_{i=0}^{M-1}\left(\rho^{(i)}\right)^{\alpha}\mathbf{g}^{(i)}
}{
\sum\limits_{i=0}^{M-1}\left(\rho^{(i)}\right)^{\alpha}
}
\end{align}
where the weighting coefficients
\begin{align}
\rho^{(i)} \defeq \prod_{k=0; k\neq i}^{M-1}
\left\vert\mathbf{g}^{(k)}\right\vert,
\quad i = 0, \ldots, M-1
\end{align}
and $\alpha$ an adjustable parameter, usually a natural number.
\clearpage
\addcontentsline{toc}{chapter}{Bibliography}
%\bibliographystyle{myunsrtnat} % no sort (order in appearance)
\bibliographystyle{myplainnat} % sort by author
\bibliography{turgon_main}
\end{document}
% vim: set ff=unix fenc=utf8 et sw=2 ts=2 tw=79: