Commit 52eea1c0 authored by sfritschi's avatar sfritschi
Browse files

Updated thesis

parent e8318623
......@@ -45,13 +45,17 @@
\newlabel{fig:balance}{{1}{4}{Pressures $p_{\mathrm {in}}$ and $p_{\mathrm {out}}$ are applied to in-pores and out-pores respectively, driving the network flow. The resulting pressure system is solved with the available solvers and the different fluxes are shown for the individual pores in the case of PETSc (using 4 processes). Since the sequential solvers produce an identical plot, they are omitted here. \relax }{figure.caption.1}{}}
\@writefile{toc}{\defcounter {refsection}{0}\relax }\@writefile{toc}{\contentsline {section}{\numberline {3}Parallel Network Generation}{4}{section.3}\protected@file@percent }
\@writefile{toc}{\defcounter {refsection}{0}\relax }\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}Cell Lists}{4}{subsection.3.1}\protected@file@percent }
\@writefile{lof}{\defcounter {refsection}{0}\relax }\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces Cell lists visualized in 2D. The neighborhood of the pore highlighted in red is marked in blue. Because the cell-size is the maximally permissible throat length $L_m$, only the pores contained within the blue region must be considered during neighbor search. Finally, the periodic buffer layers, containing copies of pores on the opposite side from the interior, are painted in orange.\relax }}{5}{figure.caption.2}\protected@file@percent }
\newlabel{fig:cell}{{2}{5}{Cell lists visualized in 2D. The neighborhood of the pore highlighted in red is marked in blue. Because the cell-size is the maximally permissible throat length $L_m$, only the pores contained within the blue region must be considered during neighbor search. Finally, the periodic buffer layers, containing copies of pores on the opposite side from the interior, are painted in orange.\relax }{figure.caption.2}{}}
\@writefile{toc}{\defcounter {refsection}{0}\relax }\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Iterative Algorithm}{5}{subsection.3.2}\protected@file@percent }
\@writefile{lot}{\defcounter {refsection}{0}\relax }\@writefile{lot}{\contentsline {table}{\numberline {1}{\ignorespaces Sample run of parallel pore-connecting algorithm using 4 threads. The generated network is 3 times as large as the base network in all directions. The maximal feasible number of throats is 103464, of which 1015 were not realized due to falling below the threshold of 1\%.\relax }}{5}{table.caption.2}\protected@file@percent }
\newlabel{table:iter}{{1}{5}{Sample run of parallel pore-connecting algorithm using 4 threads. The generated network is 3 times as large as the base network in all directions. The maximal feasible number of throats is 103464, of which 1015 were not realized due to falling below the threshold of 1\%.\relax }{table.caption.2}{}}
\@writefile{loa}{\defcounter {refsection}{0}\relax }\@writefile{loa}{\contentsline {algorithm}{\numberline {1}{\ignorespaces Connect pores in parallel\relax }}{6}{algorithm.1}\protected@file@percent }
\newlabel{alg:connect}{{1}{6}{Connect pores in parallel\relax }{algorithm.1}{}}
\@writefile{toc}{\defcounter {refsection}{0}\relax }\@writefile{toc}{\contentsline {section}{\numberline {A}PETSc Installation}{6}{appendix.A}\protected@file@percent }
\newlabel{appendix:install}{{A}{6}{PETSc Installation}{appendix.A}{}}
\@writefile{lot}{\defcounter {refsection}{0}\relax }\@writefile{lot}{\contentsline {table}{\numberline {1}{\ignorespaces Sample run of parallel pore-connecting algorithm using 4 threads. The generated network is 3 times as large as the base network in all directions. The maximal feasible number of throats is 103464, of which 1015 were not realized due to falling below the threshold of 1\%.\relax }}{7}{table.caption.3}\protected@file@percent }
\newlabel{table:iter}{{1}{7}{Sample run of parallel pore-connecting algorithm using 4 threads. The generated network is 3 times as large as the base network in all directions. The maximal feasible number of throats is 103464, of which 1015 were not realized due to falling below the threshold of 1\%.\relax }{table.caption.3}{}}
\@writefile{toc}{\defcounter {refsection}{0}\relax }\@writefile{toc}{\contentsline {section}{\numberline {A}PETSc Installation}{7}{appendix.A}\protected@file@percent }
\newlabel{appendix:install}{{A}{7}{PETSc Installation}{appendix.A}{}}
\@writefile{toc}{\defcounter {refsection}{0}\relax }\@writefile{toc}{\contentsline {section}{\numberline {B}Base Network}{7}{appendix.B}\protected@file@percent }
\newlabel{appendix:base}{{B}{7}{Base Network}{appendix.B}{}}
\abx@aux@refcontextdefaultsdone
\abx@aux@defaultrefcontext{0}{MEYER2021103936}{none/global//global/global}
\abx@aux@defaultrefcontext{0}{MEYER2021101592}{none/global//global/global}
......
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex 2021.4.27) 30 NOV 2021 15:18
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex 2021.4.27) 30 NOV 2021 22:10
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
......@@ -896,22 +896,22 @@ File: l3backend-pdfmode.def 2020-02-03 L3 backend support: PDF mode
(./thesis.aux)
\openout1 = `thesis.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 28.
LaTeX Font Info: ... okay on input line 28.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 28.
LaTeX Font Info: ... okay on input line 28.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 28.
LaTeX Font Info: ... okay on input line 28.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 28.
LaTeX Font Info: ... okay on input line 28.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 28.
LaTeX Font Info: ... okay on input line 28.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 28.
LaTeX Font Info: ... okay on input line 28.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 28.
LaTeX Font Info: ... okay on input line 28.
LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 28.
LaTeX Font Info: ... okay on input line 28.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 29.
LaTeX Font Info: ... okay on input line 29.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 29.
LaTeX Font Info: ... okay on input line 29.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 29.
LaTeX Font Info: ... okay on input line 29.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 29.
LaTeX Font Info: ... okay on input line 29.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 29.
LaTeX Font Info: ... okay on input line 29.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 29.
LaTeX Font Info: ... okay on input line 29.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 29.
LaTeX Font Info: ... okay on input line 29.
LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 29.
LaTeX Font Info: ... okay on input line 29.
Package biblatex Info: Trying to load language 'english'...
Package biblatex Info: ... file 'english.lbx' found.
......@@ -927,8 +927,8 @@ Package biblatex Info: Trying to load bibliographic data...
Package biblatex Info: ... file 'thesis.bbl' found.
(./thesis.bbl)
Package biblatex Info: Reference section=0 on input line 28.
Package biblatex Info: Reference segment=0 on input line 28.
Package biblatex Info: Reference section=0 on input line 29.
Package biblatex Info: Reference segment=0 on input line 29.
Package caption Info: Begin \AtBeginDocument code.
Package caption Info: float package is loaded.
Package caption Info: hyperref package is loaded.
......@@ -958,7 +958,7 @@ File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
e
))
\AtBeginShipoutBox=\box110
Package hyperref Info: Link coloring OFF on input line 28.
Package hyperref Info: Link coloring OFF on input line 29.
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty
Package: nameref 2019/09/16 v2.46 Cross-referencing by name of section
......@@ -971,9 +971,9 @@ Package: gettitlestring 2019/12/15 v1.6 Cleanup title references (HO)
)
\c@section@level=\count448
)
LaTeX Info: Redefining \ref on input line 28.
LaTeX Info: Redefining \pageref on input line 28.
LaTeX Info: Redefining \nameref on input line 28.
LaTeX Info: Redefining \ref on input line 29.
LaTeX Info: Redefining \pageref on input line 29.
LaTeX Info: Redefining \nameref on input line 29.
(./thesis.out) (./thesis.out)
\@outlinefile=\write5
......@@ -983,47 +983,41 @@ LaTeX Info: Redefining \nameref on input line 28.
[1
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] [2]
<plots/flux_PETSC.png, id=70, 462.528pt x 346.896pt>
<plots/flux_PETSC.png, id=75, 462.528pt x 346.896pt>
File: plots/flux_PETSC.png Graphic file (type png)
<use plots/flux_PETSC.png>
Package pdftex.def Info: plots/flux_PETSC.png used on input line 72.
Package pdftex.def Info: plots/flux_PETSC.png used on input line 74.
(pdftex.def) Requested size: 276.00105pt x 207.01175pt.
[3] [4 <./plots/flux_PETSC.png>]
Overfull \vbox (5.3285pt too high) has occurred while \output is active []
LaTeX Warning: `h' float specifier changed to `ht'.
Overfull \vbox (8.34245pt too high) has occurred while \output is active []
[3]
Underfull \hbox (badness 10000) in paragraph at lines 78--78
[]\OT1/cmr/bx/n/14.4 Parallel Net-work
[]
[4 <./plots/flux_PETSC.png>]
[5]
Package hyperref Info: bookmark level for unknown algorithm defaults to 0 on in
put line 111.
LaTeX Warning: `h' float specifier changed to `ht'.
[5] [6] [7]
Package atveryend Info: Empty hook `BeforeClearDocument' on input line 163.
Package atveryend Info: Empty hook `AfterLastShipout' on input line 163.
put line 231.
[6] [7] [8]
Package atveryend Info: Empty hook `BeforeClearDocument' on input line 303.
Package atveryend Info: Empty hook `AfterLastShipout' on input line 303.
(./thesis.aux)
Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 163.
Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 163.
Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 303.
Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 303.
Package rerunfilecheck Info: File `thesis.out' has not changed.
(rerunfilecheck) Checksum: AA3CBB7EB769D633AAD438AE1872089A;581.
(rerunfilecheck) Checksum: 1B7571DBFF6EC6A1298F38F07740F126;630.
Package logreq Info: Writing requests to 'thesis.run.xml'.
\openout1 = `thesis.run.xml'.
)
Here is how much of TeX's memory you used:
26070 strings out of 483107
488688 string characters out of 5964630
1117583 words of memory out of 5000000
40667 multiletter control sequences out of 15000+600000
26209 strings out of 483107
491571 string characters out of 5964630
1149035 words of memory out of 5000000
40803 multiletter control sequences out of 15000+600000
540150 words of font info for 51 fonts, out of 8000000 for 9000
59 hyphenation exceptions out of 8191
60i,8n,60p,2000b,1258s stack positions out of 5000i,500n,10000p,200000b,80000s
60i,8n,60p,2036b,1256s stack positions out of 5000i,500n,10000p,200000b,80000s
</home/sev/.texlive2019/texmf-var/fonts/pk/ljfour/jknappen/ec/tcrm1000.600pk
></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb></usr
/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb></usr/share
......@@ -1038,10 +1032,10 @@ s/cm/cmsl10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/c
msy10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy7.p
fb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmti10.pfb></u
sr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb>
Output written on thesis.pdf (7 pages, 221338 bytes).
Output written on thesis.pdf (8 pages, 226902 bytes).
PDF statistics:
186 PDF objects out of 1000 (max. 8388607)
158 compressed objects within 2 object streams
27 named destinations out of 1000 (max. 500000)
98 words of extra memory for PDF output out of 10000 (max. 10000000)
197 PDF objects out of 1000 (max. 8388607)
168 compressed objects within 2 object streams
30 named destinations out of 1000 (max. 500000)
106 words of extra memory for PDF output out of 10000 (max. 10000000)
......@@ -8,3 +8,4 @@
\BOOKMARK [2][-]{subsection.3.1}{Cell Lists}{section.3}% 8
\BOOKMARK [2][-]{subsection.3.2}{Iterative Algorithm}{section.3}% 9
\BOOKMARK [1][-]{appendix.A}{PETSc Installation}{}% 10
\BOOKMARK [1][-]{appendix.B}{Base Network}{}% 11
No preview for this file type
No preview for this file type
......@@ -9,6 +9,7 @@
\usepackage[labelfont=bf]{caption} % figure captions (bold-face)
\usepackage{multicol} % multicolumn environment
\usepackage{tikz} % figures
\usepackage{xcolor} % color for cell lists picture
\usepackage{hyperref} % web-links
\usepackage{listings} % line break in verb environment
\usepackage{amsmath} % math commands
......@@ -48,12 +49,12 @@
\newpage
\begin{center} \Large{\textbf{Abstract}} \end{center}
\hspace{0.5cm}To study the flow properties of large void-space geometries found in porous media such as f.ex. soil or gravel, \cite{MEYER2021103936} describes and implements routines for the generation \& simulation of flow networks in the Python library \emph{netflow} \cite{MEYER2021101592}. Based on a relatively small base network acquired via tomographic scans, the generated flow network is of intermediate size (millions of pores). To extend this procedure to even larger networks (up to 100 millions of pores), parallel computing is employed for both generation of pore-networks as well as solving the flow for said networks. In the latter, we rely on existing MPI-based parallel solvers from the PETSc \cite{petsc-web-page} toolkit. See ~\ref{appendix:install} for installation details.
\hspace{0.5cm}To study the flow properties of large void-space geometries found in porous media such as f.ex. soil or gravel, \cite{MEYER2021103936} describes and implements routines for the generation \& simulation of flow networks in the Python library \emph{netflow} \cite{MEYER2021101592}. Based on a relatively small base network acquired via tomographic scans, the generated flow network is of intermediate size (millions of pores). To extend this procedure to even larger networks (up to 100 millions of pores), parallel computing is employed for both generation of pore-networks as well as solving the flow for said networks. In the latter, we rely on existing MPI-based parallel solvers from the PETSc \cite{petsc-web-page} toolkit. See Appendix ~\ref{appendix:install} for installation details.
\vspace{5ex}
\begin{multicols}{2}
\section{Introduction}
\hspace{0.5cm}Porous media are abundant in nature. Various types of soils harbor intricate networks that enable the flow of groundwater and subsequently the transport of important chemical compounds through the soil. To understand these natural phenomena, it is of key interest to study the flow through pore networks. However, this requires sufficiently large void-space geometries taken from porous bodies, which despite advances in scanning technologies, is infeasible. Additionally, in pursuit of simulation efficiency, the 3D images obtained from scans are converted into a simplified representation consisting of spherical pores (nodes), connected by cylindrical throats (edges). To overcome above size limitation, the paper from \cite{MEYER2021103936} outlines a procedure for generating random realizations of much larger flow networks, taking an existing base network, obtained from a scan of a porous medium, as input. Furthermore, this method is particularly useful for generating heterogeneous networks, characterized by an irregular pore distribution. This is done with dendrogram-based clustering of pores in the original network, followed by random rotations of said clusters. When performed repeatedly and arranged in a 3-dimensional grid of perturbed base network copies, the resulting network, carrying over pore statistics such as coordination number \& radius, preserves the irregular pore structure of the original network. The \emph{netflow} package that implements the mentioned algorithm also provides functionality for solving and analyzing the flow through such networks. The former of which is now to be parallelized in a distributed fashion, so that it may support larger networks with up to 100 millions of pores. In a further step, the network generation algorithm shall be complemented by a parallel shared memory approach, specifically for connecting the generated pores in the resulting network.
\hspace{0.5cm}Porous media are abundant in nature. Various types of soils harbor intricate networks that enable the flow of groundwater and subsequently the transport of important chemical compounds through the soil. To understand these natural phenomena, it is of key interest to study the flow through pore networks. However, this requires sufficiently large void-space geometries taken from porous bodies, which despite advances in scanning technologies, is infeasible. Additionally, in pursuit of simulation efficiency, the 3D images obtained from scans are converted into a simplified representation consisting of spherical pores (nodes), connected by cylindrical throats (edges). To overcome above size limitation, the paper from \cite{MEYER2021103936} outlines a procedure for generating random realizations of much larger flow networks, taking an existing base network (See Appendix ~\ref{appendix:base}), obtained from a scan of a porous medium, as input. Furthermore, this method is particularly useful for generating heterogeneous networks, characterized by an irregular pore distribution. This is done with dendrogram-based clustering of pores in the original network, followed by random rotations of said clusters. When performed repeatedly and arranged in a 3-dimensional grid of perturbed base network copies, the resulting network, carrying over pore statistics such as coordination number \& radius, preserves the irregular pore structure of the original network. The \emph{netflow} package that implements the mentioned algorithm also provides functionality for solving and analyzing the flow through such networks. The former of which is now to be parallelized in a distributed fashion, so that it may support larger networks with up to 100 millions of pores. In a further step, the network generation algorithm shall be complemented by a parallel shared memory approach, specifically for connecting the generated pores in the resulting network.
\section{Parallel Flow Solver}
\subsection{PETSc Interface}
......@@ -67,7 +68,8 @@
\end{multicols}
\begin{figure}[h]
\begin{figure}[ht]
\vspace{-0.5cm}
\centering
\includegraphics[width=0.8\textwidth]{plots/flux_PETSC.png}
\caption{Pressures $p_{\mathrm{in}}$ and $p_{\mathrm{out}}$ are applied to in-pores and out-pores respectively, driving the network flow. The resulting pressure system is solved with the available solvers and the different fluxes are shown for the individual pores in the case of PETSc (using 4 processes). Since the sequential solvers produce an identical plot, they are omitted here. }
......@@ -75,13 +77,148 @@
\end{figure}
\begin{multicols}{2}
\section{Parallel Network Generation}
\section[Parallel Network Generation]{Parallel Network\\ Generation}
\vspace{-0.25cm}
\hspace{0.5cm}The existing serial dendrogram-based network generation algorithm, as presented in \cite{MEYER2021101592}, is now modified. Concretely, to allow connecting all pores that populate the larger, generated network domain in parallel, we rely on a shared memory approach via the \verb|multiprocessing| Python module. To accomplish this, we first shift our attention to \emph{cell lists}, which offer a direct application of the already existing \textbf{maximal throat length} parameter $L_m$ as a suitable \textbf{cell size}.
\subsection{Cell Lists}
\hspace{0.5cm}To speed up neighbor search for the \emph{stationary} pores, we have opted to use the well-known cell lists data structure instead of the triangulation based approach outlined in \cite{MEYER2021103936}. This choice is supported by the useful properties of cell lists for our purpose of generating a network of similar pore-arrangement. It is also favorable over the triangulation method as the cell lists are only initialized once, and pores that have already been processed by the algorithm can be removed efficiently. Primarily however, it allows a straight-forward application of parallel computing, by distributing the work needed to find the neighbors of individual pores evenly. See figures TODO for further details.
\newpage
\hspace{0.5cm}To speed up neighbor search for the \emph{stationary} pores, we have opted to use the well-known cell lists data structure instead of the triangulation based approach outlined in \cite{MEYER2021103936}. This choice is supported by the useful properties of cell lists for our purpose of generating a network of similar pore-arrangement. It is also favorable over the triangulation method as the cell lists are only initialized once, and pores that have already been processed by the algorithm can be removed efficiently. Primarily however, it allows a straight-forward application of parallel computing, by distributing the work needed to find the neighbors of individual pores evenly. See Figure ~\ref{fig:cell} for a visualization.
\end{multicols}
\newpage
\begin{figure}[ht]
\vspace{-0.5cm}
\centering
\begin{tikzpicture}
\draw[black] (-3,-3) grid (3,3);
\draw[draw=orange, fill=orange!10!white] (-3, -3) grid (2, -2) rectangle (-3, -3);
\draw[draw=orange, fill=orange!10!white] (2, -3) grid (3, 3) rectangle (2, -3);
\draw[draw=orange, fill=orange!10!white] (-3, 2) grid (2, 3) rectangle (-3, 2);
\draw[draw=orange, fill=orange!10!white] (-3, -2) grid (-2, 2) rectangle (-3, -2);
\draw[draw=blue, fill=blue!10!white] (-2, -1) grid (1, 2) rectangle (-2, -1);
\node[anchor=north, black] at (-2.5, -3) {$0$};
\node[anchor=north, black] at (-1.5, -3) {$1$};
\node[anchor=north, black] at (-0.5, -3) {$2$};
\node[anchor=north, black] at (0.5, -3) {$3$};
\node[anchor=north, black] at (1.5, -3) {$4$};
\node[anchor=north, black] at (2.5, -3) {$5$};
\node[anchor=east, black] at (-3, -2.5) {$0$};
\node[anchor=east, black] at (-3, -1.5) {$1$};
\node[anchor=east, black] at (-3, -0.5) {$2$};
\node[anchor=east, black] at (-3, 0.5) {$3$};
\node[anchor=east, black] at (-3, 1.5) {$4$};
\node[anchor=east, black] at (-3, 2.5) {$5$};
% Points
\node[red] at (-0.5, 0.5) {\textbullet};
\node[black] at (0.79, 1.48) {\textbullet};
\node[black] at (0.79, -2.52) {\textbullet};
\node[black] at (0.30, -0.55) {\textbullet};
\node[black] at (-1.02, 0.86) {\textbullet};
\node[black] at (2.98, 0.86) {\textbullet};
\node[black] at (-1.73, 1.53) {\textbullet};
\node[black] at (2.27, 1.53) {\textbullet};
\node[black] at (-1.73, -2.47) {\textbullet};
\node[black] at (0.44, 1.26) {\textbullet};
\node[black] at (0.44, -2.74) {\textbullet};
\node[black] at (-0.64, 0.77) {\textbullet};
\node[black] at (0.72, -0.05) {\textbullet};
\node[black] at (-0.16, 1.25) {\textbullet};
\node[black] at (-0.16, -2.75) {\textbullet};
\node[black] at (-1.92, -0.76) {\textbullet};
\node[black] at (2.08, -0.76) {\textbullet};
\node[black] at (-1.95, 1.75) {\textbullet};
\node[black] at (2.05, 1.75) {\textbullet};
\node[black] at (-1.95, -2.25) {\textbullet};
\node[black] at (-0.90, -0.11) {\textbullet};
\node[black] at (-1.20, 1.88) {\textbullet};
\node[black] at (2.80, 1.88) {\textbullet};
\node[black] at (-1.20, -2.12) {\textbullet};
\node[black] at (-0.90, 0.70) {\textbullet};
\node[black] at (-1.65, 0.10) {\textbullet};
\node[black] at (2.35, 0.10) {\textbullet};
\node[black] at (1.49, 0.63) {\textbullet};
\node[black] at (-2.51, 0.63) {\textbullet};
\node[black] at (0.31, -0.98) {\textbullet};
\node[black] at (-0.24, 0.58) {\textbullet};
\node[black] at (-1.73, 1.63) {\textbullet};
\node[black] at (2.27, 1.63) {\textbullet};
\node[black] at (-1.73, -2.37) {\textbullet};
\node[black] at (1.25, 1.28) {\textbullet};
\node[black] at (-2.75, 1.28) {\textbullet};
\node[black] at (1.25, -2.72) {\textbullet};
\node[black] at (1.67, 1.06) {\textbullet};
\node[black] at (-2.33, 1.06) {\textbullet};
\node[black] at (1.67, -2.94) {\textbullet};
\node[black] at (1.32, -0.71) {\textbullet};
\node[black] at (-2.68, -0.71) {\textbullet};
\node[black] at (1.94, 1.21) {\textbullet};
\node[black] at (-2.06, 1.21) {\textbullet};
\node[black] at (1.94, -2.79) {\textbullet};
\node[black] at (0.15, 0.63) {\textbullet};
\node[black] at (-0.22, 1.79) {\textbullet};
\node[black] at (-0.22, -2.21) {\textbullet};
\node[black] at (1.76, 1.90) {\textbullet};
\node[black] at (-2.24, 1.90) {\textbullet};
\node[black] at (1.76, -2.10) {\textbullet};
\node[black] at (0.70, -1.21) {\textbullet};
\node[black] at (0.70, 2.79) {\textbullet};
\node[black] at (-1.78, 1.07) {\textbullet};
\node[black] at (2.22, 1.07) {\textbullet};
\node[black] at (-1.78, -2.93) {\textbullet};
\node[black] at (-1.67, 1.98) {\textbullet};
\node[black] at (2.33, 1.98) {\textbullet};
\node[black] at (-1.67, -2.02) {\textbullet};
\node[black] at (-1.84, 0.88) {\textbullet};
\node[black] at (2.16, 0.88) {\textbullet};
\node[black] at (1.33, 0.09) {\textbullet};
\node[black] at (-2.67, 0.09) {\textbullet};
\node[black] at (-0.28, -0.39) {\textbullet};
\node[black] at (-0.11, 1.31) {\textbullet};
\node[black] at (-0.11, -2.69) {\textbullet};
\node[black] at (1.62, -1.47) {\textbullet};
\node[black] at (-2.38, -1.47) {\textbullet};
\node[black] at (1.62, 2.53) {\textbullet};
\node[black] at (-0.44, 1.14) {\textbullet};
\node[black] at (-0.44, -2.86) {\textbullet};
\node[black] at (-1.50, 1.32) {\textbullet};
\node[black] at (2.50, 1.32) {\textbullet};
\node[black] at (-1.50, -2.68) {\textbullet};
\node[black] at (0.83, -1.10) {\textbullet};
\node[black] at (0.83, 2.90) {\textbullet};
\node[black] at (-1.63, -0.59) {\textbullet};
\node[black] at (2.37, -0.59) {\textbullet};
\node[black] at (-0.36, -1.09) {\textbullet};
\node[black] at (-0.36, 2.91) {\textbullet};
\node[black] at (-1.07, 1.10) {\textbullet};
\node[black] at (2.93, 1.10) {\textbullet};
\node[black] at (-1.07, -2.90) {\textbullet};
\node[black] at (0.62, -0.39) {\textbullet};
\node[black] at (1.34, -0.01) {\textbullet};
\node[black] at (-2.66, -0.01) {\textbullet};
\node[black] at (0.62, -1.62) {\textbullet};
\node[black] at (0.62, 2.38) {\textbullet};
\node[black] at (0.71, -1.45) {\textbullet};
\node[black] at (0.71, 2.55) {\textbullet};
\node[black] at (-1.70, 0.74) {\textbullet};
\node[black] at (2.30, 0.74) {\textbullet};
\node[black] at (0.78, 1.77) {\textbullet};
\node[black] at (0.78, -2.23) {\textbullet};
\node[black] at (-0.89, -1.07) {\textbullet};
\node[black] at (-0.89, 2.93) {\textbullet};
\node[black] at (-1.91, -0.38) {\textbullet};
\node[black] at (2.09, -0.38) {\textbullet};
\node[black] at (-1.74, 1.62) {\textbullet};
\node[black] at (2.26, 1.62) {\textbullet};
\node[black] at (-1.74, -2.38) {\textbullet};
\node[black] at (0.59, -1.09) {\textbullet};
\node[black] at (0.59, 2.91) {\textbullet};
\end{tikzpicture}
\caption{Cell lists visualized in 2D. The neighborhood of the pore highlighted in red is marked in blue. Because the cell-size is the maximally permissible throat length $L_m$, only the pores contained within the blue region must be considered during neighbor search. Finally, the periodic buffer layers, containing copies of pores on the opposite side from the interior, are painted in orange.}
\label{fig:cell}
\end{figure}
\begin{multicols}{2}
\subsection{Iterative Algorithm}
\hspace{0.5cm}To connect the generated pores by throats, we employ an \textbf{iterative} strategy. Beforehand however, the cell list is constructed based on the extent of the full domain (including periodic buffer layer) and cell-size $L_m$. Next, all pores are placed in their respective cell computed from their position. Now, for each pore and for each of its throats, which are copied from the base network and are sought to be realized, we find an \emph{ideal} match from its \textbf{neighboring cells}. Here, ideal refers to minimal absolute difference between physical distance of the pores and original length of the current throat $L_t$. Given position of $i$-th pore $\mathbf{p}_i$ and original throat length $L_t$ we seek:
\begin{equation}
......@@ -90,24 +227,7 @@
Where $\mathcal{N}(i)$ is the set of all pores in adjacent cells to pore $i$. Finding $j^*$ for different pores is \emph{embarrassingly parallel} and can therefore be computed by a large number of threads, storing their results in shared memory. Each thread works on an even chunk of the pores located \emph{inside} the domain. Subsequently, these ideal matches are connected, while avoiding \textbf{conflicts} of pores seeking a neighbor that is already fully-connected. Finally we repeat the two steps from above, now only considering pores that still have throats left in \emph{random} order (for improved \textbf{load balancing}), until only a specified \textbf{fraction of total feasible throats} are left e.g. $1\%$. Empirically, this process converges very fast and consistently, for different target sizes of the full domain, after merely 3-4 iterations. The first iteration alone leaves only $\approx 18\%$ of all possible throats left, see Table ~\ref{table:iter}. The procedure is summarized as pseudo-code in Algorithm ~\ref{alg:connect}.
\end{multicols}
\begin{table}[h]
\centering
\caption{Sample run of parallel pore-connecting algorithm using 4 threads. The generated network is 3 times as large as the base network in all directions. The maximal feasible number of throats is 103464, of which 1015 were not realized due to falling below the threshold of 1\%.}
\begin{tabular}{|c|c|c|}
\hline
\textbf{Iteration} & \textbf{Throats left} & \textbf{Rel. percentage} \\
\hline
0 & 103464 & 100.00\% \\
1 & 18676 & 18.1\% \\
2 & 5191 & 5.0\% \\
3 & 1996 & 1.9\% \\
4 & 1015 & 0.98\% \\
\hline
\end{tabular}
\label{table:iter}
\end{table}
\begin{algorithm}[h]
\begin{algorithm}[ht]
\caption{Connect pores in parallel}
\begin{algorithmic}
\State Initialize $cellList$ using $pores$ and compute $totalThroats$
......@@ -137,6 +257,23 @@
\label{alg:connect}
\end{algorithm}
\begin{table}[ht]
\centering
\caption{Sample run of parallel pore-connecting algorithm using 4 threads. The generated network is 3 times as large as the base network in all directions. The maximal feasible number of throats is 103464, of which 1015 were not realized due to falling below the threshold of 1\%.}
\begin{tabular}{|c|c|c|}
\hline
\textbf{Iteration} & \textbf{Throats left} & \textbf{Rel. percentage} \\
\hline
0 & 103464 & 100.00\% \\
1 & 18676 & 18.1\% \\
2 & 5191 & 5.0\% \\
3 & 1996 & 1.9\% \\
4 & 1015 & 0.98\% \\
\hline
\end{tabular}
\label{table:iter}
\end{table}
\newpage
\appendix
......@@ -156,6 +293,9 @@
\item Set environment flags \verb|PETSC_DIR| and \verb|PETSC_ARCH| as specified in the output of \verb|./configure| \& run \textbf{make all}.
\end{itemize}
\section{Base Network}
\label{appendix:base}
Throughout this paper we rely on existing networks obtained via tomographic scans to serve as base for \textbf{generation} of larger networks and \textbf{simulation} of network flow. Their statistics are detailed in the figures below.
\newpage
\centering
......
import numpy as np
nCells = [6, 6]
def cell_pos(pos):
from math import floor
return [floor(pos[i] + 3.) for i in range(2)]
def is_periodic(cellPos):
return not all([2 <= cellPos[i] and cellPos[i] <= 3 for i in range(2)])
def print_point(x, y):
x = np.round(x, 2)
y = np.round(y, 2)
print("\\node[black] at (%.2f, %.2f) {\\textbullet};" % (x, y))
if __name__ == '__main__':
nInterior = 10
nRest = 40
interiorX = np.random.uniform(-2, 1, (nInterior, 1))
interiorY = np.random.uniform(-1, 2, (nInterior, 1))
interior = np.hstack((interiorX, interiorY))
rest = np.random.uniform(-2, 2, (nRest, 2))
points = np.vstack((interior, rest))
for i in range(points.shape[0]):
pos = points[i, :]
cellPos = cell_pos(pos)
x = pos[0]
y = pos[1]
print_point(x, y)
if (is_periodic(cellPos)):
# Left/right side
if (x <= -1.):
print_point(x + 4., y)
elif (x >= 1.):
print_point(x - 4., y)
# Up/down side
if (y <= -1.):
print_point(x, y + 4.)
elif (y >= 1.):
print_point(x, y - 4.)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment