格子Boltzmann方法在GPU的实现及加速

 2022-05-17 09:05

论文总字数:36275字

%本模板在CTEX2.8版本下编辑,运行两遍PDFLatex编译通过

%论文封面需要Word单独制作

\documentclass[oneside,openany,12pt]{cctbook}

%\documentclass[11pt]{article} 这是一般发表论文的格式

\zihao{3}\ziju{0.15}

\pagestyle{myheadings} \textwidth 16.0cm \textheight 22 truecm

\special{papersize=21.0cm,29.7cm} \headheight=1.5\ccht

\headsep=20pt \footskip=12pt \topmargin=0pt \oddsidemargin=0pt

\setcounter{section}{0}

\frontmatter

\def\nn{\nonumber}

\newcommand{\lbl}[1]{\label{#1}}

\newcommand{\bib}[1]{\bibitem{#1} \qquad\framebox{\scriptsize #1}}

\renewcommand{\baselinestretch}{1.5}

\newtheorem{theorem}{定理}

\newtheorem{proposition}{命题}

\newtheorem{lemma}{引理}

\newtheorem{remark}{Remark}

\newtheorem{corollary}{推论}

\newtheorem{defi}{定义}

\newcommand{\be}{\begin{equation}}

\newcommand{\ee}{\end{equation}}

%\def\c{\theta}

\newcounter{local}

\newcounter{locallocal}

\newcommand{\scl}{\stepcounter{local}}

\setcounter{local}{0}

%\renewcommand{\theequation}{\arabic{chapter}.\arabic{section}.\arabic{local}}

\renewcommand{\theequation}{\arabic{chapter}.\arabic{equation}}

%\renewcommand{\theequation}{\arabic{local}.\arabic{local}}

\def\s#1{\setcounter{local}{#1}}

%\usepackage[nooneline,center]{caption2}

%\usepackage[dvips]{graphics,color}

\usepackage{Picinpar}

\usepackage{amsmath,amssymb}

\usepackage{graphicx}

\usepackage{flafter}

\usepackage{fancyhdr}

\usepackage{mathrsfs}

\usepackage{placeins}

\usepackage{epstopdf}

\usepackage{epsf}

%%%%%%%%%%%%%%%%%%%%%%%%%%%设置页眉双下划线%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\makeheadrule}{%

\makebox[0pt][l]{\rule[0.55\baselineskip]{\headwidth}{0.4pt}}%

\rule[0.7\baselineskip]{\headwidth}{0.4pt}}

\renewcommand{\headrule}{%

{\if@fancyplain\let\headrulewidth\plainheadrulewidth\fi

\makeheadrule}}

\makeatother

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\pagestyle{fancy}

\renewcommand{\chaptermark}[1]{\markboth{\kaishu{\chaptername}~~~#1~}{}} %设置页眉章节

\fancyhead[l]{\kaishu{~~~东~南~大~学~本~科~毕~业~论~ 文}}

\fancyhead[c]{}

\fancyhead[r]{\leftmark}

\fancyfoot[l]{}

\fancyfoot[c]{\thepage}

\fancyfoot[r]{}

\begin{document}

\begin{titlepage} %从此到 \end{titlepage} 的内容第一页不编页号,以后的编页号

\end{titlepage}

\frontmatter %从 \frontmatter 到 \mainmatter 处的内容可在目录中出现但不编章号

%从 \backmatter 以后的内容也在目录中出现但不编章号

\begin{center}{\kaishu \LARGE{格子Boltzmann方法在GPU 的实现及加速}}\end{center}

\vskip 0.5cm

\begin{center}{\kaishu\zihao{4} 摘\ \ \ \ 要}

\end{center} 

\addcontentsline{toc}{chapter}{摘\ \ \ \ 要} {\kaishu \ \

Caputo型时间低扩散方程具有重大物理意义,经常被用来描述反常扩散现象。然而与经典偏微分方程类似,经常很难甚至不可能得到解析解,所以需要研究其数值解。

格子Boltzmann方法(LB)是一种基于分子动理论的介观数值方法,在多孔介质中的流体流动、湍流等领域取得了巨大的成功,与传统数值方法相比具有计算效率高,边界处理简单等优点。

然而由于Caputo分数阶导数自身的性质,现有的Caputo 型时间低扩散方程的LB模型运算速度慢,内存占用大,难以应用到高维问题等。

本文首先讨论了已有的Caputo型时间低扩散方程的LB模型,其次讨论了Caputo分数阶导数的快速算法,研究了基于CUDA 的LB并行算法,并基于这两个算法对原模型进行优化改进。

在论文最后,针对二维和三维的问题,我们在不同的参数下进行计算,并对比了不同算法优化后LB模型的计算效率,发现这两种算法对于LB模型的计算效率均有较大提升。

\vskip 1cm \noindent{\kaishu 关键词: \ 格子Boltzmann 方法,\ GPU计算, \

CUDA, \ Caputo分数阶导数}

\newpage

\thispagestyle{plain}

\begin{center}{\rm Implementation of GPU Based Lattice Boltzmann Method}\end{center}

\vskip 0.5cm

\begin{center}{\rm\zihao{4} Abstract}

\end{center}

\addcontentsline{toc}{chapter}{Abstract}

\par

The time sub-diffusion equation in Caputo sense has great significance in physical and is often used to describe the anomalous diffusion. However, similar to the classical PDEs, it is also difficult or even impossible to get the exact solutions. Therefore, the study of their numerical solutions is to solve the key.

Lattice Boltzmann Method (LB) is a mesoscopic numerical method based on molecular motion theory. It has already been successfully applied in fluid flow in porous media and turbulence. Compared with traditional numerical methods, it has a high computational efficiency and a simple boundary processing.

However, due to Caputo fractional derivative itself, the existing LB model of the time sub-diffusion equation in Caputo has great drawbacks, including long computing time, large RAM consumption, being difficult to extend to high-dimensional problems and so on.

In this paper, we will first discuss the existing LB model of the time sub-diffusion equation in Caputo.

Secondly, the fast evaluation of the Caputo fractional derivative is discussed, together with the LB model based on CUDA. After each of that, the improved LB model is given.

At the end of the paper, for 2-D and 3-D problems under different parameter values, we compared the efficiency of the improved LB model on different algorithms. It is found that both two algorithms offer a great improvement on the LB model, and they can be used superimposed.

\vskip 0.8cm \noindent{\rm Key Words:\ Lattice Boltzmann method,\ GPU computing, \

CUDA, \ Caputo derivative}

\tableofcontents

%\mainmatter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newpage

\mainmatter

%\markboth{\protect

%\scriptsize{\underline{\underline{\hspace{1cm}{\bf

%东~南~大~学~毕~业~设~计~报~告}\hspace{0.5cm}{\bf 第一章 \qquad 引言}

% \hspace{1cm}}}}}

% {\protect \scriptsize{

% \underline{\underline{\hspace{1cm}{\bf 东~南~ 大~学~ 毕~业~设~计~报~告}\hspace{7cm}{\songti

% 第一章 \qquad 引言 }\hspace{1.5cm}}}}}

\chapter{研究背景}

\s0 \vskip 3mm

分数阶微分方程是经典整数阶微分方程的推广,它是通过将整数阶的导数用分数阶导数来替换而产生的。因而,分数阶微积分的历史久远,甚至可以追溯到经典微积分方程的起源。但是,由于科学技术发展的限制且长期没有得到实际应用,分数阶微分方程发展得十分缓慢。然而在近几十年里,分数阶微积分受到了物理科学家和数学家的高度关注,因为它们能够准确的表达包括生物学、生态学和控制学系统在内的许多应用科学中的物理过程\cite{F1,F2}。

反常扩散现象,也称为非高斯过程,通常出现在高度非均匀介质的复杂无序系统中。在过去的几年里,一般采用在时间和空间上包含分数阶导数的低扩散方程来模拟此现象,包括分数随机游走、波传播、分形等。

分数阶微分方程的数学和数值分析成为一个深入研究的课题。在文献\cite{FAST3}中,有几个不同的分数阶时间导数的定义,包括 Riemann-Liouville (RL)分数阶导数、Gr\"unwald-Letnikov (GL)分数阶导数和 Caputo分数阶导数。 很容易看出 GL 分数阶导数与 RL 分数阶导数定义类似,两者都需要分数类型的初始值,而且其物理解释并不十分清楚。另一方面,Caputo分数阶导数以整数阶微分方程为初始值,且常量的Caputo 分数阶导数为零,就像人们对整数阶导数的预期一样。因而在本文中,在时间导数方面我们采用Caputo 分数阶导数。

与经典偏微分方程类似,分数阶偏微分方程也很难甚至不可能得到解析解。为此,开发了许多数值方法来求解分数偏微分方程,如有限差分法、有限元法等。然而,由于计算成本昂贵,上述数值方法大多无法轻易扩展到解决三维问题。

格子Boltzmann方法\cite{LB2}(LB)是一种基于分子动理论的介观数值方法,自上世纪80年代末期开始逐渐流行起来。与传统数值计算方法相比,LB方法具有演化过程简单,计算效率高,易于处理复杂边界等优点。至今,LB方法在多个领域取得了巨大的成功,例如多孔介质中的流体流动、湍流、多相和多分量流动等等。应用Caputo型时间低扩散方程的新LB模型来求解反常扩散问题也应运而生。

在数值模拟中,可以将Caputo分数阶导数离散化,若基于每个子区间上的分段线性插值而生成的离散化方案,称为L1 近似,还有使用分段高阶多项式插值得到的高阶格式。这些方法要求存储第n步以前的所有信息,

因此,存在两个瓶颈,长时间的模拟和大规模的数据存储。所以,我们希望寻求计算效率更高,存储更小的近似算法,来优化模型。

在文献\cite{FAST}中,已经给出了一种利用Caputo分数阶导数的快速算法来研究分数阶扩散方程数值解法。

该论文证明了Caputo分数阶导数的快速算法,可以应用到标准有限差分格式来求解分数扩散方程,而且所得到的求解时间低扩散方程的算法既有效又稳定。在本篇论文中,我们应用该Caputo 分数阶导数的快速算法,来优化时间低扩散方程的LB模型,从而提高计算效率。

剩余内容已隐藏,请支付后下载全文,论文总字数:36275字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;