### Diffusion in conventional materials

In the diffusion equation, the material capacity relates the potential (temperature, voltage, etc.) required to store a certain amount of the conserved quantity of interest (thermal energy, charge, etc.) per unit volume and a conductivity term, which relates the transport of that quantity between two points of different potential. For the case of heat, the pertinent material quantities are heat capacity and thermal conductivity, whereas for the case of electric charge diffusion they are electrical capacitance and electrical conductivity.

Diffusion can be macroscopically understood in terms of Fick’s diffusion equation^{27,28}, which in its most general form for the one-dimensional (1D) scenario can be written as

$$frac{{partial qleft( {x,t} right)}}{{partial t}} = frac{partial }{{partial x}}left( {sigma frac{partial }{{partial x}}left( {g,qleft( {x,t} right)} right)} right)$$

(1)

where (sigma) and (g) correspond to the conductivity and the inverse of capacity of the medium, respectively, and both can in general be functions of space and/or time. In its simplest form when these two parameters are assumed to be independent of time and space, the above equation is simplified to its well-known form

$$frac{{partial qleft( {x,t} right)}}{{partial t}} = Dfrac{{partial ^2}}{{partial x^2}}qleft( {x,t} right)$$

(2)

where (D = sigma g) is the diffusion coefficient. The solution of such diffusion equation is well known and is depicted in the left panel of Fig. 1a, which is associated with conventional homogeneous diffusive media. Conventionally, to engineer the diffusive response of the system, one would judiciously choose the right spatial distribution of conductivity and capacity by selecting a combination of conductors, insulators, and structures with proper capacity.

### Diffusion in spatiotemporal metamaterials

We ask the following question: can we propose a medium over which the diffusion occurs in a “biased” asymmetric manner, thus breaking the diffusion spatial symmetry, as sketched in the right panel of Fig. 1a? As we show below, this is possible using a properly designed spatiotemporally varying diffusive metamaterial, in which both the temporal and spatial variation of conductivity and capacitance parameters are judiciously performed, enabling such control over diffusion. This allows modification of the temporal and spatial response of the diffusion phenomena, leading to the breakage of spatial symmetry and even allowing for concentration and accumulation of the quantity of interest with time (such as charge or temperature). Moreover, this platform also provides control over the transient as well as the steady-state behavior of the solutions to the diffusion equation.

For that purpose, let us now consider a metamaterial composed of an infinite chain of miniaturized parallel capacitive elements connected by series finite-conductivity elements as depicted in Fig. 1b. We assume both conductive and capacitive elements to be functions of time (*t*) and space (*x* as, e.g., (sigma left( {x,t} right) = sigma _0 + sigma _msin left( {kx – omega t} right)) and (gleft( {x,t} right) = g_0 + g_m{mathrm{sin}}left( {kx – omega t + phi } right)), both with the same modulation wavelength and frequency, where (0 {,} < {,} sigma _m {,} < {,} sigma _0) and (0 {,} < {,} g_m {,} < {,} g_0). Inserting these functions into Eq. (1), we homogenize the equation in space and time, when the period of temporal variation of the material parameters is much smaller than the response time of the material, dictated by the average value of those modulated parameters (see Supplementary Note 1), obtaining the effective diffusion equation^{29}

$$frac{{partial tilde qleft( {x,t} right)}}{{partial t}} = tilde Dfrac{{partial ^2}}{{partial x^2}}tilde qleft( {x,t} right) – vfrac{{partial tilde qleft( {x,t} right)}}{{partial x}}$$

(3)

where (tilde qleft( {x,t} right)) is the time-averaged charge density (averaging is done over the period of modulation, which is a much shorter time than the diffusion time), and (tilde D = sigma _0g_0 + frac{1}{2}sigma _mg_mcos left( phi right)) and (v = frac{1}{2}ksigma _mg_msin left( phi right)) are the homogenized coefficients obtained by assuming very rapid oscillations of the constitutive parameter modulations (and smooth spatial variations of (qleft( {x,t} right))). This partial differential equation is known as the advection–diffusion (or Smoluchowski) equation^{30}, which corresponds to the diffusion in a medium that moves along the *x* direction with a velocity (v) with respect to the observer. This velocity term breaks the spatial symmetry of the system (*x* and −*x* are no longer interchangeable). The parameters (v), which represents the direction of the “medium bias,” and (tilde D) can be controlled with the relative phase (phi). We note that this temporal homogenization is valid when the modulation’s temporal period is much smaller than the temporal rate of change of the diffusion mechanism, dictated by (tilde D), and the spatial distribution of the diffusive quantity (specifically its second derivative). This fact makes it challenging to obtain a universal rule for the range of validity of the homogenization, although we provide a number of validating examples in Supplementary Figs. 1 and 2 for several initial conditions.

This homogenization results in two arguably unexpected outcomes. First, the effective velocity obtained in Eq. (3) depends on the relative phase of the modulation of conductivity and capacity terms, and depends neither on the frequency nor direction of the underlying spatiotemporal modulations (see Supplementary Movies 1 and 2). Second, although the metamaterial’s response is equivalent to that of a moving flow, there is no actual mechanical or physical flow. The effective velocity can in fact be discontinuous, as we will explore later. Extending this idea, one can also design a metamaterial platform made of multiple domains with different effective velocity distributions (even opposite directions). This idea can lead to a carefully designed flow structure with a tailored steady-state solution.

In the following, let us introduce two different mechanisms that take advantage of this effective velocity to produce large concentrations of the diffusive quantity. First, let us imagine a finite size metamaterial, which is insulated against the flow at both of its boundaries at which the electric current (or the heat flux) must therefore vanish. In the absence of biasing effective velocity, the charge density (or thermal energy) will eventually come to equilibrium with a uniform distribution. However, if the biasing effective velocity is non-zero, charge (or thermal energy) will be driven towards one end of the structure, accumulating until a balance is reached between the two forces acting on them: the diffusive force, which is trying to reduce the accumulation, and the force due to the biasing effective velocity, which pushes it towards the insulating interface. The stationary solution in this case takes the form of an exponential (qleft( x right) = q_0exp left( {alpha ,x} right) + q_1), where (alpha = v/tilde D), similar to the stationary solutions found when drift and diffusion currents balance in solid-state physics^{31}.

### Experimental validation of asymmetric diffusion

To demonstrate experimentally a proof-of-concept of this phenomenon, we have constructed a 1D spatiotemporally varying metamaterial for the case of electric charge diffusion (see Fig. 2a). This structure consists of 50 capacitors connected via 49 switches. Each capacitor consists of a circular disk (rotor) made of a semicircularly metalized printed-circuit board and a grounded stator. These metal plates produce a linear variation in the rotor’s capacitance directly related to the overlap between the metalized regions and the stators. In every two adjacent disks, one disk is rotated with angle (pi /6) with respect to its neighboring disk, resulting in spatial variation of the capacitance along the axis. A set of electrical contacts has been placed between each pair of adjacent disks, which serves to connect them when the metal portion of both disks and the contact is overlapping, thus forming a spatial variation of conductivity along the medium’s axis. The temporal variation of capacitance and conductivity can be achieved by rotating the ensemble of rotors at a constant angular velocity (omega), using a mechanical motor. The angle at which the contacts occur relative to the position of angle of capacitance can be modified at will, thus producing an arbitrary phase difference in the spatiotemporal variation of conductivity and the capacitance. The electrical contacts and variable capacitors in this case can be likened to spatiotemporally varying conductivity and permittivity (or capacity), respectively. This time-evolving structure can be described mathematically using homogenized expressions for the conductivity and inverse of capacitance (denoted by (C)), in the limit of a large number of disks, as

$$sigma left( {x,t} right) = sigma {mathrm{{Pi}}}left( {beta x – omega t} right)$$

(4)

$$gleft( {x,t} right) = 1/Cleft( {x,t} right) = 1/({mathrm{c}}_1{mathrm{Lambda }}left( {beta x – omega t + phi } right) + c_0)$$

(5)

where ({mathrm{{Pi}}}left( cdot right)) and ({mathrm{Lambda }}left( cdot right)) represent normalized square and triangular dimensionless functions respectively. The constant offset of the capacity modulation (c_0) is introduced in the design to ensure that the inverse of capacitance remains finite at all times. It is noteworthy that these spatiotemporal variations are consistent with a positive phase velocity along the *x* direction, but in the following we shall prove that this fact will not play any role in the effective bias velocity of the metamaterial.

In our setup, the first disk on one end of the sample (we call this the “left end”) is connected to a voltage source that maintains a constant potential between the first rotor and the stators. The equations governing the temporal dynamics of the system comprised of a series of switches alternated with parallel capacitors can be derived analytically in terms of the Kirchhoff laws, with the spatiotemporally varying capacitances and switches following a traveling triangular function and a traveling square function, as summarized in Fig. 2b. It can be shown that in the limit of a large number of disks, the Kirchhoff laws can be homogenized spatially, obtaining a differential equation in the form of Eq. (1). Details of such homogenization can be found in the Supplementary Note 2.

Although the experimental setup is presented for the case of electric charge diffusion, an analogous device could be envisioned for the case of thermal energy diffusion. One way to achieve this would be to substitute the variable capacitors with closed gas reservoirs whose volumes can be externally controlled by means of a set of pistons. The reservoirs are connected by variable thermal resistors, whose value can be controlled by mechanically modifying the cross-section in contact with the neighboring gas reservoirs. In this case, the variable thermal capacitors would follow, in the limit of high modulation frequencies, a series of adiabatic compression and expansion cycles, which can be modeled using the specific heat ratio of the gas used.

It is worth noting that due to the time modulation of the capacitance at any given node along the sample, the voltage at that point becomes also time-modulated even when the charge distribution has reached the steady state. However, we restrict our attention to the time-homogenized voltage, i.e., time-averaged voltage (tilde Vleft( {x,t} right)), which is proportional to the time-average charge density (tilde qleft( {x,t} right)) (as mentioned before, this time averaging is over the period of the modulation, which is much shorter time than the diffusion time.)

In the following, we investigate two elucidating cases of the degree of control over the charge diffusion in our experimental setup.

In the first case, the effective velocity is chosen such that the charges are drawn from the source and accumulated at the opposite end of the sample. To achieve this, the relative phase between the spatiotemporal modulation of the capacitances and the switches has been chosen close to (phi = pi /3).

The theoretical prediction (see Supplementary Note 3) for the temporal evolution of such system is shown in Fig. 2c, which clearly shows an accumulation of time-averaged charge/voltage towards the right end of the sample, in contrast to the conventional stationary state, i.e., flat evenly distributed charges, found in the absence of the modulation of the material parameters. Here we find a rapid growth in the time-averaged voltage (and associated charge) at the right end, which, in as few as five rotational periods, becomes larger than the source voltage. The rapid increase in charge accumulation then leads to a factor of 6 in less than 20 rotational periods of the system.

The experimental results for this case are shown in Fig. 2d, demonstrating a clear link with the theoretical results in Fig. 2c. We have been able to experimentally reproduce the voltage enhancement, i.e., factor of 6 within the first 20 rotational periods, predicted theoretically. We note that in real systems, large voltage accumulations may lead to arcing between neighboring conductors. Moreover, in our experiment, larger than six voltage enhancement could not be reliably measured due to the limitation of our instruments and thus not reported here (see Supplementary Note 4 for more information). As mentioned earlier, in the absence of such nonlinearities (e.g., arcing), the system will reach the steady-state accumulation, in which the force due to the effective velocity balances that of the diffusion mechanism that tries to minimize the charge accumulation. The shape of the charge distribution will then be dictated by the ratio between the diffusion coefficient and effective velocity achieved.

Let us now focus on the case in which the effective velocity points towards the source, which is achieved by imposing a relative phase of (phi = – pi /3). As shown by the theoretical results in Fig. 2e, the voltage introduced by the source is clearly constrained within the first few elements of the structure, corresponding to those which are, at a certain value of the angle of rotation, directly connected to the source due to overlapping. Beyond this region, the voltage decays in such a way that the right end of the sample is not even perturbed by the presence of the voltage source. We have experimentally verified this, as shown by Fig. 2f. This implies that one can achieve isolation and “evacuation” of charges, heat, etc. from a region of space, not being constrained by the conventional diffusion mechanism. As for the accumulation phenomenon, the rate of decay is determined by the ratio between the effective velocity and the diffusion coefficient of the homogenized metamaterial, which can be controlled through the modulation amplitudes, the relative phase, and the wavelength of the spatiotemporal modulations.

We should highlight the fact that the only difference between the sample in Fig. 2c–f is the change in relative phase between the modulations of capacitance and conductivity, while maintaining every other aspect of the modulations the same. Therefore, as predicted from our theory, the sign of the modulations’ wavevector (i.e., the direction of the modulations) does not play any role in determining the direction of the biasing velocity.