365507a

committed
# Commits

# Comments (0)

# Files changed (2)

# docs/sm_final_report/sm_final_report.pdf

Binary file modified.

# docs/sm_final_report/sm_final_report.tex

The lattice-gas model represents a very useful way for describing the behavior of interacting particles. It consists of a spatial lattice structure $\Lambda$ (squared, HCP, etc.), and for each lattice site $j \in \Lambda$ there is a discrete variable $\sigma_j$ such that $\sigma_j \in \{0, 1\}$; $\sigma_j$ models the fact that a particle is present in the lattice site.

+ \caption{Example of a possible lattice-gas configuration for a model with a simple cubic package. }

\item only the nearest neighbor interactions are considered, and each couple of adjacent occupied cells contribute to the total hamiltonian by an amount $-\epsilon$

Using a HCP arrangement (refer to \cite{wiki:hcp} for a exhaustive description) the $z$ values of the film layers are:

it is possible to replace the $\sigma_ni$ by the probability $\rho_n$ that a site in the $n$-th layer is occupied.

y_n &= \tanh \left\{ \frac{1}{2T^*} \left[ \frac{1}{2} \sum_{n'=-\infty}^{+\infty}f(n-n')y_{n'} -\left(\tilde{V_n} - \gamma\right) \right] \right\}

-A numerical algorithm has been implemented in C++, to calculate both the isotherm layer coverage and the energy levels of metastable solutions given a target coverage value.

+The final programs allow to calculate the layer coverage for an isotherm, the energy levels associated to specific coverage ($\theta$) values and the critical temperature diagram (the $\theta - T^*$ plane). They all share some common blocks:

+The number of iteration needed to make (\ref{math:yn_relation}) converge can be quite high, especially close to the critical points. Considering also that for each $(T^*,\bar{\mu})$ pair the initial configurations $\{y_{0_n}\}$ must be chosen in a DOE-like approach to allow the algorithm to `jump-out' of local minima, it is evident that the problem can be computationally quite taxing.

+Fortunately, the problem is also easily parallelizable, by splitting the $[\mu_i , \mu_f]$ range into several, independent, subranges. Each one can then be executed in parallel on a different CPU core. The approach chosen in the programs is the \textit{thread pool} pattern.

+The lattice site arrangement chosen in both \cite{DeOliveira1978687} and \cite{PhysRevA.22.2776} is the hexagonal closed-packing (\textit{HCP}).

+Since the $f(ni,n'i')$ as used in (\ref{math:simplified_H}) relates a particle in the layer $n$ with all particles at layer $n'$, the class first build an internal representation of the lattice site coordinates, then allow to easily retrieve each particle point given the layer $n$ and the particle index $i$ in the layer.

+Since it is needed to investigate both the technique used in \cite{DeOliveira1978687} and \cite{PhysRevA.22.2776}, and they differ essentially in the potentials used (in both range and formulation), a pure interface class has been implemented, exposing the common functionalities. The main algorithm then use that common interface, allowing to simulate both approaches simply replacing the particular potential class instance.

+The derived classes \texttt{DeOliveiraPotentials} and \texttt{EbnerPotentials} then implement the particular potentials as explained in section (\ref{section:assumptions}).

+The main simulation class cal calculate the equilibrium state given the current (normalized) chemical potential $\bar{\mu}/\epsilon$ and the reference (normalized) temperature $T^*$.

+As explained in the previous section, it can be initialized for using either (\ref{math:oliveira_v}) or (\ref{math:ebner_v}) as substrate potential.

+All the calculation functions have been designed to be reentrant, to allow a safe concurrent execution by many threads.

+The thread pool pattern consists in a set of worker threads that are created to perform a number of jobs, organized in a queue.

+As soon as a thread completes its job, it will request the next one from the queue until all tasks have been completed. The thread can then terminate, or sleep until there are new tasks available.

-the thread pool is filled with jobs to be executed; these jobs are placed in a shared queue, and a set of worker threads continuously execute jobs, until the queue is empty.

+This approach allows the performances to scale (almost) linearly with the number of CPU cores, virtually eliminating the cost associated to the thread context creation/destruction, since the worker thread are created once at the beginning and destroyed at the end of the program.

-Each job consists on a function and its supporting data, that have been implemented as in the following fragment.

+Each job consists on a function and its supporting data, that have been implemented as in the following code fragment.

-In figure (\ref{fig:worker_threads}) there is a graphical representation of a layer coverage simulation, composed by 300 samples. The workload is evenly distributed among 8 threads on a intel i7 quad-core CPU, with 8

+In figure (\ref{fig:worker_threads}) there is a graphical representation of a layer coverage simulation, composed by 300 samples. The workload is evenly distributed among 8 threads on a intel i7 quad-core CPU (each core hosts 2 processing threads).

-It has been designed to be cross-platform, and tested on Windows7 and Mac OSX 10.8; on Windows, Visual Studio (Express) 2010 or newer and Python 2.7 or newer are required.

-An automatic build system takes care of configuring the environment, building the applications and installing the final executables. To run it, type the following commands from a Prompt Shell:

+The source code for all the programs and libraries developed is available online, on a Mercurial SCM repository at the address \texttt{https://bitbucket.org/dbacchet/univ} .

+It has been designed to be cross-platform, and tested on Windows7 and Mac OSX 10.8; on Windows, Visual Studio 2010 (or newer) and Python 2.7 (or newer) are required.

+An automatic build system takes care of configuring the environment, building the applications and installing the final executables. To run it, type the following commands from a Prompt shell in the repository root directory:

+As described in \cite{PhysRevA.22.2776}, when the substrate potential strength is high both approaches show similar results. The coverage increases from zero in single layer steps, when the chemical potential $\bar{\mu}$ spans the range $[-\infty,0]$.

+It is worth to note, in the figure \ref{fig:t135_sub2}, the effect of the long range inter-particle potentials: the coverage still grow with first-order steps, but the first layer is formed at a smaller $\bar{\mu}$. This is the effect of the balance between the substrate and the particle potentials; stronger inter-particle potentials make more difficult for the substrate to attract particles [AGGIUNGERE??].

+\caption{Coverage comparison, with strong substrate potential ($\alpha=2.75$ for the Ebner formulation).}

+The short-range potentials produce a coverage that increase continuously for high $\bar{\mu}$, and then progress with first order steps as $\bar{\mu} \to 0$.

+Using long-range potentials, the coverage remains fixed to a fraction of a monolayer, and then suddenly jumps to approximately 5 layers. After this point it progress with first order steps.

+ \caption{Comparison between short and long range inter-particle potentials, with $\alpha=1.75$ and $T^*=2.0$.}

+This phenomenon can be investigated looking also at the energy levels associated to each possible coverage value, that are represented in figure (\ref{fig:layer-energy-comp}) for 3 values of the temperature $T^*$.

+The energy curves have been obtained by setting the initial $\{y_{0_n}\}$ to the desired configuration $C_L$, and letting the system to evolve; if the system converge to a metastable solution close to the initial value, then the corresponding energy is associated to $C_L$.

-Looking at figure (\ref{fig:layer-energy-comp}), it is interesting to note that fot $T^*=2.0$ the configuration corresponding to a single layer is \textit{never} stable; there are no local minima around $\theta \approx 1$ and the system will converge either to a partial adsorbed layer $\theta \approx 0$ or to the metastable solution $\theta \approx 2$.

+It is interesting to note, for example, that for $T^*=2.0$ the configuration corresponding to a single layer is \textit{never} stable; there are no local minima around $\theta \approx 1$ and the system will converge either to a partial adsorbed layer $\theta \approx 0$ or to the metastable solution $\theta \approx 2$.

+In general looking at the energies confirms that the sharp step from 0 to 5 layers (for $T^*=0$) is a direct result of