Introduction

Ferroelectric materials are characterized by a permanent electric polarization under Curie temperature which can be switched by an electric field larger than a coercive value. The switchable polarizations and associated domain structures are maintained down to nanoscale and directly underpin enormous commercialized and emerging advanced applications of ferroelectrics such as nonvolatile memories1,2, neuromorphic devices3,4, high-frequency agile microwave devices5, etc. Understanding the underlying mechanisms of ferroelectric switching is a premise for device applications based on domain structures and for further control of the functionalities of ferroelectrics by domain engineering. Great efforts have been made in pursuit of deterministic and facile controls of ferroelectric domain structures, particularly, the local manipulation6,7. Currently, tip electric fields are commonly used to manipulate ferroelectric domain structures locally8,9,10,11, but with inescapable field-driven phenomena like charge injection and breakdown. To ease the adverse effects of electrical switching and to pursue application scenarios, various switching strategies, e.g., optical12,13, thermal14,15,16, chemical17,18, mechanical19,20,21,22,23,24,25,26,27,28, and hybrid29,30 switching strategies, have been explored as alternative ways to control ferroelectric domains.

Mechanically induced local domain switching enters researchers’ field of vision due to the revisiting of a high order electromechanical coupling effect, i.e., the flexoelectric effect, which is reported to be significantly enhanced in nanoscale ferroelectrics recently31,32,33. In such an effect, strain gradients break the symmetry of the lattice and generate an equivalent electric field—flexoelectric field, indicating a promising alternative to switching the ferroelectric polarization under right circumstances. A milestone work was done by Lu et al. who experimentally demonstrated a deterministic 180° downward reversal of ferroelectric polarization in a BaTiO3 (BTO) thin film by pressing an atomic force microscope (AFM) tip19. This mechanical switching provides a possibility of voltage-free and local control of polarization in ferroelectrics and is believed to ease the adverse effects of electrical switching to the ferroelectric devices, such as the occurring of charge injection, leakage current, and electrical breakdown. Since then, interest in flexoelectricity has resurged and prompted discussions on the feasibility of switching ferroelectric domains ‘non-electrically’. A variety of nanoelectromechanical device concepts based on mechanical control of ferroelectric polarization have been proposed in ferroelectrics19,25,29,34,35,36,37,38,39.

Despite of the progresses in this field during the past decade, mechanical bidirectional ferroelectric switching scheme in tip-film architectures has not yet been realized, implying a significant drawback of mechanical switching. Meanwhile, discussions on the exact mechanisms of mechanical switching are still onging40,41. On the one hand, in the tip-film architecture, pressing an AFM tip onto the surface of a ferroelectric film generates strain gradients with definite distributions. Although the direction of flexoelectric field should depend on the flexoelectric coefficients, experimental results reported so far indicate that tip pressing always causes an ‘apparent’ downward flexoelectric field, which only enables the domain switching path from upward to downward, but not vice versa. On the other hand, the tip-film surface contact problem is actually complicated with multiple possible processes involved in practice6,42. In addition to flexoelectricity, other possible sources including surface electrochemistry, surface screening condition, shear strain effect, charged defect transport, and chemical expansion were possible to trigger mechanical switching22,23,24,25,26,27. For example, as an analogy of the demagnetization effect, depolarization effect can play a crucial role in domain switching in poorly screened ferroelectric thin films and is possible to trigger an upward switching24. However, such switching is from a single-domain (SD) state to a poly-domain (PD) state switching (SD→PD switching), and no back-switching (i.e., PD→SD switching) is achieved. A bidirectional 180° mechanical switching (i.e., SD→PD and then PD→SD switching) has never been demonstrated. Based on a trilinear coupling between shear strain and the polarization components in rhombohedral ferroelectric systems, shear strains are also possible to trigger an upward switching23. These effects indicate that a bidirectional switching scheme might be realized by combining two or more mechanical switching mechanisms in the same system but has not yet been explored even from theoretical perspective. Moreover, the polarization dynamics is expected to play a role in the mechanical switching behavior in ferroelectrics. However, theoretical investigations on mechanical switching in ferroelectrics so far are mainly based on phase-field models using the phenomenological time-dependent Ginzburg-Landau (TDGL) equation, which cannot fully capture the real-time polarization dynamics. It is noteworthy that a dynamical phase-field model has been developed43,44 and has recently been applied to reveal the nontrivial effect of (~ns) polarization dynamics on mechanical switching28. Investigation on the dynamics of mechanical switching in ferroelectric at the atomic scale should bring insight into the field but remains exclusive.

In this paper, first-principles-based molecular dynamics (MD) simulations are performed to explore the effects of the flexoelectric field and an overlooked effective dipolar field on tip-force-induced local domain switching in ferroelectric thin films. We show that bidirectional 180° mechanical switching is theoretically possible in tip-film architectures when screening condition of the ferroelectric film and tip loading force are within an appropriate window. The idea is schematically illustrated in Fig. 1. The ferroelectric thin films are assumed in a tetragonal phase with z-directed (out-of-plane) polarizations. This is the case of BTO and PbTiO3 (PTO) thin films epitaxially grown on substrates that exert a large enough compressive misfit strain. Switching between a SD state and a PD state (with a center-reversed domain) is explored by pressing an AFM tip to the ferroelectric thin films under various surface screening conditions. External loads are applied to the film surface at the center of the simulation cell. The polarization of the loading area (assumed to be a circular region of radius r0) and that of the residual area are denoted as \(P_z^{{{{\mathrm{Load}}}}}\) and \(P_z^{{{{\mathrm{Res}}}}}\), respectively. Due to the long-range dipole–dipole interaction, the dipoles in the loading area are subjected to an either downward or upward effective dipolar field from the dipoles of the residual area, depending on the surface screening condition and the direction of \(P_z^{{{{\mathrm{Res}}}}}\). Specifically, when the surface screening condition is close to the ideal short-circuit (SC) boundary condition, the dipoles of the residual area would exert an effective dipolar field (in the same direction of \(P_z^{{{{\mathrm{Res}}}}}\)) to the dipoles in the loading area. Such a field tends to polarize the dipoles in the loading area to the same direction of the residual dipoles. That is, it favors a SD state rather than a PD state and it promotes the PD→SD process (erasing process) but hinders the SD→PD process (writing process). In contrast, under poor charge screening conditions, the dipoles of the residual area would generate an effective dipolar field (in the opposite direction of \(P_z^{{{{\mathrm{Res}}}}}\)) to the dipoles in the loading area. In contrast to the good screening case, the effective dipolar field favors a PD state and promotes the SD→PD process (writing process) but hinders the PD→SD process (erasing process). The effective dipolar hence manifests itself like a built-in field in the local switching of the ferroelectric thin films, with its direction determined by that of the surrounding dipoles as well as the screening condition. Moreover, the flexoelectric field caused by the tip-induced strain gradients in the tip-film architecture acts as a downward equivalent electric field, which favors downward polarization underneath the loading area. A bidirectional mechanical switching scheme might then be constructed based on the different roles of the effective dipolar field and the flexoelectric field in the polarization switching. In such a switching scheme, the ferroelectric thin films are pre-polarized as a downward SD, thus the effective dipolar field is employed to dominate the local writing process from downward SD to upward PD (SD→PD) at a relatively small tip force while the flexoelectric field is used to switch back the upward domain underneath the loading area (i.e., enabling an erasing process PD→SD) at a relatively large tip force. A reversible 180° mechanical switching scheme is thus achieved by applying tip force pulses with alternatively varying strength. Switching ‘phase diagram’ as a function of tip force and screening condition is then calculated. The strong dipole–dipole interaction dynamics which cannot be revealed by conventional thermodynamic model and its role playing in the mechanical switching is also discussed.

Fig. 1: Schematic of a bidirectional mechanical switching scheme.
figure 1

The effective dipolar field is dominated at a relatively small tip force and can be employed to switch an initial downward SD state to an upward PD state, whereas the flexoelectric field is dominated at a relatively large tip force and can enable a back-switching. A reversible 180° mechanical switching scheme is achieved by applying tip force pulses with alternatively changing magnitude.

Results

Stability of SD and PD states under different surface screening conditions

We first investigate the stability of SD and PD states in ferroelectric thin films under different surface screening conditions. We consider (001) oriented BTO thin films, with z axis being the out-of-plane direction. The size of the simulation cell is 24a0 × 24a0 × 6a0, with a0 ≈ 3.95 Å; being the lattice constant of the primitive five-atom unit cell. The substrate imposes a misfit strain ηm = –0.03. The films are initialized to either a SD state or a PD state with a reversed domain size r0 = 4a0. MD simulations are performed to reveal the evolution of the two domain states under different surface screening conditions. In the effective Hamiltonian model, the degree of the screening is controlled by the screening factor β (see the “Methods” section)45,46,47. Here we vary the magnitude of β from 1.0 (ideal SC condition) to 0.60 (relatively poor screening condition). Figure 2a plots the β dependence of the total energy Etot of SD and PD states. It shows that the SD state has a lower total energy than the PD state when β > 0.99, while PD state has lower total energy than the SD state when β < 0.99. This is to say, the SD state is energetically more favorable when the surface screening condition is near the ideal SC condition, while the PD state is more stable under poor charge screening conditions as illustrated in Fig. 2b.

Fig. 2: Stability of SD and PD states under different surface screening conditions.
figure 2

a Total energy of ferroelectric thin films with SD state (blue cubes and solid line) and PD state with a reversed domain r0 = 4a0 (red triangles and solid line) as a function of surface screening factor β. b Schematics of the energy landscape of the two states under different surface screening conditions. c, d β dependence of the total polarization of the ferroelectric thin films initialized to be a SD state (blue cubes and solid line) and a PD state with a reversed domain r0 = 4a0 (red triangles and solid line). e, f Evolution of the equilibrium domain patterns in ferroelectric thin films initialized to be a SD state (top) and a PD state with a reversed domain r0 = 4a0 (bottom) with the decrease of β.

Furthermore, Fig. 2c and d illustrates the β dependence of the average out-of-plane polarization of ferroelectric thin films initialized to either a SD state or a PD state with a reversed domain size r0 = 4a0. The corresponding equilibrium domain patterns at selected β are shown in Fig. 2e and f for the two initial domain states, respectively. From Fig. 2c and e for the film with an initialized SD state, one can see that the SD state maintains stable as β ≥ 0.87. When β decreases to be 0.81 < β < 0.87, it destabilizes into a PD state (denoted as PD (i)) with isolated reversed domains. With a further decrease of β (β < 0.81), the area of reversed domains increases sharply, and the reversed domains begin to merge together, forming a PD state denoted as PD (ii). The area of the reversed domains increases with the decrease of β and finally approximately equals to that of the unreversed domains, resulting in \(\left\langle {P_z} \right\rangle \approx 0\) when β < 0.70. For the ferroelectric thin film initialized into a center-reversed PD state, it preserves PD state under different magnitudes of β, as illustrated in Fig. 2d and f. Moreover, PD (i) state appears in the film when β is reduced to be slightly smaller than 0.86, instead of the expansion of the center-reversed domain. Interestingly, the configuration of the PD state transforms to a ring-shaped texture (with the center-reversed domain surrounded by a ring-shaped domain) when β ≤ 0.78, similar to those reported in previous works24,48. Such a ring-shaped texture is believed to be caused by the modification effect of center-reversed PD state on the long-range dipole–dipole interaction. When β further decreases, the radius of the ring-shaped domain gradually decreases, and the center-reversed domain also evolves into ring shape with a small back-switched domain in the center. When β < 0.70, the film shows almost no net polarization, i.e., \(\left\langle {P_z} \right\rangle \approx 0\). Note that the above results are obtained based on the PD state with a reversed domain size r0 = 4a0, readers are referred to Supplementary Figs. 1 and 2 for results of PD states with other reversed domain sizes.

Local domain switching in ferroelectric thin films mediated by an effective dipolar field

Surface screening conditions can not only modify the stability of SD and PD states in ferroelectric thin films, but also the switching behaviors between SD and PD states. To elaborate this effect, we simulate the local electrical switching behaviors of BTO thin films under different surface screening conditions. As illustrated in Fig. 3a, the BTO thin film is initialized to be the SD state with upward polarization. An external electric field Ez in the form of a triangular wave is then applied to the loading area (of radius r0 = 4a0) of the thin film to trigger SD→PD and PD→SD switching. The change of the average out-of-plane polarization in the loading area (denoted as \(P_z^{{{{\mathrm{Load}}}}}\)) as a function of Ez is tracked to obtain the local hysteresis loops. We use 105 to 139 points to mimic a period of the triangular wave depending on the screening conditions, with Ez gradually varying between –0.19 and 0.2 V Å−1. At each point of Ez, the simulation time is set to be sufficiently long to ensure that the system reaches its equilibrium dipole state. From the obtained hysteresis loops shown in Fig. 3b, one can see \(P_z^{{{{\mathrm{Load}}}}}\) is firstly reversed by the negative electric field at first half period (A→B→C→D) and is switched back by the positive electric field at the second half period (D→E→F→A). Importantly, the local hysteresis loops at various β show inherent asymmetric features. First of all, the coercive fields of the SD→PD switching (denoted as \(\left| {E_{{{\mathrm{c}}}}^ - } \right|\)) and those of PD→SD switching (denoted as \(\left| {E_{{{\mathrm{c}}}}^ + } \right|\)) are significantly different. To be more specific, as shown in Fig. 3c, \(\left| {E_{{{\mathrm{c}}}}^ - } \right|\) decreases with the decrease of β, whereas \(\left| {E_{{{\mathrm{c}}}}^ + } \right|\) shows an opposite trend; \(\left| {E_{{{\mathrm{c}}}}^ - } \right|\) > \(\left| {E_{{{\mathrm{c}}}}^ + } \right|\) when β > 0.967, and \(\left| {E_{{{\mathrm{c}}}}^ - } \right|\) < \(\left| {E_{{{\mathrm{c}}}}^ + } \right|\) when β< 0.967. To describe the asymmetry of the coercive fields, we introduce an asymmetric parameter \(\delta = \left[ {\left( {\left| {E_{{{\mathrm{c}}}}^ + } \right| - \left| {E_{{{\mathrm{c}}}}^ - } \right|} \right)/\left( {\left| {E_{{{\mathrm{c}}}}^ + } \right| + \left| {E_{{{\mathrm{c}}}}^ - } \right|} \right)} \right] \times 100\%\)49. δ > 0 represents that the hysteresis loop is shifted to the +Ez direction and indicates an easier writing process (SD→PD); whereas δ < 0 represents that the hysteresis loop is shifted to the –Ez direction and indicates an easier easing process (PD→SD). δ = 0 gives the symmetric hysteresis loops with equal \(\left| {E_{{{\mathrm{c}}}}^ + } \right|\) and \(\left| {E_{{{\mathrm{c}}}}^ - } \right|\). The β dependence of δ is shown in Fig. 3e. We can see that the hysteresis loops are shifted to –Ez direction when β > 0.967 whereas they are shifted to +Ez direction when β < 0.967. It is important to note that δ increases from –18% to about 60% as β decrease from 1.0 to 0.87, the β dependence of which is unexpectedly large. Perfectly symmetric hysteresis loop can only be found at the rigorous screening condition of β = 0.967. Besides the asymmetry in coercive fields, the remnant polarization of the initial SD state (denoted as \(\left| {P_{{{\mathrm{r}}}}^ + } \right|\)) and that of the PD state (denoted as \(\left| {P_{{{\mathrm{r}}}}^ - } \right|\)) are also obviously asymmetric. From Fig. 3d, as β decreases from 1.0 to 0.87, \(\left| {P_{{{\mathrm{r}}}}^ + } \right|\) decreases significantly from 0.57 to 0.38 C m−2, whereas \(\left| {P_{{{\mathrm{r}}}}^ - } \right|\) decreases slightly from 0.53 to 0.50 C m−2, which remains almost unchanged compared with \(\left| {P_{{{\mathrm{r}}}}^ + } \right|\). Similarly, we define a parameter θ to describe the asymmetry of the remnant polarization as \(\theta = \left[ {\left( {\left| {P_{{{\mathrm{r}}}}^ + } \right| - \left| {P_{{{\mathrm{r}}}}^ - } \right|} \right)/\left( {\left| {P_{{{\mathrm{r}}}}^ + } \right| + \left| {P_{{{\mathrm{r}}}}^ - } \right|} \right)} \right] \times 100\%\). As shown in Fig. 3f, we have \(\left| {P_{{{\mathrm{r}}}}^ + } \right|\) > \(\left| {P_{{{\mathrm{r}}}}^ - } \right|\) when β > 0.967, and \(\left| {P_{{{\mathrm{r}}}}^ + } \right|\) < \(\left| {P_{{{\mathrm{r}}}}^ - } \right|\) when β < 0.967; θ decreases from 4% to –14% as β decrease from 1.0 to 0.87.

Fig. 3: Local hysteresis loops under different surface screening conditions.
figure 3

a Schematic of local electrical switching. b The simulated local hysteresis loops under selected β. cf The β dependence of the coercive field, remnant polarization, asymmetric parameter of the coercive field, and asymmetric parameter of the remnant polarization.

To understand how the surface screening condition modifies the stability of SD and PD states and gives rise to the asymmetric local domain switching behaviors, we explore the β dependence of the dipole–dipole interaction in BTO thin films. Qualitatively, due to the presence of the long-range dipole–dipole interaction, the dipoles in the loading area of BTO thin films are subjected to an effective dipolar field from the dipoles of the residual area. When the surface screening condition is relatively close to the ideal SC boundary condition, the effective dipolar field should tend to make the direction of the dipoles in the loading area the same as the direction of the dipoles in the residual area. This is consistent with the well-known fact that Coulomb interaction enhances ferroelectric order. As a result, such an effective dipolar field works as a polarizing field for the SD state and depolarization field for the PD state. It stabilizes the SD state but destabilize the PD state (see Fig. 2b), and it promotes the PD→SD process (erasing process) but hinders the SD→PD process (writing process), shifting the hysteresis loops to –Ez direction. In contrast, the depolarization energy in the thin film is large under poor surface screening conditions. The ferroelectricity is thus suppressed, and the PD state is energetically favored rather than the SD state (see Fig. 2b). The effective dipolar field promotes the SD→PD process (writing process) but hinders the PD→SD process (erasing process), giving rise to the shift of the hysteresis loops to +Ez direction. While the realistic effective dipolar field is more complicated than the above qualitative analysis (see Supplementary Fig. 3 for detailed β dependence and distribution of the effective dipolar field), the mechanism how surface screening condition works is the same.

As we have shown, the effective dipolar field acting on the local domain manifests itself like a built-in field in the local domain switching of the ferroelectric thin films, with its direction determined by the direction of the surrounding dipoles and the screening condition. Importantly, such a dipolar field can also contribute to local mechanical switching in ferroelectric thin films. To be more specific, we take a BTO thin film initialized as a SD state as an example. When the BTO thin film is under poor surface screening conditions (not too far from ideal SC boundary condition, β > 0.87 according to Fig. 2c and e), the effective dipolar field works as a depolarization field as discussed above. However, the SD state usually remains metastable, and no switching occurs spontaneously due to the energy barrier between the SD and PD states, which is small but cannot be thermally overcome (Fig. 2b). Applying a mechanical load to the loading area of the film causes deformation nearby the loading area. If we neglect the mechanical loading induced strain gradients and flexoelectric field, it is interesting to find that the mechanical loading induced strains can help decrease the switching barrier of the dipoles in the loading area, enabling SD→PD switching. Investigation on the local mechanical domain switching in BTO thin films mediated by the effective dipolar field at different surface screening conditions is carried out by MD simulations (Supplementary Fig. 4). We would like to emphasize that the mechanical switching of ferroelectric domains mediated by the effective dipolar field is SD→PD switching, which can be either upwards to downwards (up-to-down) or downwards to upwards (down-to-up). Moreover, such dipolar-field-assisted switching in ferroelectric thin films is also expected to take place by laser heating of the loading area. Actually, it has been verified in magnetic systems that when a laser spot destructs the domain nearby, the remaining domain generates an effective magnetic field to switch the destructed domain50.

A bidirectional switching scheme induced by a pressing AFM tip

As discussed above, the effective dipolar field in ferroelectric thin films promotes PD→SD switching when the screening condition is very close to ideal SC condition and promotes SD→PD switching under poor surface screening conditions. Moreover, pressing an AFM tip onto a ferroelectric thin film induces local strain gradients, giving rise to a downward flexoelectric field. Therefore, the scenario of mechanical switching could be varied depending on the direction of the polarization of the SD state and the surface screening condition. In the case of an initial upward SD state, the effective dipolar field points downward at poor surface screening conditions, which can work together with the flexoelectric field acting on the loading area of the film to largely reduce the coercive field. As the screening condition is very close to ideal SC condition, the dipoles in the loading region are subjected to an upward effective dipolar field, which forms a competitive relationship with the flexoelectric field. On the other hand, in the case of an initial downward SD state, the relationship between the effective dipolar field and flexoelectric effect is competitive under poor surface screening conditions, and cooperative to stabilize the initial SD state when the surface charge screening condition is very close to ideal SC condition. In the following, we explore the feasibility of bidirectional mechanical switching induced by a pressing AFM tip, based on the competitive roles of the effective dipolar field and the flexoelectric field in the polarization switching.

We take an initial downward SD state under poor surface screening conditions as an example. A theoretically possible reversible 180° mechanical switching is to make sure the effective dipolar field dominate the SD→PD switching while the flexoelectric field dominate the PD → SD switching. The key to the problem is to find out an appropriate window to adjust the relative magnitude of the effective dipolar field and the flexoelectric field. It is well-known that the effective dipolar field is largely adjusted by β and the flexoelectric field mostly depends on the tip force ftip. MD simulations are thus carried out to calculate the ftipβ phase diagrams of mechanical switching to look for the desired window for bidirectional switching. In MD simulations, we adopt a model with a point force acting on the center area of the film as illustrated in Fig. 4a. Figure 4a also depicts the cross-sectional distributions of the strain components \(\varepsilon _{11}^{{{{\mathrm{ext}}}}}\), \(\varepsilon _{33}^{{{{\mathrm{ext}}}}}\), and \(\varepsilon _{13}^{{{{\mathrm{ext}}}}}\) caused by a pressing point force of ~12 nN located at the center (with coordinates x and y [12, 14]). According to Fig. 4a, \(\varepsilon _{11}^{{{{\mathrm{ext}}}}}\) changes from compression at the top surface to tension at the bottom interface along the film thickness, whereas \(\varepsilon _{33}^{{{{\mathrm{ext}}}}}\) maintains compression across the film. Similar to the strain gradients of spherical tips, such strain distributions give rise to an effective flexoelectric field pointing downwards, which enables local domain switching from upward to downward.

Fig. 4: Phase diagrams for bidirectional mechanical switching.
figure 4

a The point force mechanical model and distribution of tip-force-induced strain field \(\varepsilon _{11}^{{{{\mathrm{ext}}}}}\), \(\varepsilon _{33}^{{{{\mathrm{ext}}}}}\), and \(\varepsilon _{13}^{{{{\mathrm{ext}}}}}\) in the film. b The ftipβ phase diagram for SD→PD switching. c The ftipβ phase diagram for PD→SD switching. d The ftip–β phase diagram indicating the bidirectional mechanical switching region.

The ftipβ phase diagram for SD→PD switching dominated by the effective dipolar field is shown in Fig. 4b. The blue circles and solid line in Fig. 4b correspond to the critical tip forces needed to realize the SD→PD switching for the SD state with initial downward polarization under different β. We can see that the critical ftip decreases with the decrease of β. When the surface screening condition is very poor, even a quite small tip force can lead to the SD→PD switching. The ftipβ phase diagram for PD→SD switching dominated by the flexoelectric field is shown in Fig. 4c. In Fig. 4c, the red squares and solid line represent the critical tip forces needed to realize the PD→SD switching for the PD state under different β, which increases with the decrease of β. The above results are reasonable considering that the effective dipolar field increases with the decrease of β and the flexoelectric field increases with the increase of ftip. However, it is quite interesting to note that there is an unexpected upper limit of ftip (indicated by red triangles and solid line in Fig. 4c) for PD→SD switching under different β. This is counterintuitive since larger ftip causes larger flexoelectric field, which should lead to easier PD→SD switching according to our previous qualitative analysis. To clarify this problem, we first review the tip force-induced distributions of strain shown in Fig. 4a. One can note that the strain gradients decay extremely fast along the film thickness and keep nonzero only in the range of three or four layers of unit cells of the film. The tip-force-induced flexoelectric field in the BTO thin film, as a result, is also limited to the four layers nearby the top surface, which is almost independent on film thickness and the magnitude of tip force (see Supplementary Fig. 6). The fast decay of the flexoelectric field nearby the top surface of the BTO thin films is a feature of the point force loading, and result shows that the fast-decaying flexoelectric field would cause a special layer-by-layer dynamic switching behavior of the dipoles in the loading area. To be more specific, after the application of a tip force, only the switching behaviors of the dipoles in the loading area of the uppermost four layers are entirely dominated by the flexoelectric field, and they are switched quickly layer-by-layer in sequence (see Supplementary Fig. 5). Meanwhile, the switching behaviors of the dipoles in the loading area of the downmost two layers, which determine whether the PD→SD switching can be finally completed, do not directly depend on the flexoelectric field. Instead, they are subjected to a time-dependent effective dipolar field (see Supplementary Fig. 3) due to the dynamic dipole–dipole interaction with those in the loading area of the uppermost four layers and those in the residual area. As a result, an unrestricted increase of ftip will not do good to the switching of the dipoles in the loading area of the downmost two layers. To make things worse, the large increase of ftip can hinder the switching by modifying the time-dependent effective dipolar field. Readers are referred to Supplementary Discussion for more details. The strong dipole–dipole interaction dynamics hence plays an important role in mechanical switching, and it cannot be revealed by conventional thermodynamic model.

Combining the ftipβ phase diagrams for SD→PD switching and PD→SD switching, we can obtain a bidirectional mechanical switching region as shown in Fig. 4d. It shows that the desired appropriate window for bidirectional mechanical switching is 0.942 < β < 0.97. Specifically, when 0.942 < β < 0.96, the effective dipolar field is dominated at a small tip force and can be employed to switch an initial downward SD state to an upward PD state, whereas the flexoelectric field is dominated at a large tip force and can enable a back-switching. In contrast, when 0.96 < β < 0.97, a large tip force can be employed to switch an initial downward SD state to an upward PD state, whereas a small tip force can enable a back-switching.

Now we take the case with the surface screening condition β = 0.95 as an example to examine the tip-force-induced bidirectional switching scheme via MD simulations. The BTO thin film is initialized to be a SD state with downward polarization. Tip force pulses with alternatively varying strength are applied to the ferroelectric thin film. The small tip force is set to be about 12 nN, and the large tip force is set to be about 18 nN. The simulated results for the force pulse time of 10 ps are shown in Fig. 5 (see Supplementary Fig. 13 for the effect of the force pulse time on the polarization switching behavior). We can see that the SD state is switched to be a PD state very quickly (within 0.2 ps) with the application of a small tip force (A→B, mechanical writing process). Then, the obtained PD state remains stable after the removal of the tip force (B→C). Applying a large tip force switches the PD state back to the SD state within 0.2 ps (C→D, mechanical erasing process), which remains stable after removing the tip force (D→A). Our MD simulations thus demonstrate that a reversible 180° mechanical switching scheme (A→B→C→D→A) can be achieved by applying tip force pulses with alternatively varying strength. Evolution of the dipole structures during the bidirectional mechanical switching is shown in Fig. 5c (a movie can be found in Supplementary Movie 1). Moreover, the SD and PD states can be repeatedly switched into each other by applying periodic sequences of tip force pulses as shown in Fig. 5a and b, which further verifies the feasibility of our bidirectional mechanical switching scheme.

Fig. 5: Bidirectional mechanical switching via MD simulations.
figure 5

a Tip force pulses with alternatively varying strength applied to a BTO thin film. b Evolution of the polarization of the loading area in the BTO thin film under the tip force pulses. c Corresponding dipole structures during the bidirectional mechanical switching.

Discussion

So far there is still lack of experimental evidence of bidirectional mechanical switching in ferroelectric although lots of research works on mechanical switching have been carried out. As indicated by our result, this might be due to the fact that the condition of bidirectional mechanical switching is too harsh to be realized in practice. Particularly, it is crucial in our mechanically induced bidirectional switching scheme to ensure that ferroelectric thin films are homogeneously screened, and the screening condition are within an appropriate window, where the delicate competition between the tip-induced flexoelectric field and the effective dipolar field can be significantly tailored by the magnitude of the tip force. Thus, the depolarization field is large enough to assist upward mechanical switching with small tip force, while smaller than the flexoelectric field to enable downward mechanical switching when the tip force is relatively large. Experimental feasibility of tailoring the depolarization field is usually achieved by choosing proper electrodes, controlling surface chemical environment51,52,53, adjusting the thickness of the intermediate dielectric layer in capacitor or superlattice structures54,55,56, etc. Specifically, electrodes with different effective screening lengths can alter the extent of screening (Supplementary Fig. 11). By introducing a dielectric layer (e.g., SrTiO3) between a metal-ferroelectric interface or two ultrathin ferroelectric layers, the screening condition of the ferroelectric layers can be poor and further modified by adjusting the thickness of the dielectric layer (Supplementary Fig. 12). Moreover, a more precise control of the depolarization field can be achieved by connecting an additional capacitor to the ferroelectric film57. Through the charging and discharging of the capacitor, the amount of screening charges on the surface or interface of the ferroelectric film can be effectively adjusted, thereby realizing dynamic and precise control of the depolarization field. Nevertheless, a systematic investigation of the mechanical switching behavior of such ferroelectric systems with tunable screening is still lacking.

Despite of these possible experimental schemes of tailoring screening condition of ferroelectric thin films, it is still challenging to provide experimental verification to our theoretical predictions. On the one hand, as we have mentioned above, the tip-film surface contact problem is actually complicated with multiple possible processes involved in practice. In addition to flexoelectricity and the effective dipolar field, other possible sources including surface/bulk electrochemistry27,33 and shear strain effect23 have been reported to trigger mechanical switching recently. Discussions on the exact mechanism of mechanical switching are still ongoing, and different mechanisms may be involved at the same time in a practical dynamic mechanical switching process. On the other hand, the ferroelectric thin film is considered to be homogenously screening by surface screening charges in our theoretical model. Nevertheless, the charge screening conditions in ferroelectric thin films are very complicated in practice. Besides the surface screening, there are other possible screening sources such as charge defects like oxygen vacancies nearby the domain walls, ionic charges absorbing from the air or via bending of energy bands. These extra charge carriers, which could locate nearby the surface, interface or inside the ferroelectric thin films, can give rise to a localized inhomogeneous charge screening effect. Therefore, the requirements for the experimental samples and environment are rather high to ensure that ferroelectric thin films are under proper homogeneous surface screening conditions to carry out experimental verification. Specifically, the band gap width of the selected ferroelectric samples should be relatively large (e.g., >4.0 eV) to reduce the effect of band bending, and the quality of the samples should be high with a low density of defects, and the experimental environment should exclude the influence of air charge adsorption. It is also noteworthy that, due to the limitations of the computational scales, we have adopted a simplified point force model to trigger mechanical switching. While this can be approached in experiment by fabricating a sharp AFM tip, in practice, AFM tips are much blunter with radius larger than 10 nm. The exact window of bidirectional mechanical switching is expected to be modified by the model-dependent strain fields (Supplementary Fig. 9), though they will not alter our main conclusion.

In summary, first-principles-based MD simulations have been performed to explore the effects of the flexoelectric field and an overlooked effective dipolar field on the tip-force-induced local domain switching in ferroelectric thin films. The effective dipolar field is found to significantly influence the stability of SD and PD states and further results in inherent asymmetric features of the local hysteresis loops in the ferroelectric thin films. Characteristics of the local mechanical switching behavior in the ferroelectric thin films mediated by an effective dipolar field are then revealed. Based on the effective dipolar field and flexoelectric field, we show that reversible 180° mechanical switching is theoretically possible in a tip-film architecture when screening condition of the ferroelectric film and tip loading force are within an appropriate window. Such a switching utilizes a delicate competition between the tip-induced flexoelectric field and the effective dipolar field exerted by the surrounding non-switched dipoles. ftipβ phase diagrams for SD→PD switching and PD→SD switching are calculated to find out the appropriate bidirectional switching condition. Based on the phase diagrams, a reversible 180° mechanical switching scheme is thus examined in MD simulations by applying tip force pulses with alternatively varying strength. The effective dipolar field is dominated at a relatively small tip force and is employed to switch a downward SD state to an upward PD state, whereas the flexoelectric field is dominated at a relatively large tip force and enables a back-switching. It is also found that the strong dipole–dipole interaction dynamics play important roles in the mechanical switching. Our study thus provides insights into the mechanical switching behavior in ferroelectric thin films mediated by the long-range dipolar field and should help deepen the current understanding on this field.

Methods

Effective Hamiltonian method

A first-principle-based effective Hamiltonian method30,58,59,60,61 is employed in our investigation. For the effective Hamiltonian model of ferroelectric thin films, the total energy of the system is written as a function of several reduced degrees of freedom including the local modes ui, the local displacements vi (related to the inhomogeneous strain \(\eta _{{{\mathrm{I}}}}\)), and the homogeneous strain \(\eta _{{{\mathrm{H}}}}\), i.e.,

$$\begin{array}{l}E^{{{{\mathrm{tot}}}}}\left( {\left\{ {{{{\bf{u}}}}_i} \right\},\left\{ {{{{\bf{v}}}}_i} \right\},\left\{ {\eta _{{{{\mathrm{H}}}},l}} \right\}} \right)\\ \;\;\;\;\;\;\; = \frac{{M^ \ast }}{2}\mathop {\sum}\limits_{i\alpha } {\dot u_{i\alpha }^2} + E^{{{{\mathrm{Heff}}}}}\left( {\left\{ {{{{\bf{u}}}}_i} \right\},\left\{ {{{{\bf{v}}}}_i} \right\},\left\{ {\eta _{{{{\mathrm{H}}}},l}} \right\}} \right)\\ \;\;\;\;\;\;\; + \frac{1}{2}\beta \mathop {\sum}\limits_i {\left\langle {{{{\mathbf{E}}}}_{{{{\mathrm{dep}}}}}} \right\rangle \cdot Z{{{\mathbf{u}}}}_i} - \mathop {\sum}\limits_i {{{{\bf{E}}}}_{{{{\mathrm{ext}}}}}^{{{{\mathrm{eff}}}}} \cdot Z{{{\bf{u}}}}_i} - \frac{1}{2}\mathop {\sum}\limits_i {f_{pqrs}Zu_{ip}\frac{{\partial \varepsilon _{iqr}}}{{\partial x_s}}} \end{array}$$
(1)

where the first term is the kinetic energy of local modes with M* being the effective mass of the local mode. EHeff is the total energy for a ferroelectric film in the absence of surface screening and any external electric field; it contains the local modes self-energy, the short-range and long-range energies between local modes, the elastic energy, and the coupling energy between elastic deformations and the local modes. The explicit expression of EHeff can be found in ref. 59 and ref. 62. Note, to calculate the long-range dipole–dipole energy for ferroelectric film, an efficient dual-space approach based on a periodic Green’s function for dipole–dipole interaction in two-dimensional periodic systems is adopted in the first term63, instead of the Ewald summation method for three-dimensional bulk systems. The second term of Eq. (1) mimics the screening of the depolarization field arising from uncompensated bound charges at the film surfaces via a linear mixing of the dipole–dipole interactions for ideal OC and perfect SC boundary conditions weighted with the scalar parameter 1 − β and β, respectively. The parameter β ranging from 0 to 1 controlling the degree of the screening45,46,47. Specifically, β = 0 describes an ideal open circuit (OP) boundary condition without any charge screening and it corresponds to a maximum depolarization field, while β = 1 represents the ideal SC boundary condition corresponding to complete screening of the bound charges at the surfaces. \(\left\langle {{{{\mathbf{E}}}}_{{{{\mathrm{dep}}}}}} \right\rangle\) is the maximum depolarization field and Z is the Born effective charge. The third term of Eq. (1) considers the effect of applying an external electric field. Here \({{{\bf{E}}}}_{{{{\mathrm{ext}}}}}^{{{{\mathrm{eff}}}}}\) is an effective applied field after considering the screening effect. This is due to the fact that the screening charges would not only modify the depolarization field, but also alter the applied field experienced by the ferroelectric64. Readers are referred to Supplementary Discussion 4 for details of atomistic calculation of the depolarization energy and treatment of the surface screening effect.

Moreover, the last term is adopted to model the flexoelectric effect on polarization due to strain gradients31, which are introduced by a local surface pressure in our work. Here, fpqrs are the flexocoupling coefficients, ∂εiqr/∂xs represents the strain gradient centered on Ti sites i, and p, q, r, and s are indexes ranging from 1 to 3, and xs are the spatial coordinates along the s-th Cartesian axis. fpqrs are related to the flexoelectric coefficients μpqrs phenomenologically describing the coupling between strain gradient and polarization by

$$\mu _{pqrs} = \frac{1}{2}f_{tqrs}\chi _{tp}\varepsilon _0$$
(2)

with χtp being the dielectric susceptibility, and ε0 being the dielectric permittivity of vacuum.

The parameters of the effective Hamiltonian in Eq. (1) are determined by first-principle calculations. The flexocoupling coefficients, in particular, is set to be f11 = 3.072 V, f12 = 1.992 V, and f44 = 0.027 V20,26,31. The temperature is set to be 10 K to reduce the effects of heat disturbance, and the pressure is set to be –4.8 GPa to correct the underestimated lattice constants caused by local density approximation (LDA) of the first-principle calculation. The effective mass is set to be 39.0 au for BTO65.

Molecular dynamic simulations

MD simulations are adopted to combine with the first-principles-derived Hamiltonian to simulate the dynamic evolution of the polarization. In MD simulations, the evolution of local modes is obtained by solving Newton’s equations of motion66. The force acting on local modes ui is calculated by solving

$${{{\mathbf{f}}}}_i^{{{\mathbf{u}}}} = - \frac{{\partial E^{{{{\mathrm{tot}}}}}\left( {{{{\mathbf{u}}}}_i} \right)}}{{\partial {{{\mathbf{u}}}}_i}}$$
(3)

The updating of the homogenous strains and inhomogeneous strains (i.e., local displacements) are determined by minimizing the corresponding strain-related energy at each step according to the current configuration of local modes66. MD simulations are performed in an isothermal-isobaric (NTP) ensemble with a Berendsen thermostat to control the temperature and a barostat which allows the simulation cell to vary in size and shape. The barostat is mimicked by adding a pV term in the effective Hamiltonian. p is the pressure and V is the volume of the simulation cell. The damping time of the thermostat is set to be 0.05 ps. Velocity Verlet method is used to integrate the equations of motion to update ui and \({{{\dot{\mathbf u}}}}_i\). The time step is set to be 1 fs.