Introduction

Habitats of motile microorganisms are not limited by Newtonian fluids. For example, many bacteria successfully colonize complex non-Newtonian environments exemplified by viscoelastic media and liquid crystals. The medium anisotropy and viscoelasticity may control the movement of these swimmers in a non-trivial way1, 2. A suspension of swimming bacteria in lyotropic (water-based) liquid crystal3,4,5,6 is one of the examples. Furthermore, complex biological fluids like mucus, DNA solutions7, suspensions of viruses8, or long polymers9 also exhibit a certain degree of liquid-crystallinity as well as visco-elastic response to deformation. From the human and animal health perspective, interaction and invasion of mucus by bacteria is relevant in the context of multiple bacteria-born infections10.

Bacterial collective behavior in visco-elastic media is an open area of research. There is numerous literature on microswimmer motility in a viscoelastic environment. However, it is still a matter of controversy. Some studies11, 12 state that viscoelasticity hinders self-propulsion and results in about a 35% reduction of the swimming speed. Studies in ref. 13 have found that the microswimmers are always slower in a shear-thinning fluid while in weakly viscoelastic second-order fluid they may swim slower or faster depending on their swimming gait. On the contrary, a computational study in ref. 14 obtained an increase of the swimming speed up to 60% in polymer solutions due to a non-uniform distribution of polymer molecules around a bacterium. It was shown that pullers slow down whereas pushers speed up in a weakly viscoelastic fluid15 and in Newtonian fluids with spatial gradients of viscosity16. Swimming sheets demonstrate increased speed due to shear-thinning17 as nematodes do in concentrated polymer solutions18.

The earlier experimental studies indicated the non-monotonous viscosity dependence of the swimming speed: the swimming speed increases with the viscosity increase then falls off when the viscosity reaches 60 viscosities of water19, 20. However, ref. 9 has found that the non-monotonous viscosity dependence is due to low-molecular-weight impurities: after purification of the polymer solution by dialysis, the swimming speed exhibits essentially no dependence in the wide range of polymer concentrations. Also, the bacterial body and bacterial flagella may experience different viscosity in polymer solutions. Bacterial motility in a viscoelastic gel such as mucus also shows little effect of the increased solution viscosity on the bacterial swimming speed10. This finding can be explained by the heterogeneity of the mucus polymer network: bacteria swim in "tunnels” formed by the network and effectively experience the viscosity of water.

One may expect that viscoelasticity and associated memory in polymer networks will have a non-trivial effect on bacterial motility. For example, the direction change due to bacteria run-and-tumble behavior requires unbundling of the bacterial flagella21. However, in the polymer solution, the unbundling is suppressed4, 10, 22: a bacterium reverses its direction and follows the same track instead of picking a random orientation. Moreover, in mucus, the swimming speed of backward motion is higher than the forward swimming10. This speed increase is due to the memory in the mucus polymer network: bacteria burrow transient tunnels in the polymer mesh and, after the reversal, swim backward in an already existing tunnel. It is known that in addition to visco-elasticity, mucus gel also exhibits some degree of liquid crystallinity10, 23.

To date, there are only a few computational and experimental studies of collective bacterial behavior in viscoelastic media24,25,26. One of the conclusions is that viscoelasticity enhances the attraction and orientational order among pusher-type swimmers25. However, the overall understanding of the miscroswimmer individual dynamics and interactions in visco-elastic media remains unclear.

In this paper, we study the dynamics of a single microswimmer (e.g., a bacterium) or two interacting microswimmers in anisotropic viscoelastic media. Specifically, we investigate a viscoelastic liquid crystal (VELC) as a mucus model. For individual swimmers in the VELC, we have found that after the reversal, they swim faster along the same track, in faithful agreement with the experiment10. This behavior is attributed to the slow relaxation of the nematic director in VELC and the formation of the transient tunnel due to the memory effect. Similar behavior occurs for the interaction of two swimmers following the same track: the aft swimmer has a higher velocity and catches up with the leading swimmer. Parallel swimmers tend to attract each other approaching until they reach an equilibrium distance. Also, if the swimmers are launched at different angles, the interactions mediated by the VELC result in the formation of a "train”: after some transient, the following swimmers repeat the path of the "leader”. The train behavior also was observed experimentally27. Our computational results shed light on bacteria penetration in mucus and bacteria colonization of heterogeneous liquid environments.

Results

Model formulation

A self-propelled microswimmer is modeled by a rigid elliptical body with the principal axis \({{{{{{{\bf{p}}}}}}}}=\langle \cos (\alpha ),\sin (\alpha )\rangle\) to capture the shape anisotropy, where α measures the angle between swimming direction and horizontal x-axis (see Fig. 1). The microswimmer moves with translational velocity V(t) and rotates with angular velocity ω(t). To model the self-propulsion of the microswimmer in the direction of its principal axis p, a slip velocity vsq is prescribed at the surface of the microswimmer γ:

$${{{{{{{\bf{v}}}}}}}}({{{{{{{\bf{x}}}}}}}})= {{{{{{{\bf{V}}}}}}}}(t)+\omega (t)\times ({{{{{{{\bf{x}}}}}}}}-{{{{{{{{\bf{x}}}}}}}}}_{c}(t))+{{{{{{{{\bf{v}}}}}}}}}_{sq},\quad \\ {{{{{{{{\bf{v}}}}}}}}}_{sq}=B\sin (\theta )(1+\beta \cos (\theta )){{{{{{{\boldsymbol{\tau }}}}}}}}.$$
(1)

Here xc(t) is the position of the center of mass of the microswimmer, and θ is the counter-clockwise angle between p and x − xc(t). Vector τ is tangential to the swimmer surface γ, pointing towards the increasing direction of θ. The last term in equation (1) models the self-propulsion with strength B.

Fig. 1: Schematics of a microswimmer exemplified by a flagellated bacterium.
figure 1

The domain occupied by the microswimmer is modeled as an ellipse, oriented parallel to the unit vector p. The VELC far-field director orientation is shown by n. The angle between the horizontal axis and the vector p is given by α. Small blue segments represent the nematic director field. These segments are tangential to the microswimmer’s surface, thus illustrating planar anchoring.

The slip velocity vsq is commonly used for spherical swimmers (squirmers) in the Stokes flow28, 29. Elliptical squirmers were studied in Newtonian30,31,32,33,34 as well as viscoelastic fluids35, 36. However, there is a lack of studies of their motion in liquid crystals except for passive ellipsoidal/spheroidal particles37,38,39. We use simplified Lighthill-Blake squirmer boundary condition30, 40 with only two modes on the elliptical surface of the squirmer (c.f.35). We expect, based on experimental results4, 27, that the most striking effects happen due to the anchoring of the nematic director on the boundary and the generic type of the swimmer (that is, pusher/puller). Influence of the highest stroking modes or specific for elliptical squirmers boundary conditions (e.g., as in13, 32,33,34, 36, 41) on the swimmer motion in liquid crystals is a matter of future studies.

In the case when B = 0, equation (1) is reduced into the classical boundary condition for passive rigid body motion. Squirmer parameter β determines the type of the microswimmer. When β > 0, boundary condition (1) models a puller-type swimmer whose propulsion "motor" is at the front and body mass is concentrated at the back (e.g., eukaryotic unicellular algae Chlamydomonas reinhardtii), whereas for β < 0, the microswimmer is a pusher whose propulsion "motor" is at the back and body mass is concentrated at the front (e.g., motile bacteria Escherichia coli, Bacillus subtilis, etc.). If β = 0, the microswimmer is a neutral one (e.g., ciliates Paramecium).

The viscoelastic fluid is described by the generic continuum model proposed in42, 43, which is the Beris-Edwards model for the liquid crystal nematic order parameter Q coupled with an equation for the polymer conformation tensor C. Conventionally, unit director field n(x) and scalar order parameter q(x) are used to characterize the anisotropy of the nematics, as in the Eriksen-Leslie model44,45,46. The director n(x) represents the local average orientation of the nematic, whereas the scalar order parameter q(x) describes the variation of the nematic orientation from the average one. For the Beris-Edwards model, a symmetric and traceless tensor order parameter Q(x) is used

$${{{{{{{\bf{Q}}}}}}}}({{{{{{{\bf{x}}}}}}}})=q({{{{{{{\bf{x}}}}}}}})\left({{{{{{{\bf{n}}}}}}}}({{{{{{{\bf{x}}}}}}}})\otimes {{{{{{{\bf{n}}}}}}}}({{{{{{{\bf{x}}}}}}}})-\frac{{{{{{{{\bf{I}}}}}}}}}{d}\right)$$
(2)

to characterize the anisotropy of the media. Here I is d × d identity matrix and d is the space dimension of the problem. We consider the case d = 2 for simplicity. It is an approximation to the quasi-2D experiments where two rigid walls (substrates) are used to contain a thin layer of VELC with swimming bacteria. External force Fexter aligns the director n with n = 〈1, 0〉, which corresponds to the alignment of the media due to the substrates. Surface anchoring (planar or homeotropic) is modeled at the surface of the microswimmer via anchoring force Fanc with strength W.

To model viscoelastic effects, the conformation tensor C(x) is introduced as

$${{{{{{{\bf{C}}}}}}}}={{{{{{{\bf{r}}}}}}}}({{{{{{{\bf{x}}}}}}}})\otimes {{{{{{{\bf{r}}}}}}}}({{{{{{{\bf{x}}}}}}}}),$$
(3)

where r(x) is an end-to-end vector representing the average elongation of the nematic. Coupling parameter χ between Q and C determines the alignment of elongation vector r with the director parameter n and plays a major role in the model as it will be seen from the results below. If the coupling χ < 0, r(x) prefers to be parallel to the director n(x) whereas for χ > 0, r and n prefer to be perpendicular to each other. That is to say, physically, when χ < 0, the elongation is more likely to be along the long nematic axis and perpendicular to the long nematic axis when χ > 0. The larger the absolute value of χ, the stronger the coupling between n(x) and r(x) is. We will mainly consider the case when χ < 0 since it is more relevant to biological VELC (e.g., mucus).

Besides the tensor order parameter Q and conformation tensor C, velocity field v(x), and pressure p(x) are used to model the hydrodynamics of the viscoelastic nematics. They are determined through solving the Stokes equation with additional stresses depending on Q and C characterizing the viscoelastic properties.

Dynamics of a single microswimmer

We first perform numerical experiments for a single microswimmer in the VELC to study the stability of its swimming direction. It is found that for an elongated puller (β > 0), there exists a critical planar anchoring strength Wcrit which controls the stable swimming direction of a puller. That is to say, a puller prefers to swim perpendicular to n when W < Wcrit and parallel to n when W > Wcrit, see Fig. 2a. As for a pusher, there exists a critical homeotropic anchoring strength. If W < Wcrit, the pusher prefers to swim parallel to n, see Fig. 2b. If W > Wcrit, the pusher prefers to swim perpendicular to n. A pusher with planar anchoring and a puller with homeotropic anchoring do not demonstrate critical behavior and swim parallel and perpendicular to the nematic director field, correspondingly, see Fig. 2b.

Fig. 2: Orientation dynamic of a single swimmer.
figure 2

a Orientation angle of a puller with strong (blue) and weak planar anchoring (red). b Orientation angle of a pusher with strong (red) and weak homeotropic anchoring (blue). c, d Relaxation time τrl vs. β for different values of coupling parameter χ when planar anchoring strength W = 0.1. Positive β corresponds to pullers and β < 0 to pushers.

Similar results were obtained in47 for the stable swimming direction of a single microswimmer in pure liquid crystals described by the Beris-Edwards model without conformation tensor C. Compared to the swimmer dynamics in non-viscoelastic nematics, the new finding here is that viscoelasticity affects the convergence rate of the swimmer’s orientation to its stable swimming direction if χ < 0. In general, viscoelasticity reduces the torque acting on the squirmer caused by elastic stresses emerging due to distortion of the nematic order by anchoring. Since the total torque is the sum of hydrodynamic and elastic torques, the resulting effect depends on the interplay between them, see47. A puller with weak planar anchoring whose preferred swimming direction is perpendicular to n rotates to its preferred swimming direction faster (see Fig. 2c). The same happens for a pusher with weak homeotropic anchoring; its convergence to its preferred parallel direction is also "sped up”. In contrast, a puller slows down its rotation to the parallel direction when strong planar anchoring and to the perpendicular one when weak homeotropic (see Fig. 2d) is applied. Correspondingly, when strong homeotropic anchoring is applied, a pusher slows down its rotation to the perpendicular direction.

That happens because there are two preferred orientations for a swimmer in liquid crystals: (i) a swimming direction favored due to the type of swimmer in which the torque caused by hydrodynamic stresses tries to rotate the swimmer; (ii) a direction favored due to the elongated shape of the swimmer together with the anchoring type (in this direction the torque caused by elastic stresses rotates the swimmer). When these two favored directions are different, critical behavior is found47. In VELC, viscoelasticity attenuates alignment towards the second favored direction due to the elongated shape and the anchoring type. This favored direction is parallel to n for planar anchoring and perpendicular to n for homeotropic anchoring. That happens because the elongation of the liquid crystal molecules along their principal axes prevents the relaxation of the molecular orientation to n. This relaxation is the main reason the elongated microswimmer rotates parallel to n when planar anchoring is present. These results are summarized in Table 1. A more detailed explanation of this phenomenon will be given in the Discussion; see also Supplementary Fig. 1 showing contributions to the total torque acting on the elongated squirmer.

Table 1 The swimming stable direction of an elongated swimmer depending on its type (puller/pusher) and anchoring condition.

We also performed numerical experiments for a single pusher’s back-and-forth motion with the coupling parameter χ < 0. The pusher with planar anchoring is launched with the initial orientation α = 0 (along its stable swimming direction). It ensures that the swimmer will not rotate, and its trajectory will be a straight line. After some transient, we flip the swimming direction to α = π (also a stable swimming direction). Then the swimmer moves along the same trajectory but in the opposite direction. During the backward motion, the swimmers have the same gait, which is represented by the coefficient B in (1). In experiments, such back-and-forth motion is related to some common swimming properties of bacteria, like tumbling. However, since random reorientation with respect to an overall nematic direction is not possible in liquid crystals, instead of run-and-tumble behavior, bacteria execute back-and-forth motion3, 4.

We found in these computational experiments that the pusher has a larger speed swimming backward (α = π) than forward (α = 0). This observation agrees with experimental observation on motion of bacteria Bacillus subtilis in mucus10, where a 20% increase in the speed traveling backward on the same trajectory was observed, see Fig. 3. Compared to our numerical results, it corresponds to the case when χ = − 0.04. In addition, we observed numerically that the speed difference depends on the absolute value of coupling parameter χ, and it increases when χ grows, see Fig. 3a. That is because a transient "tunnel” is created at the back of the pusher when it is swimming forward, see Fig. 4a–d where the walls of the "tunnel” were determined as curves with values of scalar order parameter q = 0.4. When it swims backward, the pusher goes back into the "tunnel”, which facilitates swimming. After traveling backward for about twice its body length, the pusher’s swimming speed begins to relax towards its original value during the forward motion (see Fig. 3b). See details of this "tunnel” effect in the Discussion. The increase in velocity is relatively small if the coupling between Q and C tensors is turned off and VELC becomes ordered viscoelastic fluid, that is χ = 0. In this case, the speed of motion is close to the speed in the pure liquid crystal without viscoelasticity, see Fig. 3a.

Fig. 3: Swimming speed for motion reversal on the same track.
figure 3

A pusher (β = − 2) with planar anchoring (W = 0.5) swims horizontally (parallel to n) towards the bouncing point (forth motion) and switches to the opposite direction after reaching the bouncing point (back motion) a Average speed of the microswimmer within one body length from the bouncing point. The case “no VE” corresponds to the motion in the pure liquid crystal when viscoelasticity is turned off. b Swimming speed vs position of the swimmer for χ = − 0.03. Point A corresponds to the starting point for the forward motion and point B to the final point. Points C and D correspond to the starting and final point of the backward motion.

Fig. 4: Single swimmer in VELC.
figure 4

A single pusher (β = − 2) with planar anchoring (W = 0.5) in VELC. Coupling parameter χ = − 0.01. Topological defects generated by the swimmer are encircled. Red and green circles are correspondingly “ + 1/2” and “ − 1/2” defects. The dashed lines shows a transient tunnel formed by the swimmer. a Scalar order parameter q(x) around the swimmer. b Director field n(x) around the swimmer. c Largest eigenvalue of conformation tensor C. d The eigenvector corresponding to the largest eigenvalue of C.

Two microswimmers

To further investigate this observed back-and-forth motion, we also performed numerical studies for two pusher-type swimmers, one pursuing the other. We have found that the following swimmer has a larger speed than the leader at the beginning of its motion. This speed difference is larger when the viscoelastic effects are stronger (that is, χ is more negative). After the distance between two swimmers reaches a critical value, the speed difference decreases to zero, and both swimmers travel at the same speed. That happens for the same reason as the speed difference observed in back-and-forth motion. In this numerical study, the leading swimmer creates a tunnel that makes moving easier for the following swimmer. This tunnel, attracting two swimmers to each other, competes with the hydrodynamic repulsion of two pushers. That leads to the existence of a critical distance where attraction and repulsion are balanced. Similar results were observed if two swimmers initially follow a parallel course, see Fig. 5a, b. If the coupling between Q and C tensors is turned off, that is χ = 0, then the viscoelastic effects are relatively weak, and the swimmers are slightly repulsive due to elastic interactions (see Fig. 5b, black solid and dashed curves, where the distance grows from 8 to about 11 swimmer widths). However, if the coupling is present, the swimmers attract each other: first traveling in intersecting courses and then resuming parallel motion. Likewise for swimmers in pursuit, the critical distance also exists in this case, see Fig. 5a, having a similar behavior, that is, the stronger the coupling is, the closer the swimmers approach.

Fig. 5: Two parallel swimmers.
figure 5

Two pushers (β = − 2) with planar anchoring (W = 0.5) swim with parallel initial velocities. The initial distance from the side to side is 8 times larger than their widths. a Critical distance (measured from side to side) between two swimmers when they resume traveling in parallel. b Trajectories of the centers of mass of swimmers for different values of χ. The solid curves correspond to the top swimmer, and the dashed curves represent the trajectory of the bottom swimmer.

We are also interested when two swimmers are launched with different initial direction angles α, see Figs. 6, 7. The scalar order parameter and the nematic fields for two swimmers with the same initial orientations are shown in Fig. 6a, b. Correspondingly, the same fields for two swimmers with different initial orientations are shown in Fig. 6c, d. That shows how the tunnel formation affects the trajectory of the following swimmer. A numerical study is performed with two pushers whose centers of mass are both located on the x-axis. The initial direction for the first swimmer is α(t = 0) = 0 and the initial direction for the second swimmer is α(t = 0) = π/6. We fix the swimming direction of the first swimmer so that it plays the role of the "leader”. We found that the second swimmer first tries to rotate so that it will move back to the x-axis, which is the trajectory of the leader. Once it returns to the x-axis, it overshoots and swims below the x-axis. Eventually it swims back to the x-axis and then follows the leader (see Fig. 7a). We denote the distance traveled in x-direction by the second swimmer before it returns back to the x-axis for the first time as the first half period. This value can be used to quantify how strong the oscillations are. The dependence of the first half period on the coupling parameter χ is shown in Fig. 7b.

Fig. 6: Two swimmers in VELC.
figure 6

Two pushers (β = − 2) with planar anchoring (W = 0.5) swim in VELC. Coupling parameter χ = − 0.03. Topological defects generated by the swimmer are encircled. Red and green circles are correspondingly “ + 1/2” and “ − 1/2” defects. a Scalar order parameter q(x) around the swimmer when two swimmers are launched with same initial orientation α = 0. b Corresponding director field n(x) of (a). c Scalar order parameter q(x) around the swimmer when two swimmers are launched with different initial orientation, α = 0 for the leading one and \(\alpha =\frac{\pi }{6}\) for the following one. d Corresponding director field n(x) of (c).

Fig. 7: Two swimmers with different initial direction.
figure 7

Two pushers (β = − 2) with planar anchoring (W = 0.5) swim one after the other with different initial direction: the leading swimmer with α(t = 0) = 0 and the following swimmer with α(t = 0) = π/6. It is imposed that the leading swimmer does not change its direction. The second swimmer follows the trajectory of the first swimmer. a Trajectory of the center of mass of both swimmers when χ = − 0.03. b First half period (strength of oscillation) vs coupling parameter χ.

It is worth noticing that all these numerical results are discovered in a physically reasonable parameter regime. Swimmer’s length is taken to be l = 5  10−6m and its speed is approximately twice its body length per second. Erickson number \(Er=\frac{\eta {{{{{{{\bf{V}}}}}}}}l}{K}=2.5\) with viscosity η = 0.5kg  m−1 s−1 and elastic constant K = 10pN.

Discussion

Our study shows that the viscoelastic effects, represented by the coupling between the tensor order parameter Q and the conformation tensor C, significantly affect the behavior of a single microswimmer and multiple microswimmers in VELC. As we observe, the primary source of the obtained results is not the viscolasticity itself but rather the coupling between the nematic director n and the end-to-end elongation vector r. The strength of this conjunction is represented in the model by the value of the coupling parameter χ. For χ < 0, n and r tend to have the same direction. Being perturbed by the swimmer’s motion, both n and r relax into a minimal energy state: n relaxes towards the direction prescribed by aligning force Fexter and r follows. However, the coupling between them slows down the relaxation of n, keeping the orientation of VELC molecules n with their elongation direction r. Thus, reducing the aligning torque Tela exerted on the swimmer due to substrate aligning force Fexter and the surface anchoring force Fanc. As discussed in47, the convergence rate of swimming direction α to the stable direction for an elongated swimmer is a competition between the torque Thydro due to hydrodynamic interactions and the torque Tela due to elastic interactions induced by Fexter and Fanc. This reduction of the aligning torque Tela makes the convergence of swimming direction α to the direction favored by the aligning force and surface anchoring less pronounced. In this connection, see Supplementary Fig. 1, where contributions to the total torque acting on a puller with homeotropic anchoring are given. For the weak anchoring, viscoelasticity works together with Thydro and Tela against additional torque due to anisotropy L and speeds up the rotation. On the contrary, viscolasticity for the strong anchoring works with Tela against Thydro and additional torque L, thus, slowing down rotation.

Compared to liquid crystals modeled by Beris-Edwards equations47, in the VELC with an active microswimmer, the detachment of defects happens at a much lower Erickson number (Er ≈ 1). However, the boojum defects attached to the swimmer’s surface appear at the same Erickson number. In VELC, defects detach from the interface of the swimmer and turn into a " − 1/2” defect in its front (green circle in Fig. 4) and a " + 1/2” defect at the back (red circle in Fig. 4). When the microswimmer turns around and swims backward, the new " − 1/2” defect is attracted to the original " + 1/2” defect and accelerates the swimmer. In our computational study, the "turning around” happened by manually changing the propulsion direction α. The defects were observed numerically as points xd, where the scalar order parameter q(xd) < 0.1. The type of defects (" + 1/2” or " − 1/2”) was determined by examining the local orientation of the director field. Note that due to coupling between Q and C tensors, planar/homeotropic anchoring of the director induces the respective direction of the principal axes of the conformation tensor. On the contrary, the hydrodynamic effects define the orientation of the conformation tensor in viscoelastic fluids48. In this relation, see Supplementary Figs. 2, 3, where pushers with planar and pullers with homeotropic boundary conditions are presented, the orientation of the conformation tensor due to hydrodynamic effects coincides with orientation due to anchoring.

For two microswimmers, topological defects may explain the fact that the following swimmer has a higher swimming speed compared to the leading one (see Fig. 6). Those two " + 1/2” defects at the back of the leading swimmer attract two " − 1/2” defects at the front of the pursuing swimmer due to relaxation of the elastic energy in the nematic field between them. That accelerates the following swimmer and decelerates the leading one. However, the flow field around the pushers repulses them from each other, (see Fig. 8a, b). The competition between the hydrodynamic repulsion and the elastic attraction (topological defects) leads to the origin of the critical distance between two swimmers (see Fig. 9a, b). A larger magnitude of the coupling parameter χ increases the deformations and, therefore, energy stored in the nematic field between swimmers, accelerating the following swimmer. Hence attraction due to the elasticity (topological defects) grows, which leads to a smaller critical distance. Turning off coupling between conformations and nematic order but keeping viscoelasticity (χ = 0) reduces the medium to an ordered viscoelastic fluid. Here we do not obtain an increase in speed for the following swimmer; see Fig. 9a. It shows the importance of the memory effects and of the conjunction between director and elongations. In some viscoelastic fluids the speed increases17 and particles attract each other49 due to shear-thinning and local decrease of viscosity. In our case, the primary source is the slow relaxation of the director in the tunnel region caused by viscoelastic coupling.

Fig. 8: Two swimmers in VELC, launching with the same initial orientation α = 0.
figure 8

Two pushers (β = − 2) with planar anchoring (W = 0.5) swim in VELC. Both of their initial orientation is α = 0. Coupling parameter χ = − 0.03. a Fluid velocity field v(x) around the swimmers. b Sketch of the velocity field showing that two pushers are repulsive when one follows the other.

Fig. 9: Swimming speed for two swimmers, one following the other.
figure 9

Two pushers (β = − 2) with planar anchoring (W = 0.5) swim one after the other. The initial distance from the tail of the leading swimmer to the head of the following swimmer is twice their body length. a The average speed of each pusher swimming its first body length b Critical distance (measured from the tail of the leading swimmer to the head of the following swimmer) between two swimmers when their speeds become equal.

Since defect interaction strength is inverse proportional to the distance between them, the tunnel effect may be accounted for by the acceleration of the aft swimmer on large distances comparable to several swimmers’ sizes. As it is seen from Fig. 4, a single swimmer creates (burrows) a tunnel: a zone where nematic order is distorted and the level of anisotropy is suppressed. Correspondingly, the scalar order parameter q is relatively small. In the meantime, the largest eigenvalue of the conformation tensor C is relatively small (less than 1) in this tunnel region, which means larger viscoelastic deformations, specifically compressive deformations. Both effects lead to an increase in elastic and viscoelastic energy stored in the tunnel region. The tunnel effect allows the swimmer in the tunnel to achieve higher velocity with the same propulsion strength, see Figs. 3 and 9.

When two swimmers with their centers of mass xc located on the x-axis are launched with different initial orientations α as it is shown in Fig. 6, the attraction between the topological defects that swimmers generate tries to "pull” the following swimmer onto the trajectory of the leading one. Therefore, after the aft swimmer travels upward for a while due to its initial orientation (see this trajectory in Fig. 7a), it comes back to the trajectory of the leading particle, and they form a "train”, see Fig. 6. Such phenomenon was also found experimentally in27 where more than two bacteria were observed forming a train and swimming together along the same trajectory in liquid crystals with homeotropic surface anchoring on the substrate and planar anchoring on the bacteria surface.

For parallel swimmers, see Fig. 5, we suggest the following explanation. The zone of suppressed anisotropy between swimmers facilitates their motion and, therefore, they attract each other. However, the closer they get, the stronger the elastic  repulsion is. At the critical distance where these two effects balance each other, the swimmers resume parallel motion. Similar effects are observed in pure viscoelastic fluids49. However, the connection between nematic and viscoelastic properties is more subtle in our case. Indeed, when the coupling is turned off (χ = 0), the viscoelastic effects are not strong enough to cause attraction of swimmers, see Fig. 5.

Conclusion

In conclusion, we developed a computational method to investigate the dynamics of self-propelled rigid particles in a viscoelastic nematic environment. Our study demonstrated that viscoelasticity is responsible for a variety of phenomena not observed in traditional liquid crystals: transient tunnels and memory effects. For example, we observed a speed difference in back-and-forth motion after the direction reversal, the appearance of trains, etc., in faithful agreement with the experiments on bacterial motility in mucus10. Based on our results, we expect that enhancing viscoelasticity in bacterial liquid crystalline suspensions will facilitate the formation of bacterial trains and enhance their stability, thus, paving the way to the onset of collective motion while allowing for the reduced critical distance between bacteria.

Further study of the model may provide new insights into the collective behavior of many swimmers in VELC. However, the existing computational algorithm is relatively slow and is not well-suited for this problem. A main computational bottleneck is calculating the hydrodynamic flow around the swimmer and satisfying the corresponding boundary condition. We expect that replacing a rigid swimmer with a self-propelled object with simplified boundary conditions, e.g. based on a dipole force50, may significantly speed up computations.

Methods

Computational model

The dynamics of the tensor order parameter Q, conformation tensor C, the flow velocity v, as well as hydrodynamic pressure p are described by the system:

$$({\partial }_{t}+{{{{{{{\bf{v}}}}}}}}\cdot \nabla ){{{{{{{\bf{Q}}}}}}}}={{{{{{{{\bf{S}}}}}}}}}_{Q}({{{{{{{\bf{Q}}}}}}}},\nabla {{{{{{{\bf{v}}}}}}}})+{\Gamma }_{Q}{{{{{{{{\bf{H}}}}}}}}}_{Q}+{{{{{{{{\bf{F}}}}}}}}}_{{{{{{{{\rm{exter}}}}}}}}}+{{{{{{{{\bf{F}}}}}}}}}_{{{{{{{{\rm{anc}}}}}}}}},$$
(4)
$$({\partial }_{t}+{{{{{{{\bf{v}}}}}}}}\cdot \nabla ){{{{{{{\bf{C}}}}}}}}={{{{{{{{\bf{S}}}}}}}}}_{C}({{{{{{{\bf{C}}}}}}}},\nabla {{{{{{{\bf{v}}}}}}}})+{\Gamma }_{C}{{{{{{{{\bf{H}}}}}}}}}_{C}+{K}_{C}{\nabla }^{2}{{{{{{{\bf{C}}}}}}}},$$
(5)
$$\nabla \cdot (-p{{{{{{{\bf{I}}}}}}}}+2\eta {{{{{{{\bf{D}}}}}}}}+{\sigma }_{Q}+{\sigma }_{C})=\mu {{{{{{{\bf{v}}}}}}}},$$
(6)
$$\nabla \cdot {{{{{{{\bf{v}}}}}}}}=0.$$
(7)

In the framework of the Beris-Edwards model51, equation (4) represents the evolution of the tensor order parameter Q due to the molecular field HQ and rotation as well as stretching by the flow, which is expressed by the tensor:

$${{{{{{{{\bf{S}}}}}}}}}_{Q}({{{{{{{\bf{Q}}}}}}}},\nabla {{{{{{{\bf{v}}}}}}}})={{{{{{{\bf{Q}}}}}}}}{{{{{{{\boldsymbol{\Omega }}}}}}}}-{{{{{{{\boldsymbol{\Omega }}}}}}}}{{{{{{{\bf{Q}}}}}}}}+\frac{2\xi }{d}{{{{{{{\bf{D}}}}}}}}+2\xi {[{{{{{{{\bf{Q}}}}}}}}{{{{{{{\bf{D}}}}}}}}]}^{ST}-2\xi {{{{{{{\bf{Q}}}}}}}}{{{{{{{\rm{Tr}}}}}}}}[{{{{{{{\bf{Q}}}}}}}}{{{{{{{\bf{D}}}}}}}}],$$
(8)

In (8), D and Ω are symmetric and antisymmetric parts of the gradient tensor v, correspondingly, the constant ξ is the shape parameter of the VELC molecules, which determines its rotational response to a shear flow. Superscripts S, T denote symmetric and traceless parts of a tensor, respectively. The molecular field HQ multiplied by the relaxation constant ΓQ in (4) is the variation of the free energy density f with respect to Q:

$${{{{{{{{\bf{H}}}}}}}}}_{Q}=-{\left(\frac{\partial f}{\partial {{{{{{{\bf{Q}}}}}}}}}-\nabla \frac{\partial f}{\partial \nabla {{{{{{{\bf{Q}}}}}}}}}\right)}^{ST}.$$
(9)

The free energy density f consists of three parts:

$$f={f}_{Q}+{f}_{C}+{f}_{QC},$$
(10)

namely, the Landau–de Gennes energy density

$${f}_{Q}=\left(-\frac{{a}_{L}}{2}{{{{{{{\rm{tr}}}}}}}}{{{{{{{{\bf{Q}}}}}}}}}^{2}-\frac{{b}_{L}}{3}{{{{{{{\rm{tr}}}}}}}}{{{{{{{{\bf{Q}}}}}}}}}^{3}+\frac{{c}_{L}}{4}{({{{{{{{\rm{tr}}}}}}}}{{{{{{{{\bf{Q}}}}}}}}}^{2})}^{2}\right)+\frac{K}{2}| \nabla {{{{{{{\bf{Q}}}}}}}}{| }^{2},$$
(11)

the energy density of dumbbell polymers

$${f}_{C}=\frac{{G}_{C}}{2}({{{{{{{\rm{tr}}}}}}}}{{{{{{{\bf{C}}}}}}}}-\ln \det {{{{{{{\bf{C}}}}}}}})$$
(12)

and the coupling term

$${f}_{QC}=\varkappa {{{{{{{\rm{tr}}}}}}}}({{{{{{{\bf{C}}}}}}}}-{{{{{{{\bf{I}}}}}}}})({{{{{{{\rm{tr}}}}}}}}{{{{{{{{\bf{Q}}}}}}}}}^{2})+2\chi {{{{{{{\rm{tr}}}}}}}}{{{{{{{\bf{C}}}}}}}}{{{{{{{\bf{Q}}}}}}}}.$$
(13)

In (11)–(13), K is the elastic constant, aL, bL, and cL are the Landau-de Gennes coefficients, GC is the polymer elastic modulus, ϰ controls the shift of the nematic transition, and the sign of coupling parameter χ defines the respective alignment of tensors Q and C as explained in the Results section. In what follows, we assume that the polymer network does not affect the nematic transition and therefore ϰ = 0 in our computational model.

The force Fexter in (4), exerted by the substrate that aligns the nematic director along vector n, is expressed as

$${{{{{{{{\bf{F}}}}}}}}}_{{{{{{{{\rm{exter}}}}}}}}}=4{\xi }_{ext}{{{{{{{\bf{Q}}}}}}}}{{{{{{{{\bf{R}}}}}}}}}_{\pi /2}{{{{{{{\rm{tr}}}}}}}}\left[{{{{{{{\bf{Q}}}}}}}}\left({{{{{{{{\bf{n}}}}}}}}}_{\infty }\otimes {{{{{{{{\bf{n}}}}}}}}}_{\infty }-\frac{1}{2}{{{{{{{\bf{I}}}}}}}}\right){{{{{{{{\bf{R}}}}}}}}}_{\pi /2}\right],$$
(14)

where Rπ/2 is the \(\frac{\pi }{2}\)-rotation matrix.

The tensor SC in (5) is similar to SQ and describes the interactions of the conformation tensor C with the flow:

$${{{{{{{{\bf{S}}}}}}}}}_{C}={{{{{{{\bf{C}}}}}}}}{{{{{{{\boldsymbol{\Omega }}}}}}}}-{{{{{{{\boldsymbol{\Omega }}}}}}}}{{{{{{{\bf{C}}}}}}}}+2{a}_{C}{[{{{{{{{\bf{C}}}}}}}}{{{{{{{\bf{D}}}}}}}}]}^{S},$$
(15)

where aC is the alignment constant. The term HC in (5) is defined via molecular field B: 

$${{{{{{{{\bf{H}}}}}}}}}_{C}=2{[{{{{{{{\bf{B}}}}}}}}{{{{{{{\bf{C}}}}}}}}]}^{S},\quad {{{{{{{\bf{B}}}}}}}}=-\left(\frac{\delta f}{\delta {{{{{{{\bf{C}}}}}}}}}\right)=-\frac{{G}_{C}}{2}({{{{{{{\bf{I}}}}}}}}-{{{{{{{{\bf{C}}}}}}}}}^{-1})-\kappa {{{{{{{\bf{I}}}}}}}}{{{{{{{\rm{tr}}}}}}}}{{{{{{{{\bf{Q}}}}}}}}}^{2}-2\chi {{{{{{{\bf{Q}}}}}}}},$$
(16)

and \({\Gamma }_{C}={({\tau }_{C}{G}_{C})}^{-1}\) is the respective relaxation constant where τC is the relaxation time of the polymer network.

The momentum balance equation (6) together with (7) model the incompressible flow of the VELC for small Reynolds numbers. Here, σQ and σC are additions to viscous stresses due to elastic and viscoelastic deformations properties

$${\sigma }_{Q}=-K(\nabla {{{{{{{\bf{Q}}}}}}}}):(\nabla {{{{{{{\bf{Q}}}}}}}})+2{[{{{{{{{\bf{Q}}}}}}}}{{{{{{{\bf{H}}}}}}}}]}^{A}-\frac{2\xi }{d}{{{{{{{\bf{H}}}}}}}}-2\xi {[{{{{{{{\bf{Q}}}}}}}}{{{{{{{\bf{H}}}}}}}}]}^{ST}+2\xi {{{{{{{\bf{Q}}}}}}}}{{{{{{{\rm{tr}}}}}}}}[{{{{{{{\bf{Q}}}}}}}}{{{{{{{\bf{H}}}}}}}}],$$
(17)
$${\sigma }_{C}=-2{a}_{C}{[{{{{{{{\bf{C}}}}}}}}{{{{{{{\bf{B}}}}}}}}]}^{S}+2{[{{{{{{{\bf{C}}}}}}}}{{{{{{{\bf{B}}}}}}}}]}^{A}.$$
(18)

Furthermore, we model the substrate friction of the flow by adding the linear term μv in the Stokes equation (5), where μ is the friction coefficient4.

The microswimmer is modeled as a rigid elliptical particle. We assume that its interior is filled with artificial VELC so that equations (4)–(5) are satisfied in the entire domain. The surface anchoring is modeled by introducing in (4) the forcing function:

$${{{{{{{{\bf{F}}}}}}}}}_{{{{{{{{\rm{anc}}}}}}}}}=4{\xi }_{{{{{{{{\rm{anc}}}}}}}}}{{{{{{{\bf{Q}}}}}}}}{{{{{{{{\bf{R}}}}}}}}}_{\pi /2}{{{{{{{\rm{tr}}}}}}}}[{{{{{{{\bf{Q}}}}}}}}({{{{{{{{\bf{n}}}}}}}}}_{{{{{{{{\rm{anc}}}}}}}}}{{{{{{{{\bf{n}}}}}}}}}_{{{{{{{{\rm{anc}}}}}}}}}-\frac{1}{2}{{{{{{{\bf{I}}}}}}}}){{{{{{{{\bf{R}}}}}}}}}_{\pi /2}]{\left(\frac{\nabla \phi }{| \nabla \phi | }\right)}^{2},$$
(19)

which aligns the nematic director with the vector nanc near the particle’s boundary. The preferred direction of the nematic director given by vector nanc is tangential to swimmer’s surface γ if the planar anchoring is applied and normal to γ if the homeotropic anchoring is used. The smooth function ϕ (a phase field function) is equal to 1 inside the microswimmer, 0 outside and has a smooth transition from 0 to 1 near the boundary of the swimmer. At each time-step of numerical implementation, the function ϕ(x, t) is updated based on the changed position of the center of mass xc and orientation α of the microswimmer. It is supposed that natural boundary conditions \(\frac{\partial {{{{{{{\bf{C}}}}}}}}}{\partial {{{{{{{\boldsymbol{\nu }}}}}}}}}=0\) are satisfied for the conformation tensor C on γ and do not require the introduction of a forcing term in (5). Outward normal vector ν is perpendicular to the swimmer’s boundary. The no-slip velocity boundary condition (1) involves the translational velocity of the microswimmer \({{{{{{{\bf{V}}}}}}}}={\dot{{{{{{{{\bf{x}}}}}}}}}}_{c}\) and its angular velocity \(\omega =\dot{\alpha }\) that satisfy force and torque balances considered in the small inertia limit:

$${{{{{{{\bf{F}}}}}}}}=0,\quad {{{{{{{\bf{M}}}}}}}}=0,$$
(20)

where

$${{{{{{{\bf{F}}}}}}}}= \,{\int}_{\gamma }{{{{{{{{\bf{F}}}}}}}}}_{{{{{{{{\boldsymbol{\nu }}}}}}}}}d{P}_{x},\quad {{{{{{{\bf{M}}}}}}}}={\int}_{\gamma }\left(({{{{{{{\bf{x}}}}}}}}-{{{{{{{{\bf{x}}}}}}}}}_{c})\times {{{{{{{{\bf{F}}}}}}}}}_{{{{{{{{\boldsymbol{\nu }}}}}}}}}+{{{{{{{{\bf{L}}}}}}}}}_{{{{{{{{\boldsymbol{\nu }}}}}}}}}\right)d{P}_{x},\\ {{{{{{{{\bf{F}}}}}}}}}_{{{{{{{{\boldsymbol{\nu }}}}}}}}}= \,(-p{{{{{{{\bf{I}}}}}}}}+2\eta {{{{{{{\bf{D}}}}}}}}+{\sigma }_{Q}+{\sigma }_{C})\cdot {{{{{{{\boldsymbol{\nu }}}}}}}},$$
(21)

in which γ is the boundary of the particle. A more detailed explanation of how to compute V and ω is given in Supplementary Notes 1 and 2. The additional torque L arises due to anisotropy of the VELC and, therefore, asymmetry of the stress tensor σQ. Due to the balance of angular momentum45, the following relation is satisfied

$${{{{{{{\rm{div}}}}}}}}\,{{{{{{{\bf{L}}}}}}}}=\tilde{\tau },$$
(22)

where \(\tilde{\tau }\) is the skew symmetric part of σ

$${\tilde{\tau }}_{i}={\varepsilon }_{ijk}{\sigma }_{jk},$$
(23)

where εijk is the Levi-Civita symbol. Therefore, we can express

$${\int}_{\gamma }{{{{{{{{\bf{L}}}}}}}}}_{{{{{{{{\boldsymbol{\nu }}}}}}}}}d{P}_{x}={\int}_{\Omega }{{{{{{{\rm{div}}}}}}}}\,{{{{{{{\bf{L}}}}}}}}d\Omega ={\int}_{\Omega }\tilde{\tau }d\Omega .$$
(24)

The described model recovers the motion of microswimmers in liquid crystals taking the parameters κ, χ, and ac zero with the initial value C = I. Setting K, ξ, ξanc, ξext to zeros and the coefficient aL positive in the Landau–de Gennes free energy with the initial value of the scalar order parameter q = 0, we obtain isotropic pure viscoelastic behavior. By combining these conditions, the motion in the Stokes flow is recovered.

Numerical implementation

For numerical implementation, the equations (4)–(7) are scaled by characteristic length 2.5 × 10−6 m and time 10−3 s. After rescaling, the dimensionless length of the swimmer l = 1 and the dimensionless swimmer velocity B1 ≈ 5  10−3. Mass is scaled by 10−9 kg so that the dimensionless shear viscosity η = 0.5 and elastic constant K = 5  10−3.

For tensors

$${{{{{{{\bf{Q}}}}}}}}=\left(\begin{array}{cc}{q}_{1}&{q}_{2}\\ {q}_{2}&-{q}_{1}\end{array}\right),{{{{{{{\bf{C}}}}}}}}=\left(\begin{array}{cc}{c}_{11}&{c}_{12}\\ {c}_{12}&{c}_{22}\end{array}\right),$$
(25)

auxiliary complex variables

$$q={q}_{1}+i{q}_{2},\quad {p}_{1}=\frac{{c}_{11}-{c}_{22}}{2}+i{c}_{12},\quad {p}_{2}={c}_{11}+{c}_{22},$$
(26)

are introduced. Then (4), (5) are reduced into three scalar PDEs

$$\dot{q}={\Gamma }_{Q}K{\nabla }^{2}q+{f}_{q,{{{{{{{\bf{v}}}}}}}}},\quad {\dot{p}}_{j}={K}_{C}{\nabla }^{2}{p}_{j}+{f}_{{p}_{j},{{{{{{{\bf{v}}}}}}}}},\quad j=1,2,$$
(27)

where \({f}_{q},{f}_{{p}_{j}}\) are nonlinear functions depending on q, pj, their spatial derivatives and velocity field v.

Equations (27) are considered in a periodic domain. By applying the Fast Fourier transform \({{{{{{{\mathcal{F}}}}}}}}(g)=\hat{g}\) of (27), we obtain ordinary differential equations in the frequency domain

$$\begin{array}{c}\dot{\hat{q}}=-{\Gamma }_{Q}K({k}_{x}^{2}+{k}_{y}^{2})\hat{q}+{\hat{f}}_{q,{{{{{{{\bf{v}}}}}}}}},\\ {\dot{\hat{p}}}_{j}=-{K}_{C}({k}_{x}^{2}+{k}_{y}^{2}){\hat{p}}_{j}+{\hat{f}}_{{p}_{j},{{{{{{{\bf{v}}}}}}}}},\quad j=1,2.\end{array}$$
(28)

For each equation in (27), the solution is found semi-analytically, and the functions q, p1, p2 are computed at the time instant t + Δt as

$$\begin{array}{c}q(t+\Delta t)={{{{{{{{\mathcal{F}}}}}}}}}^{-1}\left({e}^{-{\Gamma }_{Q}K({k}_{x}^{2}+{k}_{y}^{2})}{{{{{{{\mathcal{F}}}}}}}}(q(t))+\Delta t{{{{{{{\mathcal{F}}}}}}}}(\,{f}_{q,{{{{{{{\bf{v}}}}}}}}}(t))\right),\\ {p}_{j}(t+\Delta t)={{{{{{{{\mathcal{F}}}}}}}}}^{-1}\left({e}^{-{K}_{C}({k}_{x}^{2}+{k}_{y}^{2})}{{{{{{{\mathcal{F}}}}}}}}({p}_{j}(t))+\Delta t{{{{{{{\mathcal{F}}}}}}}}(\,{f}_{{p}_{j},{{{{{{{\bf{v}}}}}}}}}(t))\right),\quad j=1,2.\end{array}$$
(29)

Given functions q, pj at the time instant t + Δt, the velocity field v(t + Δt) is found by solving the momentum balance equation (6) with boundary condition (1) via the Boundary Integral Method (BIM)52. We introduce an artificial fluid velocity field w inside the swimmer for which the squirmer boundary conditions are satisfied. Next, we compute by means of FFT two Green’s functions of the Stokes equation with periodic boundary conditions in the entire periodic cell (with no particles) corresponding to two Dirac forces acting along coordinate directions. Similar to the Lorenz reciprocal theorem, we derive integral equations on the boundary γ with unknown ψ = v − w. Discretizing the boundary, we solve a linear system on ψ and then restore v in the bulk; see details in Supplementary Notes 1 and 2. Then, the position, angular velocity, and phase-field are updated due to the force and torque balances (20).

A spatial grid of 1024 × 1024 points is used in a periodic domain of dimensionless size 8π × 8π. Compared to the length of the swimmer, which has a length 1, a relatively large size of the domain is chosen to reduce the boundary effects and the perturbations caused by the swimmers in the adjacent periodic cells. When applying BIM to solve momentum equation (6), an auxiliary function defined on γ is solved on a mesh with equally distributed 2048 points on the boundary of each particle. Then velocity field v is recovered by the auxiliary function on the main mesh. More details are given in the Supplementary Note 2.

The numerical scheme was implemented in CUDA C++ and run on GPUs. The standard built-in FFT library53 was utilized to perform the Fourier transform, whereas the authors wrote the BIM code with the linear GMRES solver accelerated by parallelization via CUDA on GPUs.