Containing a pandemic: nonpharmaceutical interventions and the ‘second wave’

In response to the worldwide outbreak of the coronavirus disease COVID-19, a variety of nonpharmaceutical interventions such as face masks and social distancing have been implemented. A careful assessment of the effects of such containment strategies is required to avoid exceeding social and economical costs as well as a dangerous ‘second wave’ of the pandemic. In this work, we combine a recently developed dynamical density functional theory model and an extended SIRD model with hysteresis to study effects of various measures and strategies using realistic parameters. Depending on intervention thresholds, a variety of phases with different numbers of shutdowns and deaths are found. Spatiotemporal simulations provide further insights into the dynamics of a second wave. Our results are of crucial importance for public health policy.


Introduction
The rapid spread of the coronavirus disease 2019 (COVID- 19), caused by the severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) [1][2][3], has led governments across the globe to impose severe restrictions on social life, typically denoted 'shutdown' or 'lockdown'. While these have been found to be very effective in reducing the number of infections, they have also been accompanied by high social and economical costs. Moreover, it can be expected that infection numbers rise again after the shutdown has ended ('second wave'). Consequently, the development of an effective containment strategy that avoids a collapse of both the economy and the healthcare system and that takes into account the problem of multiple outbreaks is of immense public interest.
For this reason, a significant amount of research is currently performed on the effects of various nonpharmaceutical interventions (NPIs) [3][4][5][6][7][8] and intervention strategies [3,8,9] on the spread of infectious diseases. From a political perspective, the costs associated with different containment measures make it necessary to obtain a detailed understanding of the benefits of various strategies, the effectiveness of different combinations of NPIs, and of whether one type of intervention can compensate for another one. Of particular importance is the question at which stage social restrictions should be imposed and lifted in order to avoid multiple outbreaks and a large number of deaths.
A useful theory for such investigations is the susceptible-infected-recovered (SIR) model developed by Kermack and McKendrick [10], which has been generalized in a large variety of ways in order to incorporate, e.g., governmental interventions [11]. Recently [12], we have proposed an extension of the SIR model based on dynamical density functional theory (DDFT) [13][14][15][16] that incorporates social distancing in the form of a repulsive interaction potential. It allows to treat different types of NPIs separately and therefore provides more detailed insights into containment strategies than the simple SIR model while being computationally more efficient than individual-based models. A further recent development in SIR theory is the description of adaptive containment strategies, which are relevant for the current pandemic [5], using hysteresis loops [11,17,18].
In this work, we use the SIR-DDFT model and an extended susceptible-infected-recovered-dead (SIRD) model with hysteresis to investigate the effects of various containment strategies with model parameters adapted to the current COVID-19 outbreak in Germany. We compare the effects of face masks and social distancing/ isolation and of various threshold values (of the number of infected persons) for imposing and lifting restrictions. Our simulations reveal the existence of various phases with different numbers of outbreaks. This effect needs to be taken into account when making political decisions on shutdown thresholds, as it can significantly affect both the total length of the shutdowns and the number of deaths. Moreover, we show that a second wave can also arise if only one type of restriction is lifted. Finally, it is found that second waves tend to have a different spatial distribution than first waves, an effect that is a current public health concern [19]. Our results thereby extend the work in [6][7][8][9], as they are based on methods from statistical mechanics that allow for deeper insights. Moreover, we break new ground in soft matter physics by developing a DDFT model with timeand history-dependent interaction potential, leading to interesting novel dynamical behavior. This model allows to test a large variety of shutdown strategies and their consequences for the 'second wave' using our freely available code [20].
This article is structured as follows: In section 2, we compare the effects of face masks and social distancing on infection numbers. Adaptive measures and the 'second wave' are discussed in section 3. In section 4, we extend this discussion to spatiotemporal dynamics. We conclude in section 5. Mathematical details of the SIR-DDFT model are explained in section A, the choice of parameter values in section B, and numerical details in section C.

Nonpharmaceutical interventions: Face masks vs social distancing
The most widely used theory for modeling disease outbreaks is the SIR model [10]. It assumes that the population consists of three groups, namely susceptible (S), infected (I), and recovered (R) individuals. Susceptible persons are infected at a rate c I eff¯, where c eff is the effective transmission rate [21]. Infected persons recover at a rate w. Recovered persons are immune to the disease. An extension is the SIRD model [22], in which infected persons die at a rate m. The governing equations of the SIRD model are We use overbars to distinguish, e.g., the total number of infected persons (I¯) from the number of infected persons per unit area (I). Due to its simplicity, the SIR(D) model has become very popular and is used in modeling the current coronavirus outbreak, incorporating real data [7]. Although reinfections with COVID-19 have been reported [23], it has been found that British hospital workers with previous SARS-CoV-2 infections had 84% reduced risk of being infected, with this protection lasting seven months (median) [24], and experiments on rhesus macaques have found that a SARS-CoV-2 infection induces protective immunity against rechallenge [25]. Therefore, the assumption made in the SIR(D) model that recovered persons are immune is likely to be a good approximation for the case of COVID-19. Modeling a pandemic using the simple SIR(D) model given by equations (1)-(3) corresponds to the assumption of a homogeneous contact network, which is an oversimplification for disease spreading in a heterogeneous society [26]. This, together with the fact that the simple SIR model has been found to be not empirically accurate for the COVID-19 outbreak [27], makes more sophisticated modeling approaches necessary.
A drawback of the standard SIR(D) model is the fact that it does not include spatiotemporal dynamics. Moreover, it does not allow to treat various types of NPIs, such as face masks and social distancing, separately. This is possible in individual-based models, which, however, are computationally very expensive. Therefore, an intermediate approach that combines the simplicity of the simple SIR model with the flexibility of individualbased models is very promising in this context. Such an approach is given by the SIR-DDFT model developed in [12]. It describes the densities S, I, and R of susceptible, infected, and recovered persons, respectively, as fields on spacetime governed by the equations r t I r t  wI r t  mI r t  ,  , , with position r  , time t, mobility Γ f for field f = S, I, R, free energy F, and transmission rate c. The free energy F = F id + F exc + F ext consists of a term F id describing noninteracting persons ('ideal gas free energy'), a term F exc ('excess free energy') for social interactions, i.e., social distancing and self-isolation of infected persons, and a term F ext for an 'external potential' describing, e.g., travel restrictions (not considered in this work). In comparison to the SIR model, social distancing is therefore incorporated explicitly, based on a microscopic model of individual persons staying away from each other. The interaction strength is measured using two parameters C sd and C si for social distancing and self-isolation, respectively (which are negative if the interactions are repulsive). This model is an extension of the reaction-diffusion SIR model, which has been found to give accurate predictions for the spread of the Black Death in Europe [28]. It reduces to the diffusion model if the excess free energy F exc , which incorporates interactions, is set to zero. Mathematical details on the SIR-DDFT model are given in section A, a numerical implementation is provided in [29]. DDFT is reviewed in [16]. As discussed in [12], the transmission rate c should be distinguished from the effective transmission rate c eff appearing in the standard SIR model: The former measures the transmission rate given contact, where the amount of contacts is determined by the interactions that incorporate social distancing and self-isolation. On the other hand, the rate c eff depends on both c and the number of contacts. Consequently, it is possible in the SIR-DDFT model (but not in the SIR model) to treat these two factors separately. This is an important advantage, since it allows to distinguish the effects of two of the main NPIs that were implemented against the COVID-19 outbreak: Face masks and other hygiene measures such as frequent hand washing reduce c, i.e., they decrease the probability of an infection in case of contact. Repulsive interactions, on the other hand, reduce the number of contacts. Hence, performing a parameter scan in c and the interaction strength allows to distinguish the effects of the two types of measures, and thereby provides insights into the question to which extent these can supplement or replace each other.
To obtain the phase diagram, we have solved the SIR-DDFT model (equations (4)-(6)) numerically in two spatial dimensions with w = 0.125/d and m = 0.0007/d. These parameter values are adapted to the outbreak in Germany (see section B). Additional simulations have been performed with w = 0.1/d, 0.15/d and m = 0.0005/ d, 0.001/d to ensure that our observations are not sensitive to small changes in the parameter values and therefore not affected by measurement errors. (Note, however, that a strong change of the values of w and m can lead to a strong change of the effective reproduction number [12] and therefore start or stop an outbreak.) Moreover, we set Γ S = Γ I = Γ R = 1/d. We measure time in days (d) and everything else in dimensionless units. 1 Population numbers shown in the plots are normalized such that the initial total population size is one. Details on the simulations can be found in section C. The resulting phase diagram, shown in figure 1, visualizes the dependence of the normalized maximal number of infected persons I max,n on c and on the strength of the repulsive interactions 2 = C C sd 1 3 si . Throughout this article, we use a subscript n to denote a normalized quantity (this subscript is not used for the parameter c). We have investigated the influence of the ratio C sd /C si in [12], where it was shown that the value 1/3 can lead to a significant inhibition of the pandemic. It is found that both a reduction of c and an increase of |C sd | can decrease infection numbers. The model exhibits three phases, which are characterized by low (no outbreak), intermediate (contained outbreak), and large (uncontained outbreak) infection numbers, respectively. Infection numbers are small if c is below w (indicated by a green line in figure 1). The outbreak can be (partially) contained by large values of |C sd | (even if c is also large) or by intermediate values of c and C sd . Therefore, it is possible, to a certain extent, to reduce the amount of contact restrictions (i.e., to decrease |C sd |) without increasing the infection numbers if the transmission rate c is also reduced, which is possible by hygiene measures. Consequently, the model shows that face masks allow to re-open a society after a shutdown in a controlled way. The way in which the parameter c is changed by implementing face masks depends on their efficacy and on the adherence in the population, a strong reduction of c is possible if both are large (see [30] for a quantitative estimate of the effect of face masks).

Adaptive strategies and multiple outbreaks
Up to now, we have assumed that the mitigation measures are imposed in the same way at all times, i.e., that the model parameters are constant. In practice, however, they will be imposed and lifted in an adaptive fashion depending on whether infection numbers rise above or fall below certain thresholds. Strategies of this form are 1 The right-hand side of equations (4)-(6) needs to have a dimension of 1/d if everything except for time is dimensionless. This can be achieved by measuring the mobilities in inverse days. If energies are also dimensionless, the relation b = G f f f -D 1 with f ä {S, I, R} between the diffusion constants D f and the rescaled inverse temperatures β f (which are inverse energies) then implies that D f is also measured in 1/d. 2 We choose |C si | > |C sd |, since people will keep a larger distance from infected than from non-infected persons. of significant importance for the COVID-19 outbreak [3,5]. We now discuss how such approaches can be described mathematically, starting with the simple SIRD model.
Let us assume that a shutdown is started once the number of infected persons is larger than a threshold value I start , and stopped once it falls below a value I stop with  I I stop start¯. Mathematically, this corresponds to a nonideal relay operator (also called 'rectangular hysteresis loop' or 'lazy switch'), which was incorporated into the SIR model by Chladná et al [11]. Here, we extend the model from [11] by also taking into account the fact that the infection rate will not jump immediately when a threshold is crossed, since a society requires some time to implement restrictions. Thus, we assume that the effective transmission rate c eff converges exponentially [21] to a value c 1 or c 0 in the presence or absence of interventions, respectively. These considerations lead to the dynamical equation Here, α is a constant parameter, and the form of equation (7) ensures a convergence to c 0 or c 1 , depending on the infection numbers and the history of the system. Usually, the initial condition will be c eff (0) = c 0 , since social distancing measures are not present at the beginning of an outbreak. As discussed in section B, realistic parameter choices for the outbreak in Germany (which we use for our simulations) are given by α = 0.206/d, c 0 = 0.479/d, and c 1 = 0.105/d. We drop the subscript n for the quantities c eff , I start , and I stop to improve readability (all numerical values for c eff are normalized, and all values for I start and I stop are specified in %). In Germany, decisions about imposing or removing social restrictions are typically made based on the number of new infections per week per 100 000 inhabitants (7-day incidence) [31] rather than on the total number of active cases. However, since the number of new infections per unit time is proportional the total number for exponential growth (which is typical for pandemics), our model can be applied also in this case.
The political decision that has to be made then is the choice of I start and I stop , i.e., what the infection numbers should be in order for a shutdown to be started and stopped, respectively. To investigate this problem, we have solved equations (1)-(3) and (7) numerically with parameter values w=0.125/d and m=0.0007/d for different values of I start and I stop in order to obtain the phase diagrams. 3 Details on the simulations can be found in 3 si and the transmission rate c is shown. Three phases (uncontained, contained, and no outbreak) are found. A reduction of contact restrictions (smaller |C sd |) can be compensated for by face masks/hygiene measures (smaller c). The green line indicates the recovery rate w. 3 Note that the values of I start (4%-8%) and I stop (1%-3.5%) in the phase diagrams are rather large to ensure that the behavior is more clearly visible. We have verified that different phases also exist for smaller threshold values. section C. We adapted the values of w and m to the current COVID-19 pandemic (see section B). As an initial condition, we have used the number of confirmed infections in Germany at 10 March 2020 (reported in [32] to be 1296) 4 normalized by the population of Germany. The results are shown in figure 2, visualizing (A) the normalized maximal number of infected persons I max,n , (B) the normalized number of susceptibles ¥ S ,n at the end of the pandemic (i.e., the number of persons that have never been infected), and (C) the normalized total number of deaths ¥ D ,n . As can be seen from figure 2(A), the maximal peak I max,n depends only on I start . Hence, for avoiding a large number of infected persons at the same time and thus a collapse of the healthcare system, it is speaking, one has to use the number of active cases (which was not reported by the Robert Koch Institute for this date) as an initial condition. Since the total number of reported infections on 4 March 2020 was just 262 [33] and most of the 1296 infections therefore had occurred later, it is a good approximation to assume that the total number of infections was equal to the number of active cases at 10 March 2020. The error made by this approximation is likely to be overcompensated by undocumented infections (in fact, [34] estimates the number of active cases on 10 March 2020 to be 1545). primarily important to start the shutdown sufficiently early. The point at which it is lifted again is less relevant. This observation is in agreement with results from [5].
A different and much more complex result is found when considering the final number of susceptibles ¥ S ,n and the total number of deaths ¥ D ,n . Here, various distinct phases can be observed, which have a staircase-shaped boundary that depends on both I start and I stop . We have performed additional simulations with a resolution increased by a factor 200 in the vicinity of the 'stairs', which leads to a reduction of their size. This suggests that the rough shape of the phase boundaries is an artefact of the discretization, i.e., that they would become straight lines if the simulations had been performed with an infinite resolution. However, this does not affect the validity of our qualitative results. As can be expected, large values of ¥ S ,n correspond to small values of ¥ D ,n and vice versa (if fewer people are infected, fewer people die). For large values of I start (i.e., in the phase on the right), the number of deaths is large. However, within each phase, the number of deaths increases upon reducing I start at fixed I stop . This is a remarkable and surprising result, since one would intuitively expect a smaller shutdown threshold to be beneficial. When reducing I stop at fixed I start within a phase, the number of deaths becomes smaller, although it jumps to a larger value if a phase boundary is crossed from above.
An explanation for the complexity of the phase diagrams can be found in figures 2(D), 2(E), and 2(F), which show the number of waves 5 of the pandemic N waves , the number of shutdowns N shut , and the total shutdown time t shut as a function of I start and I stop . The difference between the various phases in figures 2(B) and 2(C) is the number of shutdowns N shut . Increasing I stop at fixed I start leads to a larger number of waves and shutdowns and a reduced total shutdown time (in agreement with [3], where I start and I stop were not distinguished). However, increasing I start at fixed I stop reduces N waves and N shut .
Finally, a very interesting observation is that the phase boundaries for N waves and N shut are not at the same positions. While a larger number of shutdowns generally corresponds to a larger number of waves, reducing I start below the critical value for n shutdowns (with Î  n ) does not immediately lead to n + 1 waves because the critical value of I start for n + 1 waves is slightly smaller. Since it is, as far as the number of deaths is concerned, beneficial to be slightly below the critical value of I start separating regions with n and n − 1 shutdowns, choosing I start in such a way that the wave n + 1 is avoided needs careful adjustment. This requires, of course, that one is aware of the difference between the phase boundaries for N waves and N shut , which makes our results highly relevant for political decisions on shutdown thresholds.
In  · . Our results have important consequences for political decisions on intervention strategies. Of course, the best strategy for keeping both I max,n and ¥ D ,n small is to start the shutdown early and stop it late (bottom left corner of the phase diagram). However, this is not always possible due to the social and economical costs associated with a shutdown (as can be seen in figure 2(F), the total shutdown time t shut is very long in this case). In practice, a political decision has to be made regarding the question when to start and end a shutdown given limited resources.
When making a political decision on when to start and end shutdown (choosing I start and I stop ), one needs to take into account the existence of the various phases shown in figure 2. A small variation of the threshold values can lead to a different phase, which changes the number of outbreaks and shutdowns and thus significantly affects the total number of deaths. The optimal strategy depends on what one is aiming for: • If the main goal is to keep I max,n small to avoid a collapse of the healthcare system, one should start the shutdown early (small I start ).
• As far as ¥ D ,n is concerned, it is beneficial to choose I start and I stop close to a phase boundary in such a way that a slight increase of I start or decrease of I stop would reduce the number of shutdowns by one.
• The choice of I stop also corresponds to a trade-off between ¥ D ,n and t shut . Increasing it within a phase at constant I start leads to a larger number of deaths and a shorter shutdown time.
• Remarkably, strategies with multiple shutdowns can have advantages over strategies with a single shutdown.
While in many cases more shutdowns correspond to more waves, an additional wave can be avoided after a further shutdown if the threshold values are chosen close to a phase boundary.
In practice, however, there is a further difficulty: Since not every infected person is found, there can in practice be a substantial number of undocumented infections [35,36]. This is problematic since, if we wish to start the shutdown at a certain threshold I start , we need to know when this value is reached. In particular, if we trigger a shutdown based on the known number of infections, we are effectively using higher values of I start and I stop than we think. Therefore, if we try to choose these values close to a phase boundary as discussed above, we might actually cross this boundary without noticing, making the outcome significantly worse. This can make it difficult to exploit our results-such as the fact that one should try to be close to a phase boundary or that increasing I start at fixed I stop can reduce the number of deaths-in practice.
This problem can be dealt with in four ways (that can also be combined): • The first and most obvious solution is to improve testing of symptomatic and asymptomatic individuals in order to improve the knowledge of the actual number of infections.
• Second, suppose that we can estimate the fraction of actually infected persons that we have found. The number of infected persons I test that have been tested is related to the actual number I¯by g = I I test¯w ith an underreporting factor γ ä [0, 1]. If we have an estimate for γ and aim for a threshold I start , we should start the shutdown once there are gI start known active infections.
• Third, one should take into account also the uncertainty of the underreporting factor γ. Suppose that we have found it to be γ 0 with a measurement error Δγ. Moreover, assume that we wish to minimize the number of deaths ¥ D . From figure 2(C), one can infer that increasing I start is beneficial as long as no phase boundary is crossed. Otherwise, increasing I start is a significant disadvantage. If we want to be sure that we are not making things significantly worse, we should start the shutdown at g g -D I 0 start ( )¯if I start is the threshold we actually aim for.
• Finally, modifications of the SIR model have been developed which incorporate the fact that only a fraction of the infections are detected [36]. By combining such a model with the approach proposed here, one can develop more realistic guidelines.
In general, strategies that require knowing the actual number of infected persons to a high precision can be applied in practice only in combination with a high testing rate. This affects, in particular, strategies that are based on trying to be close to a phase boundary. However, this does not affect all strategies. For example, the strategy of reducing I max by choosing a small I start to protect the healthcare system is less vulnerable to this 'measurement problem'. Finally, since our simulations have been based on data from the early stages of the coronavirus outbreak in Germany, it is interesting to compare our simulation results to the actual course of the pandemic there. In the simulations shown in figures 2(G)-2(J), the first wave of the pandemic is always the worst one in terms of shutdown duration and maximal number of infected persons. This was not the case in Germany, where the number of infections in the second wave was much larger and the duration of the second shutdown was much longer (see [34] for a plot of the actual evolution). The reason for this discrepancy is that our simulations assume that the values of the thresholds I start and I stop and the strictness of a shutdown are always the same. In Germany, however, the first shutdown was initiated on 22 March 2020 [6], where the number of active infections was = I 24513 according to [34]. The second shutdown was started in a 'light' form (closure of gastronomy and cultural activities) on 2 November 2020 [31] at = I 186652 active infections [34], followed by a more rigid shutdown starting on 16 December 2020 [31] at = I 358046 [34]. Consequently, the number of infections I start Germany was willing to accept before starting a shutdown has increased significantly during 2020. Based on our results, it is plausible to argue that the fact that the second wave was significantly worse than the first one in Germany is a consequence of the much larger value of I start for the second shutdown.

The 'second wave' in spatiotemporal dynamics
In practice, contact restrictions will typically be removed earlier than hygiene requirements such as face masks if infection numbers decrease. Consequently, more detailed insights can be gained using the SIR-DDFT model, in which effects of face masks and contact restrictions can (as shown in figure 1) be modeled separately. For this purpose, we introduce a dynamic equation for the interaction strength in the form where i = sd, si. The form of equation (8) has been chosen in analogy to equation (7). Changing the interaction strength according to equation (8) while keeping c constant models a scenario in which contact restrictions are imposed and removed depending on infection numbers while no change regarding measures such as face masks is made. Investigating the SIR-DDFT model with a dynamic interaction strength is of significant interest not only for disease spreading, but also for condensed matter physics, since it corresponds to a DDFT with a timedependent interaction potential. Theories of this form are yet to be investigated and can therefore be expected to exhibit a variety of novel and interesting effects.
To study the effects of dynamic interaction strengths, we have solved equations (4)- (6) and (  confirm the observations from the simpler model. However, they also add to it an important new aspect: A second wave can also occur if, after a shutdown, only contact restrictions are lifted while other measures are kept in place (constant c).
An effect of this type was observed in Germany: While face masks are still mandatory in public places (constant c), contact restrictions have been relaxed after the initial shutdown. In consequence, infection numbers have risen again [37]. The extended SIR-DDFT model allows for a detailed investigation of a variety of shutdown strategies by adapting the values of the model parameters. In figure 3, we have chosen c in such a way that it allows to recover the effective reproduction number measured in Germany in early March 2020 (corresponding to an infrequent use of face masks). The choice C sd,0 = C si,0 = −1 corresponds to the assumption that there is moderate social distancing in the no-shutdown phase that does not distinguish between healthy and infected persons (which can arise if infected persons cannot be easily identified as such, as it is the case for COVID-19 [4,35]). In the case of a shutdown, a strong increase of |C si | (large value of |C si,1 |) then reflects both an increased amount of testing (allowing for a specific isolation of infected persons) and stronger physical isolation. Other possible scenarios include a lower value of c (increased use of face masks), larger values of |C sd,0 | and |C si,0 | (stricter social distancing in the no-shutdown phase), and larger values of |C sd,1 | and |C si,1 | with smaller ratio C si,1 /C sd,1 (strict physical distancing in the shutdown phase without testing). Hence, the extended SIR-DDFT model is a flexible and useful tool for analyzing under which conditions and in which way a second wave will occur for a certain combination of measures. Using our freely available code [20], simulations can be easily performed for any policy the consequences of which one wishes to investigate.
Snapshots from the time evolution of the density I(x, y, t) of infected persons as a function of position = r x y , T ( )  are shown in figure 3(B) for = I 6% start and = I 7% start . The complete time evolutions are shown in the supplementary movies S1 and S2. Initially, the infected persons are concentrated in the middle of the domain and spread outwards radially (t = 5 d). Afterwards (at t = 35 d), a phase separation effect is observed where the infected persons arrange into separated spots. This pattern formation, which was discussed in [12], can be interpreted as infected persons self-isolating at their houses. A quantitative argument for this interpretation is given in section B. When the shutdown ends, the strength of the interactions is reduced such that phase separation is no longer present (t = 65 d). For = I 6% start (but not for = I 7% start ), phase separation is observed a second time at t = 95 d during a second shutdown. The second phase separation differs from the first one in that it emerges from a distribution that is already rather homogeneous and not from an accumulation of infected persons in the middle. Finally, at t = 125 d, there are almost no infected persons left in both simulations.
These findings are very interesting for public health policy, since they show that the first and second wave do not only differ by the initial values for S¯, I¯, and R-the only aspect that can be captured in the simpler modelbut also by their different spatial distributions. This can be seen when comparing the distributions at t = 5 d and t = 65 d, which represent the initial stages of the first and second wave, respectively. The first wave starts after a radial spread from the center, i.e., the infection is initially localized. Before the second wave, however, the disease has already spread over the entire area. This difference is also relevant for the current spread of COVID-19 in Germany: The first wave was a consequence of infected persons arriving by travel, and therefore started at isolated positions. In contrast, the second wave emerges from a more homogeneous spatial distribution [19]. From our model, this can be expected to be a common feature of second waves. Initially, a disease will always break out at single spots, which corresponds to an inhomogeneous initial condition I r, 0 ( )  . If contact restrictions (repulsive interactions) are lifted, the SIR-DDFT model describes a purely diffusive dynamics that typically leads to a homogeneous distribution. Therefore, the initial condition for the second wave is more homogeneous than for the first one. On the other hand, as can be seen from figure 3(A), the overall infection numbers are smaller for the second wave. The snapshot for t = 95 d in the bottom row of figure 3(B) shows that phase separation does not occur at the center, where the concentration of infected persons is lower at t = 65 d (initial stage of the second wave). Physically, this corresponds to a shutdown that is locally restricted as a consequence of infection numbers becoming large only in certain regions. This local restriction is not manifest on the level of the model equations, where C sd and C si are only functions of time (although one could extend the model by making them position-dependent), but only in the fact that the number of infected persons at the center of the domain is too small to create an infection spot.

Discussion
In summary, we have employed the SIR-DDFT model and an extended SIRD model with hysteresis to study the effects of different containment strategies. We have found that lifting contact restrictions can be partially compensated for by stricter hygiene measures. Investigating adaptive strategies showed that different combinations of thresholds lead to various phases. They differ by the number of waves and shutdowns and, consequently, by the number of deaths and the total shutdown time, making this effect immensely important for public health policy. Spatiotemporal simulations have revealed that a second wave can also arise if only contact restrictions are lifted, and that it tends to have a different spatial distribution than the first wave. By adapting parameter values, the model allows to study the effects of a large variety of containment strategies in any country. Possible extensions of this work include the investigation of further strategies, such as partial shutdowns or isolation of specific groups. Moreover, the SIR-DDFT model could be extended to include vaccination [38,39].
with transmission rate c, recovery rate w, and death rate m. The free energy F has three terms: First, the ideal gas free energy describes a system of noninteracting particles with the rescaled inverse temperature β, number of spatial dimensions d, and thermal de Broglie wavelength Λ. The parameter Λ is only required for dimensional reasons, its value is not relevant for the dynamics. In the case F = F id , equation (A1) simply gives the standard diffusion equation , The term F ext describes the influence of an external potential and is set to zero throughout this work. Finally, the excess free energy F exc describes interactions. It is not known exactly and needs to be approximated. In our case, the interactions are social interactions such as social distancing and self-isolation. The basic idea is that persons practicing social distancing can be described as repulsively interacting particles [42]. We assume that the repulsive interactions can be described by a soft (Gaussian) pair potential. The reason for this is that, even in the case of social distancing, there will still be a certain (although reduced) amount of contact. Hence, soft potentials are more appropriate than hard-core interactions. For interaction potentials as chosen here, the mean-field approximation ò ò is known to give good results [43]. Assuming that the excess free energy F exc contains a contribution for social distancing F sd and a contribution for self-isolation F si then gives Here, C sd and C si determine the strength and σ sd and σ si the range of the interactions. Inserting equations (A6), (A7) and (A10)-(A12) into equations (A3)-(A5) gives the final model equations [12] ò ¶ =  -

Appendix B. Choice of parameter values
The parameters for the simulations presented in the main text have been chosen in such a way that their order of magnitude is realistic for the current COVID-19 outbreak in Germany. We use days d as the unit of time and dimensionless units for all other quantities. For Germany, the effective reproduction number R eff , which in our model is given by is estimated by the Robert Koch Institute (RKI), the central public health institute of the German federal government, on a daily basis. If we assume » = S N 1 with the total population size N, we get Due to the normalization, a population size of 1 in the simulations shown in figure 2 corresponds to about 80 · 10 6 persons (approximate population of Germany) in reality. From equation (7) of the main text, we can infer that the approach of R eff (t) to its shutdown value will be governed by a function of the form with R eff,0 = (c 0 − c 1 )/w and R eff,1 = c 1 /w. As shown in figure B1, choosing R eff,0 = 2.99, R eff,1 = 0.838, and α = 0.206/d gives a good agreement with empirical data. Furthermore, we assume w=0.125/d, which is consistent with the mean infection duration of 8 days reported in [7]. From this, we can infer c 0 ≈ 0.479/d and c 1 ≈ 0.105/d. Moreover, we assume following [45] that the probability of dying from COVID-19 in the case of available intensive care is p d = 0.005625. This result is given by the probability of hospitalization (0.045) multiplied by the probability of requiring intensive care given hospitalization (0.25) multiplied by the probability of dying during intensive care (0.5), which results in p d = 0.045 × 0.25 × 0.5 = 0.005625. Given the probability p d of dying during time T, we can obtain the death rate m (which is needed for the SIRD model) as [46] = - Assuming that persons are infected for T = 8 d and die at a constant rate during this time (which, of course, is a strong simplification) gives m ≈ 0.0007/d. For the extended SIR-DDFT model, the same parameter values for w, m, and α can be used. The parameter c of the SIR-DDFT model is not identical to the parameter c eff of the SIR model, which is why we discuss here how the value of c can be obtained (which is important for practical applications of the SIR-DDFT model also to regions other than Germany). In the simplest case of a homogeneous distribution of the population, the relation between c and c eff is given by c = c eff A with the domain area A [12]. In this work, we use A = 100. If we set the total population size to N = 100 and assume » S N , equation (B1) gives Comparing equations (B2) and (B5) shows that the value used for c eff (0) can also be used for c under the approximation c eff (0) = c/A if the population size is set to A rather than to 1. In particular, using c ≈ 0.479/d in the spatiotemporal simulations allows to recover, in the limiting case of a completely homogeneous distribution, the value of R eff that corresponds to the values measured in Germany in early March 2020 (inserting c=0.479/d into equation (B5) gives R eff = 3.832, which is approximately equal to the result R eff (0) = 3.828 obtained from equation (B3)). Finally, given that we have measured lengths and areas in dimensionless units, it is an interesting question what length scale the systems we have simulated actually correspond to. This also allows us to see, e.g., whether it is consistent to interpret the spots of high infection concentration observed in figure 3 as infected households (rather than, e.g., cities with a high infection rate). For this purpose, we make use of the fact that the effective reproduction number R eff given by equation (B5) is a measurable quantity that does not depend on our scaling. Moreover, we assume that the dimensionless area A entering equation (B5) is given by = consider Münster, a city in Germany that has a settlement density 6 of n = 3136.6 persons/km 2 [48]

Appendix C. Numerical analysis
The simulations for figures 1 and 3 have been performed in two spatial dimensions on a quadratic domain [−L/ 2, L/2] × [−L/2, L/2] with size L = 10 and periodic boundary conditions. These boundary conditions allow to simulate an effectively infinitely large system and to avoid finite-size effects by surrounding the system with copies of itself [50]. A city in which a disease spreads is much larger than the domain of 0.04 km 2 considered here, and is (very roughly) periodic as it consists of houses and blocks. This makes periodic boundary conditions appropriate here. We have solved the equations (4)-(6) of the SIR-DDFT model using an explicit finitedifference scheme with spatial step size dx = 0.04 for figure 1 and dx = 0.01 for figure 3 and adaptive time steps. The differential equations (7) for the effective transmission rate c eff (t) and (8) for the interaction strengths C sd (t) and C si (t) depend on the shutdown state (see the distinction of cases in equations (7) and (8)). This state has been checked explicitly every 0.01d, while the differential equations themselves have also been solved with adaptive time-step size. As an initial condition, we have used a Gaussian distribution with amplitude ≈ 7.964 and variance L 2 /50 centered at (x, y) = (0, 0) for S(x, y, 0), I(x, y, 0) = 0.001S(x, y, 0), and R(x, y, 0) = 0, such that the mean overall density was 1. Regarding parameter values not specified in the main text, we have set D S = D I = D R = 0.01/d and σ sd = σ si = 100. The simulations for figure 2 were also performed using an explicit finite-difference scheme with adaptive time steps, while the shutdown state was updated every 0.01 d. As an initial condition, we used = -S I 0 1 0 ( )¯( ), = I 0 1296 80 10 6 ( ) ( · ) (number of confirmed infections in Germany at 10 March 2020 [32], normalized by the approximate population of Germany), , and c eff (0) = c 0 .