DAMASK_EICMD/documentation/SpectralMethod/FFT-Divergence.tex

228 lines
10 KiB
TeX

\documentclass[12pt,numbers,sort&compress]{article}
%% Use the option review to obtain double line spacing
%% \documentclass[authoryear,preprint,review,12pt]{elsarticle}
%% Use the options 1p,twocolumn; 3p; 3p,twocolumn; 5p; or 5p,twocolumn
%% for a journal layout:
%% \documentclass[final,1p,times]{elsarticle}
%% \documentclass[final,1p,times,twocolumn]{elsarticle}
%% \documentclass[final,3p,times]{elsarticle}
%% \documentclass[final,3p,times,twocolumn]{elsarticle}
%% \documentclass[final,5p,times]{elsarticle}
%% \documentclass[final,5p,times,twocolumn]{elsarticle}
%% if you use PostScript figures in your article
%% use the graphics package for simple commands
%% \usepackage{graphics}
%% or use the graphicx package for more complicated commands
%% \usepackage{graphicx}
%% or use the epsfig package if you prefer to use the old commands
%% \usepackage{epsfig}
%% The amssymb package provides various useful mathematical symbols
\usepackage[usenames,dvipsnames,pdftex]{color}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{siunitx}
%\usepackage{subeqnarray}
\usepackage[hang]{subfigure}
\usepackage{verbatim}
\usepackage{bm}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usepackage{booktabs}
\usepackage{graphicx}
\newcommand{\pathToFigures}{./figures}
\graphicspath{{\pathToFigures/}}
\DeclareGraphicsExtensions{.pdf,.png}
\usepackage[pdftex, % hyper-references for pdftex
bookmarksnumbered=true,% % generate bookmarks with numbers
pagebackref=true,% % generate backref in biblio
colorlinks=true,%
]{hyperref}%
%% The amsthm package provides extended theorem environments
%% \usepackage{amsthm}
%% The lineno packages adds line numbers. Start line numbering with
%% \begin{linenumbers}, end it with \end{linenumbers}. Or switch it on
%% for the whole article with \linenumbers.
%% \usepackage{lineno}
\newlength{\diagramsize}
\setlength{\diagramsize}{0.4\textwidth}
\newcommand{\question}[1]{\textcolor{Red}{#1}}
\newcommand{\note}[1]{\textcolor{CornflowerBlue}{#1}}
\newcommand{\term}[1]{\textsc{#1}}
\newcommand{\eref}[1]{Eq.~\eqref{#1}}
\newcommand{\Eref}[1]{Eq.~\eqref{#1}}
\newcommand{\erefs}[1]{Eqs.~\eqref{#1}}
\newcommand{\Erefs}[1]{Eqs.~\eqref{#1}}
\newcommand{\fref}[1]{Fig.~\ref{#1}}
\newcommand{\Fref}[1]{Fig.~\ref{#1}}
\newcommand{\frefs}[1]{Figs.~\ref{#1}}
\newcommand{\Frefs}[1]{Figs.~\ref{#1}}
\newcommand{\tref}[1]{Tab.~\ref{#1}}
\newcommand{\Tref}[1]{Tab.~\ref{#1}}
\newcommand{\trefs}[1]{Tabs.~\ref{#1}}
\newcommand{\Trefs}[1]{Tabs.~\ref{#1}}
\newcommand{\ie}{\textit{i.e.}}
\newcommand{\eg}{\textit{e.g.}}
\newcommand{\cf}{\textit{cf.}}
\newcommand{\Euler}{\textsc{Euler}}
\newcommand{\Gauss}{\textsc{Gauss}}
\newcommand{\kB}{\ensuremath{k_\text{B}}}
\newcommand{\transpose}[1]{\ensuremath{{#1}^{\mathrm T}}}
\newcommand{\inverse}[1]{\ensuremath{{#1}^{-1}}}
\newcommand{\invtranspose}[1]{\ensuremath{{#1}^{\mathrm{-T}}}}
\newcommand{\sign}[1]{\ensuremath{\operatorname{sgn}\left({#1}\right)}}
\newcommand{\grad}[1][]{\ensuremath{\operatorname{grad}{#1}}}
\newcommand{\Grad}[1][]{\ensuremath{\operatorname{Grad}{#1}}}
\newcommand{\divergence}[1][]{\ensuremath{\operatorname{div}{#1}}}
\newcommand{\Divergence}[1][]{\ensuremath{\operatorname{Div}{#1}}}
\newcommand{\totalder}[2]{\ensuremath{\frac{\inc{#1}}{\inc{#2}}}}
\newcommand{\partialder}[2]{\ensuremath{\frac{\partial{#1}}{\partial{#2}}}}
\newcommand{\inc}[1]{\ensuremath{\text d{#1}}}
\newcommand{\abs}[1]{\ensuremath{\left|{#1}\right|}}
\newcommand{\norm}[1]{\ensuremath{\left|\left|{#1}\right|\right|}}
\newcommand{\avg}[1]{\ensuremath{\bar{#1}}}
\newcommand{\fluct}[1]{\ensuremath{\tilde{#1}}}
\newcommand{\FT}[1]{\ensuremath{\hat{#1}}}
\newcommand{\domain}[1]{\ensuremath{\mathcal{#1}}}
\newcommand{\tnsrfour}[1]{\ensuremath{\mathbb{#1}}}
\newcommand{\tnsr}[1]{\ensuremath{\bm{#1}}}
\newcommand{\vctr}[1]{\ensuremath{\bm{#1}}}
\newcommand{\eyetwo}{\ensuremath{\tnsr I}}
\newcommand{\eyefour}{\ensuremath{\tnsrfour I}}
\newcommand{\stiffness}{\ensuremath{\tnsrfour D}}
\newcommand{\refStiffness}{\ensuremath{\avg{\tnsrfour D}}}
\newcommand{\fPK}{\ensuremath{\tnsr P}}
\newcommand{\sPK}{\ensuremath{\tnsr S}}
\newcommand{\F}[1][]{\ensuremath{\tnsr F^{#1}}}
\newcommand{\Favg}{\ensuremath{\avg{\F}}}
\newcommand{\Ffluct}{\ensuremath{\fluct{\F}}}
\newcommand{\Fp}[1][]{\ensuremath{\tnsr F_\text{p}^{#1}}}
\newcommand{\Fe}[1][]{\ensuremath{\tnsr F_\text{e}^{#1}}}
\newcommand{\Lp}{\ensuremath{\tnsr L_\text{p}}}
\newcommand{\Q}[1]{\ensuremath{\tnsr Q^{(#1)}}}
\newcommand{\x}[2][]{\ensuremath{\vctr x^{(#2)}_\text{#1}}}
\newcommand{\dg}[2][]{\ensuremath{\Delta\vctr g^{(#2)}_\text{#1}}}
\newcommand{\g}[1][]{\ensuremath{\vctr g_\text{#1}}}
\newcommand{\A}[2][]{\ensuremath{A^{(#2)}_\text{#1}}}
\newcommand{\N}[2]{\ensuremath{\varrho^{(#1)}_\text{#2}}}
\newcommand{\Burgers}[1]{\ensuremath{\vctr s^{(#1)}}}
\newcommand{\n}[1]{\ensuremath{\vctr n^{(#1)}}}
\newcommand{\m}[2]{\ensuremath{\vctr m^{(#1)}_{#2}}}
\newcommand{\ld}[1]{\ensuremath{\vctr p^{(#1)}}}
\newcommand{\velocity}[2]{\ensuremath{v^{(#1)}_\text{#2}}}
\newcommand{\avgvelocity}[2]{\ensuremath{{\bar v}^{(#1)}_ \text{#2}}}
\newcommand{\flux}[2]{\ensuremath{\vctr f^{(#1)}_ \text{#2}}}
\newcommand{\averageflux}[2]{\ensuremath{\bar{\vctr f}^{(#1)}_ \text{#2}}}
\newcommand{\interfaceflux}[2]{\ensuremath{\tilde{\vctr f}^{(#1)}_ \text{#2}}}
\newcommand{\transmissivity}[1]{\ensuremath{\chi^{(#1)}}}
\newcommand{\galpha}{\ensuremath{\gamma^{(\alpha)}}}
\newcommand{\dotgalpha}{\ensuremath{\dot{\gamma}^{(\alpha)}}}
\newcommand{\taualpha}{\ensuremath{\tau^{(\alpha)}}}
\newcommand{\taualphamax}{\ensuremath{\hat\tau^{(\alpha)}}}
\newcommand{\density}[2]{\ensuremath{\varrho^{(#1)}_ \text{#2}}}
\newcommand{\densityfunc}[2]{\ensuremath{{\tilde\varrho}^{(#1)}_ \text{#2}}}
\newcommand{\avgdensity}[2]{\ensuremath{{\bar\varrho}^{(#1)}_ \text{#2}}}
\newcommand{\dotdensity}[2]{\ensuremath{\dot{\varrho}^{(#1)}_ \text{#2}}}
\newcommand{\densityexcess}[2]{\ensuremath{\Delta\varrho^{(#1)}_ \text{#2}}}
\newcommand{\cs}[2][]{\ensuremath{\sigma^{(#1)}_ \text{#2}}}
%% Title, authors and addresses
%% use the tnoteref command within \title for footnotes;
%% use the tnotetext command for theassociated footnote;
%% use the fnref command within \author or \address for footnotes;
%% use the fntext command for theassociated footnote;
%% use the corref command within \author for corresponding author footnotes;
%% use the cortext command for theassociated footnote;
%% use the ead command for the email address,
%% and the form \ead[url] for the home page:
%% \title{Title\tnoteref{label1}}
%% \tnotetext[label1]{}
%% \author{Name\corref{cor1}\fnref{label2}}
%% \ead{email address}
%% \ead[url]{home page}
%% \fntext[label2]{}
%% \cortext[cor1]{}
%% \address{Address\fnref{label3}}
%% \fntext[label3]{}
\title{Calculation of Divergence in Fourier space}
%% use optional labels to link authors explicitly to addresses:
%% \author[label1,label2]{}
%% \address[label1]{}
%% \address[label2]{}
\author{M.~Diehl}
%% \linenumbers
% main text
\begin{document}
\maketitle
% ----------------------------------------------------------------------------------------------------------------------------
\section{Idea}
% ----------------------------------------------------------------------------------------------------------------------------
A field of 3x3 tensors in the form
\begin{equation}
\begin{pmatrix} P_{11} & P_{12} & P_{13}\\ P_{21} & P_{22} & P_{23} \\ P_{31} & P_{32}& P_{33} \end{pmatrix} = \tnsr{P}(\vec{x})
\end{equation}
depending on a discrete 3D vector $\vec x$ (spatial coordinates in real space)
\begin{equation}
\vec x \mathrm{~with~} x_1=1,2,...,N_1\mathrm{,~}x_2=1,2,...,N_2\mathrm{,~and~}x_3=1,2,...,N_3
\end{equation}
is transformed into Fourier space using the FFT (Subroutines provided by FFTW, 9 transforms of rank 3). The result is a 3x3 tensor field depending on the frequencies $\vec \xi$:
\begin{equation}
\hat{\tnsr P}(\vec \xi) = \mathcal{F}\left( \tnsr P(\vec x) \right)
\end{equation}
the divergence of a tensor is defined as:
\begin{equation}
\operatorname{div}\,(\tnsr P) =
\begin{pmatrix}
\frac{\partial P_{11}}{\partial x_1} +\frac{\partial P_{12}}{\partial x_2} +\frac{\partial P_{13}}{\partial x_3}\\[6pt]
\frac{\partial P_{21}}{\partial x_1} +\frac{\partial P_{22}}{\partial x_2} +\frac{\partial P_{23}}{\partial x_3}\\[6pt]
\frac{\partial P_{z1}}{\partial x_1} +\frac{\partial P_{z2}}{\partial x_2} +\frac{\partial P_{33}}{\partial x_3}
\end{pmatrix}
\end{equation}
It is a 3D vector. With
\begin{equation}\label{div}
\mathcal{F}(\frac{d^n f(x)}{dx^n}) = (2\pi i\xi)^n \hat{f}(\xi)
\end{equation}
follows:
\begin{equation}
\mathcal{F}\left(\operatorname{div}\,(\tnsr P) \right) = 2\pi i\vec \xi \times \hat{\tnsr P}(\vec \xi)
\end{equation}
Due to the order in which FFTW stores the array, the components of the 3D frequencies can be calculated by dividing a linear list $0,1,2,...N/2-1,\pm N/2,-(N/2-1),...,-2,-1$ by the sampling length in each dimension.
\section{Remarks}
The inverse transform of $\mathcal{F}\left(\operatorname{div}\,(\tnsr P) \right)$ (FFTW, 3 transforms of rank 3) gives the divergence field in real space.
If a complex-to-complex transform is done, $\hat{\tnsr P} (\vec \xi)$ possesses conjugate complex symmetry.
$\operatorname{div}\,(\hat{\tnsr P})(\vec xi) \right)$ also has conjugate complex symmetry as it would lead to a real-only divergence after the inverse transform. It can be seen for the simple derivative as given in formula eq.(\ref{div}) that the complex conjugate symmetry is preserved.
As the tensor $\tnsr P$ is a real-only tensor, it is possible to use a real-to-complex transform for the tensor field and a complex-to-real transform for the back transform of the divergence field. Than one of the dimensions should run from $0$ to $N/2+1$ only. That implies, that the divergence in Fourier space has conjugate complex symmetry.
The important think is that the highest frequencies are not correct for the DFT. Therefore, they should not contribute to the divergence calculation. This becomes obvious, as they can be multiplied with $\pm N/2$ (again divided by sampling length) in the case of an even number of data points. This shows, that they are not properly defined.
\end{document}
\endinput