# 3.4. Three-phase model¶

This implementation assumes the density \(\rho\) is unity and two scalar order parameters (\(\phi\) and \(\psi\)) define the composition. The three phases are defined by concentrations \(C_1 = (\rho + \phi - \psi)/2\), \(C_2 = (\rho - \phi - \psi)/2\) and \(C_3 = \psi\) so that we have:

Phase |
\(\rho\) |
\(\phi\) |
\(\psi\) |
\(C_1\) |
\(C_2\) |
\(C_3\) |
---|---|---|---|---|---|---|

One |
1 |
1 |
0 |
1 |
0 |
0 |

Two |
1 |
-1 |
0 |
0 |
1 |
0 |

Three |
1 |
0 |
1 |
0 |
0 |
1 |

C. Semprebon, T. Krueger, and H. Kusumaatmaja, Ternary free-energy
lattice Boltzmann model with tunable surface tensions and
contact angles, *Phys. Rev. E*, **93** 033305 (2016).

## 3.4.1. Two dimensions¶

Note that there is currently no default initialisation of the ternary composition.

### 3.4.1.1. Double emulsion (in blocks)¶

```
ternary_initialisation 2d_double_emulsion # Initialisation
2d_double_emulsion_xf1 0.2 # Optional: fraction x1
2d_double_emulsion_xf2 0.5 # Optional: fraction x2
2d_double_emulsion_xf3 0.8 # Optional: fraction x3
2d_double_emulsion_yf1 0.3 # Optional: fraction y1
2d_double_emulsion_yf2 0.7 # Optional: fraction y2
```

This initialises two central blocks of composition \(C_1\) and \(C_2\) surrounded by \(C_3\). The positions of the ‘cuts’ are controlled by five optional parameters, which are fractions of the system length in the relevant dimension; the default values are shown above.

It is expected that the \(z\)-dimension will have extent \(L_z = 1\), but it is not enforced; the initialisation will be uniform in \(z\).

### 3.4.1.2. Double droplet¶

```
ternary_initialisation 2d_double_drop # Initialisation
ternary_2d_drop1_radius 2.0 # radius for C_1 drop
ternary_2d_drop1_centre 2.0_1.5 # centre for C_1 drop
ternary_2d_drop2_radius 2.5 # radius for C_2 drop
ternary_2d_drop2_centre 4.0_2.0 # centre for C_2 drop
```

This is a variation of the above using instead of rectangular blocks, circular droplets. All the parameters specifying the position and the radii of the two drops must be specified and are in absolute lattice units.

Drop 1 has composition \(C_1\) and drop 2 has composition \(C_2\), while the background is \(C_3\). If the drops overlap, composition \(C_2\) will be favoured.

It is expected that \(L_z = 1\), although not enforced. If \(L_z > 1\), cylinders will result.

### 3.4.1.3. Lens in two dimensions¶

```
ternary_initialisation 2d_lens #
ternary_2d_lens_centre 16.0_16.0 # Required: centre (x0, y0)
ternary_2d_lens_radius 4.0 # Required: radius
```

This initialises a circular droplet of phase \(C_3\) with its centre at the specified position (absolute coordinates) and with given radius. The horizontal interface between \(C_1\) and \(C_2\) is always at \(L_y/2\). Such an initial condition, upon relaxation, should give rise to a lens shape depending on the equilibrium contact angles selected.

Again, it is expected that the \(z\)-dimension will have extent \(L_z = 1\), but it is not enforced; the initialisation will be uniform in \(z\).

### 3.4.1.4. T-shape in two dimensions¶

```
ternary_initialisation 2d_tee # initialisation
ternary_2d_tee_xf1 0.50 # optional: fraction of L_x
ternary_2d_tee yf1 0.33 # optional: fraction of L_y
```

Three rectangular blocks are initialised with sharp interfaces forming an inverted ‘T’-shape. The default positions of the interfaces are shown above, with the optional parameters specifying the fractional position of the vertical and horizontal interfaces. The default parameters give roughly equal areas of the three components in a square system with disposition as shown in the diagram.

This initialisation can be useful in, for example, assessing the wetting angles formed at solid boundaries at each side of the box.

## 3.4.2. Three dimensions¶

Details on three-dimensional configurations are pending.

## 3.4.3. Three-phase configuration from file¶

```
ternary_initialisation from_file # Request from single file
ternary_file_stub ternary.init # This is the default
```

Arbitrary composition fields may be supplied from file of appropriate format. This file must contain exactly two scalar fields \(\phi\) and \(\psi\) (\(\rho\) does not appear and is dealt with via the lattice Boltzmann distributions).

The file stub name can be set with the key `ternary_file_stub`

. Other
I/O parameters are currently dealt with via keys prefixed `phi_`

.
See sections on I/O for details.