% $Id: particle_model.tex 954 2012-07-20 07:44:19Z fricke $ \input{header_tmp.tex} %\input{../header_lectures.tex} \usepackage[utf8]{inputenc} \usepackage{ngerman} \usepackage{pgf} \usetheme{Dresden} \usepackage{subfigure} \usepackage{units} \usepackage{multimedia} \usepackage{hyperref} \newcommand{\event}[1]{\newcommand{\eventname}{#1}} \usepackage{xmpmulti} \usepackage{tikz} \usetikzlibrary{shapes,arrows,positioning} \usetikzlibrary{calc} %neues paket \usetikzlibrary{decorations.markings} %neues paket \usetikzlibrary{decorations.pathreplacing} %neues paket \def\Tiny{\fontsize{4pt}{4pt}\selectfont} \usepackage{amsmath} \usepackage{amssymb} \usepackage{multicol} \usepackage{pdfcomment} \usepackage{graphicx} \usepackage{listings} \lstset{showspaces=false,language=fortran,basicstyle= \ttfamily,showstringspaces=false,captionpos=b} \institute{Institut für Meteorologie und Klimatologie, Leibniz Universität Hannover} \date{last update: \today} \event{PALM Seminar} \setbeamertemplate{navigation symbols}{} \setbeamertemplate{footline} { \begin{beamercolorbox}[rightskip=-0.1cm]& {\includegraphics[height=0.65cm]{imuk_logo.pdf}\hfill \includegraphics[height=0.65cm]{luh_logo.pdf}} \end{beamercolorbox} \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex, leftskip=.3cm,rightskip=0.3cm plus1fil]{title in head/foot} {\leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor} \hfill \eventname \hfill \insertframenumber \; / \inserttotalframenumber} \end{beamercolorbox} \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot} \end{beamercolorbox} } %\logo{\includegraphics[width=0.3\textwidth]{luhimuk_logo.pdf}} \title[PALM's Lagrangian Particle Model]{PALM's Lagrangian Particle Model} \author{Siegfried Raasch} \begin{document} % Folie 1 \begin{frame} \titlepage \end{frame} \section{The embedded Lagrangian particle model} \subsection{The embedded Lagrangian particle model} % Folie 2 \begin{frame} \frametitle{Overview} \begin{itemize} \item<1-> The Lagrangian particle model embedded in PALM can be used for different purposes: \begin{itemize} \footnotesize \item Cloud droplet simulation \item Dispersion modelling / Footprint analysis \item Visualization \end{itemize} \vspace{3mm} \item<2-> Therefore the particles can have different properties, e.g.: \begin{itemize} \footnotesize \item Particles can be transported (advected) \textbf{passively} with the \textbf{resolved-scale} flow \item Particle transport by the subgrid-scale (SGS) turbulence can be included by switching on a stochastic SGS model for the particle transport (parameter: \texttt{use\underline{ }sgs\underline{ }for\underline{ }particles}) \item Particles can be given a mass and thus an \textbf{inertia} and a \textbf{radius} which affects their \textbf{flow resistance} (parameter: \texttt{density\underline{ }ratio}, \texttt{radius}) \item Tails can be added to the particles (showing the particle trajectories) for visualization purpose using the special visualization package \textbf{dvrp} \end{itemize} \end{itemize} \end{frame} % Folie 3 \begin{frame} \frametitle{Basics (I)} \begin{itemize} \item<1-> The particle model is switched on by adding a \texttt{\&particles\underline{ }par} NAMELIST to the parameter file (PARIN). This NAMELIST has to be added \textbf{after} the \texttt{\&d3par}-NAMELIST. \item All parameters for steering the particle model are described in: Documentation $\rightarrow$ Model steering $\rightarrow$ Parameters $\rightarrow$ Particles (http://palm.muk.uni-hannover.de/) \item \textbf{The particle model requires to use a constant vertical grid spacing (due to the implemented scheme for the interpolation of information from the LES grid to particle positions, that is required for the calculation of particle velocities)!} \end{itemize} \end{frame} % Folie 4 \begin{frame} \frametitle{Basic Particle Parameters (I)} \small Parameters that define the locations of particle source(s): \begin{itemize} \item Step I: Define the volume of the particle source \end{itemize} \begin{tikzpicture} \definecolor{darkgreen1}{rgb}{0.2,0.7,0.2} \definecolor{darkgreen2}{rgb}{0.4,0.7,0.4} \definecolor{darkgreen3}{rgb}{0.1,0.6,0.2} % Draw the box \onslide<2-> \draw[-] (0,0) -- (5,0); \draw[-] (0,0) -- (0,4); \draw[-] (5,4) -- (5,0); \draw[-] (0,4) -- (5,4); \draw[-] (2,1.5) -- (7,1.5); \draw[-] (2,1.5) -- (2,5.5); \draw[-] (7,5.5) -- (7,1.5); \draw[-] (2,5.5) -- (7,5.5); \draw[-] (0,0) -- (2,1.5); \draw[-] (5,0) -- (7,1.5); \draw[-] (5,4) -- (7,5.5); \draw[-] (0,4) -- (2,5.5); \node at (4,5) {\small Total model domain}; % Draw coordinate system \node at (8.5,2.5) [scale=1.0] {% \begin{tikzpicture} \draw[->] (0,0) -- (1,0); \draw[->] (0,0) -- (0,1); \draw[->] (0,0) -- (0.5,0.5); \node at (-0.2,0.9) {z}; \node at (0.9,-0.2) {x}; \node at (0.65,0.3) {y}; \end{tikzpicture} }; % Draw green box \onslide<3-> \draw[fill=darkgreen1,draw=darkgreen1,opacity=.95] (0,1) -- (3,1) -- (3,2.5) -- (0,2.5) -- cycle ; \draw[fill=darkgreen2,draw=darkgreen2,opacity=.95] (3,1) -- (4,1.75) -- (4,3.25) -- (3,2.5) -- cycle ; \draw[fill=darkgreen3,draw=darkgreen3,opacity=.95] (0,2.5) -- (3,2.5) -- (4,3.25) -- (1,3.25) -- cycle ; \node at (1.5,2) {\small \glqq Source Volume\grqq }; % Dashed green lines \draw[dashed, ultra thick, color=darkgreen3] (0,1) -- (0,0); \draw[dashed, ultra thick, color=darkgreen3] (3,1) -- (3,0); \draw[dashed, ultra thick, color=darkgreen3] (3,1) -- (5,1); \draw[dashed, ultra thick, color=darkgreen3] (4,1.75) -- (6,1.75); \draw[dashed, ultra thick, color=darkgreen3] (5,1) -- (5,0); \draw[dashed, ultra thick, color=darkgreen3] (6,1.75) -- (6,0.75); % Add Labels \node at (1,-0.25) {\scriptsize \texttt{ps1} (default 0.0)}; \node at (4.25,-0.25) {\scriptsize \texttt{psr} (default \texttt{nx*dx})}; \node at (7,0) {\scriptsize \texttt{pss} (default 0.0)}; \node at (8,0.75) {\scriptsize \texttt{psn} (default \texttt{ny*dy})}; \node [text width=4em] at (-0.7,0.5) {\scriptsize \texttt{psb} (default zu(\texttt{nz}/2))}; \node [text width=4em] at (-0.7,2) {\scriptsize \texttt{pst} (default zu(\texttt{nz}/2))}; \onslide<1-> \end{tikzpicture} \end{frame} % Folie 5 \begin{frame} \frametitle{Basic Particle Parameters (II)} \small Parameters that define the locations of particle source(s): \begin{itemize} \item Step IIa: Define the points of single particle release \end{itemize} \begin{tikzpicture} \definecolor{darkgreen}{rgb}{0.0,0.35,0.0} \definecolor{darkgreen3}{rgb}{0.2,0.6,0.2} \definecolor{darkred}{rgb}{0.5,0.0,0.0} % Draw green box (except for one line that is drawn later) \draw[-, ultra thick, color=darkgreen3] (0,0) -- (5,0); \draw[-, ultra thick, color=darkgreen3] (0,0) -- (0,4); \draw[-, ultra thick, color=darkgreen3] (0,4) -- (5,4); \draw[-, ultra thick, color=darkgreen3] (2,1.5) -- (7,1.5); \draw[-, ultra thick, color=darkgreen3] (2,1.5) -- (2,5.5); \draw[-, ultra thick, color=darkgreen3] (7,5.5) -- (7,1.5); \draw[-, ultra thick, color=darkgreen3] (2,5.5) -- (7,5.5); \draw[-, ultra thick, color=darkgreen3] (0,0) -- (2,1.5); \draw[-, ultra thick, color=darkgreen3] (5,0) -- (7,1.5); \draw[-, ultra thick, color=darkgreen3] (5,4) -- (7,5.5); \draw[-, ultra thick, color=darkgreen3] (0,4) -- (2,5.5); \node at (4,5) {\small \glqq Source Volume\grqq}; % Draw circles and dashed lines \node[circle, draw, thick, fill=red!90, scale=1.1] (rd1) at (0,0) {}; \node at (0,0) {1}; \onslide<2-> \node[circle, draw, thick, fill=red!90, scale=1.1] (rd2) at (2,0) {}; \draw[dashed, ultra thick, color=blue] (rd1) -- (rd2); \node at (2,0) {2}; \node at (1,-0.25) {\scriptsize \texttt{pdx}}; \onslide<3-> \node[circle, draw, thick, fill=red!90, scale=1.1] (rd3) at (4,0) {}; \draw[dashed, ultra thick, color=blue] (rd2) -- (rd3); \node at (4,0) {3}; \onslide<4> \node[circle, draw, thick, fill=red!90, scale=1.1] (rdx1) at (6,0) {}; \draw[dashed, ultra thick, color=blue] (rd3) -- (rdx1); \node[scale=1.6] at (6,0) {X}; \onslide<6-> \node[circle, draw, thick, fill=red!90, scale=1.1] (rd4) at (1.5,1.125) {}; \draw[dashed, ultra thick, color=darkgreen] (rd1) -- (rd4); \node at (1.5,1.125) {4}; \node at (1.1,0.43) {\scriptsize \texttt{pdy}}; \onslide<7-> \node[circle, draw, thick, fill=red!90, scale=1.1] (rd5) at (3.5,1.125) {}; \draw[dashed, ultra thick, color=blue] (rd4) -- (rd5); \node at (3.5,1.125) {5}; \onslide<7-> \node[circle, draw, thick, fill=red!90, scale=1.1] (rd6) at (5.5,1.125) {}; \draw[dashed, ultra thick, color=blue] (rd5) -- (rd6); \node at (5.5,1.125) {6}; \onslide<8> \node[circle, draw, thick, fill=red!90, scale=1.1] (rdx2) at (3,2.25) {}; \draw[dashed, ultra thick, color=darkgreen] (rd4) -- (rdx2); \node[scale=1.6] at (3,2.25) {X}; \onslide<10-> \node[circle, draw, thick, fill=red!90, scale=1.1] (rd7) at (0,2.2) {}; \draw[dashed, ultra thick, color=darkred] (rd1) -- (rd7); \node at (0,2.2) {7}; \node at (0.3,1.3) {\scriptsize \texttt{pdz}}; \onslide<11-> \node[circle, draw, thick, fill=red!90, scale=1.1] (rd8) at (2,2.2) {}; \draw[dashed, ultra thick, color=blue] (rd7) -- (rd8); \node at (2,2.2) {8}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd9) at (4,2.2) {}; \draw[dashed, ultra thick, color=blue] (rd8) -- (rd9); \node at (4,2.2) {9}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd10) at (1.5,3.325) {}; \draw[dashed, ultra thick, color=darkgreen] (rd7) -- (rd10); \node[scale=0.8] at (1.5,3.325) {10}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd11) at (3.5,3.325) {}; \draw[dashed, ultra thick, color=blue] (rd10) -- (rd11); \node[scale=0.8] at (3.5,3.325) {11}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd12) at (5.5,3.325) {}; \draw[dashed, ultra thick, color=blue] (rd11) -- (rd12); \node[scale=0.8] at (5.5,3.325) {12}; \onslide<12> \node[circle, draw, thick, fill=red!90, scale=1.1] (rdx3) at (0,4.4) {}; \draw[dashed, ultra thick, color=darkred] (rd7) -- (rdx3); \node[scale=1.6] at (0,4.4) {X}; % Draw rest of the green box \onslide<1-13> \draw[-, ultra thick, color=darkgreen3] (5,4) -- (5,0); % Draw coordinate system \node at (7.2,0.1) [scale=1.0] {% \begin{tikzpicture} \draw[->] (0,0) -- (1,0); \draw[->] (0,0) -- (0,1); \draw[->] (0,0) -- (0.5,0.5); \node at (-0.2,0.9) {z}; \node at (0.9,-0.2) {x}; \node at (0.65,0.3) {y}; \end{tikzpicture} }; % Add text \node at (9.0,3) [scale=0.8] {% \begin{tikzpicture} \node[text width=11em] {\scriptsize \texttt{maximum\underline{ }number\underline{ }of\underline{ }particles} number of particles (per PE) for that memory must be allocated at the beginning of a run; this number must be $\ge$ the initial number of particles \textbf{per subdomain(!)}.\\ \ \\ \textbf{Attention:} If netCDF output of particle data is switched on, \texttt{maximum\underline{ }number\underline{ }of\underline{ }particles} must be $\ge$ the maximum number of particles per subdomain observed throughout the complete run!\\ \ \\ Choosing a too large value may cause memory problems!\\}; \end{tikzpicture} }; \end{tikzpicture} \end{frame} % Folie 6 \begin{frame} \frametitle{Basic Particle Parameters (III)} \small Parameters that define the locations of particle source(s): \begin{itemize} \item Step IIb: Random start positions of particles \end{itemize} \begin{tikzpicture} \definecolor{darkgreen3}{rgb}{0.2,0.6,0.2} % Draw green box \draw[-, ultra thick, color=darkgreen3] (0,0) -- (5,0); \draw[-, ultra thick, color=darkgreen3] (0,0) -- (0,4); \draw[-, ultra thick, color=darkgreen3] (5,4) -- (5,0); \draw[-, ultra thick, color=darkgreen3] (0,4) -- (5,4); \draw[-, ultra thick, color=darkgreen3] (2,1.5) -- (7,1.5); \draw[-, ultra thick, color=darkgreen3] (2,1.5) -- (2,5.5); \draw[-, ultra thick, color=darkgreen3] (7,5.5) -- (7,1.5); \draw[-, ultra thick, color=darkgreen3] (2,5.5) -- (7,5.5); \draw[-, ultra thick, color=darkgreen3] (0,0) -- (2,1.5); \draw[-, ultra thick, color=darkgreen3] (5,0) -- (7,1.5); \draw[-, ultra thick, color=darkgreen3] (5,4) -- (7,5.5); \draw[-, ultra thick, color=darkgreen3] (0,4) -- (2,5.5); % Draw circles and dashed lines \onslide<1-3> \node[circle, draw, thick, fill=red!90, scale=1.1] (rd3) at (4,0) {}; \node at (4,0) {3}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd9) at (4,2.2) {}; \node at (4,2.2) {9}; \onslide<1> \node[circle, draw, thick, fill=red!90, scale=1.1] (rd1) at (0,0) {}; \node at (0,0) {1}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd2) at (2,0) {}; \node at (2,0) {2}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd4) at (1.5,1.125) {}; \node at (1.5,1.125) {4}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd5) at (3.5,1.125) {}; \node at (3.5,1.125) {5}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd6) at (5.5,1.125) {}; \node at (5.5,1.125) {6}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd7) at (0,2.2) {}; \node at (0,2.2) {7}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd8) at (2,2.2) {}; \node at (2,2.2) {8}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd10) at (1.5,3.325) {}; \node[scale=0.8] at (1.5,3.325) {10}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd11) at (3.5,3.325) {}; \node[scale=0.8] at (3.5,3.325) {11}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd12) at (5.5,3.325) {}; \node[scale=0.8] at (5.5,3.325) {12}; \onslide<3> \node[circle, draw, thick, fill=red!90, scale=1.1] (rd1n) at (1.0,0.3) {}; \node at (1.0,0.3) {1}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd2n) at (1.8,0.3) {}; \node at (1.8,0.3) {2}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd4n) at (1.7,1.0) {}; \node at (1.7,1.0) {4}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd5n) at (3.0,1.2) {}; \node at (3.0,1.2) {5}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd6n) at (4.5,1.125) {}; \node at (4.5,1.125) {6}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd7n) at (0.9,2.8) {}; \node at (0.9,2.8) {7}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd8n) at (3,1.8) {}; \node at (3,1.8) {8}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd10n) at (2.1,3) {}; \node[scale=0.8] at (2.1,3) {10}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd11n) at (4,4.5) {}; \node[scale=0.8] at (4,4.5) {11}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd12n) at (4.5,3.2) {}; \node[scale=0.8] at (4.5,3.2) {12}; % Draw coordinate system \onslide<1-> \node at (9,2) [scale=1.0] {% \begin{tikzpicture} \draw[->] (0,0) -- (1,0); \draw[->] (0,0) -- (0,1); \draw[->] (0,0) -- (0.5,0.5); \node at (-0.2,0.9) {z}; \node at (0.9,-0.2) {x}; \node at (0.65,0.3) {y}; \end{tikzpicture} }; % Add text \node at (9.2,4) {\scriptsize \texttt{random\underline{ }start\underline{ }position = .T.}}; \end{tikzpicture} \end{frame} % Folie 7 \begin{frame} \frametitle{Basic Particle Parameters (IV)} \small Parameters that define the period of particle release: \\ \vspace{10mm} \begin{columns}[T] \begin{column}{1.15\textwidth} \begin{tikzpicture} \definecolor{darkred}{rgb}{0.6,0.1,0.1} \definecolor{grey}{rgb}{0.25,0.25,0.25} \draw[->, ultra thick] (0,0) -- (10.5,0); \draw[->, ultra thick] (0,0.5) -- (0,-0.5); \node at (10.7,0) {t}; \node at (0,-0.8) {0}; \node[text width=6em] at (0.2,-1.9) {\scriptsize Start of LES, determination of particle release points}; \onslide<2-> \draw[->, ultra thick, color=red] (2.5,0.5) -- (2.5,-0.5); \node at (2.8,-0.8) {\scriptsize \texttt{particle\underline{ }advection\underline{ }start}}; \node[text width=6em] at (2.8,-2.1) {\scriptsize Calculation of particle trajectories begins (default value: 0.0)}; \onslide<3-> \draw[->, ultra thick, color=red] (5,0.5) -- (5,-0.5); \node[text width=4em] at (4.8,-1.7) {\scriptsize Release of a new set of particles}; \node at (3.75,0.3) {\scriptsize \texttt{dt\underline{ }prel}}; \draw[<->, thick, color=blue] (2.5,0.6) -- (4.95,0.6); \onslide<4-> \draw[->, ultra thick, color=darkred] (6.5,0.5) -- (6.5,-0.5); \node[text width=5em] at (6.7,-1.7) {\scriptsize Deletion of the first set of particles}; \draw[<->, thick, color=darkred] (2.5,0.9) -- (6.5,0.9); \node at (4.5,1.2) {\scriptsize \texttt{particle\underline{ }maximum\underline{ }age}}; \onslide<5-> \draw[->, ultra thick, color=darkred] (8.5,0.5) -- (8.5,-0.5); \node[text width=5em] at (8.6,-1.9) {\scriptsize No release of new particles after this time}; \node at (8.5,-0.8) {\scriptsize \texttt{end\underline{ }time\underline{ }prel}}; \draw[<->, thick, color=blue] (5.05,0.6) -- (8.5,0.6); \onslide<6-> \draw[->, ultra thick, color=grey] (10.2,0.5) -- (10.2,-0.5); \node[text width=5em] at (10.7,-1.9) {\scriptsize Deletion of the second set of particles}; \draw[<->, thick, color=darkred] (5.0,1.6) -- (10.2,1.6); \onslide<1-> \end{tikzpicture} \end{column} \end{columns} \end{frame} % Folie 8 \begin{frame}[t] \frametitle{Basic Particle Parameters (V)} \small Parameter that defines the mode of particle movement: \\ The concept of LES ...\\ \vspace{-5mm} \begin{center} \includegraphics[scale=0.1]{particle_model_figures/basic_particle_parameters_5.png} \end{center} \vspace{-5mm} \onslide<2-> ... transferred to the embedded particle model leads to particle velocity\\ \vspace{1mm} \begin{columns}[T] \begin{column}{0.35\textwidth} $\vec{V}_{i_{\text{particle}}} = \vec{V}_{i_{\text{resolved}}} + \vec{V}_{i_{\text{subgrid}}}$ \end{column} \begin{column}{0.55\textwidth} \scriptsize \onslide<3-> Particle movement as a result of \begin{itemize} \item advection, resolved turbulence $\vec{V}_{i_{\text{resolved}}}$ \vspace{-2mm} \item and subgrid turbulence $\vec{V}_{i_{\text{subgrid}}}$ \end{itemize} \end{column} \end{columns} \begin{tikzpicture}[remember picture, overlay] \node [shift={(6 cm,-6.3cm)}] at (current page.north west) {% \begin{tikzpicture}[remember picture, overlay] \uncover<4->{\draw[->, ultra thick] (-2.05,0) -- (-5,-0.8); \node[text width=14em] at (-3.2,-1.5) {\scriptsize $=0$, if \texttt{use\underline{ }sgs\underline{ }for\underline{ }particles = .F.} (default value)\\};} \uncover<5->{\draw[->, ultra thick] (-1.95,0) -- (0,-0.8); \node[text width=20em] at (3.2,-1.5) {\scriptsize $\ne0$, if \texttt{use\underline{ }sgs\underline{ }for\underline{ }particles = .T.}\\ determination of the subgrid part of the particle velocity as a solution of a stochastic differential equation\\}; \node[text width=14em] at (2.5,-2.5) {\scriptsize requires initialization parameter \texttt{use\underline{ }upstream\underline{ }for\underline{ }tke = .T.}\\ };} \end{tikzpicture} }; \end{tikzpicture} \end{frame} % Folie 9 \begin{frame}[t] \frametitle{Basic Particle Parameters (VI)} \small \vspace{-2mm} Parameter \texttt{dt\underline{ }sort\underline{ }particles} that improves the performance of a simulation with (many) particles: \onslide<2-> \begin{tikzpicture}[remember picture, overlay] \node [shift={(1 cm,2.5cm)}] at (current page.south west) {% \begin{tikzpicture}[remember picture, overlay] \node at (2.5,4.2) {$t=t_0$:}; \draw[-] (0,0) -- (5,0); \draw[-] (0,1) -- (5,1); \draw[-] (0,2) -- (5,2); \draw[-] (0,3) -- (5,3); \draw[-] (0,0) -- (0,4); \draw[-] (1,0) -- (1,4); \draw[-] (2,0) -- (2,4); \draw[-] (3,0) -- (3,4); \draw[-] (4,0) -- (4,4); \draw[-] (5,4) -- (5,0); \draw[-] (0,4) -- (5,4); \node[circle, draw, thick, fill=red!90, scale=1.1] (rd1) at (0.25,0.5) {}; \node[scale=0.8] at (rd1) {1}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd2) at (0.75,0.5) {}; \node[scale=0.8] at (rd2) {2}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd3) at (1.25,0.5) {}; \node[scale=0.8] at (rd3) {3}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd4) at (1.75,0.5) {}; \node[scale=0.8] at (rd4) {4}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd5) at (2.25,0.5) {}; \node[scale=0.8] at (rd5) {5}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd6) at (2.75,0.5) {}; \node[scale=0.8] at (rd6) {6}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd7) at (3.25,0.5) {}; \node[scale=0.8] at (rd7) {7}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd8) at (3.75,0.5) {}; \node[scale=0.8] at (rd8) {8}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd9) at (4.25,0.5) {}; \node[scale=0.8] at (rd9) {9}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd10) at (4.75,0.5) {}; \node[scale=0.8] at (rd10) {10}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd11) at (0.25,2.5) {}; \node[scale=0.8] at (rd11) {11}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd12) at (0.75,2.5) {}; \node[scale=0.8] at (rd12) {12}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd13) at (1.25,2.5) {}; \node[scale=0.8] at (rd13) {13}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd14) at (1.75,2.5) {}; \node[scale=0.8] at (rd14) {14}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd15) at (2.25,2.5) {}; \node[scale=0.8] at (rd15) {15}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd16) at (2.75,2.5) {}; \node[scale=0.8] at (rd16) {16}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd17) at (3.25,2.5) {}; \node[scale=0.8] at (rd17) {17}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd18) at (3.75,2.5) {}; \node[scale=0.8] at (rd18) {18}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd19) at (4.25,2.5) {}; \node[scale=0.8] at (rd19) {19}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd20) at (4.75,2.5) {}; \node[scale=0.8] at (rd20) {20}; \node[text width=14em] at (2.5,-0.9) {\scriptsize Particles are sorted in a way that their order follows the order in which the grid point values are stored (beneficial as the code contains many loops over all particles)\\}; \end{tikzpicture} }; \uncover<3->{ \node [shift={(7 cm,2.5cm)}] at (current page.south west) {% \begin{tikzpicture}[remember picture, overlay] \node at (2.5,4.2) {$t>t_0$:}; \draw[-] (0,0) -- (5,0); \draw[-] (0,1) -- (5,1); \draw[-] (0,2) -- (5,2); \draw[-] (0,3) -- (5,3); \draw[-] (0,0) -- (0,4); \draw[-] (1,0) -- (1,4); \draw[-] (2,0) -- (2,4); \draw[-] (3,0) -- (3,4); \draw[-] (4,0) -- (4,4); \draw[-] (5,4) -- (5,0); \draw[-] (0,4) -- (5,4); \node[circle, draw, thick, fill=red!90, scale=1.1] (rd1) at (1.75,1.3) {}; \node[scale=0.8] at (rd1) {1}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd2) at (1.2,2.3) {}; \node[scale=0.8] at (rd2) {2}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd3) at (2.3,2.3) {}; \node[scale=0.8] at (rd3) {3}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd4) at (3.25,1.21) {}; \node[scale=0.8] at (rd4) {4}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd5) at (3.2,2.7) {}; \node[scale=0.8] at (rd5) {5}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd6) at (3.25,1.7) {}; \node[scale=0.8] at (rd6) {6}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd7) at (1.25,1.6) {}; \node[scale=0.8] at (rd7) {7}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd8) at (3.7,0.5) {}; \node[scale=0.8] at (rd8) {8}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd9) at (3.77,1.8) {}; \node[scale=0.8] at (rd9) {9}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd10) at (2.6,1.3) {}; \node[scale=0.8] at (rd10) {10}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd11) at (2.7,0.7) {}; \node[scale=0.8] at (rd11) {11}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd12) at (0.21,1.3) {}; \node[scale=0.8] at (rd12) {12}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd13) at (0.3,2.5) {}; \node[scale=0.8] at (rd13) {13}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd14) at (1.75,2.5) {}; \node[scale=0.8] at (rd14) {14}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd15) at (2.3,1.7) {}; \node[scale=0.8] at (rd15) {15}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd16) at (2.4,2.8) {}; \node[scale=0.8] at (rd16) {16}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd17) at (4.23,0.7) {}; \node[scale=0.8] at (rd17) {17}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd18) at (3.77,2.6) {}; \node[scale=0.8] at (rd18) {18}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd19) at (4.23,3.3) {}; \node[scale=0.8] at (rd19) {19}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd20) at (3.75,1.23) {}; \node[scale=0.8] at (rd20) {20}; \node[text width=14em] at (2.5,-1.05) {\scriptsize By default, particles are not sorted after every time step, particles with subsequent numbers will need information from quite different LES grid points\\ \textcolor{red}{Bad cache utilization}\\}; \node at (-0.2,-1.9) {$\rightarrow$}; \end{tikzpicture} };} \end{tikzpicture} \end{frame} % Folie 10 \begin{frame}[t] \frametitle{Basic Particle Parameters (VI)} \small \vspace{-2mm} Parameter \texttt{dt\underline{ }sort\underline{ }particles} that improves the performance of a simulation with (many) particles: \begin{tikzpicture}[remember picture, overlay] \node [shift={(1 cm,2.5cm)}] at (current page.south west) {% \begin{tikzpicture}[remember picture, overlay] \node[text width=14em] at (2.5,3.8) {Higher performance with\\ resorting of particles:\\}; \uncover<2->{\node[text width=14em] at (2.5,1.6) {\scriptsize Temporal interval between the\\ sorting of particles determined\\ by the parameter\\ \ \\ \texttt{dt\underline{ }sort\underline{ }particles}\\ \ \\ (default value 0.0, i.e. particles are resorted at every time step)};} \uncover<3->{\node[text width=28em] at (5,-0.9) {Keep in mind that resorting of particles is time consuming itself, so that using the default value of \texttt{dt\underline{ }sort\underline{ }particles} probably won‘t yield the best performance that is possible.\\};} \end{tikzpicture} }; \node [shift={(7 cm,2.5cm)}] at (current page.south west) {% \begin{tikzpicture}[remember picture, overlay] \node at (2.5,4.2) {$t>t_0$:}; \draw[-] (0,0) -- (5,0); \draw[-] (0,1) -- (5,1); \draw[-] (0,2) -- (5,2); \draw[-] (0,3) -- (5,3); \draw[-] (0,0) -- (0,4); \draw[-] (1,0) -- (1,4); \draw[-] (2,0) -- (2,4); \draw[-] (3,0) -- (3,4); \draw[-] (4,0) -- (4,4); \draw[-] (5,4) -- (5,0); \draw[-] (0,4) -- (5,4); \node[circle, draw, thick, fill=red!90, scale=1.1] (rd1) at (1.75,1.3) {}; \node[scale=0.8] at (rd1) {1}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd2) at (1.2,2.3) {}; \node[scale=0.8] at (rd2) {2}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd3) at (2.3,2.3) {}; \node[scale=0.8] at (rd3) {3}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd4) at (3.25,1.21) {}; \node[scale=0.8] at (rd4) {4}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd5) at (3.2,2.7) {}; \node[scale=0.8] at (rd5) {5}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd6) at (3.25,1.7) {}; \node[scale=0.8] at (rd6) {6}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd7) at (1.25,1.6) {}; \node[scale=0.8] at (rd7) {7}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd8) at (3.7,0.5) {}; \node[scale=0.8] at (rd8) {8}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd9) at (3.77,1.8) {}; \node[scale=0.8] at (rd9) {9}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd10) at (2.6,1.3) {}; \node[scale=0.8] at (rd10) {10}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd11) at (2.7,0.7) {}; \node[scale=0.8] at (rd11) {11}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd12) at (0.21,1.3) {}; \node[scale=0.8] at (rd12) {12}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd13) at (0.3,2.5) {}; \node[scale=0.8] at (rd13) {13}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd14) at (1.75,2.5) {}; \node[scale=0.8] at (rd14) {14}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd15) at (2.3,1.7) {}; \node[scale=0.8] at (rd15) {15}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd16) at (2.4,2.8) {}; \node[scale=0.8] at (rd16) {16}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd17) at (4.23,0.7) {}; \node[scale=0.8] at (rd17) {17}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd18) at (3.77,2.6) {}; \node[scale=0.8] at (rd18) {18}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd19) at (4.23,3.3) {}; \node[scale=0.8] at (rd19) {19}; \node[circle, draw, thick, fill=red!90, scale=1.1] (rd20) at (3.75,1.23) {}; \node[scale=0.8] at (rd20) {20}; \end{tikzpicture} }; \end{tikzpicture} \end{frame} % Folie 11 \begin{frame}[t] \frametitle{Basic Particle Parameters (VI)} \small Example for the beneficial effect of resorting on the consumption of CPU time \texttt{(dt\underline{ }sort\underline{ }particles = 0.0)}:\\ \scriptsize \ \\ Release of 3.200.000 particles into a convective boundary layer.\\ Extract from CPU time measurement file.\\ \ \\ \begin{tabular}{|p{2.5cm}|p{1.3cm}|p{1.3cm}|p{1.3cm}|p{1.3cm}|p{1.3cm}|} \hline Part of PALM & Consumed CPU time in s \textbf{without resorting} & Percentage of totally consumed CPU time \textbf{(without)} & Consumed CPU time in s \textbf{with resorting} & Percentage of totally consumed CPU time \textbf{(with)} & Saved CPU time \textbf{with resorting} in \%\\ \hline total & 50027.225 & 100.0 & 47805.635 & 100.0 & \textcolor{red}{4.4}\\ \hline advec\underline{ }particles & 22049.711 & 44.08 & 19926.364 & 41.68 & \textcolor{red}{9.6}\\ \hline advec\underline{ }particles\underline{ }advec & 13640.729 & 27.27 & 11424.540 & 23.90 & \textcolor{red}{16.2}\\ \hline \end{tabular} \end{frame} % Folie 12 \begin{frame}[t] \frametitle{Basic Particle Parameters (VII)} \small \vspace{-2mm} Parameters that define the boundary conditions for particles\\ \scriptsize \ \\ \uncover<10>{In PALM particles are \textbf{always} reflected at \textbf{vertical walls and roofs of buildings.}}\\ \ \\ \begin{tikzpicture} \definecolor{darkgreen}{rgb}{0.2,0.7,0.2} % Bottom \uncover<2>{\draw[fill=darkgreen,draw=darkgreen,opacity=.85] (0,0) -- (2,1.5) -- (7,1.5) -- (5,0) -- cycle ;} % Top \uncover<4>{\draw[fill=darkgreen,draw=darkgreen,opacity=.85] (0,4) -- (2,5.5) -- (7,5.5) -- (5,4) -- cycle ;} % Front \uncover<6>{\draw[fill=darkgreen,draw=darkgreen,opacity=.85] (0,0) -- (0,4) -- (5,4) -- (5,0) -- cycle ;} % Back \uncover<6>{\draw[fill=darkgreen,draw=darkgreen,opacity=.85] (2,1.5) -- (7,1.5) -- (7,5.5) -- (2,5.5) -- cycle ;} % Left \uncover<8>{\draw[fill=darkgreen,draw=darkgreen,opacity=.85] (0,0) -- (0,4) -- (2,5.5) -- (2,1.5) -- cycle ;} % Right \uncover<8>{\draw[fill=darkgreen,draw=darkgreen,opacity=.85] (5,0) -- (5,4) -- (7,5.5) -- (7,1.5) -- cycle ;} % Draw Box \draw[-] (0,0) -- (5,0); \draw[-] (0,0) -- (0,4); \draw[-] (5,4) -- (5,0); \draw[-] (0,4) -- (5,4); \draw[-] (2,1.5) -- (7,1.5); \draw[-] (2,1.5) -- (2,5.5); \draw[-] (7,5.5) -- (7,1.5); \draw[-] (2,5.5) -- (7,5.5); \draw[-] (0,0) -- (2,1.5); \draw[-] (5,0) -- (7,1.5); \draw[-] (5,4) -- (7,5.5); \draw[-] (0,4) -- (2,5.5); \node at (4,5) {\small Total model domain}; % Labels \uncover<2->{\node at (2.7,0.15) {\scriptsize \texttt{bc\underline{ }par\underline{ }b = 'reflect', 'absorb'}};} \uncover<4->{\node at (3.0,4.25) {\scriptsize \texttt{bc\underline{ }par\underline{ }t = 'absorb', 'reflect'}};} \uncover<6->{\node at (3.25,2.15) {\scriptsize \texttt{bc\underline{ }par\underline{ }ns = 'cyclic', 'reflect', 'absorb'}};} \uncover<8->{\node[text width=15.5em] at (7.7,3.7) {\scriptsize \texttt{bc\underline{ }par\underline{ }lr = 'cyclic', 'reflect',}\\ \texttt{\hspace{5em} 'absorb'}};} % Draw coordinate system \node at (9,2) [scale=1.0] {% \begin{tikzpicture} \draw[->] (0,0) -- (1,0); \draw[->] (0,0) -- (0,1); \draw[->] (0,0) -- (0.5,0.5); \node at (-0.2,0.9) {z}; \node at (0.9,-0.2) {x}; \node at (0.65,0.3) {y}; \end{tikzpicture} }; \end{tikzpicture} \end{frame} % Folie 13 \begin{frame} \frametitle{Basic Particle Parameters (VIII)} \small Parameters that steer the output of particle data \begin{itemize} \item There are two output files containing particle data: \begin{itemize} \item \texttt{DATA\underline{ }1D\underline{ }PTS\underline{ }NETCDF}: \hspace{0.5em} contains particle time series, output\\ \hspace{11.0em}interval is controlled by parameter\\ \hspace{11.0em}\texttt{dt\underline{ }dopts}, one file for the total\\ \hspace{11.0em}domain, e.g. time series of the total\\ \hspace{11.0em}number of particles, mean particle\\ \hspace{11.0em}velocity, mean subgrid scale part of\\ \hspace{11.0em}the particle velocity, mean particle\\ \hspace{11.0em}location etc. \vspace{1mm} \item \texttt{DATA\underline{ }PRT\underline{ }NETCDF}: \hspace{2.5em}contains \textbf{all} particle data (see slide\\ \hspace{11.0em}The Data Type Used for Particles),\\ \hspace{11.0em}output is controlled by\\ \hspace{11.0em}\texttt{dt\underline{ }write\underline{ }particle\underline{ }data},\\ \hspace{11.0em}one file per subdomain/PE \end{itemize} \end{itemize} \end{frame} % Folie 14 \begin{frame} \frametitle{An Example of a Particle NAMELIST} \includegraphics[scale=0.3]{particle_model_figures/namelist.png} \begin{itemize} \item<2-> \small Several (up to 10) so called particle groups with different density ratio, radius, and starting positions can be defined by setting parameter number\underline{ }of\underline{ }particle\underline{ }groups to the required number of groups, and by assigning values for each particle groups to the respective parameters (e.g. density\underline{ }ratio = 0.001, 0.0, etc.) \end{itemize} \end{frame} % Folie 15 \begin{frame}[t] \frametitle{Theory of the Lagrangian Particle Model (I)} \textbf{Advection of Passive particles}\\ \small \vspace{1mm} The position of a particle is found by integrating $ \dfrac{d \vec{X}_{\text{particle}}}{dt} = \vec{V}_{\text{particle}}$\\ \vspace{2mm} \onslide<2->Transferring the LES concept ... \includegraphics[scale=0.1]{particle_model_figures/basic_particle_parameters_5.png}\\ \vspace{-2mm} \scriptsize \hspace{2em}total energy\hspace{2.25em}=\hspace{3em}resolved part\hspace{2.5em}+\hspace{3em}modelled part\\ \vspace{1mm} \small ... to the embedded particle model leads to: $\vec{V}_{\text{particle}} = \vec{V}_{\text{res}} (+ \vec{V}_{\text{sub}})$\\ \vspace{2mm} \onslide<3->$\vec{V}_{\text{res}}:$\\ \begin{tikzpicture}[remember picture, overlay] \node [shift={(1.7 cm,0.6cm)}] at (current page.south west) {% \begin{tikzpicture}[scale=0.3,remember picture, overlay] \draw[-] (0,0) -- (5,0); \draw[-] (0,0) -- (0,4); \draw[-] (5,4) -- (5,0); \draw[-] (0,4) -- (5,4); \draw[-] (2,1.5) -- (7,1.5); \draw[-] (2,1.5) -- (2,5.5); \draw[-] (7,5.5) -- (7,1.5); \draw[-] (2,5.5) -- (7,5.5); \draw[-] (0,0) -- (2,1.5); \draw[-] (5,0) -- (7,1.5); \draw[-] (5,4) -- (7,5.5); \draw[-] (0,4) -- (2,5.5); \node[circle, fill=blue, scale=0.5] at (0,0) {}; \node[circle, fill=blue, scale=0.5] at (5,0) {}; \node[circle, fill=blue, scale=0.5] at (0,4) {}; \node[circle, fill=blue, scale=0.5] at (5,4) {}; \node[circle, fill=blue, scale=0.5] at (2,1.5) {}; \node[circle, fill=blue, scale=0.5] at (7,1.5) {}; \node[circle, fill=blue, scale=0.5] at (7,5.5) {}; \node[circle, fill=blue, scale=0.5] at (2,5.5) {}; \node[circle, fill=red, scale=0.5] at (2.5,1.1) {}; \draw[->, ultra thick, color=red] (7.4,0.7) -- (2.9,1.1); \node at (9.0,0.1) {\scriptsize \textcolor{red}{particle location}}; \draw[->, ultra thick] (8,2.5) -- (12,2.5); \end{tikzpicture} }; \node [shift={(5.8 cm,0.6cm)}] at (current page.south west) {% \begin{tikzpicture}[scale=0.3,remember picture, overlay] \definecolor{darkgreen}{rgb}{0.2,0.7,0.2} \draw[-] (0,0) -- (5,0); \draw[-] (0,4) -- (5,4); \draw[-] (2,1.5) -- (7,1.5); \draw[-] (2,5.5) -- (7,5.5); \draw[-] (0,0) -- (2,1.5); \draw[-] (5,0) -- (7,1.5); \draw[-] (5,4) -- (7,5.5); \draw[-] (0,4) -- (2,5.5); \node[circle, fill=blue, scale=0.5] at (0,0) {}; \node[circle, fill=blue, scale=0.5] at (5,0) {}; \node[circle, fill=blue, scale=0.5] at (0,4) {}; \node[circle, fill=blue, scale=0.5] at (5,4) {}; \node[circle, fill=blue, scale=0.5] at (2,1.5) {}; \node[circle, fill=blue, scale=0.5] at (7,1.5) {}; \node[circle, fill=blue, scale=0.5] at (7,5.5) {}; \node[circle, fill=blue, scale=0.5] at (2,5.5) {}; \node[circle, draw, color=darkgreen, ultra thick, scale=0.5] at (2.5,0.6) {}; \node[circle, draw, color=darkgreen, ultra thick, scale=0.5] at (2.5,4.6) {}; \draw[->, ultra thick] (8,2.5) -- (12,2.5); \end{tikzpicture} }; \node [shift={(9 cm,0.6cm)}] at (current page.south west) {% \begin{tikzpicture}[scale=0.3,remember picture, overlay] \definecolor{darkgreen}{rgb}{0.2,0.7,0.2} \node[circle, draw, color=darkgreen, ultra thick, scale=0.5] at (2.5,0.6) {}; \node[circle, fill=red, scale=0.5] at (2.5,1.1) {}; \node[circle, draw, color=darkgreen, ultra thick, scale=0.5] at (2.5,4.6) {}; \end{tikzpicture} }; \end{tikzpicture} \end{frame} % Folie 16 \begin{frame}[t] \frametitle{Theory of the Lagrangian Particle Model (II)} \scriptsize \textbf{A: Passive particles}\\ \ \\ \uncover<10->{\normalsize \textbf{\underline{Calculation of the subgrid part of the particle velocity $\vec{V}_{\text{sub}}$:}}} \footnotesize \begin{itemize} \item<3-> Application of the method of Weil et al. (2004) \item<2-> \uncover<4->{they derived an adaptation of Thomson's model (1987)}\\ \vspace{1mm} \uncover<2->{$\dfrac{dV_{\text{particle}_i}}{dt} = a_i dt + (C_0 \overline{\varepsilon})^{\frac{1}{2}} d \xi_i$ \quad deterministic + random velocity forcing}\\ \vspace{1mm} \uncover<5->{to the grid-volume level, i.e.:} \item<6-> Ensemble-mean velocity replaced by the LES resolved velocity \item<7-> Lagrangian stochastic model describes the subgrid scale random velocity fluctuation about the resolved velocity \item<8-> The subgrid scale velocities are specified by a Gaussian probability density function based on the subgrid scale stress tensor and its inverse \item<9-> The ensemble mean dissipation rate can be replaced by the local dissipation rate \end{itemize} \end{frame} % Folie 17 \begin{frame}[t] \frametitle{Theory of the Lagrangian Particle Model (III)} \scriptsize \textbf{A: Passive particles}\\ \ \\ \normalsize \textbf{\underline{Weil's formula for the subgrid part of the particle velocity:}} \footnotesize \\ \vspace{2mm} Assumption: subgrid scale turbulence locally isotropic\\ \vspace{6mm} $dV_{\text{sub}_i} = - \dfrac{3 f_s C_0 \varepsilon}{4} \dfrac{V_{\text{sub}_i}}{e_s} dt + \dfrac{1}{3} \left( \dfrac{\partial e_s}{\partial x_i} + \dfrac{3}{2 e_s} \dfrac{d e_s}{dt} V_{\text{sub}_i}\right) dt + \sqrt{f_s C_0 \varepsilon}\, d\xi_i$\\ \vspace{2mm} $f_s = \dfrac{\langle 2 e_s / 3 \rangle}{\langle 2 e_s / 3 \rangle + \langle \left( \sigma^2_{\text{res}U} + \sigma^2_{\text{res}V} + \sigma^2_{\text{res}W} \right) /3 \rangle}$\\ \vspace{6mm} Local dissipation rate $\varepsilon$ , subgrid scale turbulent kinetic energy $e_s$ and variances of resolved velocity components $\sigma_{\text{res}_i}$ derived from LES data\\ \end{frame} % Folie 18 \begin{frame}[t] \frametitle{Theory of the Lagrangian Particle Model (IV)} \scriptsize \textbf{A: Passive particles}\\ \ \\ \normalsize \textbf{\underline{Particle time step in case of \texttt{use\underline{ }sgs\underline{ }for\underline{ }particles = .TRUE.}:}} \footnotesize \\ \vspace{2mm} limited by the Lagrangian time scale $T_L$ \qquad $dt=0.025 T_L$\\ \vspace{3mm} subsequent particle time steps: velocities correlated, accelerations not correlated\\ \vspace{3mm} Lagrangian autocorrelation function:\\ \begin{tikzpicture}[domain=0:4] \draw[->] (0,0) -- (4.5,0); \draw[->] (0,0) -- (0,2); \node at (4.5,-0.3) {$\tau$}; \node at (-0.5,1.8) {$R_L(\tau)$}; \draw[thick, domain=0:4] plot (\x,{1.7*exp(-1.6*\x)+0.05}); \end{tikzpicture}\\ $R_L(\tau) = \dfrac{W(t) W(t + \tau)}{\sigma^2_w} = exp\left( - \dfrac{\tau}{T_L} \right) \hspace{10mm} T_L = 4 e_s / (3 f_s C_0 \varepsilon)$\\ \ \\ Particle time step can be smaller than LES time step! \end{frame} % Folie 19 \begin{frame}[t] \frametitle{Theory of the Lagrangian Particle Model (V)} \scriptsize \textbf{B: Non-passive particles (e.g. cloud droplets) }\\ \ \\ \footnotesize $\rightarrow$ advection of particles by the non-linear drag law following Clift et al., 1978\\ \vspace{4mm} \onslide<2->$\dfrac{dV_i}{dt} = \dfrac{1}{\tau_p} (u_i - V_i -\delta_{i3}w_s) \rightarrow V_i(t) = V_i(0) e^{-\Delta t / \tau_p} + (u_i -w_s \delta_{i3}) \left( 1 - e^{-\Delta t / \tau_p} \right)$\\ \vspace{2mm} with $\tau_p^{-1} = \dfrac{3 \pi}{8 \beta r} C_D \left| \vec{u} - \vec{V} \right|$, $C_D = \dfrac{24}{\text{Re}} \left( 1 + 0.15 \text{Re}^{0.687} \right)$, $w_s = \dfrac{\beta -1}{\beta} g \tau_p$,\\ \vspace{1mm} \hspace{2em} $\beta = \dfrac{\rho_p}{\rho_f}$\\ \vspace{5mm} \onslide<1-> \begin{tabular}{llll} $C_D$ & = drag coefficient & $w_s$ & = terminal velocity\\ $g$ & = gravitational acceleration & $\beta$ & = density coefficient\\ Re & = Reynolds number & $\rho_p$ & = density of the particle\\ $u_i$ & = velocity of the fluid & $\rho_f$ & = density of the fluid\\ $V_i$ & = particle velocity & $\tau_p$ & = response time with respect to inertia\\ \end{tabular} \end{frame} % Folie 20 \begin{frame} \frametitle{Flow Chart of Particle Code (I)} \footnotesize \begin{tikzpicture}[scale=0.8, transform shape] % Define colours \tikzstyle{gelb1} = [draw, fill=yellow!60, text width=7em, text centered, minimum height=1.6em] \tikzstyle{orange} = [draw, fill=orange!60, text width=7em, text centered] % Define coordinates and draw nodes \node[gelb1, text width=5em] (PALM) at (0,0.1) {PALM}; \coordinate (A) at (0,-0.7); \node[gelb1, right=0.6cm of A] (init3d) {init\underline{ }3d\underline{ }model}; \coordinate[below=0.4cm of init3d] (B) ; \coordinate[below=1.0cm of init3d] (C) ; \coordinate[below=1.6cm of init3d] (D) ; \coordinate[below=2.2cm of init3d] (E) ; \coordinate[below=2.8cm of init3d] (F) ; \coordinate[below=4.2cm of init3d] (G) ; \coordinate[below=4.8cm of init3d] (H) ; \coordinate[below=7cm of init3d] (I) ; \coordinate (J) at (0,-8.6); \node[gelb1, right=0.5cm of B, text width=17em] (init1d) {init\underline{ }1d\underline{ }model (\textit{calls various subroutines})}; \node[gelb1, right=0.5cm of C] (initslope) {init\underline{ }slope}; \node[gelb1, right=0.5cm of D] (disturb) {disturb\underline{ }heatflux}; \node[gelb1, right=0.5cm of E] (initrankine) {init\underline{ }rankine}; \node[gelb1, right=0.0cm of initrankine] {init\underline{ }pt\underline{ }anomaly}; \node[gelb1, right=0.5cm of F] (disturbfield) {disturb\underline{ }field}; \node[gelb1, right=0.0cm of disturbfield] (pres) {pres}; \node[gelb1, right=0.5cm of G] (read3d) {read\underline{ }3d\underline{ }binary}; \node[gelb1, right=0.0cm of read3d] (initdvrp) {init\underline{ }dvrp}; \node[gelb1, right=0.0cm of initdvrp] (initocean) {init\underline{ }ocean}; \node[gelb1, right=0.0cm of initocean] {init\underline{ }cloud\underline{ }physics}; \node[orange, right=0.5cm of H] (initparticles) {init\underline{ }particles}; \node[gelb1, right=0.5cm of I] (initadvec) {init\underline{ }advec}; \node[gelb1, right=0.0cm of initadvec] (userinit) {user\underline{ }init}; \node[gelb1, right=0.6cm of J] (dataoutput2d) {data\underline{ }output\underline{ }2d}; \node[gelb1, right=0.0cm of dataoutput2d] {data\underline{ }output\underline{ }3d}; \coordinate[below=0.15cm of pres] (K); \coordinate[right=0.2cm of K] (L); \coordinate[right=2cm of L] (M); \coordinate[right=2cm of M] (N); \node[gelb1, below=0.1cm of L, text width=4em] (poisfft) {poisfft}; \node[gelb1, below=0.1cm of M, text width=4em] (sor) {sor}; \node[gelb1, below=0.1cm of N, text width=4em] (poismg) {poismg}; \coordinate[below=0.1cm of initparticles] (O); \coordinate[below=0.6cm of O] (P); \coordinate[below=0.6cm of P] (Q); \node[orange, right=1.5cm of O] (userinitparticles) {user\underline{ }init\underline{ }particles}; \node[orange, right=1.5cm of P] (sortparticles) {sort\underline{ }particles}; \node[orange, right=1.5cm of Q] (dataoutputdvrp) {data\underline{ }output\underline{ }dvrp}; \coordinate[right=1.5cm of dataoutputdvrp] (R); \node[orange, below=0.3cm of R] (userdvrp) {user\underline{ }dvrp\underline{ }coltab}; % Draw lines \draw[dotted, thick] (PALM) -- (0,-0.5); \draw[-, thick] (0,-0.5) -- (0,-8.7); \draw[dotted, thick] (0,-8.7) -- (0,-9.0); \draw[-, thick] (init3d.west) -- (A) ; \draw[-, thick] (init3d.south) -- (I) ; \draw[dashed, thick] (B) -- (init1d.west); \draw[dashed, thick] (C) -- (initslope.west); \draw[dashed, thick] (D) -- (disturb.west); \draw[dashed, thick] (E) -- (initrankine.west); \draw[dashed, thick] (F) -- (disturbfield.west); \draw[dashed, thick] (G) -- (read3d.west); \draw[-, thick] (H) -- (initparticles.west); \draw[-, thick] (I) -- (initadvec.west); \draw[dashed, thick] (J) -- (dataoutput2d); \draw[-, thick] (pres.south) -- (K); \draw[-, thick] (K) -- (N); \draw[-, thick] (L) -- (poisfft.north); \draw[-, thick] (M) -- (sor.north); \draw[-, thick] (N) -- (poismg.north); \draw[-, thick] (initparticles.south) -- (P); \draw[dashed, thick] (P) -- (Q); \draw[-, thick] (O) -- (userinitparticles.west); \draw[-, thick] (P) -- (sortparticles.west); \draw[dashed, thick] (Q) -- (dataoutputdvrp.west); \draw[-, thick] (dataoutputdvrp.east) -- (R); \draw[-, thick] (R) -- (userdvrp.north); \end{tikzpicture} \end{frame} % Folie 21 \begin{frame} \frametitle{Flow Chart of Particle Code (II)} \footnotesize \begin{tikzpicture}[scale=0.8, transform shape] % Define colours \tikzstyle{gelb1} = [draw, fill=yellow!60, text width=7em, text centered, minimum height=1.6em] \tikzstyle{orange} = [draw, fill=orange!60, text width=7em, text centered] % Define coordinates and draw nodes \coordinate (A) at (0,-0.7); \node[gelb1, right=0.6cm of A] (timeintegration) {time\underline{ }integration}; \coordinate[below=0.3 of timeintegration] (B); \coordinate[below=0.9 of timeintegration] (C); \node[gelb1, right=0.6cm of B] (timestep) {timestep}; \node[gelb1, right=0.6cm of C] (runcontrol) {run\underline{ }control}; \coordinate[below=0.2cm of runcontrol] (D); \node[gelb1, right=1.5cm of D] (flowstat) {flow\underline{ }statistics}; \coordinate[below=1.8cm of timeintegration] (E); \node[gelb1, right=0.6cm of E] (surface) {surface\underline{ }coupler}; \coordinate[below=2.4cm of timeintegration] (F); \node[gelb1, right=0.6cm of F, text width=13em] (useractions) {user\underline{ }actions (\textit{before\underline{ }timestep})}; \coordinate[below=3.0cm of timeintegration] (G); \node[gelb1, right=0.6cm of G, text width=11em] (timestepscheme) {timestep\underline{ }scheme\underline{ }steering}; \coordinate[below=3.5cm of timeintegration] (H); \coordinate[right=2cm of H] (I); \coordinate[right=3.5cm of I] (J); \node[draw, text width=22em,minimum height=4.5em,fill=black!15] (progframe) at (5.75,-5.3) {}; \node[draw, text width= 9.5em, right=0.5cm of progframe] {For details, see PALM Flow Chart (V).}; \node[gelb1, below=0.3cm of I, text width=9em] (prog) {prognostic\underline{ }equations}; \node[gelb1, below=0.3cm of J, text width=10.5em] (progfast) {prognostic\underline{ }equations\underline{ }fast}; \node[gelb1, below=0.1cm of progfast, text width=10.5em] (progvec) {prognostic\underline{ }equations\underline{ }vec}; \node[draw, fill=red, text width=4em] at (8.2,-4) {\textcolor{white}{standard advection}}; \coordinate[below=5.5cm of timeintegration] (K); \node[orange, right=0.6cm of K] (advecparticles) {advec\underline{ }particles}; \coordinate[below=0.2cm of advecparticles] (L); \node[orange, right=1.5cm of L, text width=13em] (userparticlesatt) {user\underline{ }particle\underline{ }attributes + more}; \coordinate[below=6.6cm of timeintegration] (M); \node[orange, right=0.6cm of M, text width=10em] (interaction) {interaction\underline{ }droplets\underline{ }ptq}; \coordinate[below=7.2cm of timeintegration] (N); \node[gelb1, right=0.6cm of N] (asselin) {asselin\underline{ }filter}; \coordinate[below=7.8cm of timeintegration] (O); \node[gelb1, right=0.6cm of O] (boundary) {boundary\underline{ }conds}; \node[gelb1, right=0.0cm of boundary] {swap\underline{ }timelevel}; \coordinate[below=8.4cm of timeintegration] (P); \node[gelb1, right=0.6cm of P] (inflow) {inflow\underline{ }turbulence}; \node[gelb1, right=0.0cm of inflow] {disturb\underline{ }field}; % Draw lines \draw[dotted, thick] (0,-0.3) -- (0,-0.7); \draw[-, thick] (0,-0.7) -- (0,-7.7); \draw[dotted, thick] (0,-7.7) -- (0,-9.0); \draw[-, thick] (A) -- (timeintegration); \draw[-, thick] (B) -- (timestep); \draw[-, thick] (C) -- (runcontrol); \draw[-, thick] (runcontrol.south) -- (D); \draw[-, thick] (D) -- (flowstat); \draw[dashed, thick] (E) -- (surface); \draw[-, thick] (F) -- (useractions); \draw[-, thick] (G) -- (timestepscheme); \draw[-, thick] (H) -- (I); \draw[-, thick] (I) -- (prog.north); \draw[-, thick, color=red] (I) -- (J); \draw[->, thick, color=red] (J) -- (progfast.north); \draw[dashed, thick] (K) -- (advecparticles); \draw[-, thick] (advecparticles.south) -- (L); \draw[-, thick] (L) -- (userparticlesatt.west); \draw[dashed, thick] (M) -- (interaction.west); \draw[dashed, thick] (N) -- (asselin.west); \draw[-, thick] (O) -- (boundary.west); \draw[dashed, thick] (P) -- (inflow.west); \draw[-, thick] (timeintegration.south) -- (O); \draw[dashed, thick] (O) -- (P); \end{tikzpicture} \end{frame} % Folie 22 \begin{frame} \frametitle{Detailed Flow Chart of \texttt{advec\underline{ }particles} (I)} \scriptsize \begin{tikzpicture}[scale=0.87, transform shape] \node (0) at (0,0) {}; \uncover<2->{\node[draw, right=0.0cm of 0, text width=15em] {write particle data on file\\ \qquad binary (\texttt{PARTICLE\underline{ }DATA/})\\ \quad + NetCDF (\texttt{DATA\underline{ }PRT\underline{ }NETCDF/})};} \uncover<3->{\node[draw, right=0.0cm of 0, yshift=-0.9cm] {calculate exponential terms for particles groups with inertia};} \uncover<4->{\node[draw, right=0.0cm of 0, yshift=-1.5cm] {particle growth by condensation/evaporation and collision};} \uncover<5->{\node[draw, right=0.0cm of 0, yshift=-2.1cm] {If SGS-velocities are used: calculate gradients of TKE};} \uncover<6->{\node[draw, right=0.0cm of 0, yshift=-2.85cm, text width=29em] {timestep loop\\ (repeated, unless each particle has reached the LES timestep \texttt{dt\underline{ }3d})};} \uncover<7->{\node[draw, right=0.5cm of 0, yshift=-3.9cm, text width=36em] {for each particle:\\ - interpolate velocities and SGS quantities (SGS-velocities, Lagrangian timescale, etc.\\ - calculate the particle advection};} \uncover<8->{\node[draw, right=0.5cm of 0, yshift=-4.8cm] {calculate particle reflection from walls (subroutine \texttt{particle\underline{ }boundary\underline{ }conds})};} \uncover<9->{\node[draw, right=0.5cm of 0, yshift=-5.4cm] {user defined actions (subroutine \texttt{user\underline{ }advec\underline{ }particles})};} \uncover<10->{\node[draw, right=0.5cm of 0, yshift=-6.0cm] {if necessary, release a new set of particles};} \uncover<11->{\node[draw, right=0.5cm of 0, yshift=-6.6cm] {particle exchange between the subdomains};} \uncover<12->{\node[draw, right=0.5cm of 0, yshift=-7.2cm] {boundary conditions at bottom and top};} \uncover<13->{\node[draw, right=0.5cm of 0, yshift=-7.8cm] {delete, pack, and sort particles};} \end{tikzpicture} \end{frame} % Folie 23 \begin{frame} \frametitle{Detailed Flow Chart of \texttt{advec\underline{ }particles} (II)} \scriptsize \begin{tikzpicture}[auto, node distance=0] \node (0) at (0,0) {}; \node[draw, right=0.0cm of 0] {In case of cloud droplets: calculate the liquid water content}; \uncover<2->{\node[draw, right=0.0cm of 0, yshift=-0.6cm] {user defined setting of particle attributes (subroutine \texttt{user\underline{ }particle\underline{ }attributes})};} \uncover<3->{\node[draw, right=0.0cm of 0, yshift=-1.2cm] {if necessary, add actual positions to the particle tails};} \uncover<4->{\node[draw, right=0.0cm of 0, yshift=-1.8cm] {write particle statistics on file \texttt{PARTICLE\underline{ }INFOS} (ASCII format)}; } \end{tikzpicture} \vspace{5mm} \small \begin{itemize} \item<5-> For a better modular structure, subroutine advec\underline{ }particles will be split into several subroutines in one of the next PALM releases. \end{itemize} \end{frame} % Folie 24 \begin{frame} \frametitle{The Data Type Used for Particles} \small \begin{itemize} \item Particle data are stored in a FORTRAN derived data type: \end{itemize} \includegraphics[scale=0.3]{particle_model_figures/data_type.png} \end{frame} % Folie 25 \begin{frame} \frametitle{How to Read netCDF Particle Data from an External Program} \footnotesize \begin{itemize} \item An example program for reading netCDF particle data (from file DATA\underline{ }PRT\underline{ }NETCDF/) can be found in the PALM repository under \texttt{...../trunk/UTIL/analyze\underline{ }particle\underline{ }netcdf\underline{ }data.f90} \item<2-> \textbf{Attention:}\\ The particle feature \grqq density\underline{ }ratio\grqq\, is stored in variable particle\underline{ }groups which (so far) is \textbf{not} contained in the netCDF file.\\ Also, informations about particle tails (history of particle positions) are \textbf{not} on the netCDF file!\\ \vspace{1mm} Both informations can only be found on file PARTICLE\underline{ }DATA/.\\ \vspace{1mm} For the format of this file (one per PE, i.e. filenames \underline{ }0000, \underline{ }0001, etc.) see beginning of subroutine advec\underline{ }particles. \end{itemize} \onslide<3->\hspace{4mm}\includegraphics[scale=0.27]{particle_model_figures/particle_data.png} \end{frame} % Folie 26 \begin{frame} \frametitle{Application example: Footprint modelling above a homogeneously heated surface (I)} \footnotesize \textbf{What is a footprint?} \begin{itemize} \item field of view of a micrometeorological measurement \end{itemize} \onslide<2-> \textbf{What is the motivation for footprint modelling?} \begin{itemize} \item measured turbulent fluxes don’t represent the fluxes originating directly from below the measuring device, but rather represent the fluxes originating from an area upwind of the measuring device \end{itemize} \onslide<3-> \textbf{How is it done?} \begin{itemize} \item particle trajectories are calculated in LES using embedded Lagrangian Particle Model \item once a particle intersects with chosen measuring height, footprint relevant data is output \item footprints are calculated in postprocessing \end{itemize} \onslide<4-> \textbf{What to keep in mind?} \begin{itemize} \item including subgridscale particle velocities necessary, when calculating footprints close to the surface, where subgridscale contribution\\to turbulent kinetic energy is relatively large \end{itemize} \end{frame} % Folie 27 \begin{frame} \frametitle{Application example: Footprint modelling above a homogeneously heated surface (II)} \footnotesize \begin{center} \includegraphics[scale=0.4]{particle_model_figures/footprint2.png} \end{center} \vspace{-6mm} \begin{flushright} after Steinfeld, 2009 \end{flushright} \end{frame} % Folie 28 \begin{frame} \frametitle{Application example: Footprint modelling above a homogeneously heated surface (III)} \footnotesize \textbf{Setup} (according to Steinfeld et al., 2008) \includegraphics[scale=0.285]{particle_model_figures/footprint3_1.png} \hspace{2mm} \includegraphics[scale=0.5]{particle_model_figures/footprint3_2.png} \begin{itemize} \item particles are released every 2min over a period of 30min at z=70m in the total model domain ($\rightarrow$ 7 * $10^6$ particles) \item particles are measured at z=72.5m, 77.5m, 100.0m \end{itemize} \end{frame} % Folie 29 \begin{frame} \frametitle{Application example: Footprint modelling above a homogeneously heated surface (IV)} \footnotesize Extract from the corresponding parameter file: \includegraphics[scale=0.285]{particle_model_figures/footprint4.png} \end{frame} % Folie 30 \begin{frame} \frametitle{Application example: Footprint modelling above a homogeneously heated surface (V)} \footnotesize Additionally required user-defined code (continued): \begin{enumerate} \scriptsize \setcounter{enumi}{0} \item Open files (one per PE and measuring height) for the additional output of footprint relevant particle data in \texttt{user\underline{ }init} \end{enumerate} \includegraphics[scale=0.27]{particle_model_figures/footprint5_1.png} \begin{enumerate} \scriptsize \setcounter{enumi}{1} \item Create directory into which the files containing the particle data shall be moved to and move the files (in .mrun.config) \end{enumerate} \includegraphics[scale=0.27]{particle_model_figures/footprint5_2.png} \end{frame} % Folie 31 \begin{frame} \frametitle{Application example: Footprint modelling above a homogeneously heated surface (VI)} \footnotesize Additionally required user-defined code (continued): \begin{enumerate} \scriptsize \setcounter{enumi}{2} \item Output of footprint relevant data in \texttt{user\underline{ }advec\underline{ }particles} (checking if particle has crossed measuring height) \end{enumerate} \includegraphics[scale=0.285]{particle_model_figures/footprint6.png} \end{frame} % Folie 32 \begin{frame} \frametitle{Application example: Footprint modelling above a homogeneously heated surface (VII)} \includegraphics[scale=0.3]{particle_model_figures/example1.png} \includegraphics[scale=0.35]{particle_model_figures/example2.png}\\ \begin{itemize} \item sensor position at x = 0m \end{itemize} \end{frame} % Folie 33 \begin{frame} \frametitle{Using Particles as Cloud Droplets} \begin{itemize} \item<1-> This feature is switched on by setting the initial parameter cloud\underline{ }droplets = \textit{.TRUE.}. \item<2-> In this case, the change in particle radius by condensation/evaporation and collision is calculated for every timestep. \item<3-> In case of condensation or evaporation, the potential temperature and the specific humidity has to be adjusted in the respective grid volumes. This is done within the subroutine interaction\underline{ }droplets\underline{ }ptq. \end{itemize} \end{frame} % Folie 34 \begin{frame} \frametitle{General Warning} \begin{itemize} \item<2-> Errors in the user interface routines for particles may cause problems which are very difficult to debug. Please be extremely careful with modifying the user interface and try to find out exactly how the default particle code works, before you make your modifications. \end{itemize} \end{frame} \end{document}