a0525a5

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 adsorption of an ideal gas shows the formation of a dense film on the substrate, whose thickness depends on the temperature, chemical potential and substrate potential strength.

-De Oliveira and Griffiths first, and then Ebner approached the problem using the lattice-gas model in a mean field approximation. Their work differs essentially in the substrate potential used and in the range of particle interactions. A critical study of both articles has been made, and a computer simulation implemented in order to investigate the relations and understand the strengths and limitations of both approaches.

+De Oliveira and Griffiths first, and then Ebner, approached the problem using the lattice-gas model in a mean field approximation. Their work differs essentially in the substrate potential used and in the range of particle interactions. A critical study of both articles has been made, and a computer simulation implemented in order to investigate the relations and to understand the strengths and limitations of both approaches.

A system composed by an unsaturated gas and an attractive substrate show sharp vertical steps in the amount of gas adsorbed in function of the gas pressure. These steps can be interpreted as successive layers of adsorbate added to the adsorbent substrate.

There is a critical temperature $T_{cf}$ above which no transitions occurs, and a minimum temperature $T_{AL}$ below which the transition is from a partial (mono)layer to a bulk liquid.

-For very attractive substrates, the models predict a first order phase transitions (the order being the film thickness) for all temperatures in the $[T_{AL} - T_{cf}]$ range.

-For weakly attractive substrates, and temperatures very close to $T_{AL}$, the discontinuity in film thickness becomes bigger and can be made arbitrarily large choosing an appropriate temperature.

+For very attractive substrates, the models predict first order phase transitions (the order being the film thickness) for all temperatures in the $[T_{AL} - T_{cf}]$ range.

+For weakly attractive substrates, and temperatures very close to $T_{AL}$, the discontinuity in film thickness becomes bigger and can be made arbitrarily large by choosing an appropriate temperature.

-The meaningful variables for the system are the absolute temperature $T$ and the chemical potential $\mu$. The volume is considered fixed, but infinitely large. Particles are free to flow in and out of the system. For this family of systems, the grancanonical thermodynamic ensemble is then the most appropriate.

+The meaningful variables for the system are the absolute temperature $T$ and the chemical potential $\mu$. The volume is considered fixed, but infinitely large. Particles are free to flow in and out of the system. For this family of problems, the grancanonical thermodynamic ensemble is then the most appropriate.

-This problem will be studied using a lattice-gas model, in the mean-field approximation; the region of space with $z<0$ is occupied by the substrate, which extends indefinitely in $x$ and $y$.

+This problem will be studied using a lattice-gas model, in the mean-field approximation; the region of space with $z<0$ is occupied by the substrate, which extends indefinitely in $x$ and $y$ directions.

-where P is pressure and V is volume, using the fundamental thermodynamic relation (combined first and second thermodynamic laws) $dU = TdS - PdV$.

+where P is pressure and V is volume, using the fundamental thermodynamic relation (combined first and second thermodynamic laws) $dU = TdS - PdV + \mu dN$.

$d\Omega$ becomes zero if the volume is fixed and the temperature and chemical potential have stopped evolving.

The first and second law of thermodynamics guarantee that the stationary point $d\Omega=0$ is a stable system configuration only when the system is at a minimum (refer to \cite{chandler1987introduction}, chapter 1.3 for a detailed explanation).

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

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

-The approach followed by Ebner is more generic, and can reproduce the results obtained by De Oliveira by:

+The approach followed by Ebner is more generic, and can also reproduce the results obtained by De Oliveira by:

\caption{\label{fig:hcp_layers} Distances from a reference lattice site $i_{ref}$ at layer $n$ and the sites at layer $n'$. }

-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.

+The number of iteration needed to make (\ref{math:yn_relation}) converge can be quite high, especially when 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.

+Luckyly, the problem is also easily parallelizable, by splitting the $[\mu_i , \mu_f]$ range into several, independent, subranges. Each one can then be executed concurrently 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 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 builds 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$ within 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.

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

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

+The main simulation class can 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.

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

-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.

+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 only at the end of the program.

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 (each core hosts 2 processing threads).

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

-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]$.

+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, with the chemical potential $\bar{\mu}$ spanning 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??].

+It is worth noting, 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.

+The behavior we can observe reducing the substrate potential strength is more interesting, as shown in Figure (\ref{fig:ebner_short_long}).

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.

+Using long-range potentials, the coverage sticks to a fraction of a monolayer for high values of $\bar{\mu}$, and then suddenly jumps to approximately 5 layers. After this point it progresses 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$.

+This phenomenon can also be investigated looking 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^*$.

+These energy curves have been obtained by setting the initial $\{y_{0_n}\}$ to the desired configuration $C_L$, and letting the system free to evolve; if the system converges to a (meta)stable solution close to the initial value, then the corresponding energy is associated to $C_L$.

+\caption{Layer coverage and corresponding layer-energy for $T^*=2.0,2.4,2.8$. Curves are labeled by the approximate $\theta$ to which every solution corresponds.}

+For $T^*=2.0$, starting from very negative (and then 'costly') $\bar{\mu}$, the only stable solution is the one with $\theta=0$, corresponding to a partial adsorbed layer. Around $\bar{\mu}/\epsilon \approx -10^{-1}$ other solution become possible, but the corresponding energy levels are much higher.

+The first solution that produce a smaller total energy, corresponds to $\theta=5$, at $\bar{\mu}/\epsilon \approx -0.02$. That solution is stable for just a small interval, then there is a step to $\theta=6$ and the system will evolve showing sharp first-order steps as $\bar{\mu} \to 0$.

+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$.

+The step produced is smaller, but still there is the sudden formation of 3 adsorption layers, for $\bar{\mu}/\epsilon \approx -0.06$.

+In this case the partially adsorbed layer ($\bar{\mu}/\epsilon<-0.06$) is thicker, and this can be seen also in the energy plot, with the energy curves corresponding to $\theta=0$ and $\theta=1$ blending into each other as the $\bar{\mu}$ is growing.

+Solutions with $\theta=2$ are metastable, but never stable, while solutions corresponding to $\theta=3$ become stable in a small range; the system then evolves with mono-layer steps as $\bar{\mu} \to 0$.

+For higher temperatures, the multi-layer step moves toward bigger (in modulus) $\bar{\mu}$, and becomes smaller, until it vanishes. For example for $T^*=2.80$, no multi-layer discontinuities are present, and the coverage increases continuously until $\bar{\mu}/\epsilon \approx -0.001$, where there is the first step. The corresponding energies show a `blending' until $\theta=6$, that is the first coverage value showing a consistent overlapping in the energy solutions.

-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

- \includegraphics[width=0.7\linewidth]{images/{6a_ebner_isotherm_A1.75_range_T1.80_T2.60_long}.png}

+ \includegraphics[width=0.5\linewidth]{images/{6a_ebner_isotherm_A1.75_range_T1.80_T2.60_long}.png}

+Figure (\ref{fig:ebner-discontinuity-T}) show the adsorption layer evolution for several $T^*$ values. Consistently with what observed above, when the temperature grows the step becomes smaller, it appears at stronger chemical potentials and the thickness of the partially adsorbed layer is bigger.

+The value $T^*=1.8$ is below (or very close to) $T_{AL}$, so there is a sudden transition from a partial monolayer to the bulk liquid phase.

+\caption{$\theta-T^*$ phase diagram for $\alpha=2.75$ and the corresponding $\bar{\mu} - T^* - \theta$ surface.}