\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[top=1cm, bottom=2.0cm, left=1.0cm, right=1.5cm]{geometry}
\usepackage{graphicx}
\usepackage{array}
\usepackage{bbold}
\usepackage{amsmath,amssymb}
\usepackage{caption}
\usepackage{hyperref}
\usepackage{cite}
\usepackage{algpseudocode,algorithm,algorithmicx}
\usepackage{empheq}
\usepackage{lscape}
\newcommand*\widefbox[1]{\fbox{\hspace{2em}#1\hspace{2em}}}
\newcommand{\vv}[1]{\mathbf{#1}}
\newcommand{\ii}[0]{\mathrm{i}}
\newcommand{\dd}[0]{\mathrm{d}}
\DeclareMathOperator\arctanh{arctanh}
% define citation style
\bibliographystyle{unsrt}
\title{Free (Vacuum) Green's Tensor at finite Temperatures}
\author{Marty Oelschläger}
\begin{document}
\maketitle
%\tableofcontents
\section{Pure Green Tensor}
As neatly derived in \cite{amorim2017} the free Green tensor can be written as
\footnote{The Green's tensor definition in \cite{amorim2017} differs from the displayed one by the factor $\frac{\omega^2}{\epsilon_0c^2}$. This is due to the different definitions of the Green's tensor.}
\begin{align}
  \underline{G}_0(\vv k, z,z',\omega) &=
  \frac{\omega^2}{\epsilon_0c^2}
  \mathcal{P}\left[
    \mathbb{1}-\frac{c^2}{\omega^2}
    \begin{bmatrix}
      \vv k \\ \pm\ii \kappa
    \end{bmatrix}
    \left[ \vv k^\intercal ,\,\pm\ii\kappa\right]
  \right]
  \frac{e^{-\kappa|z-z'|}}{2\kappa}
  -\frac{\vv e_z\otimes\vv e_z}{\omega^2/c^2}\delta(z-z')
  .
\end{align}
Here the case $\pm$ relates to $z\gtrless z'$ and $\kappa=\sqrt{k^2-\omega^2/c^2}$ with $\mathrm{Re}\{\kappa\}\geq0$ and $\mathrm{Im}\{\kappa\}<0$. Especially, we focus on the case $z=z'$. Despite the real part of this Green's tensor being divergent for this case, we can continue calculating the imaginary part. Here we also eliminated odd orders of $k_y$, since we solely consider symmetric integration over $k_y$
%
\begin{align}
  \mathrm{Im}\left\{\underline{G}_0(\vv k, z\to z',\omega)\right\} &=
  \frac{
  \theta(\frac{\omega^2}{c^2}-k^2)
}{2\epsilon_0\sqrt{\omega^2/c^2-k^2}}
  \left(
    \mathbb{1}\frac{\omega^2}{c^2} -
    \mathrm{diag}\left[
      k_x^2,\,k_y^2,\,\frac{\omega^2}{c^2}-k^2
    \right]
  \right)
  .
\end{align}
The Heaviside function is needed to prohibit the $\omega^2/c^2 -k^2 <0$. Otherwise the term would be purely real and thus would not contribute to the imaginary part of the free Green's tensor. To show, that we can obtain the same result as e.g. given in \cite{buhmann2012b} or \cite{intravaia2016b}, we quickly calculate the integration over polar coordinates (assuming $\omega>0$). First, we perform the integration over $\varphi$ and find
%
\begin{align}
  \int \frac{\dd^2\vv k}{(2\pi)^2}
  \mathrm{Im}\left\{\underline{G}_0(\vv k, z\to z',\omega)\right\} &=
  \frac{1}{4\pi\epsilon_0}
  \int_0^{\omega/c} \dd k \,k
  \frac{1
}{\sqrt{\omega^2/c^2-k^2}}
    \mathrm{diag}\left[
     \frac{\omega^2}{c^2}-  \frac{k^2}{2},\,\frac{\omega^2}{c^2}-\frac{k^2}{2},\,k^2
    \right]
  .
\end{align}
%
In order to perform the $k$ integration, we use the known integrals
\begin{align}
  \int_0^y \dd x \frac{x}{\sqrt{y^2-x^2}}=y,
 \quad \quad
  \int_0^y \dd x \frac{x^3}{\sqrt{y^2-x^2}}=\frac{2y^3}{3},
  \end{align}
  and find
\begin{align}
  \int \frac{\dd^2\vv k}{(2\pi)^2}
  \mathrm{Im}\left\{\underline{G}_0(\vv k, z\to z',\omega)\right\} &=
     \frac{\omega^3}{6\pi\epsilon_0 c^3}
     \mathbb{1}
     .
\end{align}
In general, when considering a constant motion of the source with $\vv r = \vv v t +\vv r_0$, we can shift the motion into the frequency dependence, which manifests as a Doppler shift $\omega\to\omega_+=\omega+k_x v$. Since we need several different integrals concerning the $k_x$ integration, we want restrict us here to the $k_y$ integration. The inequality from the Heaviside function then reads $\omega_+^2/c^2-k_x^2\geq k_y^2$. However, when employing this inequality for the upper $k_y$ bound we still have to fulfil the $\omega_+^2/c^2-k_x^2\geq 0$ bound with respect to the $k_x$ integration. In the following we perform the $k_y$ integration

\begin{align}
  \int\frac{\dd^2\vv k}{(2\pi)^2}  \mathrm{Im}\left\{\underline{G}_0(\vv k, z\to z',\omega_+)\right\} &=
  \int\frac{\dd k_x}{4\pi\epsilon_0}
  \theta(\frac{\omega_+^2}{c^2}-k_x^2)
  \int_0^{\xi} \frac{\dd k_y}{\pi}
  \frac{1
}{\sqrt{\xi^2-k_y^2}}
  \left(
  \mathbb{1}\frac{\omega_+^2}{c^2} -
    \mathrm{diag}\left[
      k_x^2,\,k_y^2,\,\xi^2-k_y^2
    \right]
  \right)
  ,
\end{align}
where we introduced $\xi=\sqrt{\omega_+^2/c^2-k_x^2}$. Again we take advantage from the following known integrations
\begin{align}
  \int_0^y \dd x \frac{1}{\sqrt{y^2-x^2}}=\frac{\pi}{2},
 \quad \quad
  \int_0^y \dd x \frac{x^2}{\sqrt{y^2-x^2}}=\frac{\pi y^2}{4},
  \end{align}
  and find

\begin{align}
  \int\frac{\dd^2\vv k}{(2\pi)^2}  \mathrm{Im}\left\{\underline{G}_0(\vv k, z\to z',\omega_+)\right\}f(\omega,k_x) &=
  \int\frac{\dd k_x}{8\pi\epsilon_0}
  \theta(\xi^2)
  \left(
  \mathbb{1}\frac{\omega_+^2}{c^2} -
    \mathrm{diag}\left[
      k_x^2,\,\frac{\xi^2}{2},\,\xi^2-\frac{\xi^2}{2}
    \right]
  \right)f(\omega,k_x)
  \\
&=
  \int\frac{\dd k_x}{8\pi\epsilon_0}
  \theta(\xi^2)
    \mathrm{diag}\left[
      \xi^2,\,\frac{\omega_+^2}{c^2}-\frac{\xi^2}{2},\,\frac{\omega_+^2}{c^2}-\frac{\xi^2}{2}    \right]f(\omega,k_x)
  \\
&=
\int_{-\frac{\omega}{c+v}}^{\frac{\omega}{c-v}}\frac{\dd k_x}{8\pi\epsilon_0}
    \mathrm{diag}\left[
      \xi^2,\,\frac{\omega_+^2}{c^2}-\frac{\xi^2}{2},\,\frac{\omega_+^2}{c^2}-\frac{\xi^2}{2}    \right]f(\omega,k_x)
      .
\end{align}
Here the $f(\omega,k_x)$ indicates potential weight functions. In the context of non-contact friction the weight function can take several forms
\begin{align}
  f(\omega,k_x) &=
  \begin{cases}
  1
  \\
  k_x
  \\
  \frac{1}{1-\exp(-\beta\hbar[\omega+k_xv])}
  \\
  \frac{k_x}{1-\exp(-\beta\hbar[\omega+k_xv])}
  \end{cases}
\end{align}
While the first two cases lead to simple polynomial expressions, the last two cases can be solved with the aid of the undetermined integrals
\begin{align}
  \int \dd k_x \frac{1}{1-\exp(-\hbar\beta[\omega+k_x v])} &= \frac{\ln\left(e^{\hbar\beta(\omega+k_xv)}-1\right)}{\hbar\beta v}
  ,\\
  \int \dd k_x \frac{k_x}{1-\exp(-\hbar\beta[\omega+k_x v])} &= \frac{\hbar\beta k_x v\ln\left(1-e^{\hbar\beta(\omega+k_xv)}\right) + \mathrm{Li}_2(e^{\hbar\beta(k_xv+\omega)})}{(\hbar\beta v)^2}
  ,\\
  \int \dd k_x \frac{k_x^2}{1-\exp(-\hbar\beta[\omega+k_x v])} &=\frac{k_x^2 v^2 \hbar \beta ^2 \log \left(1-e^{\hbar \beta  (k_x v+\omega )}\right)+2 k_x v \hbar \beta  \text{Li}_2\left(e^{(k_x v+\omega ) \hbar \beta }\right)-2 \text{Li}_3\left(e^{(k_x v+\omega ) \hbar \beta }\right)}{v^3 \hbar \beta ^3}
  ,\\
  \int \dd k_x \frac{k_x^3}{1-\exp(-\hbar\beta[\omega+k_x v])} &=\frac{k_x^3 v^3 \hbar \beta ^3 \log \left(1-e^{\hbar \beta  (k_x v+\omega )}\right)+3 k_x^2 v^2 \hbar \beta ^2 \text{Li}_2\left(e^{(k_x v+\omega ) \hbar \beta }\right)}{v^4 \hbar \beta ^4}
\\
&+
\frac{-6 k_x v \hbar \beta  \text{Li}_3\left(e^{(k_x v+\omega ) \hbar \beta }\right)+6 \text{Li}_4\left(e^{(k_x v+\omega ) \hbar \beta }\right)}{v^4 \hbar \beta ^4}
\end{align}
where $\mathrm{Li}_n(x)=\sum_{k=1}^\infty \frac{x^k}{k^n}$ is the polylogarithm (maybe we can use the library presented by Kirchner \cite{kirchner2016}?).

\begin{align}
  \int\frac{\dd^2\vv k}{(2\pi)^2}  \mathrm{Im}\left\{\underline{G}_0(\vv k, z\to z',\omega_+)\right\}k_x
  &=
\frac{\omega^4}{6\pi\epsilon_0}
 \frac{ v c }{(c^2-v^2)^3}
\mathrm{diag}\left[
    1,\,
  \frac{  2 c^2+v^2}{ c^2-v^2}
  ,\,
  \frac{ 2 c^2+v^2}{ c^2-v^2}
\right]
\\
&\stackrel{c\gg v}=
\frac{v/c }{6\pi\epsilon_0}
 \frac{ \omega^4 }{c^4}
\mathrm{diag}\left[
    1,\,
    2
    ,\,
     2\right]
.
\end{align}

\begin{align}
  \int\frac{\dd^2\vv k}{(2\pi)^2}  \mathrm{Im}\left\{\underline{G}_0(\vv k, z\to z',\omega_+)\right\}\frac{1}{\hbar\beta\omega_+}
  &=
  \frac{1}{8\pi\epsilon_0}
  \frac{\omega^2}{v^3\hbar\beta}
  \mathrm{diag}
  \begin{bmatrix}
  \frac{2c v}{c^2-v^2}-2\arctanh\left(\frac{v}{c}\right)
  \\
  \frac{3 c v^3-c^3 v}{\left(c^2-v^2\right)^2}+\arctanh\left(\frac{v}{c}\right)
  \\
  \frac{3 c v^3-c^3 v}{\left(c^2-v^2\right)^2}+\arctanh\left(\frac{v}{c}\right)
  \end{bmatrix}
  \\
  &\stackrel{c\gg v}=
  \mathbb{1}\frac{1}{8\pi\epsilon_0}\frac{4\omega^2}{3\hbar\beta c^3}
  =
  \mathbb{1}\frac{(2\pi)^2}{\epsilon_0}\frac{1}{3\lambda_\mathrm{th}\lambda^2}
\end{align}
where we used that $\frac{2\pi}{\lambda}=\frac{\omega}{c}$ and $\hbar\beta=\omega_\mathrm{th}$.

\begin{align}
  \int\frac{\dd^2\vv k}{(2\pi)^2}  \mathrm{Im}\left\{\underline{G}_0(\vv k, z\to z',\omega_+)\right\}
  &=
  \frac{1}{8\pi\epsilon_0}\mathrm{diag}\left[
  \frac{4 c \omega ^3}{3 \left(c^2-v^2\right)^2}
    ,\,
    \frac{4 c \omega ^3 \left(c^2+v^2\right)}{3 \left(c^2-v^2\right)^3}
  ,\,
\frac{4 c \omega ^3 \left(c^2+v^2\right)}{3 \left(c^2-v^2\right)^3}
\right]
  \\
  &\stackrel{c\gg v}=
  \mathbb{1}
\frac{\omega^3}{6\pi \epsilon_0 c^3}
\end{align}
In the zero temperature limit $1+n(\omega+k_xv)\to \theta(\omega+k_xv)$. However, the Heaviside distribution does not influence the integration since $-\omega/(c+v)\geq -\omega/v$ for $\omega>0$.

\begin{align}
  \int\frac{\dd^2\vv k}{(2\pi)^2}  \mathrm{Im}\left\{\underline{G}_0(\vv k, z\to z',\omega_+)\right\}\frac{k_x}{\hbar\beta\omega_+}
  &=
  \frac{1}{8\pi\epsilon_0}
  \frac{\omega^3}{3v^4\hbar\beta}
  \mathrm{diag}
  \begin{bmatrix}
    2\frac{5 c v^3-3 c^3 v}{\left(c^2-v^2\right)^2}+6 \arctanh\left(\frac{v}{c}\right)
    \\
    \frac{8 c^3 v^3-3 c^5 v-13c v^5}{\left(v^2-c^2\right)^3}+3 \arctanh\left(\frac{v}{c}\right)
    \\
    \frac{8 c^3 v^3-3 c^5 v-13c v^5}{\left(v^2-c^2\right)^3}+3 \arctanh\left(\frac{v}{c}\right)
  \end{bmatrix}
  \\
  &\stackrel{c\gg v}=
  \frac{1}{\pi\epsilon_0}
  \frac{2 v \omega^3}{15 \hbar\beta c^5}
  \mathrm{diag}\left[1,\,2,\,2\right]
\end{align}
The respective power spectrum in the classic limit then reads
\begin{align}
  \underline{S}(\omega)\approx\mathbb{1}
  \frac{ \alpha_0 \omega_a^2}{\beta\omega}\delta(\omega_a^2-\omega^2)=\mathbb{1}\frac{k_\mathrm{B}T\alpha_0}{2}\left[\delta(\omega-\omega_a)+\delta(\omega+\omega_a)\right]
\end{align}
\bibliography{lib}
\end{document}


\chapter{Non-standard analysis}

Standard part function

Hyperreal

Hypernatural

\section{Infinitesimal}


\section{The Safety Theorem}
\label{sec:safety}

The safety theorem says that only one block may be certified in a round,
which means the blockchain will not fork.
The key assumptions of the Coq proof are some properties of cryptographic self-selection.
The cryptographic arguments for the correctness of cryptographic self-selection
are given by Chen~et~al.~\cite{Chen2019,Chen2018}, but we have not formalized cryptographic
primitives and results, so our development takes these properties as unproven assumptions.

The statement of the theorem says that any two certificates from the same round
must be for the same block:

\begin{lstlisting}[language=Coq]
Theorem safety : forall (g0:GState) (trace:seq GState) (r:nat),
  state_before_round r g0 ->
  is_trace g0 trace ->
  forall (p1:nat) (v1:Value), certified_in_period trace r p1 v1 ->
  forall (p2:nat) (v2:Value), certified_in_period trace r p2 v2 ->
  v1 = v2.
\end{lstlisting}

Note the preconditions \lstinline{state_before_round r g0}, which states that
that initial state \lstinline{g0} is far enough back in history that no user
had yet taken any actions in round \lstinline{r}, and \lstinline[breaklines=true]{is_trace g0 trace},
which states that the trace is a valid execution trace beginning at \lstinline{g0},
with all steps taken according to the global transition relation.

It is possible to end up with certificates from multiple periods of a round.
Specifically, during a network partition which allows the adversary to delay messages,
if cert-vote messages are delayed enough for some nodes to advance past the
period where the first certificate was produced, but these multiple certificates
will still be for the same block.

The proof of the main safety theorem stated above first considers two
cases, for whether the two certificates are from the same period or different
periods.

The case when the certificates are in the same period is handled in the lemma
\lstinline{one_certificate_per_period}.
This proof uses the quorum hypotheses to conclude that there is an honest node
that contributed a cert-vote to both certificates,
and concludes by the lemma \lstinline{no_two_certvotes_in_p} which shows that an
honest node cert-votes at most once in a period (this is proved by analyzing
all transition steps an honest node can take).

The case of different periods is proved using an invariant, which is established
in the period that produces the first certificate and keeps holding for all later
periods of the same round.
The invariant property is that no step of the period produced a quorum of
open next-votes, and any quorum of value next-votes must be for a given value $v$.
This property is defined as \lstinline{period_nextvoted_exclusively_for}.

Lemma \lstinline{certificate_is_start_of_next_period} shows that this is true of
next votes from the period that produced the first certificate,
Lemma \lstinline{excl_enter_excl_next} shows that if this is true for one
period, it is true for the next.
Lemma \lstinline{prev_period_nextvotes_limits_cert_vote} shows that if the
invariant holds for one period then any certificate produced in the next period
can only be for the same value.

Most of the proofs only need the simpler quorum hypotheses that say that any
two quorums from a single step have an honest user in common.
A more complicated quorum hypothesis which relates different steps
is only needed for proving the lemma
\lstinline{certificate_is_start_of_next_period}.
The intuition is that if committee members are selected approximately randomly from
the full population of users, then any property which is true for all honest
members of one quorum must be true for most honest users in the overall population,
so any other quorum even at different steps must have at least some honest
users that also have that property.
But this isn't true if the property is that of being a committee member on
a particular step, and we don't know how to formalize the idea of a property
being unrelated to committee membership, so we assume this hypothesis only
for the specific predicate we need.

The inter-quorum hypothesis is used in between the cert-voting step and
that produced the first certificate any later next-voting steps in the same period,
with the property being whether a user had seen a quorum of soft-votes by the
time that user finished the cert-voting step.
By definition of a certificate and analysis of the transitions which send
cert-votes, this property holds for every honest user which contributed a cert-vote
to the certificate.
Then by the inter-quorum assumptions, any quorum of next-votes must include
a vote from at least one honest user which had seen a quorum of soft-votes before
making their next-vote.
By examining possible transitions this user couldn't make an open next-vote and
could only next-vote for the value which received a certificate, so the invariant
is established.

To prove the latter two lemmas \lstinline{excl_enter_excl_next} and
\lstinline{prev_period_nextvotes_limits_cert_vote} we consider that any quorum
of next-votes or cert-votes contains an honest voter, and looking at the
preconditions for an honest user to make a cert-vote or next-vote.
In either case making such a vote for a value besides $v$ or making an open
next-vote requires that the honest user had received a quorum of
soft-votes for another value or a quorum of open next-votes from the
previous period.
The latter is ruled out because the invariant says no such quorum of votes
was sent, and lemma \lstinline{no_bottom_quorums_during_from_nextvoted_excl}
contains the argument that therefore no such quorum of votes could
be received.
Lemma \lstinline{no_bottom_quorums_during_from_nextvoted_excl}
states that any quorum of soft-votes must be votes for value $v$ if the
invariant for value $v$ held in the previous period.
It is proved by analyzing the transitions which move a user to a new period
to show that all honest users get $v$ as their ``starting value'',
and analyzing the transitions which send soft-votes to show that this
starting value and the absence of quorums of open next-votes means any honest
soft-vote can only be for value $v$.

By the overall inductive argument, we then have the safety theorem that the
protocol cannot fork.


\section*{General conclusion}

%% Introduction:
The purpose of this work was the development of a numerical method allowing the accurate solution of hyperbolic problems in solid mechanics.
This class of mathematical problems governs the propagation of waves in finite deforming media.
Given the ability to deal with large deformations enabled by mesh-free methods and the possibility of describing discontinuous solutions provided by the DG approximation, it has been proposed to merge those two approaches.
Furthermore, particular attention has been paid throughout this manuscript to the characteristic structure of the solution of hyperbolic problems in order to: (i) provide qualitative and quantitative comparisons between numerical solutions and exact ones; (ii) allow numerical schemes to mimic the behavior of physical systems.

$\newline$
%% Chapter2: Hyperbolic partial differential equations for solid dynamics
In chapter \ref{chap:chap2} the balance laws and constitutive equations of solid mechanics have been derived and written as a system of conservation laws in conservative form.
The characteristic analysis of the associated quasi-linear form then leads to the formulation of a hyperbolicity condition of the system in terms of the eigenstructure of the acoustic tensor.

% Type of waves
Exact solutions of one-dimensional problems have then been presented.
First, the existing solutions of Riemann problems in elastic and elastoplastic solids with linear hardening under small strains emphasized that discontinuous waves may propagate.
Second, \textbf{the derivation of exact solutions of Picard problems in a one-dimensional Saint-Venant-Kirchhoff hyperelastic medium} highlighted the existence of shocks and rarefaction waves in solid dynamics.
Given the complexity hyperbolic systems may present, especially for more than one space dimension or other constitutive models, a well-known approximate-state Riemann solver has been presented.
Such solvers represent an ideal way to take into account the characteristic structure of the solutions within numerical schemes and are therefore widely used in finite volume.

$\newline$
%% Chapter3: The Discontinuous Galerkin Material Point Method
\textit{Eulerian} and Lagrangian formulations of the Material Point Method have been recalled in chapter \ref{chap:chap3}.
This method constitutes the starting point of the present work due to its ability to avoid the mesh instabilities caused by large deformations often met in solid mechanics.
Nevertheless, the oscillating solutions provided by this numerical scheme prevent accurately following the waves.
The aforementioned numerical noise can be eliminated by going back to the early version of the approach: the Particle-In-Cell method, at the cost of additional numerical diffusion.
Thus, the approach proposed consisted of: (i) removing the oscillations by re-introducing within the MPM the diffusive mapping between material points and grid nodes used in PIC; (ii) reducing the diffusion thus introduced by means of the discontinuous Galerkin approximation.

\textbf{The Discontinuous Galerkin Material Point Method has therefore been derived} with a total Lagrangian formulation.
The method inherits appealing features of the finite element, finite volume and material point methods.
%% Similarities with FVM
First, it is based on the weak form of a system of conservation laws so that the same order of accuracy is achieved for both velocity and gradients.
Second, numerical fluxes defined at element interfaces arising in the weak form are computed with the solution of Riemann problems by means of the approximate-state Riemann solver presented in chapter \ref{chap:chap2}.
This approach not only allows the introduction of the characteristic structure in the numerical solution, but it also enables \textbf{taking into account transverse corrections by adapting the Corner Transport Upwind method}.
Third, the DGMPM solution scheme can be combined with ODE integrators for source terms if fractional-step methods are considered.
The last three points are common with FVM.
Then, the FEM approximation using polynomial shape functions is used, thus providing a convenient framework for high-order approximation.
In particular, as for other DG-methods, the order of approximation may be modified element-wise.
At last, the arbitrary grid of the MPM, in which the particles move while carrying fields and internal variables, enables the employment of mesh-adaption strategies without the need for additional diffusive projection steps.
Notice however that the last aspect is not considered in this thesis.

Then, the numerical analysis of DGMPM schemes showed that the stability properties of the method may be better than those of the original MPM depending on the space discretization used.
% 1D stability
Namely, if the DGMPM semi-discrete system is discretized in time with the forward Euler algorithm, the optimal Courant number can be achieved when one particle lies in every cell of a one-dimensional grid.
The same result holds if the second-order Runge-Kutta time discretization is used, and even for more than one material point per cell depending on their positions.
Even though the condition CFL=$1$ is not valid in general, \textbf{a formula for evaluating the critical Courant number allows the ensuring of the stability of the scheme}, whereas it is not possible for the MPM.
% 2D stability
Analogously, the two-dimensional DGMPM scheme exhibits the optimal stability condition providing that one particle per cell is used along with the CTU algorithm for transverse corrections.
It has been also shown that the stability features of the two-dimensional scheme depend on the ratio of the characteristic speeds involved in the linear advection equation.
% Convergence (numerically)
On the other hand, the convergence analysis of the method on a one-dimensional linear elasticity problem under small strains showed that by using first-order shape functions, only first-order accuracy can be achieved for velocity and gradients.
Although one could expect second-order convergence since the DGMPM approximation is similar to that of FEM, the PIC mapping of the updated nodal velocity from the grid to particles used yields first-order accuracy.

$\newline$
%% Chapter4: Numerical Results
Chapter \ref{chap:chap4} was devoted to the illustration of the DGMPM on simulations of solid dynamics problems.
Comparisons with other numerical methods and exact solutions showed very good behavior.
More specifically, since the optimal \text{CFL} number can be achieved, the DGMPM is able to capture the discontinuities arising in the Riemann problem in an elastic bar within the linearized geometrical framework.
On the other hand, it has been shown that when this condition no longer holds, that is $\text{CFL}<1$, the method suffers less from diffusion than the original MPM using the PIC mapping.
Furthermore, the same behavior has been observed for a two-dimensional problem in an elastic medium.
% Hyperelasticity
The DGMPM moreover provides good results on problems involving large deformations in one and two-dimensional solids.
Hence, the method fulfills its objectives.

%% History-dependent constitutive models
Then, history-dependent constitutive models have been considered within the infinitesimal theory.
First, the solutions of a plane wave in an elasto-viscoplastic solid resulting from DGMPM, MPM, FVM and FEM have been compared.
In the stiff limit, that is when the viscosity is close to zero, the above solutions should tend to the elastic-plastic one.
The simulations based on fractional-step methods combined with the DGMPM highlighted that the use of suitable ODE integrators is required in order to compute the correct solution and the ability to achieve high-order accuracy.
Alternatively, dedicated approximate Riemann solvers can be employed within the DGMPM for elastoplasticity so as to take into account elastic as well as plastic characteristics and hence, to get more accurate solutions.
Nevertheless, the structure of the solutions of hyperbolic problems in elastic-plastic materials is only known for one-dimensional solids in such a way that approximate Riemann solvers do not exist for multi-dimensional cases.
%Those results then motivated further developments carried out in chapter \ref{chap:chap5}.

$\newline$
%% Chapter5: Contribution to the solution of elastic-plastic problems in two space dimensions
The simulations in history-dependent materials performed in chapter \ref{chap:chap4}, as well as the point of view adopted in this thesis, motivated the developments presented in chapter \ref{chap:chap5}.
Indeed, the need for a better understanding of the characteristic structure of elastic-plastic hyperbolic problems arises from the lack of approximate Riemann solvers in more than one-dimension.
%As a result, the spectral analysis of hyperbolic systems in elastoplastic solids under small strain has been proposed.
Although some references have proposed the spectral analysis of hyperbolic systems in elastoplastic solids under small strains since the 60s, the problems treated were limited to particular cases of plane stress and plane strain conditions.
The present approach consisted in \textbf{rewriting the existing formulations by means of the elastoplastic stiffnesses to provide a unified framework for all two-dimensional problems in the Cartesian coordinates system}.
It is well-known that the particularity of elastoplastic problems in more than one space dimension lies in the fact that the wave pattern of the solution depends on the external loads.
More precisely, one must be able to connect the stationary stress state of a Picard problem to the initial data through loading paths followed inside fast and slow simple waves of combined-stress.
Hence, \textbf{the mathematical study of the loading paths} resulting from the characteristic analysis of the hyperbolic system, has been performed.
% The characteristic analysis of the hyperbolic system thus written then enabled to highlight the existence of two families of simple waves propagating in elastoplastic media.
% The combined stress-nature of these waves has next be emphasized through \textbf{the mathematical study of loading paths followed inside fast and slow simple waves}.
This analysis resulted in the identification of typical behaviors of these stress paths. %which are of major importance since they allow to determine the wave pattern of the solution of Picard problems for given external loadings. % that may help to build an approximate Riemann solver.
Nevertheless, the complexity of the equations prevents the complete characterization of the stress evolution inside the simple waves.
As a consequence, a numerical study of the loading paths based on the implicit integration of the ODEs governing the evolution of the system within the waves has been carried out for plane strain and plane stress problems.
First, the particularization of the equations to those governing the thin-walled tube problem treated in the literature, allowed to validate the present approach.
Second, \textbf{the loading paths followed inside fast and slow waves for problems under plane strain and plane stress have been plotted} so that additional features have been highlighted.
Finally, some ideas in order to develop an iterative Riemann solver have been drawn based on the identified behaviors of the loading paths.

%% Ajouter un mot pour répondre aux objectifs fixés
This aspect of the present work aimed at building numerical schemes that are based on a robust discretization, and embed a sufficient amount of information in order to mimic the physical response.
Though interesting features of the loading paths have been emphasized, additional effort is required so as to introduce the characteristic structure by means of an approximate Riemann solver.

\subsection*{Future work}
This thesis has consisted of: (i) the foundation of a computational framework for the simulation of hyperbolic problems in finite deforming solids which enables several extensions; (ii) the study of the characteristic structure of the solution of elastoplastic hyperbolic problems in two space dimensions.
%Each of these aspects comes with more or less long-term perspectives.
Each of these aspects comes with medium/long term perspectives.

\subsubsection*{(i) Improving the DGMPM}
%% High-order approximation
Although the DGMPM has been developed in order to capture discontinuities so that its first-order accuracy is sufficient, the method should be adapted so as to achieve higher-order convergence in regions where the solution is smooth.
% p-adaption
Higher-order accuracy should be achieved by using shape functions based on high-order polynomials ($p$-adaption).
Notice furthermore that the polynomial order can be set arbitrarily within the background mesh due to the discontinuous Galerkin approximation.
Nevertheless, the particle-based quadrature of the DGMPM weak form may limit the polynomial order for a given space discretization in order to avoid problems due to reduced integration.
Indeed, it has been seen that the diagonal lumping of the mass matrix can balance the reduced integration with one particle and linear shape functions, but nothing can be stated for higher-order polynomials.
Hence, analogously to recent developments of the MPM \cite{MPM_BSpline1,MPM_BSpline2,IMPM}, functions reconstruction techniques such as moving least squares or spline interpolation may be employed in order to use Gauss quadrature even for few particles in a cell.
However, such an implementation would be equivalent to the DGFEM which suffers from a very restrictive \text{CFL} condition that prevents the capturing of discontinuities, which is prohibitive.
One solution to circumvent this issue would be to combine the $p$-adaption with $h$-adaption by refining the arbitrary grid in the vicinity of discontinuities.
The underlying idea is to use a thin layer of elements containing one particle along the discontinuity, for which the \text{CFL} number can be set to unity.
The thickness $h$ of that layer would be set so that the time step $\Delta t^s$ corresponding to the most restrictive Courant number in the smooth regions \text{CFL}$^s$, allows the capture of the discontinuity, that is: $\Delta t^s = \text{CFL}^s \frac{h}{c}$, where $c$ is the speed of the fastest wave.

% particle-adaption
% Remove material points
Alternatively, one can imagine a \textit{particle}-adaption, while ensuring the conservation of mass, so that the particle-based integration can be adapted to the regularity of the solution.
That is: remove material points in such a way that one particle per cell is used near a discontinuity; add particles in elements in which the polynomial order requires so.
Furthermore, one could benefit from Roe's theorem \ref{th:Roe} in order to adapt the distribution of particles so that a given order of accuracy is achieved for a given polynomial order, as suggested in section \ref{sec:DGMPM_analysis}.
Nonetheless, it is not guaranteed that such a configuration can be found.

% Waves or slope limiters
Slope or wave limiters have not been considered so far within the DGMPM due to the non-oscillatory solutions provided by the scheme.
Nevertheless, the extension of the method to higher-order approximation may require the introduction of such numerical tools that are well-known in DG-methods \cite{Cockburn}.

% RK2 en 2D
% At last, the second-order Runge-Kutta time integrator has not been considered for two-dimensional problems, due to the lack of a formula to determine the critical \text{CFL} number for a given space discretization.
% Such a two-stages time discretization could be embedded in the method in order to reduce the numerical diffusion when more than one particle lies in a cell, providing that a von-Neumann analysis of two-dimensional DGMPM schemes is performed.
The second-order Runge-Kutta time integrator has not been considered for two-dimensional problems, due to the lack of a formula to determine the critical \text{CFL} number for a given space discretization.
Such a two-stages time discretization could be embedded in the method in order to reduce the numerical diffusion when more than one particle lies in a cell, providing that a von-Neumann analysis of two-dimensional DGMPM schemes is performed.

% Antonio Gil
At last, some properties of the method which have not be considered so far must be investigated, that is, the conservation of angular momentum and the performances for bending dominated problems in the nearly-incompressible limit.
The DGMPM formulation might then require the use of an alternative projection of the nodal solution that conserves the angular momentum, and the introduction of the Jacobian $J$ as a conserved variable to solve bending dominated nearly-incompressible deformations \cite{Gil_HE}.

\subsubsection*{(ii) On the solution of hyperbolic systems in elastoplastic solids}
%%% Approx RP elastoplastic
The study of the characteristic structure of hyperbolic systems in elastic-plastic solids allows perspectives.

First, the iterative procedure inspired by that of \textsc{Lin} and \textsc{Ballman} \cite{Lin_et_Ballman} and proposed in chapter \ref{chap:chap5} has to be implemented.
Moreover, the analytical developments proposed here can be prosecuted in order to get additional information about the solution so that an approximate Riemann solver can be developed.

Second, the framework provided allows to take into account more general hardening laws that is, kinematic, combined isotropic and kinematic, and nonlinear hardenings.
Nevertheless, the resulting equations should be much more complex and prevent the building of iterative or approximate Riemann solvers.

At last, plastic shocks, which raised scientific questions that are still unanswered, have to be studied for they are involved in problems of dynamic impacts in elastic-plastic solids.

% Essaye le solveur itératif
% Développer un solveur approximé
% D'autres écrouissage
% Etude des chocs plastiques

%%% Local Variables:
%%% mode: latex
%%% ispell-local-dictionary: "american"
%%% TeX-master: "../mainManuscript"
%%% End:


\subsection{Vector of Locally Aggregated Descriptors (VLAD)}


\section{Particle Characterization and Tracking Using Optical Interferences}
\label{sec:chapter2}

\subsection{Introduction}

Properties of coherent light to produce interference has been widely deployed in metrology for a long time as illustrated by, for example, the famous Fabry-Pérot  \cite{fabry_theorie_1899, perot_application_1899} and Michelson interferometers \cite{michelson_relative_1887}. The latter was initially employed to evaluate the rotation of the Earth and is still deployed today for the recent measurement of gravitational waves
\cite{ligo_scientific_collaboration_and_virgo_collaboration_gw151226_2016}.
Since the beginning of the century, interest on tracking and characterizing colloidal particles risen thanks to the democratization of micro fluidics and lab-on-a-chip technologies. In the following, I will provide some insights on the three most used tracking methods:

\begin{itemize}
	\item Reflection Interference Contrast Microscopy (\gls{RICM})
	\item Lorenz-Mie theory
	\item Rayleigh-Sommerfeld back propagation
\end{itemize}

The first one, \gls{RICM}, uses the principle of optical-path difference in a Michelson interferometer. The other two, use the interferences between the light scattered by the colloid and the incident light. Generally, both sources are collinear, so that we speak of in-line holography.

\subsection{Reflection Interference Contrast Microscopy}

\gls{RICM} was first introduced in cell biology by Curtis to study embryonic chick heart fibroblasts \cite{curtis_mechanism_1964} in 1964. \gls{RICM} gained in popularity 40 years after both in biology and physics \cite{filler_reflection_2000, siver_use_2000, weber_2_2003, limozin_quantitative_2009, nadal_probing_2002, raedler_measurement_1992}. It was also used recently in soft matter physics to study the elastohydrodynamic lift at a soft wall \cite{davies_elastohydrodynamic_2018}.

When we illuminate a colloid with a plane wave from the bottom, a part of the light is reflected at the surface of the glass substrate and another part, at the colloid surface. The difference of optical paths between two reflections creates an interference pattern. Let us focus on the mathematical description of this phenomenon. In the far field, we can describe two one-dimensional electric field vectors with same angular frequency $\omega$ \cite{f_bohren_absorption_1998} as propagative waves, through:

\begin{equation}
	\vec{E}_1(\vec{r}, t) = \vec{E}_{0_1} \cos(\vec{k}_1 \cdot \vec{r} - \omega t + \epsilon_1) ~,
\end{equation}
and:
\begin{equation}
	\vec{E}_2(\vec{r}, t) = \vec{E}_{0_2} \cos (\vec{k}_2 \cdot \vec{r} - \omega t + \epsilon_2) ~,
\end{equation}

\nomenclature{$\vec{E}$}{Electrical field}
\nomenclature{$k$}{Wave number}
\nomenclature{$\omega$}{Pulsation}

where the $k_i$ are the wave vector satisfying $|\vec{k_i}|=k =2\pi n_{\mathrm{m}}/\lambda$, the angular wavenumber, $\lambda$ being the illumination wavelength, $n_\mathrm{m}$ the optical index of the medium, $\epsilon_{1,2}$ the initial phases of each wave and $\vec{r}$ the position. Here, the origin ($\vec{r} = \vec{0}$) is taken at the position of the first reflection (\textit{i.e.} the glass slide). Thus, on the particle, $\vec{r}$ is given by the particle's height such that $|r| = z$.

\begin{figure}[H]
	\centering
	\includegraphics[scale=1]{02_body/chapter2/images/RICM.png}
	\caption{Figure from \cite{davies_elastohydrodynamic_2018} representing \gls{RICM} with two wavelengths. (a) Left: interference patterns created with a wavelength $\lambda_1 = 532$ nm (scale bar $ 5~\mathrm{\mu m}$).
		Right: radial intensity profile (black dots) extracted from the image, azimuthally averaged (magenta line) and fitted with Eq.~(\ref{Eq.RICM}) to measure the height of the particle (here noted $h$). (b) Same as (a) with a wavelength $\lambda_2 = 635$ nm. (c) Time series of the height $h$ of a particle  (green: $ \lambda_1$, purple: $\lambda_2$) and the particle velocity measured along the flow (in blue). }
	\label{fig.RICM}
\end{figure}

Experimentally, one measures the intensity of the interference patterns. They can be computed from the time-averaged squared total electric field $\vec{E} = \vec{E}_1 + \vec{E}_2$. The measured intensity is thus given by:

\begin{equation}
	\begin{aligned}
		I & = \left\langle \vec{E}^2 \right\rangle = \left\langle \vec{E}_1^2 + \vec{E}_2^2 + 2\vec{E}_1 \cdot \vec{E}_2 \right\rangle
		= \left\langle \vec{E}_1^2 \right\rangle + \left\langle \vec{E}_2^2 \right\rangle  + 2 \left\langle \vec{E}_1 \cdot \vec{E}_2 \right\rangle  ~,\\
	\end{aligned}
\end{equation}

where $ \langle \vec{E}_1^2 \rangle $ and  $\langle \vec{E}_2^2 \rangle$ are respectively given by $I_1$ and $I_2$, the incident intensities. Using trigonometry, we have:

\begin{equation}
	\left\langle
	\vec{E}_1 \cdot \vec{E}_2\right\rangle =
	\left\langle
	\frac{1}{2} \vec{E}_{0_1}  \vec{E}_{0_2}
	\left[
	\cos
	\left(
	\vec{k}_1 \cdot \vec{r} - \vec{k}_1 \cdot \vec{r} + \phi
	\right)
	+
	\cos
	\left(
	2\omega t + \phi'
	\right)
	\right]
	\right\rangle_t~.
\end{equation}

As we average over time, the second cosine vanishes. Thus one has:

\begin{equation}
	\left\langle \vec{E}_1 \cdot \vec{E}_2 \right\rangle = \frac{1}{2} \left\langle  \vec{E}_{0_1}  \vec{E}_{0_2}\right\rangle
	\cos
	\left(
	\vec{k}_1 \cdot \vec{r} - \vec{k}_2 \cdot \vec{r} + \phi
	\right)  ~,
\end{equation}

with $\phi$ the phase difference between the two fields, which is usually equal to $\pi$ due to the reflection properties on a higher optical index. Indeed, a colloid has generally a greater optical index than the dilution medium.  Finally, the total intensity can be read as:

\begin{equation}
	I = I_1 + I_2 + 2 \sqrt{I_1 I_2}
	\cos
	\left(
	\vec{k}_1 \cdot \vec{r} - \vec{k}_2 \cdot \vec{r} + \phi
	\right) ~.
\end{equation}

By taking $k_1 = - k_2$ due to the reflection properties, we have:

\begin{equation}
	I = I_1 + I_2 + 2 \sqrt{I_1 I_2}
	\cos
	\left(
	\frac{4 \pi n_{\mathrm{m}}}{\lambda} z + \phi
	\right) ~.
\end{equation}

So far we supposed that the reflection occurs at a unique point; however, we would likely be using spherical colloids. Therefore, illuminating from the bottom, the reflection happens on half of the sphere surface. Moreover, thanks to the spherical geometry the holograms exhibit a radial symmetry, one can write the radial interference intensity $I(x)$, with $x$ the distance from the pattern center, through \cite{ raedler_measurement_1992}:

\begin{equation}
	I(x) = A_0 + A_1 \mathrm{e}^{-b_1 x^2} + A_2\mathrm{e}^{-b_2 x^2} \cos \left[ \frac{4\pi n_m}{\lambda}\left( g(x) + z \right) + \phi \right] ~,
	\label{Eq.RICM}
\end{equation}

Where $A_1$ and $b_1$ are parameters \cite{raedler_measurement_1992} that fit the slightly bent background that arises from diffuse reflection on the upper part of the sphere, $A_2$ and $b_2$ the decaying contrast of the higher order maxima, $A_0$ background intensity, and

\begin{equation}
	g(x) = a - \sqrt{a^2 - x^2} ~,
\end{equation}

is the sphere profile, to consider  the increase sphere-wall as $x$ increases.
Finally, this method benefits from equations that are computationally light and enable a quick tracking of particles. However, as we can see in Eq.~(\ref{Eq.RICM}), because of the periodicity of the cosine, the interference pattern is the same for all heights $z$ separated by a distance $\lambda / (2n_\mathrm{m}) \approx 200 $ nm for $\lambda = 532$ nm and $n_{\mathrm{m}} = 1.33$.

It is possible to extend this separation to $\simeq 1.2 ~ \mathrm{\mu m}$ as used in \cite{davies_elastohydrodynamic_2018} length by using two different wavelengths. Despite the spatial resolution of this method which can attain $10$ nm, the measurement ambiguity is not compatible with the study of Brownian motion due to the periodicity above. Hence \gls{RICM} it is not usable in our context. As a matter of fact, we experimentally reach height spans of a few microns.

\subsection{Lorenz-Mie theory}
\label{chap:LM_fit}

When a colloid is illuminated with a plane wave, a part of the light is scattered. In consequence, the incident field $\vec{E}_0$ and scattered field $\vec{E}_\mathrm{s}$ interferes. The interference patterns thus obtained are called holograms. If the particle is not smaller than the illumination wavelength, it is not possible to use Rayleigh's approximations \cite{strutt_lviii_1871} to describe the scattering. Instead, one needs to use the Lorenz-Mie theory for dielectric spheres. This theory was developed by Lorenz and independently by Mie in 1880 and 1908, respectively \cite{lorenz_lysbevaegelsen_1890, mie_beitrage_1908}.

It is in the early 2000s that the Lorenz-Mie theory was first used in order to track and characterize particles \cite{ovryn_imaging_2000, lee_characterizing_2007}. Since then, a lot of studies have been realized with this technique \cite{katz_applications_2010}. In the following, I will describe the Lorenz-Mie method. In this part, the height $z$ of the particle is the distance between the particle's center and the focal plane of the objective lens.

Let the incident field be a plane wave uniformly polarized along an axis $ \hat{e}$, with an amplitude $E_0$ and propagating along the $\hat{z}$ direction :
\begin{equation}
	\vec{E}_0(\vec{r},z) = E_0(\vec{r}) \mathrm{e}^{ikz}\hat{e}
\end{equation}

Let us consider a particle of radius $a$ at a position $\vec{r}_\mathrm{p} $. In such case, the scattered field can be written using the Lorenz-Mie theory \cite{f_bohren_absorption_1998}, as:

\begin{equation}
	\vec{E}_\mathrm{s}(\vec{r}, z) =  \vec{f}_\mathrm{s}(k(\vec{r} - \vec{r}_p))E_0(\vec{r}) \exp \left(-ikz\right) ~,
	\label{EMie}
\end{equation}

with $\vec{f}_\mathrm{s}$, the Lorenz-Mie scattering function. The intensity $I$ that we measure at $\vec{r}$ is given by the intensity of superimposition of the incident and scattered amplitudes. Since the measurements are done at the focal plane, i.e. $z = 0 $, $I$ is given by:

\begin{equation}
	\begin{aligned}
		I(\vec{r}) & = |\vec{E}_\mathrm{s}(\vec{r}, 0) + \vec{E}_0(\vec{r}, 0)|^2 \\
		& = E_0^2(\vec{r}) + 2 E_0^2\Re \left(\vec{f}_\mathrm{s}(k(\vec{r}- \vec{r}_p)) \hat{e}\right) + E_0^2 \left| \vec{f}_\mathrm{s}(k(\vec{r}- \vec{r}_p)) \right|^2 ~.
	\end{aligned}
\end{equation}

Most of the experimental defects on the images are due to spacial illumination variations caused by dust particles. They can be corrected by normalizing the image by the background. In another word, we normalize $I(\vec{r})$ by the intensity of the incident field $I_0 = E_0(\vec{r})^2$ which corresponds to the experimental background.

Experimentally, the background can be measured by different methods. One is to have an empty field of view and the other one, which is more convenient, is to compute the median of a stack of images. Additionally, for the latter to work, the video should be long enough for the particle to diffuse sufficiently. If this condition is not satisfied, a ghost of the particle will appear on the background. Moreover, this process permits getting rid of any immobile particles that could generate any additional noise. Examples of hologram before and after the normalization are shown in Figs.\ref{fig.Lorenz_mie_demo} a-c).

Finally, we write the normalized intensity as:

\begin{equation}
	\frac{I(\vec{r})}{I_0(\vec{r})} = 1 + 2 \Re
	\left(
	\vec{f}_\mathrm{s}(k(\vec{r}- \vec{r}_p)) \hat{e}
	\right)
	+
	|
	\vec{f}_\mathrm{s}(k(\vec{r}- \vec{r}_p))
	|^2
	\label{Eq.normalized_Mie}
\end{equation}

Now that we have the analytical form of the holograms' intensity, it is possible to fit an experimental one to Eq.~(\ref{Eq.normalized_Mie}) as shown in Figs.\ref{fig.Lorenz_mie_demo} d-e). For the sake of completeness, I will detail the Lorenz-Mie scattering function $\vec{f}_\mathrm{s}(k\vec{r})$, which is given by the series:

\begin{equation}
	\vec{f}_\mathrm{s}(k \vec{r}) = \sum _{n=1} ^{n_c}
	\frac
	{
		i^n (2n +1)
	}
	{
		n(n+1)
	}
	\left(
	i a_n \vec{N}^{(3)}_\mathrm{eln}(k\vec{r})
	-
	b_n \vec{M}^{(3)}_\mathrm{oln}(k\vec{r})
	\right)
	\label{Eq.Lorenz-Mie-function}
\end{equation}

where $\vec{N}^{(3)}_{eln}(k\vec{r})$ and $\vec{M}^{(3)}_{oln}(k\vec{r})$ are the vectorial spherical harmonics \cite{lock_generalized_2009, gouesbet_t-matrix_2010}, and $a_n$ and $b_n$ are coefficients depending on the particle and illumination properties. For a spherical and isotropic particle of radius $a$ and refractive index $n_\mathrm{p}$, which is illuminated by a linearly polarized plane wave, the $a_n$ and $b_n$ coefficients are expressed in terms of spherical Bessel functions $j_n$ and Hankel functions $h_n$, as \cite{f_bohren_absorption_1998}:

\begin{equation}
	a_n =
	\frac
	{
		\zeta^2 j_n (\zeta k a)k a j_n' (k a) - j_n(ka)[\zeta kaj_n(\zeta ka)]'
	}
	{
		\zeta^2 j_n (\zeta k a)k a h_n^{(1)'} (k a) - h_n^{(1)}(ka)\zeta kaj_n'(\zeta ka)
	} ~,
	\label{Eq:an}
\end{equation}

and:

\begin{equation}
	b_n =
	\frac
	{
		j_n(\zeta k a) kaj_n'(ka) - j_n (ka) \zeta kaj_n'(mka)
	}
	{
		j_n(\zeta k a) kah_n^{(1)'}(ka) - h_n^{(1)} (ka) \zeta kaj_n '(mka)
	} ~,
	\label{Eq:bn}
\end{equation}

where $\zeta = n_\mathrm{p} / n_m $, and where the prime notation denotes differentiation with respect to the argument.

Finally, a hologram is mainly given by the Lorenz-Mie scattering function of Eq.~(\ref{Eq.Lorenz-Mie-function}). Moreover, as we can observe in Eqs.~(\ref{Eq:an})~and~(\ref{Eq:bn}), a hologram depends on a lot of parameters and variables ($\lambda$, $n_m$, $n_\mathrm{p}$, $a$ and $\vec{r}_\mathrm{p}$) . The parameters can be fitted by comparison to experimental data. In general, the illumination wavelength $\lambda$ and medium index $n_\mathrm{m}$ are known and do not need to be fitted. From only one hologram, one can measure  the position $\vec{r}_\mathrm{p}$ precisely of the particle and simultaneously characterize the radius and optical index of the colloid. As a side note, it is even possible to characterize a particle without aprioristic knowledge of its characteristics (\textit{i.e.} radius and refractive index) using a Bayesian approach \cite{gregory_bayesian_2005, dimiduk_bayesian_2016}.

Computing Eq.~(\ref{Eq.Lorenz-Mie-function}) numerically brings another interesting question, as it is analytically written as a sum over $n$. One could ask after which number $n_\mathrm{c}$ of terms the series converges. It has actually been found that the series converges after a number of terms given by Wiscombe \cite{wiscombe_improved_1980}:
\begin{equation}
	n_\mathrm{c} = k a + 4.05 (k a)^{1/3} + 2 ~.
\end{equation}

Consequently, the holograms of bigger particles require more terms to converge and, hence, are longer to fit. As an example, the largest particles used during my thesis have a radius $a = 2.5 ~ \mathrm{\mu m}$ leading to $ n_c = 55$ in water and for an illumination wavelength $\lambda = 532$ nm. For the smallest ones, where $a = 0.5 ~ \mathrm{\mu m}$ we find $n_c = 18$ which makes a huge difference in practice. Indeed, if each of the terms of the sum takes the same time to be computed; a $2.5 ~ \mathrm{\mu m}$ particle's hologram is $55/18 \simeq 3$ times longer to be fitted compared to the hologram of a $0.5 ~ \mathrm{\mu m}$ particle.

If a reader wants to evaluate a hologram given by the Lorenz-Mie theory for a peculiar particle and position, it can be done in a few lines with the \mintinline{python}{holopy} module utilizing the following Python snippet which was employed to make Fig.\ref{fig:holo_fix_z} and \ref{fig:holo_fix_n}:

\begin{minted}
	[
	frame=lines,
	framesep=2mm,
	baselinestretch=1.2,
	fontsize=\footnotesize,
	linenos
	]
	{python}
import holopy as hp
from holopy.scattering import calc_holo, Sphere

sphere = Sphere(n=1.59, r=1.5, center=(4/0.1, 4/0.1, 10))
# n is the optical index of the particle, r its radius in microns
# center is its center position in microns.

medium_index = 1.33
illum_wavelen = 0.532
illum_polarization = (1, 0)
detector = hp.detector_grid(shape=100, spacing=0.1)
# shape is the size in pixels of the camera and the spacing is the pixel's size in microns.

holo = calc_holo(
  detector, sphere, medium_index, illum_wavelen, illum_polarization, theory="auto"
)
#the hologram can directly be plotted using:
hp.show(holo)
\end{minted}

\begin{figure}[H]
	\centering
	\includegraphics[scale=1]{02_body/chapter2/images/lorenz_mie_fit_demo/plot_lorenz_mie.pdf}
	\caption{a) Raw hologram of a $2.5 ~ \mathrm{\mu m}$ polystyrene particle measured experimentally with the setup detailed in the section \ref{chap:exp-setup}. b) Background obtained by taking the median value of an image time series. c) Normalized hologram given by dividing a) by b). d) Result of the fit of c) using Eq.~(\ref{Eq.normalized_Mie}), from which the particle is found to be at a height $z = 14.77 ~ \mathrm{\mu m}$. e) Comparison of the normalized radial intensities, obtained experimentally from c) and theoretically from d).~\href{https://github.com/eXpensia/Confined-Brownian-Motion/blob/main/02_body/chapter2/images/lorenz_mie_fit_demo/demo_fit.ipynb}{\faGithub}}
	\label{fig.Lorenz_mie_demo}
\end{figure}

\subsubsection{Hologram dependence on the particle's  characteristics}

As we can see with the Eq.~(\ref{Eq.Lorenz-Mie-function}), the in-line holograms vary with the position, radius and optical index of the particle. For in-line holograms, as both incident and scattered field are collinear, the $x$ and $y$ positions of the particle are given by the center of the hologram. Thus, it is possible to track the motion of a colloid only in two dimensions by using algorithms such as the Hough transforms to find the center. As a side note, in that case, it would be optimal to place the particle just above the focal plane to have an Airy disk-like hologram, as shown in Fig.~\ref{fig:holo_fix_n} for $a = 2.5 ~ \mathrm{\mu m}$ and $z = 5 ~\mathrm{\mu m}$.

\begin{figure}[H]
	\centering
	\includegraphics{02_body/chapter2/images/holo_size_exemple/holos_only_z.pdf}
	\caption{Hologram intensity map in the ($r,z$)-plan, calculated (see. Eq.~(\ref{Eq.normalized_Mie})) with a wavelength $\lambda = 532$ nm for a particle of radius $a = 1.5 ~\mathrm{\mu m}$ and optical index $n = 1.59$.~\href{https://github.com/eXpensia/Confined-Brownian-Motion/blob/main/02_body/chapter2/images/holo_size_exemple/holosize_variation.ipynb}{\faGithub}}
	\label{fig:holo_onlyz}
\end{figure}

In order to gain some insights on how the holograms vary with the various parameters, one can compute theoretical (see. Eq.~(\ref{Eq.normalized_Mie})) holograms for particles of different sizes and heights. We start by considering a particle of radius $a = 1.5 ~ \mathrm{\mu m} $, and optical index $n_\mathrm{p}= 1.59 $ as shown in Fig.~\ref{fig:holo_onlyz}. In this case, one can observe that as the distance $z$ between the particle and the focal plane increases, the hologram's rings get wider.

Additionally, this thickening of the rings can also be observed in the Fig.~\ref{fig:holo_z_fit}, where hologram intensity profiles are plotted as a function of the height $z$ both theoretically and experimentally for a polystyrene colloidal particle of radius  $a = 1.5 ~ \mathrm{\mu m} $, and for different couples of parameters in Fig.~\ref{fig:holo_fix_n}.

Also, we note that if $z$ is not large enough compared to the radius of the particle, the center of a hologram can be so bright that the rings could not be seen if the camera does not have a large enough dynamic range.  Thus, for having an optimal condition for the fits, one should take care of defocusing enough the objective lens to have $z \gg a$.

\begin{figure}
	\centering
	\includegraphics{02_body/chapter2/images/holo_size_exemple/holos_only_r.pdf}
	\caption{Hologram intensity map in the ($r,a$)-plan, calculated (see. Eq.~(\ref{Eq.normalized_Mie})) with a wavelength $\lambda = 532$ nm for a particle of optical index $n = 1.59$, and a distance $z = 15 ~\mathrm{\mu m}$ between the particle center and the focal plane of the objective lens.~\href{https://github.com/eXpensia/Confined-Brownian-Motion/blob/main/02_body/chapter2/images/holo_size_exemple/holosize_variation.ipynb}{\faGithub}}
	\label{fig:holo_onlyr}
\end{figure}

\begin{figure}[H]
	\centering
	\includegraphics{02_body/chapter2/images/holo_size_exemple/smallparticles.pdf}
	\caption{Radial intensity profile for particle radius $a << \lambda$, and an optical index $n_\mathrm{p} = 1.59$ with a distance $z = 15 ~\mathrm{\mu m}$ between the particle center and the focal plane of the objective lens, and for a wavelength $\lambda = 532 ~ \mathrm{nm}$.~\href{https://github.com/eXpensia/Confined-Brownian-Motion/blob/main/02_body/chapter2/images/holo_size_exemple/holosize_variation.ipynb}{\faGithub}}
	\label{fig:small_part_holo}
\end{figure}

We can now look at the holograms variation with respect to the radius of the particle as shown in Fig.\ref{fig:holo_onlyr} for a particle of optical index $n = 1.59$ and at a distance $z = 15 ~\mathrm{\mu m }$ for a wavelength $\lambda = 532$ nm. One can observe that for small particles compared to the wavelength, \textit{i.e.} $a \ll \lambda$, we do not observe the rings. This is due to the fact that for the small particles, the scattering can be approximated using the Rayleigh theory in which the scattering is isotropic. Thus, the variation of intensity around $I_0$ will be smaller for smaller particles.

Also, in this small-particle regime, the particle size does not affect the general shape of the hologram but just its intensity as shown in Fig.\ref{fig:small_part_holo}, for particles of radii between $a = 0.02 ~\mathrm{\mu m}$ and $a = 0.07 ~\mathrm{\mu m}$, and for a wavelength $\lambda = 532 ~\mathrm{nm}$.

Additionally, since the signal-to-noise ratio is lower than for larger particles, it is less precise to characterize small colloids compared to the wavelength.

As the particle gets bigger, the scattering becomes anisotropic and is mostly oriented towards the incident plane-wave direction. This effect leads to an increase of the amplitude $I/I_0$ of the rings, as one can see in Fig.~\ref{fig:holo_onlyr}. Thus, the signal-to-noise ratio is high enough to easily discern the hologram on top of the noise as one can see on the experimental picture of Fig.~\ref{fig.Lorenz_mie_demo}-a). One who wants to employ this method should thus use large enough particles for the hologram intensity to be greater than the camera noise level.

\begin{figure}[H]
	\centering
	\includegraphics{02_body/chapter2/images/holo_size_exemple/holos_only_n.pdf}
	\caption{Hologram intensity map in the ($r,a$)-plan, calculated (see. Eq.~(\ref{Eq.normalized_Mie})) with a wavelength $\lambda = 532$ nm, for a particle of optical index $n = 1.59$, and a distance $z = 15 ~\mathrm{\mu m}$ between the particle center and the focal plane of the objective lens.~\href{https://github.com/eXpensia/Confined-Brownian-Motion/blob/main/02_body/chapter2/images/holo_size_exemple/holosize_variation.ipynb}{\faGithub}}
	\label{fig:holo_onlyn}
\end{figure}

Finally, one can check how the holograms are varying with the optical index of a particle. In this case, it is not the particle's optical index $n_\mathrm{p}$ which matters the most but the ratio $\zeta = n_\mathrm{p} / n_\mathrm{m} $ which can be found in the $a_n$ and $b_n$ formulas, in Eqs.~\ref{Eq:an} and \ref{Eq:bn}. Indeed, for the scattering to happen, the optical index $n_\mathrm{p}$ of the colloid needs to be different from the optical index $n_\mathrm{m}$ of the surrounding medium. Additionally, the numerical solution of the Lorenz-Mie framework needs precaution for $n_\mathrm{p} \simeq n_\mathrm{m}$ \cite{wiscombe_improved_1980, lentz_generating_1976}. In Fig.\ref{fig:holo_onlyn}, we can observe holograms of a particle of radius $a = 1.5 ~ \mathrm{\mu m}$ at fixed distance $z=15 ~ \mathrm{\mu m}$ between the particle and the focal plane of the objective lens with a varying colloid's optical index, in water where $n_\mathrm{m} = 1.33$. In Fig.\ref{fig:holo_onlyn}, one can thus observe that for  $n_\mathrm{p} \simeq n_\mathrm{m}$ we do not see any holograms.  Additionally, one can observe that the signal-to-noise ratio gradually increases as $n_\mathrm{p}$ becomes different from $n_\mathrm{m}$. One who wants to use this technique should thus have $n_\mathrm{m}$ different enough from $n_\mathrm{p}$ for the hologram intensity to be greater than the camera noise level.

\subsubsection{Summary on the Lorenz-Mie method}\mbox{} \newline

A given set of height, optical index and radius of a colloid thus gives unique holograms. Conversely, this uniqueness of the holograms permits precise extraction of the position, optical index and radius of a colloid. Holograms for different sets of parameters are shown in Figs.~\ref{fig:holo_fix_z}~and~\ref{fig:holo_fix_n}. Additionally, the interested reader can use  the Jupyter Notebook on my Github repository in order to plot any hologram \href{https://github.com/eXpensia/Ma-these/blob/main/02_body/chapter2/images/holo_size_exemple/holosize_variation.ipynb}{\faGithub}.

Finally, the Lorenz-Mie framework provides the most versatile in-line holographic method. Indeed, it permits tracking and characterizing unique particles even without a priori knowledge on its characteristics. Besides, it is possible to write the Lorenz-Mie function $\vec{f}_\mathrm{s}$ for particular cases such as anisotropic particles \cite{fung_holographic_2013, wang_using_2014} or particle clusters \cite{fung_holographic_2013, perry_real-space_2013} to name a few. Such possibilities pave the way to a lot of experimental studies. Additionally, the method allows reaching a really high precision as the tenth of nanometers on the position and radius as well as $10^{-3}$ on the optical index \cite{lee_characterizing_2007}.

Unfortunately, the Lorenz-Mie framework suffers from a major drawback which is the time needed to fit one image. For example, a 200 by 200 pixels image, of a $2.5 ~ \mathrm{\mu m}$ particle's hologram, can take up to two minutes to be fitted using a pure and straightforward Python algorithm. A lot of work has been done to permit faster tracking, such as random-subset fitting \cite{dimiduk_random-subset_2014}, GPU (graphical processing units) acceleration, machine learning \cite{yevick_machine-learning_2014, hannel_machine-learning_2018} and deep neural networks \cite{altman_catch_2020}.

\begin{figure}[H]
	\centering
	\includegraphics{02_body/chapter2/images/test_tableau2.pdf}
	\caption{Hologram intensity map in the ($r,z$)-plan, calculated (see. Eq.~(\ref{Eq.normalized_Mie})) with a wavelength $\lambda = 532$ nm, for a particle of optical index $n = 1.59$, and radius $a = 1.51 ~\mathrm{\mu m}$ using the experimental setup presented in the section \ref{chap:exp-setup}. On the right, the corresponding theoretical intensity using the result of each individual hologram's fit to Eq.~(\ref{Eq.Lorenz-Mie-function}).}
	\label{fig:holo_z_fit}
\end{figure}

\begin{figure}
	\centering
	\includegraphics{02_body/chapter2/images/holo_size_exemple/holos_fix_z.pdf}
	\caption{Holograms calculated (see. Eq.~(\ref{Eq.normalized_Mie})) with a wavelength $\lambda = 532$ nm, for different set of parameters ($a$, $n_\mathrm{p}$), and for a distance $z = 15 ~\mathrm{\mu m}$ between the particle center and the focal plane of the objective lens.~\href{https://github.com/eXpensia/Confined-Brownian-Motion/blob/main/02_body/chapter2/images/holo_size_exemple/holosize_variation.ipynb}{\faGithub}}
	\label{fig:holo_fix_z}
\end{figure}

\begin{figure}
	\centering
	\includegraphics{02_body/chapter2/images/holo_size_exemple/holos_fix_n.pdf}
	\caption{Holograms calculated (see. Eq.~(\ref{Eq.normalized_Mie})) with a wavelength $\lambda = 532$ nm, for different set of parameters ($a$, $z$), and for an optical index $n_\mathrm{p} = 1.59$.~\href{https://github.com/eXpensia/Confined-Brownian-Motion/blob/main/02_body/chapter2/images/holo_size_exemple/holosize_variation.ipynb}{\faGithub}}
	\label{fig:holo_fix_n}
\end{figure}

\clearpage
\newpage

\subsection{Rayleigh-Sommerfeld back propagation}

Rayleigh-Sommerfeld back propagation \cite{wilson_3d_2012} works on the same principle as the Lorenz-Mie scattering but assumes small scatterers, and, a low difference of optical indices, such that:

\begin{equation}
	|\zeta - 1| << 1 \text{ and } ka|\zeta - 1| << 1 ~.
\end{equation}

In this case, at the focal plane, the intensity of the scattered field is smaller than the intensity of the incident field, hence, the term $|\vec{E}_\mathrm{s}|^2$ can be ignored. Thus, the Eq.~(\ref{Eq.normalized_Mie}) can be rewritten as:

\begin{equation}
	\frac{I(\vec{r})}{I_0(\vec{r})}= 1 + 2\Re \left( \frac{E_\mathrm{s}(\vec{r},0)}{E_0(\vec{r})} \right) ~.
\end{equation}

If one can retrieve the scattered field completely from an image, it is possible to reconstruct it above the focal plane by convolution using the Rayleigh-Sommerfeld propagator \cite{goodman_introduction_2005}:

\begin{equation}
	h_{-z}(\vec{r}) = \frac{1}{2 \pi} \frac{\partial}{\partial z} \frac{\mathrm{e}^{ikR}}{R} ~,
\end{equation}

where $ R^2 = r^2 + z^2 $ and the sign convention on the propagator indicates that the particle is above the focal plane. Using this propagator we have:

\begin{equation}
	E_\mathrm{s}(\vec{r}, z) = E_z(\vec{r}, 0) \otimes h_{-z}(\vec{r}) ~.
	\label{Eq:propagator}
\end{equation}

By using the convolution theorem \cite{cheong_strategies_2010, goodman_introduction_2005, sherman_application_1967,schnars_digital_1994} and supposing a uniform illumination, one can approximately reconstruct the scattered field at height $z$ as:

\begin{equation}
	E_\mathrm{s}(\vec{r}, z) \approx \frac{\mathrm{e}^{ikz}}{4\pi ^2}
	\int ^\infty _{- \infty}
	B(\vec{q}) H(\vec{q}, -z) \mathrm{e}^{i \vec{q} \cdot \vec{r}} \mathrm{d}^2 q
	\label{Eq.RS} ~,
\end{equation}

where $B(\vec{q})$ is the Fourier transform of $I/I_0$ and where:

\begin{equation}
	H(\vec{q}, -z) = \mathrm{e}^{iz \sqrt{k^2 - q^2}} ~.
\end{equation}

Finally, using Eq.~(\ref{Eq.RS}) one can reconstruct the scattered field and intensity since $I(\vec{r}) = |E_s(\vec{r})|^2$, as shown in Fig.\ref{fig.sommerfeld}. Moreover, by finding the position where we have an inversion of the center from bright to dark in Fig.\ref{fig.sommerfeld}, we measure the position of the particle.
These equations are way less computationally expensive than Eq.~(\ref{Eq.Lorenz-Mie-function}). Thus tracking can be faster.

Additionally, as Eq.~(\ref{Eq.RS}) takes only into account the intensity of the image, this method does not require any information on the particle and number of particles. As a matter of fact,   to write Eq.~(\ref{Eq.RS}), one just needs to assume that we have spherical colloids. Thus, this method is powerful to reconstruct the 3D position of a lot of particles or clusters. However, the Rayleigh-Sommerfeld back propagation suffers from being less precise of the presented methods and we cannot use it to characterize the particles generating the holograms.

\subsubsection{Numerical Rayleigh-Sommerfeld back propagation}

The \mintinline{python}{holopy} Python module provides a set of methods that permit implementing the Rayleigh-Sommerfeld back propagation. Given the \mintinline{python}{hologram} variable containing all the needed metadata about the hologram such as the pixel size, medium index $n_\mathrm{n}$, illumination wavelength $\lambda$. Then, one can use the \mintinline{python}{propagate} method to back propagate a hologram over a set \mintinline{python}{zstack} of height  using the following Python snippet.

\begin{minted}
	[
	autogobble,
	frame=lines,
	framesep=2mm,
	baselinestretch=1.2,
	fontsize=\footnotesize,
	linenos
	]
	{python}
import holopy as hp
import numpy as np

zstack = np.linspace(0, 20, 11)
rec_vol = hp.propagate(holo, zstack)
\end{minted}

Note that using the \mintinline{python}{propagate} function, each propagation is done by performing a convolution of the reference hologram over the distance to be propagated. However, better reconstruction can be obtained iteratively  by propagating holograms over several short distances. The latter method is called Cascaded Free Space Propagation, and is particularly useful when the reconstructions have fine features or when propagating over large distances \cite{kreis_frequency_2002}. It can be done by specifying the argument \mintinline{python}{cfsp} to the  \mintinline{python}{propagate} method. For example, to change the source of the propagation every three steps, one can use \mintinline{python}{hp.propagate(holo, zstack, cfsp=3)}.

\begin{figure}[!ht]
	\centering
	\includegraphics{02_body/chapter2/images/Back-propagation/backpropagation.pdf}
	\caption{On the left: the original hologram on the top and propagated along $15 ~ \mathrm{\mu m}$ on the bottom. On the right: reconstruction using Eq.~(\ref{Eq.RS}) of the scattered intensity by a single colloidal sphere of radius $a = 0.1 ~ \mathrm{\mu m}$, with optical index $n_\mathrm{p} = 1.59$ in water whose index is $n_\mathrm{m} = 1.59$, and for a height of $15 ~ \mathrm{\mu m}$.~\href{https://github.com/eXpensia/Confined-Brownian-Motion/blob/main/02_body/chapter2/images/Back-propagation/Back-propagation.ipynb}{\faGithub}}
	\label{fig.sommerfeld}
\end{figure}

\subsection{The experimental setup}
\label{chap:exp-setup}

The experimental setup I developed during my PhD can be employed to implement both the Lorenz-Mie and Rayleigh-Sommerfeld back propagation methods. In order to observe the holograms, we use a homemade inverted microscope as shown in Fig.\ref{fig:picture} and schematized in Fig.\ref{fig:schema}. This microscope is built using a ThorLabs cage system. Using the microscope, we observe the holograms resulting from the interactions between a laser source and the beads present in a sample.

A sample consists of a parallelepipedic chamber ($1.5 ~ \text{cm} ~ \times ~ 1.5 ~ \text{cm} ~ \times ~ 150 ~ \mathrm{\mu m} $), made from two glass covers, a parafilm spacer, and sealed with vacuum grease, containing a dilute suspension of spherical polystyrene beads. Sealing the sample with vacuum grease permits to drastically decrease evaporation, which reduces the possible evaporation driven-flow in the sample.

We used 3 different colloidal sizes, of nominal radii $0.56 ~ \mathrm{\mu m}, ~ 1.5 ~ \mathrm{\mu m} \text{ and } 2.5 ~ \mathrm{\mu m} $, at room temperature $T$, in distilled water (type 1, MilliQ device) of dynamic shear viscosity $\eta = 1 ~ \mathrm{mPa.s}$. The particles are made of polystyrene of density $\rho = 1050  ~\mathrm{kg.m^{-3}}$ and optical index $n_\mathrm{p} = 1.598$ at a wavelength $\lambda = 532$ nm. The particle we mostly used are the Polybead® 17134-15 $1.5 ~ \mathrm{\mu m}$ microsphere that are packaged in aqueous suspension with minimal surfactant. These particles contain a slight anionic charge from sulfate ester. Thus, the surface charge density of the colloids remain constant as a function of the pH, this would not be the case if the particle surface charge were due to carboxyl head groups \cite{behrens_charge_2001}.

The sample is illuminated by a collimated laser beam with a $532$ nm wavelength (Laser diode CPS532, spectral width smaller than the nanometer). The laser used delivers a power of 4 mW and has a waist of $3.5$ mm. Since the laser is collimated, it has a near-zero exentricity so that it can be seen as a plane wave. As presented in the section \ref{chap:LM_fit}, the light scattered, by one colloidal particle at a given time $t$, interferes with the incident beam.

An oil-immersion objective lens (Olympus, plan apochromat, x60 magnification, $1.30$ numerical aperture) collects the resulting instantaneous interference pattern, and relays it to a camera (Basler acA1920-155um) with a $51.6$ nm/pixel resolution (see Fig.\ref{fig.Lorenz_mie_demo}-a)). The exposure time$\tau_\mathrm{expo}$ of the camera is set to be smaller than $3$ ms to avoid motion-induced blurring of the image. As a general rule, the particle should not diffuse more than the pixel size during that time, such that $\sqrt{2D\tau_{\mathrm{expo}} }< 51.6$ nm.

\begin{figure}[!ht]
	\centering
	\includegraphics{02_body/chapter2/images/figures_setup/photo_setup.pdf}
	\caption{Photo of the custom-built microscope developed in my thesis. It is composed of a Thorlabs cage system. The camera used is a Basler acA1920-155um. We use a x60 magnification and $1.30$ numerical aperture oil-immersion objective lens. The light source is a collimated  $ \lambda = 521 ~ \mathrm{n m}$ wavelength laser.}
	\label{fig:picture}
\end{figure}

\begin{figure}[!ht]
	\centering
	\includegraphics[scale=0.9]{02_body/chapter2/images/figures_setup/schema_setup.pdf}
	\caption{Schematic of the experimental setup. A laser plane wave of intensity $I_0$ illuminates the chamber containing a dilute suspension of microspheres in water. The light scattered by a particle interferes with the incident beam onto the focal plane of an objective lens, which magnifies the interference patten and relays it to a camera.}
	\label{fig:schema}
\end{figure}

\subsection{Optical forces}

As we illuminate particles with the laser light, it is important to know if the optical forces that arise from the interactions between the light and the particle needs to be taken into account. When a plane wave is incident on a sphere, it scatters and absorbs light. This process depends both on the light wavelength $\lambda$ and on the sphere properties, its radius $a$ and refractive index $n_\mathrm{p} = n_{r} - jn_i$. For polystyrene $n_i \ll 1$, as shown in Fig.\ref{fig:refractive_index} such that we neglect it in the Lorenz-Mie framework. However, computing the optical forces, and hence, the light quantity which is absorbed requires $n_i$, so we consider it in this section. Additionally, in the Mie theory, the particle is characterized by the size parameter $\tilde{x}= 2\pi a /\lambda$. The optical force $F_\mathrm{opt}$ is given by \cite{f_bohren_absorption_1998}

\begin{equation}
	F_\mathrm{opt} = \frac{I_\mathrm{r} n_\mathrm{m} \pi a^2 }{c} (Q_\mathrm{ext} - gQ_\mathrm{sca}) ~,
	\label{Eq.Fopt}
\end{equation}

where $I_r$ is the irradiance in $\mathrm{W.m^{-2}}$ on the sphere,  $c$ is the speed of light in vacuum, $g=\pi a^2$ the sphere cross section and  $Q_\mathrm{ext}$ and $Q_\mathrm{sca}$ being respectively the extinction and scattering efficiency given by:

\begin{equation}
	Q_\mathrm{ext} = \frac{2}{k^2 a^2} = \sum _{n=1} ^\infty (2n + 1 ) (|a_n|^2 + |b_n|^2) ~,
\end{equation}

and,

\begin{equation}
	Q_\mathrm{ext} = \frac{2}{k^2 a^2} = \sum _{n=1} ^\infty (2n + 1 ) \Re (a_n + b_n) ~,
\end{equation}

where the $a_n$ and $b_n$ coefficient are given by the Eqs.\ref{Eq:an} and \ref{Eq:bn} respectively.

\begin{figure}[H]
	\centering
	\includegraphics[scale=0.9]{02_body/chapter2/images/Calcul_force_optique/refractive_index.pdf}
	\caption{Real (left axis) and imaginary (right axis) part of the refractive index of polystyrene as a function of the incident wavelength. Data obtained from \cite{zhang_complex_2020}.  \href{https://github.com/eXpensia/Confined-Brownian-Motion/blob/main/02_body/chapter2/images/Calcul_force_optique/Calcul\%20optical\%20force.ipynb}{\faGithub}}
	\label{fig:refractive_index}
\end{figure}

To compute the optical force I personally employ the \mintinline{python}{miepython} python's module \href{https://github.com/scottprahl/miepython/}{\faGithub} and retrieving the optical index data from the \href{https://refractiveindex.info/?shelf=organic&book=polystyren&page=Zhang}{refractiveindex.info} website, using the following Python snippet.

\begin{minted}
	[
	frame=lines,
	framesep=2mm,
	baselinestretch=1.2,
	fontsize=\footnotesize,
	linenos
	]
	{python}
import miepython as mp
import numpy as np

# Download the data on the refractiveindex.info website
poly = np.genfromtxt(
	r"https://refractiveindex.info/tmp/data/organic/(C8H8)n%20-%20polystyren/Zhang.txt",
	delimiter="\t",
)
N = len(poly) // 2
poly_lam = poly[1:N, 0]  # wavelength
poly_nre = poly[1:N, 1]  # real part
poly_nim = poly[N + 1 :, 1]  # imaginary part

x = 2 * np.pi * a / poly_lam
n = poly_nre - 1.0j * poly_nim
qext, qsca, qback, g = mp.mie(n, x)  # compute the efficiencies
E0 = 4.5e-3 / (np.pi * 1.75e-3 ** 2)  # compute the irradience
c = 299792458 / 1.33  # light velocity in the  medium

F = E0 * np.pi * r0 ** 2 * (qext - g * qsca) / c  # compute the optical force

\end{minted}

\begin{figure}[H]
	\centering
	\includegraphics[scale=0.9]{02_body/chapter2/images/Calcul_force_optique/optical_force.pdf}
	\caption{Optical force $F_\mathrm{opt}$ (see Eq.~(\ref{Eq.Fopt})) exerted on a spherical particle of radius $a$ by a plane wave of wavelength $\lambda = 532$ nm, and of irradiance $I_\mathrm{r} = 467.7 ~ \mathrm{W.m^{-2}}$. The optical force is calculated employing the \mintinline{python}{miepython} python's module \href{https://github.com/scottprahl/miepython/}{\faGithub} and the refractive index of polystyrene \cite{zhang_complex_2020}.~\href{https://github.com/eXpensia/Confined-Brownian-Motion/blob/main/02_body/chapter2/images/Calcul_force_optique/Calcul\%20optical\%20force.ipynb}{\faGithub}}
	\label{fig:optical_force}
\end{figure}

Using Python, one can thus compute the optical force $F_\mathrm{opt}$ as a function of the particle radius. As shown in Fig.~\ref{fig:optical_force}  $F_\mathrm{opt}$ is of the order of $10^{-2}$ fN. By comparing this result with the gravitational force:

\begin{equation}
	F_\mathrm{g} =  \frac{4}{3} \pi (\rho_\mathrm{m} - \rho_\mathrm{p}) g ~,
\end{equation}

we found that for a particle of radius $a = 0.5 ~\mathrm{\mu m}$, $F_\mathrm{g} = -0.3 $ fN, while for $a = 1.5 ~\mathrm{\mu m}$, $F_\mathrm{g} = -7 $ fN. Thus, we can conclude that $F_\mathrm{opt} \ll F_\mathrm{g}$ for the range of radii we used. Hence, in the following we neglect the optical forces as they are lower than the other external forces acting on the colloids. However,  experiments with a controlled irradiance (up to $10^6 ~\mathrm{W.cm^{-2}}$ ) were conducted in \cite{prieve_measurement_1999} and the authors were able to measure the optical forces from the motion statistics. Additionally, in Fig.~\ref{fig:optical_force} we observe resonances, these happen when the denominator of the coefficients $a_n$ or $b_n$ (see Eqs.~(\ref{Eq:an})~and~(\ref{Eq:bn})) goes to zero, this happens when $2a \approx \lambda / in_\mathrm{p}$, with $i$ and integer. Moreover, as the same happen while varying the wavelength, it is possible to use a broad band light to measure the position of the resonances. This kind of measurement enable a precise measurement of the particle radius and optical index \cite{ashkin_observation_1981, chylek_simultaneous_1983} and will be implemented by the team in the near future.

\subsection{The experimental procedure}
We implement here the Lorenz-Mie fitting method, since it permits the characterization of single particles. Indeed, since we are interested in fine effects near surfaces, we require to know perfectly the radius of the tracked particle. This feature also makes our whole procedure calibration-free, as we do not need to assume any physical properties. An example of the procedure that permits tracking a single-particle trajectory is provided in appendix \ref{app:tracking}. In the following, the different steps of the procedure are described.

\subsubsection{Recording the holograms}
Since we use a Basler camera, we use the provided computer program (Pylon) by the manufacturer in order to record the holograms. The software permits adjusting the parameters of the camera, such as the region of interest (\gls{ROI}),number of frames per second (\gls{fps}) or the opturation time to name a few. Also, video can be recorded as a time series of images, in AVI or MP4 formats. AVI files or times series are a great way to save the video since it is lossless. However, in general, we use a \gls{ROI} of $1000 \times 1000$ pixels to record the particle during a long-enough time.

Additionally, since the recording is done using 8 bits per pixel (or 256 gray levels), an image of $1000 \times 1000$ pixels needs a disk space of $1$ MB \footnote{An uppercase B denotes Byte which is equivalent to 8 bits denoted by $b$, \textit{i.e.} $1\mathrm ~ {B} = 8 ~ b$. For storage indications, Bytes are generally used, since historically a set of $8$ bits encodes a single text character, and are for this reason the smallest addressable memory units in most computer architectures. As an example, in binary ``LOMA" would be encoded by ``01001100 01001111 01001101 01000001."}. One can see that image sequences and AVI files are not suitable for our case because i) at $100$ \gls{fps} one would need $108 ~ \mathrm{GB}$ to store a 30-minute film, which would lead to several TB of data per experiment which is not manageable; ii) it would require a sequential writing speed of 60 $\mathrm{MB/s}$, which is just below the limit of the better Hard Drive Disks. iii) AVI files are bound to 2 GB maximum thus dramatically reducing the length of the experiments.

To conclude, for all of these reasons, we chose to use the MP4 file format (MPEG-4 encoding) for the video recording. Using the lowest compression, we did not observe any impact on the fitting process due to quality loss. Finally, a video of 30 minutes has an approximate size of 3 GB.

\subsubsection{Fitting the holograms}

Once the holograms are recorded, we fit all of the images to retrieve the trajectory of the particle. To do so, we chose to use the \mintinline{python}{pylorenzmie} module developed by the Grier's lab at New York University. Although this module presents a lot of capabilities, it is not adapted to MP4 input. Thus, I developed a wrapper\footnote{A wrapper is a code that encapsulates or ``wraps" another code to make it easier to use. For example, it is particularly useful to adapt a program to a particular type of input data. Creating wrapping function is commonly done by developers. In the end, wrapping adds some abstraction and readability to the source codes.} around \mintinline{python}{pylorenzmie} that I called Wraplorenzmie which can be found on my Github repository \href{https://github.com/eXpensia/wraplorenzmie}{\faGithub}.

This wrapper permits to directly load the MP4 files, compute the background and choose if what parameters should be fitted. Also, it manages the process fitting a time series of images by using results of previous image as initial fit parameters.

However, as presented in the section \ref{chap:LM_fit}, the main drawback is the time to fit an image. Indeed, using a Python algorithm, one needs $30$ seconds to fit images of $100 \times  100$ pixels and a few minutes for a $500\times 500$ pixels hologram. We can directly see a bottleneck, if one wants to track one trajectory made of $100~000$ images. In such case, one would need to typically 70 days for a series of images that needs only a few minutes to be recorded experimentally.

When I started my PhD, two groups, the Grier's lab and the Manoharan's lab, had already created Python packages, respectively Pylorenzmie and Holopy, in order to inverse holograms. They had introduced ways to only fit a set of randomly chosen pixels, and demonstrated that taking only $1~\%$ of the image pixels, could lead to similar precision thus improving considerably the fit's execution time \cite{dimiduk_random-subset_2014}.

Unfortunately, even if fitting  a random subset of pixels is faster, it leads to a few images per second, and is still too long for the amount of data we want to have. This part of my thesis is certainly the one where I spent the longest time, and I learned a lot about code optimization and computer cluster usage.

In the middle of my thesis, \mintinline{python}{pylorenzmie} got a new commit\footnote{A commit is an update of the files on a Git repository.} on the authors' Github repository which was saying that the authors succeeded in using GPU acceleration with CUDA\footnote{CUDA is the acronym of Compute Unified Device Architecture. It is a parallel computing platform, and programming model made to permit an easier use of the GPU for general purposes. CUDA is developed by NVIDIA since 2012, thus all recent NVIDIA's GPUs are CUDA-enable. It is possible to use CUDA with every language as long as a library has been developed, such as \mintinline{python}{cupy} for Python \href{https://github.com/cupy/cupy}{\faGithub}.}. This was not an easy task since they needed to reconstruct the Bessel functions in an understandable way for the GPU. Fortunately, it is possible to do so by using continued fractions \cite{lentz_generating_1976}. This appreciable update permits fitting whole images with a speed improvement of 20 fps. At this speed, we  precisely extract the three dimensional position of the particle, as well as the radius and optical index.

As a remark, the fits are done by solving a least-squares problem using the Levenberg-Marquardt algorithm \cite{more_levenberg-marquardt_1978}. This algorithm is largely used in curve-fitting applications due to its capabilities to find a minimum even by starting far from it. As mentioned, it is also possible to use various models of Machine Learning or Deep Learning to do the fits \cite{altman_catch_2020}. However, since we can write analytically the holograms, the Deep Learning’s models cannot be more accurate than a standard least-square-fitting process. Deep Learning, however, could be a great option is one wanted to prioritize the computation time over the fit's precision.

Finally, to have a more reliable and fast-tracking, we begin by fitting the first $10~000$ images with  $\vec{r}_\mathrm{p}$, $a$ and $n_\mathrm{p}$ as free parameters. Using the results of this fit, we can characterize the physical properties of the tracked colloid with high precision. Then, using these results we can then fit image with only the position $\vec{r}_\mathrm{p} $ as a free parameter.

\subsubsection{Radius and optical index characterization}
\label{sec:radius_charac}

Using $10 ~ 000$ measurements of $a$ and $n_\mathrm{p}$ one can do a 2D histogram, as presented in Fig.\ref{fig:KDErn} here smoothed using a Gaussian Kernel Density Estimator\footnote{Kernel Density Estimator is a non-parametric method permitting the estimation of probability density function of random variable. This method is a generalization of histograms. The histogram's rectangle are replaced by Gaussian that are added up to have a smooth estimation of the \gls{PDF}.}. Doing so, we determine that the radius of the observed particle is $a=1.514 \pm 0.003 ~ \mathrm{\mu m} $ and its optical index is $n_\mathrm{p} = 1.585 \pm 0.002$.

Finally, as explain above, using this measurement of the radius and optical index, we then fit the whole video by removing them from the free parameters. Doing so, we measure the 3D trajectory of the particle as shown in Fig.~\ref{fig:3dtrajec} in three dimensions for the particle previously characterized.

\begin{figure}[!ht]
	\centering
	\includegraphics{02_body/chapter2/images/r_n_measurements/KDErn.pdf}
	\caption{2D Probability density function of the measurements of the optical index $n_\mathrm{p}$ and radius $a$. Black lines indicate iso-probability. Taking the $10\% $ top probability, we measure $n_\mathrm{p} = 1.585 \pm 0.002$ and $a=1.514 \pm 0.003 ~ \mathrm{\mu m}$.~\href{https://github.com/eXpensia/Confined-Brownian-Motion/blob/main/02_body/chapter2/images/r_n_measurements/mesure\%20n\%20r.ipynb}{\faGithub} }
	\label{fig:KDErn}
\end{figure}

\begin{figure}[H]
	\centering
	\includegraphics{02_body/chapter2/images/trajectory/traj.pdf}
	\caption{3D plot of an experimental trajectory measured in water for a particle of optical index $n_\mathrm{p} = 1.585$ and radius $a = 1.514  ~ \mathrm{\mu m}$.~\href{https://github.com/eXpensia/Confined-Brownian-Motion/blob/main/02_body/chapter2/images/trajectory/graph_ploting.ipynb}{\faGithub}}
	\label{fig:3dtrajec}
\end{figure}

\subsubsection{Test case scenario: a sedimenting particle}

In order to test the Lorenz-Mie framework, we consider a well-known problem: a sedimenting particle. We study a polystyrene particle of commercial radius $a = 1.5 ~ \mathrm{\mu m}$ sedimenting in water. The particle tracking is done over a minute using a frame rate of 100 \gls{fps}. The time over which we can track the colloid is bound by the terminal sedimentation velocity $v_\mathrm{sed}$. Indeed, the particle, should not be too far from the imaging plane, otherwise we do not capture enough light intensity, and not too close as discussed in section~\ref{chap:LM_fit}. To ensure that we can correctly record and fit the holograms, we experimentally find that with our experimental setup the particle height $z$ should be in a working range of 10 to 30 $\mu m$. This working range could be greatly increased by using high-sensitivity cameras. The trajectory of the sedimenting colloid is shown Fig.~\ref{fig:trajsed}, moreover, we measure its radius $a_\mathrm{sed} = 1.45 ~ \pm 0.03 ~ \mathrm{\mu m}$ and optical index $n_\mathrm{sed} = 1.59 \pm 0.01$~.

\begin{figure}[H]
	\centering
	\includegraphics{02_body/chapter2/images/sedimenting/traj_sedimenting.pdf}
	\caption{Experimental trajectory of a polystyrene particle of radius $a = 1.5 \mathrm{\mu m}$ sedimenting in water, along the $z$-axis --- \textit{i.e.} the axis where the gravity acts.}
	\label{fig:trajsed}
\end{figure}

The terminal sedimentation velocity can be found by equaling the drag force (\textit{i.e.} the Stokes's drag) to the gravitational force. Doing so, the terminal velocity of a sedimenting colloid writes:

\begin{equation}
	v_\mathrm{sed} = \frac{2}{9} \frac{\Delta \rho a^2 g}{\eta} ~,
	\label{vsed}
\end{equation}

where $\Delta \rho$ is the density difference between the fluid and colloid density, and $g$ the gravitational acceleration. For the tracked particle, we calculate $v_\mathrm{sed} = 229 ~\mathrm{nm.s^{-1}}$ using the radius measured from the holograms and tabulated $\Delta \rho = 50$ for polystyrene in water. To measure the latter velocity from the trajectory, we use the \gls{MSD} which writes by taking into account the sedimentation:

\begin{equation}
	\langle \Delta z ^2 \rangle = 2D_0 \Delta t + v_\mathrm{sed}^2 \Delta t^2 + 2\xi^2 ~,
	\label{Eq.sedmsd}
\end{equation}

where $D_0$ is the bulk diffusion coefficient (see Eq.~(\ref{Eq:D_einstein})) and $\xi$ being the noise-level due to the statistical uncertainty on the position measurement. Using the radius measured from the Lorenz-Mie method, we find for the observed colloid $D_0 = 146 ~\mathrm{\mu m ^2 . ms^{-1}}$. The experimental \gls{MSD} of the sedimenting colloid is shown in Fig.~\ref{fig:msdsed}. Once the \gls{MSD} is computed, we measure both the diffusion coefficient $D_0$ and the terminal sedimentation velocity $v_\mathrm{sed}$ by fitting the experimental \gls{MSD} to Eq.~\ref{Eq.sedmsd}. Doing so, we experimentally measure $D_0 = 144 \pm 1 ~ \mathrm{\mu m ^2 . ms^{-1}}$ and $v_\mathrm{sed} = 222 \pm 1 ~ \mathrm{nm.s^{-1}}$, corresponding to errors of $1\%$ and $3\%$, respectively. From the MSD we also evaluate the statistical error on the particle position measurement along the $z$-axis to $\xi = 25$ nm. This uncertainty can be reduced by using a larger images and more sensitive cameras. However, for the study of confined particle where the range of motion is smaller, we optimized the position of the focal plane to reduce the uncertainty on the position measurement. Finally, using Eq.~\ref{vsed} we can calculate the density difference $\Delta \rho = 48.4 \pm 0.2~ \mathrm{kg.m^{-3}}$. The discrepancy from the tabulated $\Delta \rho = 50~ \mathrm{kg.m^{-3}}$ for polystyrene in water might be attributed to rugosities and/or porosity. Nonetheless, with the small measured deviations from the theory, we correctly showed the viability of the Lorenz-Mie framework to study Brownian dynamics.

\begin{figure}[H]
	\centering
	\includegraphics{02_body/chapter2/images/sedimenting/msd_sedimentation.pdf}
	\caption{Measured mean-squared displacement as a function of the time increment $\Delta t$, along the $z$-axis. The solid line is the best fit to Eq.~(\ref{Eq.sedmsd}), with $D_0 = 144 \pm 1 ~ \mathrm{\mu m ^2 . ms^{-1}}$, $v_\mathrm{sed} = 222 \pm 1 ~ \mathrm{nm.s^{-1}}$ and $\xi = 25 $ nm.}
	\label{fig:msdsed}
\end{figure}

\subsubsection{Conclusion}

In this chapter, we have covered different techniques that enable the tracking of individual microparticles. Each method has pros and cons. We decided to employ the Lorenz-Mie framework since it requires no calibration. Then, we have shown how we implement it in practice, from the experimental setup to the numerical treatment. An example of the Jupyter notebooks employed for the tracking can be found in appendix \ref{app:tracking}.  We have discussed how to have fast and accurate fits to retrieve the particle trajectory. To do so, we first characterize the particle fully, namely, its radius and optical index, before tracking a whole video.

Now that we have an understanding on the tracking of single colloids, we can use the measured trajectories in order to understand how the Brownian motion is affected in various configurations.