# 2.6. Plane walls¶

## 2.6.1. Plane boundary walls¶

As a convenience, it is possible to specify that sets of plane walls are present in the system in one or more co-ordinate directions. For example, a set of walls in the $$y-z$$ plane are placed at each end of the system in positions $$x = 0.5\Delta x$$ and $$x = L + 0.5\Delta x$$ if the input file contains

boundary_walls       1_0_0
periodicity          0_1_1


The extent of the system $$L_x$$ is then just the number of points in the x-direction as specified by key size. By default, walls have no-slip boundary conditions implemented via bounce-back on links.

It is usual, although not strictly necessary, to declare that the relevant direction is not periodic (as in the example above). It should not make any difference to the result of the computation.

Walls may be specified in two dimensions to form a rectangular “duct”, or in all three dimensions to form an enclosed box. For example:

boundary_walls       1_1_0     # open in z-direction
boundary_walls       1_1_1     # enclosed box


### 2.6.1.1. Moving wall¶

If one set of walls (only) is present, is possible to specify a boundary speed (in the positive $$x$$-direction) which will impart momemtum to the fluid. Use, e.g.,

boundary_walls          1_0_0
boundary_speed_bottom  -0.001
boundary_speed_top     +0.001


will set the corresponding speed of the wall $$u_x$$ at the lower at upper ends of the system, respectively. Note that these speeds should be selected with reference to the Mach number constraint $$u < c_s$$. Momentum transfer here is again implemented via a no-slip condition via bounce-back on links.

Note the wall speed has only one non-zero component $$u_x$$, which should be tangential to the place of the wall (i.e., moving walls should be in either y or ‘z dimensions).

### 2.6.1.2. Slip and no-slip¶

It is possible to specify a linear combination of slip and no-slip conditions on a per-wall basis. The fraction of slip is specified. E.g.,

boundary_walls                    0_0_1
boundary_walls_slip_active        yes
boundary_walls_slip_fraction_bot  0.0_0.0_0.0
boundary_walls_slip_fraction_top  0.0_0.0_1.0


gives a no-slip condition at the lower wall and a free-slip condition at the top wall (walls in the $$x-y$$ plane). Values of the slip $$s$$ must satisfy $$0 \leq s \leq 1$$ for all six faces. If slip is active, no moving walls can be used.

### 2.6.1.3. Colloids and plane walls¶

Systems with colloids and walls can be accommodated. To prevent colloids impinging on the plane walls, a lubrication correction can be added by setting

boundary_lubrication_rcnormal   0.25


For surface-surface separations below this cut-off value specified in lattice units, a normal lubrication correction based on the analytical expression for the lubrication force between a sphere (of the appropriate hydrodynamic radius) and a plane wall is added to the force on the colloid.

## 2.6.2. Wetting at plane boundary walls¶

### 2.6.2.1. Wetting for the symmetric free energy¶

The presence of a surface free energy area density term

$f_s = {\scriptsize\frac{1}{2}} C \phi_s^2 + H \phi_s$

where $$C$$ and $$H$$ are uniform constants is available. This may be set is one of two ways. One may either set, explicitly, the value of one or both $$C$$ and $$H$$, along with the other free energy parameters:

symmetric_a        -0.00625     # A < 0
symmetric_b         0.00625     # B > 0
symmetric_kappa     0.004       # kappa > 0
symmetric_c         0.0         # Default value zero
symmetric_h         0.002       # Default value zero


Consider the case $$C=0$$. If $$h = H\sqrt{1/\kappa B}$$ then the wetting angle will, in theory, satisfy

$\cos\theta = {\scriptsize\frac{1}{2}} \Big[-(1-h)^{3/2} + (1+h)^{3/2}\Big].$

The value of $$h$$ must be such that $$|h| < (2\sqrt{3} - 3)^{1/2} \approx 0.68$$ to obtain a real wetting angle. From the free energy it can be seen that positive $$H$$ will favour negative $$\phi$$ at the solid surface, and vice-versa. In terms of angle, positive $$H$$ gives rise to $$0 \leq \theta \leq 90$$; negative $$H$$ gives rise to $$90 \leq \theta \leq 180$$ (all degrees). Larger $$|h|$$ will give rise to a situation where one phase or other completely wets the surface.

Alternatively, on can set a desired wetting angle, which will cause the relevant value of $$H$$ to be determined internally (again, $$C=0$$). E.g.,

symmetric_theta    45.0         # Angle in degrees.


The sign of $$H$$ will be set to reflect the sign of $$\cos\theta$$.

If non-uniform values of $$C$$ and $$H$$ are required, a porous media file must be prepared.

The wetting is implemented [Desplat2001] by adjusting the gradient computation near the surface. This means

fd_gradient_calculation 3d_27pt_solid


is required.

J.-C. Desplat, I. Pagonabarraga, and P. Bladon, A parallel lattice Boltzmann code for complex fluids, Comput. Phys. Comm. 134 273-290 (2001).

### 2.6.2.2. Wetting for the ternary free energy¶

For the three phase fluid free energy, specify the interfacial width and interfacial tension parameters in the usual way:

ternary_alpha         1.0
ternary_kappa1        0.01
ternary_kappa2        0.02
ternary_kappa3        0.05
ternary_h1           -0.001
ternary_h2           +0.002


We allow the specification of two independent uniform surface wetting parameters $$h_1$$ and $$h_2$$ with the third being determined by the constraint

$\frac{h_1}{\kappa_1} + \frac{h_2}{\kappa_2} + \frac{h_3}{\kappa_3} = 0.$

There are then three contact angles $$\theta_{12}$$, $$\theta_{23}$$ and $$\theta_{31}$$. These are illustrated in the diagram on the right where the rectangular box represents a solid surround.

The contact angles depend on the interfacial and surface tensions as, following the notation of Semprebon 2016:

$\cos\theta_{ij} = \frac{(\alpha\kappa_i + 4h_i)^{3/2} - (\alpha\kappa_i - 4h_i)^{3/2}} {2(\kappa_i + \kappa_j)(\alpha \kappa_i)^{1/2}} - \frac{(\alpha\kappa_j + 4h_j)^{3/2} - (\alpha\kappa_j - 4h_j)^{3/2}} {2(\kappa_i + \kappa_j)(\alpha \kappa_j)^{1/2}}.$

The gradient computation must be one of

fd_gradient_calculation     2d_ternary_solid


for the three phase model with wetting in either two dimensions or three dimensions, as required.

## 2.6.3. Anchoring for liquid crystals at plane walls¶

The preferred orientation of the liquid crystal director at a solid surface is usually referred to as the surface anchoring. For liquid crystal order there are three possibilities for anchoring conditions at a plane wall:

lc_anchoring_wall           fixed
lc_anchoring_wall           planar
lc_anchoring_wall           normal


For all cases, the conidition applies at all sides of the system. It is not possible to have different coniditions at different walls at the moment.

The liquid crystal anchoring boundary condition is implemented via the calculation of the order parameter gradients near the walls. We assume there is a surface free energy (density per unit area)

$f_s = f_s(Q_{\alpha\beta}, Q^0_{\alpha\beta})$

where $$Q_{\alpha\beta}$$ is adjacent fluid order parameter, and $$Q^0_{\alpha\beta}$$ is some preferred order parameter at the surface determined by the type of anchoring.

The boundary condition is derived from the Euler-Lagrange equation, and contains the gradient terms in the bulk free energy density and the surface free energy $$f$$ and $$f_s$$, along with the unit outward normal at the surface $$\hat{n}_\gamma$$:

$\hat{n}_\gamma \frac{\partial f}{\partial Q_{\alpha\beta,\gamma}} + \frac{\partial f_s}{\partial Q_{\alpha\beta}} = 0.$

A suitable gradient computation must be selected (see below).

Only the values above are valid (normal, planar, or fixed); any other value will generate a run time error. We consider the three cases in turn.

### 2.6.3.1. Normal or homoetropic anchoring at walls¶

The preferred direction of the surface order here is, as the name suggests, normal to the surface. We can write the surface free energy density (per unit area):

$f_s = \textstyle{\frac{1}{2}} w_1 (Q_{\alpha\beta} - Q^0_{\alpha\beta})^2$

where $$w_1$$ is a constant, and $$Q_{\alpha\beta}$$ is the local fluid order parameter. The preferred orientation is based on the unit outward normal at the relevant wall $$\hat{n}_\gamma$$, and is computed via the uniaxial approximation

$Q^0_{\alpha\beta} = \textstyle{\frac{1}{2}} A(3\hat{n}_\alpha \hat{n}_\beta - \delta_{\alpha\beta}).$

The value of $$A$$ is dependent on the bulk free energy constant $$\gamma$$ and is fixed by assuming $$Q^0_{\alpha\beta}$$ minimes the bulk free energy. Note that the preferred outward normal where two or three walls meet at an edge or at a corner, is $$45^\circ$$ outward (see example below). The full boundary condition for the order parameter gradient at the solid fluid boundary then contains the term

$\frac{\partial f_s}{\partial Q_{\alpha\beta}} = -w_1 (Q_{\alpha\beta} - Q^0_{\alpha\beta}).$

The relevant input key/value pairs are:

lc_wall_anchoring      normal      # anchoring
lc_wall_anchoring_w1   0.01        # free energy parameter


It can be appropriate to set the value of the free energy parameter in the context of the bulk fluid elastic constant, e.g., by considering the dimensionless group $$w_1 / \kappa L$$, where $$L$$ is an apprpropriate length scale for the problem. An example is shown in the following illustration.

The above results represent a two-dimensional nemetic in a square system of size $$L^2$$ surrounded by plane walls (only the top half of the system is shown). An initial random nematic director configuration is allowed to relax with no hydrodynamics, and the resulting patterns are observed for the three different normal anchoring strengths shown. Note that the preferred angle in the corners is $$45^\circ$$ outwards.

### 2.6.3.2. Planar (or degenerate) anchoring at walls¶

For planar anchoring, the preferred orientation is in the local tangent plane at the surface: this is a degenerate case as any orientation in the plane is energetically equivalent. An appropriate boundary condition is described by Fournier and Galatola [FournierGalatola2005], which we write as

$f_s = \textstyle{\frac{1}{2}} w_1 (\tilde{Q}_{\alpha\beta} - \tilde{Q}^\perp_{\alpha\beta})^2 + \textstyle{\frac{1}{2}} w_2 (\tilde{Q}^2 - S_0^2)^2.$

To compute this term we take the local fluid order parameter $$Q_{\alpha\beta}$$, form the quantity

$\tilde{Q} = Q_{\alpha\beta} + \textstyle{\frac{1}{2}} A \delta_{\alpha\beta}$

which is then projected onto the tangent plane via $$\tilde{Q}^\perp_{\alpha\beta} = P_{\alpha\gamma} \tilde{Q}_{\gamma\sigma} P_{\sigma\beta}$$ with the local surface normal entering through $$P_{\alpha\beta} = \delta_{\alpha\beta} - \hat{n}_\alpha \hat{n}_\beta$$. The full boundary condition arising from the surface free energy contains the terms

$\frac{\partial f_s}{\partial Q_{\alpha\beta}} = - w_1(\tilde{Q}_{\alpha\beta} - \tilde{Q}^\perp_{\alpha\beta}) - 2w_2(\tilde{Q}^2_{\alpha\beta} - S_0^2) \tilde{Q}_{\alpha\beta}.$

The term $$S_0 = 3A/2$$, with amplitude $$A$$ as described above for normal anchoring.

Relevant input parameters are:

lc_wall_anchoring      planar
lc_wall_anchoring_w1   0.01        # both w1 and w2 must be present
lc_wall_anchoring_w2   0.005


For the same two-dimensional nematic example discussed for normal anchoring above, initialised with the same random configuration, the corresponding results for planar anchoring are:

All simulations used $$w_1 = w_2$$ (although experience suggests the value of $$w_2$$ does not have a strong influence on the result). Note again that the preferred angle at the corners is at $$45^\circ$$ (visible in the strong anchoring case on the right).

J.-B. Fournier and P. Galatola, Modeling planar degenerate wetting and anchoring in nematic liquid crystals, Europhys. Lett. 72 403-409 (2005).

### 2.6.3.3. Fixed anchoring direction at walls¶

Relevant input parameters are:

lc_anchoring_wall           fixed         # anchoring
lc_anchoring_wall_w1        0.01          # free energy parameter
lc_wall_fixed_orientation   1.0_0.0_0.0   # the vector \hat{n}


This choice sets a uniform preferred director $$\hat{n}_\alpha$$ which gives rise to a preferred order parameter at the fluid next to the wall of $$Q^0_{\alpha\beta}$$ based on the uniaxial approximation. The treatment then follows that of normal anchoring as described above.

If the vector supplied in the input is not a unit vector, it will be adjusted to make it so at run time.

The example again uses the same random initial nemetic configuration in two dimensions, and the fixed anchoring orientation is along the $$x$$-direction (the horizontal here). In this case there is no distinction between the “weak” and “strong” cases, as the orientation can be accommodated everywhere for a nematic.

### 2.6.3.4. Gradient computation for anchoring at walls¶

For the gradient computation it is recommended to use

fd_gradient_calculation      s7_anchoring


This uses a 7-point stencil in three dimensions to compute the gradient terms, and can be used for any combination of place walls and colloids.

Note that the alternative anchoring gradient computation

fd_gradient_calculation      3d_7pt_solid


should not be used if walls meeting at edges or corners are required (as in the above examples). For single plane walls they are the same.

### 2.6.3.5. Anchoring with both walls and colloids¶

If both plane walls and colloids are present, the surface normal will become poorly defined if colloid and wall sites are adjacant. In such cases, the wall anchoring will take precedence. The advice would be to try to avoid such situations by using the boundary lubrication correction to maintain a clear separation between any colloids and the boundary wall. “A clear separation” here means at least half a lattice unit, which will ensure there is always a fluid site adjcaent to the walls. See the section on colloid lubrication corrections for further details.