Dispersive Hydrodynamics of Soliton Condensates for the Korteweg–de Vries Equation

We consider large-scale dynamics of non-equilibrium dense soliton gas for the Korteweg–de Vries (KdV) equation in the special “condensate” limit. We prove that in this limit the integro-differential kinetic equation for the spectral density of states reduces to the N-phase KdV–Whitham modulation equations derived by Flaschka et al. (Commun Pure Appl Math 33(6):739–784, 1980) and Lax and Levermore (Commun Pure Appl Math 36(5):571–593, 1983). We consider Riemann problems for soliton condensates and construct explicit solutions of the kinetic equation describing generalized rarefaction and dispersive shock waves. We then present numerical results for “diluted” soliton condensates exhibiting rich incoherent behaviors associated with integrable turbulence.


Introduction
Solitons represent the fundamental localised solutions of integrable nonlinear dispersive equations such as the Korteweg-de Vries (KdV), nonlinear Schrödinger (NLS), sine-Gordon, Benjamin-Ono and other equations.Along with the remarkable localisation properties solitons exhibit particle-like elastic pairwise collisions accompanied by definite phase/position shifts.A comprehensive description of solitons and their interactions is achieved within the inverse scattering transform (IST) method framework, where each soliton is characterised by a certain spectral parameter related to the soliton's amplitude, and the phase related to its position (for the sake of definiteness we refer here to the properties of KdV solitons).Generally, integrable equations support N -soliton solutions which can be viewed as nonlinear superpositions of N solitons.Within the IST framework N -soliton solution is characterised by a finite set of spectral and phase parameters completely determined by the initial conditions for the integrable PDE.
The particle-like properties of solitons suggest some natural questions pertaining to the realm of statistical mechanics, e.g. one can consider a soliton gas as an infinite ensemble of interacting solitons characterised by random spectral (amplitude) and phase distributions.The key question is to understand the emergent macroscopic dynamics (i.e.hydrodynamics or kinetics) of soliton gas given the properties of the elementary, "microscopic" two-soliton interactions.It is clear that, due to the presence of an infinite number of conserved quantities and the lack of thermalisation in integrable systems the properties of soliton gases will be very different compared to the properties of classical gases whose particle interactions are non-elastic.Invoking the wave aspect of the soliton's dual identity, soliton gas can be viewed as a prominent example of integrable turbulence [1].The pertinent questions arising in this connection are related to the determination of the parameters of the random nonlinear wave field in the soliton gas such as probability density function, autocorrelation function, power spectrum etc.
The IST-based phenomenological construction of a rarefied, or diluted, gas of KdV solitons was proposed in 1971 by V. Zakharov [2] who has formulated an approximate spectral kinetic equation for such a gas based on the properties of soliton collisions: the conservation of the soliton spectrum (isospectrality) and the accumulation of phase shifts in pairwise collisions that results in the modification of an effective average soliton's velocity in the gas.Zakharov's spectral kinetic equation was generalised in [3] to the case of a dense gas using the finite gap theory and the thermodynamic, infinite-genus, limit of the KdV-Whitham modulation equations [4].The results of [3] were used in [5] for the formulation of a phenomenological construction of kinetic equations for dense soliton gases for integrable systems describing both unidirectional and bidirectional soliton propagation and including the focusing, defocusing and resonant NLS equations, as well as the Kaup-Boussinesq system for shallow-water waves [6].The detailed spectral theory of soliton and breather gases for the focusing NLS equation has been developed in [7].
The spectral kinetic equation for a dense soliton gas represents a nonlinear integrodifferential equation describing the evolution of the density of states (DOS)-the density function u(η; x, t) in the phase space (η, x) ∈ Γ + × R, where η ∈ Γ + ⊂ R + is the spectral parameter in the Lax pair associated with the nonlinear integrable PDE, u t + (us) x = 0, s(η, x, t) = s 0 (η) + Γ + G(η, µ)u(µ, x, t)[s(η, x, t) − s(µ, x, t)]dµ .(1.1)Here s 0 (η) is the velocity of a "free" soliton, and the integral term in the second equation represents the effective modification of the soliton velocity in the gas due to pairwise soliton collisions that are accompanied by the phase-shifts described by the kernel G(η, µ).Both s 0 (η) and G(η, µ) are system specific.In particular, for KdV s 0 = 4η 2 and G(η, µ) = 1 η ln µ+η µ−η .The spectral support Γ + of the DOS is determined by initial conditions.We note that, while Γ + ⊂ R + for the KdV equation, one can have Γ + ⊂ C + for other equatons, e.g. the focusing NLS equation, see [7] .Equation (1.1) describes the DOS evolution in a dense soliton gas and represents a broad generalisation of Zakharov's kinetic equation for rarefied gas [2].The existence, uniqueness and properties of solutions to the "equation of state" (the integral equation in (1.1) for fixed x, t) for the focusing NLS and KdV equations were studied in [8].
The original spectral theory of the KdV soliton gas [3] has been developed under the assumption that the spectral support Γ + of the DOS is a fixed, simply-connected interval of R + ; without loss of generality one can assume Γ + = [0, 1].In [7], [8] this restriction has been removed by allowing the spectral support Γ + to be a union of N +1 disjoint intervals γ j = [λ 2j−1 , λ 2j ], termed here s-bands: Γ + = ∪ N j=0 γ j , (γ i ∩ γ j = ∅, i = j).In this paper we introduce a further generalization of the existing theory by allowing the endpoints λ i of the s-bands be functions of x, t.We show that this generalization has profound implications for soliton gas dynamics, in particular, the kinetic equation implies certain nonlinear evolution of the endpoints λ j (x, t) of the s-bands.We determine this evolution for a special type of soliton gases, termed in [7] soliton condensates.Soliton condensate represents the "densest possible" gas whose DOS is uniquely defined by a given spectral support Γ + .The number N of disjoint s-bands in Γ + determines the genus g = N − 1 of the soliton condensate.We show that the evolution of λ j 's in a soliton condensate is governed by the g-phase averaged KdV-Whitham modulation equations [4], also derived in the context of the semi-classical, zero-dispersion limit of the KdV equation [9].
We then consider the soliton condensate dynamics arising in the Riemann problem initiated by a rapid jump in the DOS.Our results suggest that in the condensate limit the KdV dynamics of soliton gas is almost everywhere equivalent to the (deterministic) generalised rarefaction waves (RWs) and generalized dispersive shock waves (DSWs) of the KdV equation.We prove this statement for the genus zero case and present a strong numerical evidence for genus one.Our results also suggest direct connection of the "deter-ministic KdV soliton gases" constructed in the recent paper [10] with modulated soliton condensates.
Our work puts classical results of integrable dispersive hydrodynamics (Flaschka-Forest-McLaughlin [4], Lax-Levermore [9], Gurevich-Pitaevskii [11]) in a broader context of the soliton gas theory.Namely, we show that the KdV-Whitham modulation equations describe the emergent hydrodynamic motion of a special soliton gas-a condensateresulting from the accumulated effect of "microscopic" two-soliton interactions.This new interpretation of the Whitham equations is particularly pertinent in the context of generalized hydrodynamics, the emergent hydrodynamics of quantum and classical many-body systems [52].The direct connection between the kinetic theory of KdV soliton gas and generalized hydrodynamics was established recently in [53] (see also [54] where the Whitham equations for the defocusing NLS equation were shown to arise in the semi-classical limit of the generalised hydrodynamics of the quantum Lieb-Liniger model).
Our work also paves the way to a major extension of the existing dispersive hydrodynamic theory by including the random aspect of soliton gases.To this end we consider "diluted" soliton condensates whose DOS has the same spectral distribution as in genuine condensates but allows for a wider spacing between solitons giving rise to rich incoherent dynamics associated with "integrable turbulence" [1].In particular, we show numerically that evolution of initial discontinuities in diluted soliton condensates results in the development of incoherent oscillating rarefaction and dispersive shock waves.
An important aspect of our work is the numerical modelling of soliton condensates using n-soliton KdV solutions with large n configured according to the condensate density of states.The challenges of the numerical implementation of standard n-soliton formulae for sufficiently large n due to rapid accumulation of roundoff errors are known very well.Here we use the efficient algorithm developed in [45], which relies on the Darboux transformation.We improve this algorithm following the recent methodology developed in [46] for the focusing NLS equation with the implementation of high precision arithmetic routine.Our numerical simulations show excellent agreement with analytical predictions for the solutions of soliton condensate Riemann problems and provide a strong support to the basic conjecture about the connection of KdV soliton condensates with finite-gap potentials.
It should be noted that soliton condensates have been recently studied for the focusing NLS equation, where they represent incoherent wave fields exhibiting distinct statistical properties.In particular, it was shown in [55] that the so-called bound state soliton condensate dynamics underies the long-term behavior of spontaneous modulational instability, the fundamental physical phenomenon that gives rise to the statistically stationary integrable turbulence [56,57].
The paper is organised as follows.In Section 2 we present a brief outline of the spectral theory of soliton gas for the KdV equation and introduce the notion of soliton condensate for the simplest genus zero case.In Section 3, following [8], we generalize the spectral definition of soliton condensate to an arbitrary genus case and prove the main Theorem 3.2 connecting spectral dynamics of non-uniform soliton condensates with multiphase Whitham modulation theory [4] describing slow deformations of the spectrum of periodic and quasiperiodic KdV solutions.Section 3 is concerned with properties of KdV solutions corresponding to the condensate spectral DOS, i.e. the soliton condensate realizations.We formulate Conjecture 4.1 that any realization of an equilibrium soliton condensate almost surely coincides with a finite-gap potential defined on the condensate's hyperelliptic spectral curve.This proposition is proved for genus zero condensates and a strong numerical evidence is provided for genus one and two.In Section 5 we construct solutions to Riemann problems for the soliton gas kinetic equation subject to discontinu-ous condensate initial data.These solutions describe evolution of generalized rarefaction and dispersive shock waves.In Section 6 we present numerical simulations of the Riemann problem for the KdV soliton condensates and compare them with analytical solutions from Section 5. Finally, in Section 7 we consider basic properties of "diluted" condensates having a scaled condensate DOS and exhibiting rich incoherent behaviors.In particular, we present numerical solutions to Riemann problems for such diluted condensates.Appendix A contains details of the numerical implementation of dense soliton gases.In Appendix B we present results of the numerical realization of the genus 2 soliton condensate and its comparison with two-phase solution of the KdV equation.

Spectral theory of KdV soliton gas: summary of results
Here we present an outline of the spectral theory of KdV soliton gas developed in [3,12].We consider the KdV equation in the form The inverse scattering theory associates soliton of the KdV equation (2.1) with a point z = z 1 = −η 2 1 , η 1 > 0 of the discrete spectrum of the Lax operator with sufficiently rapidly decaying potential ϕ(x, t): ϕ(x, t) → 0 as |x| → ∞.The corresponding KdV soliton solution is given by where the soliton amplitude a 1 = 2η 2 1 , the speed s 1 = 4η 2 1 , and x 0 1 is the initial position or 'phase'.Along with the simplest single-soliton solution (2.3) the KdV equation supports N -soliton solutions ϕ n (x, t) characterized by n discrete spectral parameters 0 < η 1 < η 2 < • • • < η n and the set of initial positions {x 0 i |i = 1, . . ., n} associated with the phases of the so-called norming constants [13].It is also known that n-soliton solutions can be realized as special limits of more general n-gap solutions, whose Lax spectrum S n consists of N finite and one semi-infinite bands separated by n gaps [13], (2.4) The n-gap solution of the KdV equation (2.1) represents a multiphase quasiperiodic function where k j and ω j are the wavenumber and frequency associated with the j-th phase θ j , and θ 0 j are the initial phases.Details on the explicit representation of the solution (2.5) in terms of Riemann theta-functions can be found in classical papers and monographs on finite-gap theory, see [59] and references therein.
The n-phase (n-gap) KdV solution (2.5) is parametrized by 2n+1 spectral parametersthe endpoints {ζ j } 2n+1 j=1 of the spectral bands.The nonlinear dispersion relations (NDRs) for finite gap potentials can be represented in the general form, see [4] for the concrete expressions, -and connect the wavenumber-frequency set {k j , ω j } n j=1 of (2.5) with the spectral set S n (2.4).These are complemented by the relation ϕ = Φ(ζ 1 , . . ., ζ 2n+1 ), where ϕ = F n dθ 1 . . .dθ n is the mean obtained by averaging of F n over the phase n-torus ), assuming respective non-commensurability of k j 's and ω j 's and, consequently, ergodicity of the KdV flow on the torus.
The n-soliton limit of an n-gap solution is achieved by collapsing all the finite bands [ζ 2j−1 , ζ 2j ] into double points corresponding to the soliton discrete spectral values, It was proposed in [3] that the special infinite-soliton limit of the spectral n-gap KdV solutions, termed the thermodynamic limit, provides spectral description the KdV soliton gas.The thermodynamic limit is achieved by assuming a special band-gap distribution (scaling) of the spectral set S n for n → ∞ on a fixed interval [ζ 1 , ζ 2n+1 ] (e.g.[−1, 0]).Specifically, we set the spectral bands to be exponentially narrow compared to the gaps so that S n is asymptotically characterized by two continuous nonnegative functions on some fixed interval Γ + ⊂ R + : the density φ(η) of the lattice points η j ∈ Γ + defining the band centers via −η 2 j = (ζ 2j + ζ 2j−1 )/2, and the logarithmic bandwidth distribution τ (η) defined for n → ∞ by The scaling (2.8) was originally introduced by Venakides [14] in the context of the continuum limit of theta functions.
Complementing the spectral distributions (2.8) with the uniform distribution of the initial phase vector θ 0 on the torus T n we say that the resulting random finite gap solution ϕ(x, t) approximates soliton gas as n → ∞.An important consequence of this definition of soliton gas is ergodicity, implying that spatial averages of the KdV field in a soliton gas are equivalent to the ensemble averages, i.e. the averages over T n in the thermodynamic limit n → ∞.We shall use the notation F [ϕ] for ensemble averages and F [ϕ] for spatial averages.
From now on we shall refer to η as the spectral parameter and Γ + -the spectral support.The density of states (DOS) u(η) of a spatially homogeneous (equilibrium) soliton gas is phenomenologically introduced in such a way that u(η 0 )dηdx gives the number of solitons with the spectral parameter η ∈ [η 0 ; η 0 + dη] contained in the portion of soliton gas over a macroscopic (i.e. containing sufficiently many solitons) spatial interval x ∈ [x 0 , x 0 + dx] ⊂ R for any x 0 (the individual solitons can be counted by cutting out the relevant portion of the gas and letting them separate with time).The corresponding spectral flux density v(η) represents the temporal counterpart of the DOS i.e. v(η 0 )dη is the number of solitons with the spectral parameter η ∈ [η 0 ; η 0 + dη] crossing any given point x = x 0 per unit interval of time.These definitions are physically suggestive in the context of rarefied soliton gas where solitons are identifiable as individual localized wave structures.The general mathematical definitions of u(η) and v(η) applicable to dense soliton gases are introduced by applying the thermodynamic limit to the finite-gap NDRs (2.6), leading to the integral equations [3,12]: for all η ∈ Γ + .Here the spectral scaling function σ : Γ + → [0, ∞) is a continuous nonnegative function that encodes the Lax spectrum of soliton gas via σ(η) = φ(η)/τ (η).Equations (2.9), (2.10) represent the soliton gas NDRs.Eliminating σ(η) from the NDRs (2.9), (2.10) yields the equation of state for KdV soliton gas: where s(η) = v(η)/u(η) can be interpreted as the velocity of a tracer soliton in the gas.It was shown in [3] that for a weakly non-uniform (non-equilibrium) soliton gas, for which u(η) ≡ u(η; x, t), s(η) ≡ s(η; x, t), the DOS satisfies the continuity equation so that s(η; x, t) acquires the natural meaning of the transport velocity in the soliton gas.Equations (2.12), (2.11) form the spectral kinetic equation for soliton gas.One should note that the typical scales of spatio-temporal variations in the kinetic equation (2.12) are much larger than in the KdV equation (2.1), i.e. the kinetic equation describes macroscopic evolution, or hydrodynamics, of soliton gases.Let the spectral support Γ + be fixed.Then, differentiating equation (2.9) with respect to t, equation (2.10) with respect to x, and using the continuity equation (2.12) we obtain the evolution equation for the spectral scaling function which shows that σ(η; x, t) plays the role of the Riemann invariant for the spectral kinetic equation.
Finally, the ensemble averages of the conserved densities of the KdV wave field in the soliton gas (the Kruskal integrals) are evaluated in terms of the DOS as P n [ϕ] = C n Γ + η 2n−1 u(η)dη, where P n [ϕ] are conserved quantities of the KdV equation and C n constants [3,12] (see also [15] for rigorous derivation in the NLS context).In particular, for the two first moments we have, on dropping the x, t-dependence [3,12], We note that in the original works on KdV soliton gas it was assumed (explicitly or implicitly) that the spectral support Γ + of the KdV soliton gas is a fixed, simply connected interval (without loss of generality one can assume that in this case Γ + = [0, 1]).In what follows we will be considering a more general configuration where Γ + represents a union of N + 1 disjoint intervals.A special kind of soliton gas, termed soliton condensate, is realized spectrally by letting σ → 0 in the NDRs (2.9), (2.10).This limit was first considered in [7] for the soliton gas in the focusing NLS equation and then in [8] for KdV.Loosely speaking, soliton condensate can be viewed as the "densest possible" gas (for a given spectral support Γ + ) whose properties are fully determined by the interaction (integral) terms in the NDRs (2.9), (2.10).
For the KdV equation, setting σ = 0 and, considering the simplest case Γ + = [0, 1] in (2.9), (2.10), we obtain the soliton condensate NDRs [12]: These are solved by is that all the tracer solitons with the spectral parameter η > η 0 move to the right, whereas all the tracer solitons with η < η 0 move in the opposite direction while the tracer soliton with η = η 0 is stationary.The somewhat counter-intuitive "backflow" phenomenon (we remind that KdV solitons considered in isolation move to the right) has been observed in the numerical simulations of the KdV soliton gas [16] and can be readily understood from the phase shift formula of two interacting solitons, where the the larger soliton gets a kick forward upon the interaction while the smaller soliton is pushed back.As a matter of fact, the KdV soliton backflow is general and can be observed for a broad range of sufficiently dense gases (see Fig. 16 in Section 7.1 for the numerical illustration).

Soliton condensates and their modulations
We now consider the general case of the soliton gas NDRs (2.9), (2.10) by letting the support Γ + ⊂ R + of u(η), v(η) to be a union of disjoint intervals γ k ⊂ R + with endpoints λ j > 0, j = 1, 2, . . ., 2N + 1, where γ 0 = [0, λ 1 ] and We shall call the intervals γ k the s-bands, and the soliton gas spectrally supported on Γ + (3.1)-the genus N soliton gas.Correspondingly, we refer to the intervals c j = (λ 2j−1 , λ 2j ) separating the s-bands as to s-gaps.Note that the s-bands and s-gaps are different from the original bands and gaps in the spectrum S n of finite-gap potential (cf.(2.4)) as they emerge after the passage to the thermodynamic limit: loosely speaking, one can view the s-bands as a continuum limit of the "thermodynamic band clusters", each representing an isolated dense subset of S ∞ consisting of the collapsing original bands.
The existence and uniqueness of solutions u(η), v(η) for (2.9), (2.10) respectively, as well as the fact that u(η) ≥ 0 on Γ + with some mild constraints, was established in [8].Our goal here is to find explicit expressions for u, v for the genus N soliton condensate, that is, solutions of (2.9), (2.10) for the particular case σ ≡ 0 on Γ + .Denote by Γ − the symmetric image of Γ + with respect to the origin, i.e., Γ − = −Γ + .If we take the odd continuation of u, v to Γ − (preserving the same notations), we observe that equations (2.9), (2.10) become where Γ := Γ + ∪ Γ − , for all η ∈ Γ + .In fact, if we symmetrically extend σ(η) from Γ + to Γ, equations (3.2), (3.3) should be valid on Γ since every term in these equations is odd.The expressions (2.14) for the first two moments (ensemble averages) of the KdV wave field in the soliton gas become We now consider soliton condensate of genus N by setting σ ≡ 0 in (3.2), (3.3).Then, differentiating in η we obtain where H denotes the Finite Hilbert Transform (FHT) on Γ, see for example [17], [18], where and P, Q are odd monic polynomials of degree 2N + 1 and 2N + 3 respectively that are chosen so that all their s-gap integrals are zero, i.e.
Remark 3.1.The normalization (3.9) requires that both polynomials P, Q have zeros in every of the 2N gaps on [−λ 2N +1 , λ 2N +1 ].Note also that P (0) = Q(0) = 0.That takes care of all the zeros of P .The polynomial Q has two additional symmetric real zeros ±η 0 that must be located on some band γ k and its symmetrical image γ −k , see below.In the case N = 0 such zeros are η 0 = ± 1 √ 2 , see (2.16).Let us prove that η 0 belongs to a band.It is easy to see that the zero level curves η 0 dp = 0 consist of all bands and the imaginary axis, whereas the zero level curves η 0 dq = 0 consist of that of η 0 dp = 0 with an extra two curves crossing R at ±η 0 and approaching z = ∞ with angles ± π 6 and ± 5π 6 respectively.Note that there must be four zero level curves passing through ±η 0 and, therefore, they must be on the bands.
Thus, for the soliton condensate of genus N , we obtain, on using Theorem 3.1 and Equation (3.7), (3.10)The velocity of a tracer soliton with the spectral parameter η ∈ Γ + propagating in the (2) ( soliton condensate with DOS u(η) is then found as As an illustrative example we present in Fig. 1 the plots of the DOS and tracer velocity for the genus 2 soliton condensate.We now consider slow modulations of non-equilibrium (non-uniform) soliton condensates by assuming u ≡ u(η; x, t), v ≡ v(η; x, t), Γ ≡ Γ(x, t).Equations (2.12), (3.10) then yield the kinetic equation for genus N soliton condensate: that is valid for η ∈ Γ = ∪ N k=−N (γ k ).The velocity (3.11) then assumes the meaning of the tracer, or transport, velocity in a non-uniform genus N soliton condensate.
Corollary 3.1.The endpoints of the "special" band γ k = [λ 2k , λ 2k+1 ], k = 0, containing the point η 0 of zero tracer speed, s(η 0 ) = 0, are moving in opposite directions, whereas all the endpoints on the same side from η 0 are moving in the same direction.See Fig. 1 (right) for N = 2 Remark 3.2.Modulation equations (3.12), (3.13) were originally derived by Flaschka, Forest and McLaughlin [4] by averaging the KdV equation over the multiphase (finitegap) family of solutions.These equations along with the condensate NDRs (3.5), also appear in the seminal work of Lax and Levermore [9] in the context of the semiclassical (zero-dispersion) limit of multi-soliton KdV ensembles (see Section 5 and, in particular, Equation (5.23) in [9]).A succinct exposition of the spectral Whitham theory for the KdV equation can be found in Dubrovin and Novikov [19]).
Remark 3.3.The Whitham modulation equations (3.13), (3.14) are locally integrable for any N via Tsarev's generalized hodograph transform [20,19].Moreover, by allowing the genus N to take different values in different regions of x, t-plane, N = N (x, t), global solutions of the KdV-Whitham system can be constructed for a broad class of initial data (see Section 4.2 for further details).Invoking the definitive property σ ≡ 0 of a soliton condensate, the existence of the solution to an initial value problem for the Whitham system for all t > 0 implies that this property will remain invariant under the t-evolution, i.e. soliton condensate will remain a condensate during the evolution, however its genus can change.
The finite-genus Whitham modulation system (3.13),(3.14) can be viewed as an exact hydrodynamic reduction of the full kinetic equation (2.12), (2.11) under the ansatz (3.10), (3.11).Recalling the origin of the soliton gas kinetic equation as a singular, thermodynamic limit of the Whitham equations [3] the recovery of the finite-genus Whitham dynamics in the condensate limit might not look surprising.On the other hand, viewed from the general soliton gas perspective the condensate reduction notably shows that the highly nontrivial nonlinear modulation (hydro)dynamics emerges as a collective effect of the elementary two-soliton scattering events.This understanding is in line with ideas of generalised hydrodynamics, a powerful theoretical framework for the description of non-equilibrium macroscopic dynamics in many-body quantum and classical integrable systems [21].The connection of the KdV soliton gas theory with generalised hydrodynamics has been recently established in [22].Relevant to the above, it was shown in [23] that the semiclassical limit of the generalised hydrodynamics for the Lieb-Liniger model of Bose gases yields the Whitham modulation system for the defocusing NLS equation.
A different type of hydrodynamic reductions of the soliton gas kinetic equation defined by the multi-component delta-function ansatz u(η, x, t) = m i=1 w i (x, t)δ(η − η j ) for the DOS has been studied in [24] for η j = const and in [25,26] for η j = η j (x, t).One of the definitive properties of the multicomponent hydrodynamic reductions of this type is their linear degeneracy which, in particular, implies the absence of the wavebreaking and the occurrence of contact discontinuities in the solutions of Riemann problems [27].In contrast, the condensate (Whitham) system (3.13),(3.14) obtained under the condition σ ≡ 0 is known to be genuinely nonlinear, ∂V j /∂λ j = 0, j = 1, . . .2N + 1 [28] implying the inevitability of wavebreaking for general initial data, which is in stark contrast with linear degeneracy of the multicomponent "cold-gas" hydrodynamic reductions.Reconciling the genuine nonlinearity property of soliton condensates with linearly degenerate non-condensate multicomponent cold-gas dynamics is an interesting problem which will be considered in future publications.Thus, we have shown that the spectral dynamics of soliton condensates are equivalent to those of finite gap potentials, which naturally suggests a close connection (or even equivalence) of these two objects at the level of realizations, i.e. the corresponding solutions ϕ(x, t) of the KdV equation.This connection will be explored in the next section using a combination of analytical results and numerical simulations for genus 0 and genus 1 soliton condensates.

Genus 0 and genus 1 soliton condensates
Having developed the spectral description of KdV soliton condensates, we now look closer at the two simplest representatives: genus 0 and genus 1 condensates.In particular, we shall be interested in the characterization of the realizations of soliton condensates, i.e. the KdV solutions, denoted ϕ (N ) c (x, t), corresponding to the condensate spectral DOS u (N ) (η) for N = 0, 1.We do not attempt here to construct the soliton gas realizations explicitly via the thermodynamic limit of finite gap potentials (see Section 2), instead, we infer some of their key properties from the expressions (3.4) for the ensemble averages as integrals over the spectral DOS.We then conjecture the exact form of soliton condensate realizations and support our conjecture by detailed numerical simulations.
(note that constant solution is classified as a genus 0 KdV potential).
This result can be intuitively understood by identifying soliton condensate with the "densest possible" soliton gas for a given spectral support Γ.The densest "packing" for genus 0 is achieved by distributing soliton parameters according to the spectral DOS u(η) (4.1) which results in the individual solitons "merging" into a uniform KdV field of amplitude λ 2 1 .The numerical implementation of soliton condensate realizations, using nsoliton KdV solution with n large, shows that the condensate DOS (4.1) is only achievable within this framework if all n solitons in the solution have the same phase of the respective norming constants.Invoking the interpretation of the phase of the norming constant as the soliton position in space [13,30] one can say that in the condensate all solitons are placed at the same point, say x = 0 (cf.Appendix A for a mathematical justification).Details of the numerical implementation of KdV soliton gas using n-soliton solutions can be found in Appendix A. Fig. 2 displays the realization ϕ (0) c (x) of genus 0 soliton condensate with λ 1 = 1 modeled by n-soliton solutions ϕ n (x) with n = 100 and n = 200, along with the absolute errors ϕ n (x) − 1; in the following we refer to these n-soliton solutions as "numerical realizations" of the soliton gas.One can see that the error at the center of the numerical domain, where the gas is nearly uniform, is very small: Fig. 3 displays the variation of this error with n and shows that it decreases with 1/n 2 .The numerical  approximation used here is similar to the approximation of the soliton condensate of the focusing NLS equation via a n-soliton solution presented in [50].In the latter case the uniform wavefield limit as a central part of the so-called "box potential", is also reached when the complex phases of the norming constants are chosen deterministically.The absolute error-the difference between the n-soliton solution and the expected constant value of the wavefield-measured at the center of the numerical realization-follows a different scaling law and is proportional to n −1/2 .

Genus 1
We now consider the case of genus 1 soliton condensate.For N = 1 where follows from the fact that −iRes The normalization conditions (3.9) imply that Using 3.131.3and 3.132.2from [31], we calculate Calculation of r 2 is a bit more involved as it is based on the observation ) . (4.10) Using (4.8), (4.10), we obtain after some algebra Thus, the velocity of a tracer soliton with spectral parameter η ∈ Γ + in the genus 1 soliton condensate, characterized by DOS (4.6), is given by . (4.12) We note that a similar expression for the tracer velocity in a dense soliton gas was obtained in [32] in the context of the modified KdV (mKdV) equation.
For N = 1 the integrals (3.4) for the mean and mean square of the soliton condensate wave field ϕ ≡ ϕ (1) c (x, t) can be explicitly evaluated using (253.11)and (256.11)from [33] and 19.7.10 from [49]: with µ(m) and m given by (4.9).It is not difficult to verify that, unlike in the case of genus 0 condensates, the variance ∆ = ϕ 2 − ϕ 2 does not vanish identically implying that all realizations of the genus 1 soliton condensate are almost surely non-constant.
A key observation is, that formulae (4.13), (4.14) coincide with the period averages ϕ and ϕ 2 of the genus 1 KdV solution associated with the spectral Riemann surface R 2 of (4.5) (see e.g.[34,35]): where θ 0 ∈ [0, 2π) is an arbitrary initial phase.The equivalence between the ensemble c (x, t) of the genus 1 KdV soliton condensate associated with the spectral curve R 2 of (4.5) one can find the initial phase θ 0 ∈ [0, 2π) in the periodic solution F 1 (θ; λ 1 , λ 2 , λ 3 ) (4.15) such that almost surely ϕ We support Conjecture 4.1 by a detailed comparison of a numerical realization of KdV soliton condensate (as n-soliton solution with n large) spectrally configured according to the DOS (4.6), and the periodic KdV solution (4.15), defined on the same spectral curve R 2 , with the appropriately chosen initial phase θ 0 (see Appendix A for the details of the numerical implementation of soliton condensate).The comparison is presented in Fig. 4 and reveals a remarkable agreement, which further improves as n increases.
Conjecture 4.1 can be naturally generalized to an arbitrary genus N : for any realization of the KdV soliton condensate of genus N corresponding to the density of states u (N ) (η; λ) (3.10) and associated with the spectral Riemann surface R 2N of (3.8), one can find N -component initial phase vector θ 0 ∈ T N so that ϕ (N ) c (x, t) almost surely coincides with N -phase KdV solution ϕ = F N (θ; λ) (2.5).To support this generalization we performed a comparison of a numerical realization of the genus 2 soliton condensate with the respective two-phase (two-gap) KdV solution, see Appendix B.
A rigorous mathematical proof of Conjecture 4.1 and its generalization for an arbitrary genus will be the subject of future work.
In conclusion we note that Conjecture 4.1 correlates with the results of [10] where a particular "deterministic soliton gas" solution of the KdV equation has been constructed by considering the n-soliton solution with the discrete spectrum confined within two symmetric intervals-the analogs of s-bands of our work-and letting n → ∞.This solution was shown in [10] to represent a primitive potential [36] whose long-time asymptotics is described at leading order by a modulated genus 1 KdV solution.A similar construction was realized for the mKdV equation in [32].

Modulation dynamics
The dynamics of DOS in non-equilibrium (weakly non-homogeneous) soliton condensates is determined by the evolution of the endpoints λ j of the spectral bands of Γ (the sbands).As proven in Section 3, this evolution is governed by the Whitham modulation equations (3.13).Properties of the KdV-Whitam modulation systems are well studied: in particular, system (3.13) is strictly hyperbolic and genuinely nonlinear for any genus N ≥ 1 [28].This implies inevitability of wavebreaking for a broad class of initial conditions.What is the meaning of the wavebreaking in the context of soliton condensates, and how is the solution of the kinetic equation continued beyond the wavebreaking time?
We first invoke the definitive property of a soliton condensate-the vanishing of the spectral scaling function, σ(η) ≡ 0 in the soliton gas NDRs (2.9).According to Remark 3.3, if σ(η; x, 0) ≡ 0 for all x ∈ R, then σ(η; x, t) ≡ 0 for all x ∈ R, ∀t > 0 implying that soliton condensate necessarily remains a condensate during the evolution (at least of some class of initial data).The only qualitative modification that is permissible during the evolution is the change of the genus N .The description of the evolution of a soliton condensate is then reduced to the determination of the spectral support Γ(x, t), parametrizing the DOS via the band edges λ j (x, t): u = u (N ) (η; λ 1 , . . .λ 2N +1 ) (3.10).
In view of the above, the evolution of soliton condensates can be naturally put in the framework of the problem of hydrodynamic evolution of multivalued functions originally formulated by Dubrovin and Novikov [19].Let Λ N (x, t) = {λ 1 (x, t), . . ., λ 2N +1 (x, t)} be a smooth multivalued curve whose branches λ j (x, t) satisfy the Whitham modulation equations (3.13).Then, if wavebreaking occurs within one of the branches it results in a change of the genus N so that Λ N → Λ N +1 in some space-time region [x − (t), x + (t)] that includes the wavebreaking point.The curves Λ N and Λ N +1 are glued together at free boundaries x ± (t).Details of the implementation of this procedure can be found in [19,37,38,39].The simplest case of the multivalued curve evolution arises when the initial data for Λ N is a piecewise-constant distribution (both for λ j 's and for N ), with a discontinuity at x = 0 -a Riemann problem.In this special case the wavebreaking occurs at t = 0 (subject to appropriate sign of the initial jump) and smoothness of Λ N is not a prerequisite.
In this paper, we restrict ourselves to Riemann problems involving only genus 0 and genus 1 modulation solutions and show how the resulting spectral dynamics are interpreted in terms of soliton condensates.For that we will need explicit expressions for the Whitham characteristic velocities for N = 0 and N = 1.These expressions are known very well (see e.g.[11,34,35]) but here we obtain them as transport velocities for the respective soliton condensates, using the expressions (4.2), and (4.12) respectively.

Riemann problem for soliton condensates
The classical Riemann problem consists of finding solution to a system of hyperbolic conservation laws subject to piecewise-constant initial conditions exhibiting discontinuity at x = 0.The distribution solution of such Riemann problem generally represents a combination of constant states, simple (rarefaction) waves and strong discontinuities (shocks or contact discontinuities) [41].In dispersive hydrodynamics, classical shock waves are replaced by dispersive shock waves (DSWs) -nonlinear expanding wavetrains with a certain, well-defined structure [35].Here we generalize the Riemann problem formulation to the soliton gas kinetic equation by considering (1.1) subject to discontinuous initial DOS: where u (N ) (η; λ 1 , . . ., λ 2N +1 ) is the DOS (3.10) of genus N condensate and λ ± j > 0.
As discussed in Section 4.2, soliton condensate necessarily retains its definitive property σ = 0 during the evolution, with the only qualitative modification permissible being the change of the genus N .The evolution of the soliton condensate is then determined by the motion of the s-band edges λ j according to the Whitham modulation equations (3.13) subject to discontinuous initial conditions following from (5.1): (5.2) Thus the Riemann problem for soliton gas kinetic equation is effectively reduced in the condensate limit to the Riemann problem (5.2) for the Whitham modulation equations (3.13).Depending on the sign of the jump λ − j − λ + j the regularization of the discontinuity in λ j can occur in two ways: (i) if (λ − j − λ + j ) > 0 then the regularization occurs via the generation of a rarefaction wave for λ j without changing the genus N of the condensate; (ii) if (λ − j − λ + j ) < 0 (which implies immediate wavebreaking for λ j ) the regularization occurs via the generation of a higher genus condensate whose evolution is governed by the modulation equations.
Below we consider several particular cases of Riemann problems describing some prototypical features of the soliton condensate dynamics.
The Riemann problem for the KdV equation was originally studied by Gurevich and Pitaevskii (GP) [11] in the context of the description of dispersive shock waves.The key idea of GP construction was to replace the dispersive Riemann problem (5.5) for the KdV equation by an appropriate boundary value problem for the hyperbolic KdV-Whitham system (4.17) which is then solved in the class of x/t-self-similar solutions.Here we take advantage of the GP modulation solutions and their higher genus analogues to describe dynamics of soliton condensates.The choice of the genus of the Whitham system and, correspondingly, the genus of the associated soliton condensate, depends on whether q − > q + or q + < q − .
The requisite solution is the 2-wave of the Whitham system (4.17)(only λ 2 is nonconstant) where This is the famous GP solution describing the DSW modulations in the KdV step resolution problem [11].Indeed, we have s − < s + and, interpreting the GP solution (5.10) in terms of soliton condensates the limiting behaviors at the DSW edges is given by x → s + t, λ 2 → λ 3 = q − , u (1) (η; q − , λ 2 , q + ) → u (0) (η; q + ). (5.12) 5.2 Before considering the soliton condensate Riemann problem (1.1), (5.1) for the case N − + N + = 1 we list the admissible solutions to the kinetic equation connecting a genus 0 distribution u (0) (η; q) to a genus 1 distribution u (1) (η; λ 1 , λ 2 , λ 3 ).One can easily verify for the next four solutions that with s − < s + .We use the following convention to label the fundamental Riemann problem solutions: we call j ± -wave, where j is the index of the only varying Riemann invariant λ j in the solution, while the remaining invariants are constant; + indicates that N + = 1 i.e. the genus 1 soliton condensate is initially at x > 0, and − indicates that N − = 1 i.e. the genus 1 soliton condensate is initially at x < 0.

(i) 3 + -wave
Consider the initial condition for the soliton condensate DOS: The resolution of the step (5.14) is described by where λ 3 (x/t) is given by the 3 + -wave solution of the modulation equations (4.17): (5.16) The behavior of the Riemann invariants λ j in the 3 + -wave is shown in Fig. 6a.The associated soliton condensate KdV solution ϕ(x, t) along with the behavior of the mean ϕ are shown in Figs. 10 and 11.
(ii) 2 + -wave Consider the initial condition: (5.17) The resolution of the step (5.17) is described by where λ 2 (x/t) is given by the 2 + -wave solution of the modulation equations (4.17): ( The behavior of the Riemann invariants λ j in the 2 + -wave is shown in Fig. 6b. (iii) 1 − -wave Consider the initial condition: The resolution of the step (5.20) is described by where λ 1 (x/t) is given by the 1 − -wave solution of the modulation equations (4.17): (5.22) The behavior of the Riemann invariants λ j in the 1 − -wave is shown in Fig. 6c.
(iv) 2 − -wave Consider the initial condition: The resolution of the step (5.23) is described by where λ 2 (x/t) is given by the 2 − -wave solution of the modulation equations (4.17): (5.25) The behavior of the Riemann invariants λ j in the 2 − -wave is shown in Fig. 6d.The associated soliton condensate KdV solution ϕ(x, t) along with the behavior of the mean ϕ are shown in Figs. 12 and 13.

Riemann problem: numerical results
We consider Riemann problems with N − + N + ≤ 1.Because of the inherent limitations of the numerical implementation of soliton gas detailed in Appendix A, we restrict the comparison to the cases q − = 0 or q + = 0.

Rarefaction wave
In this first example, we choose A numerical realization of the soliton condensate evolution corresponding to the steplike initial condition (6.1) is displayed in Fig. 7.The same figure displays the realization at t = 40.The realization corresponds to a n-soliton solution with parameters distributed according to the initial DOS of (5.3), (6.1); details are given in Appendix A. As predicted in Sec.4.1, the realization of the condensate corresponds to the vacuum ϕ = 0 at the left of x = 0, and a constant ϕ = 1 at the right of x = 0.As highlighted in Appendix A.1, the n-soliton solution displays an overshoot at x = 0, regardless of the number of solitons n, which is reminiscent of Gibbs' phenomenon in the theory of Fourier series.This phenomenon has been originally observed in the numerical approximation of the soliton condensate of the focusing NLS equation by a n-soliton solution in [50]; see for instance the similarities between Figs. 7a, 8b and Fig. 2a of [50].Indeed, in both cases, the IST spectrum of the step distribution contains a non-solitonic radiative component (cf.[42]), which is not taken into account by the n-soliton solution; the mismatch between the exact step and the n-soliton solution manifests by the occurrence of the spurious oscillations observed near x = 0. Figure 7: Riemann problem with initial condition (6.1) for DOS u(η; x, t).The plots depict the variation of a condensate's realization ϕ(x, t) at t = 0 (a) and t = 40 (b, solid line).The red dashed line in depicts the variation of the rarefaction wave ϕ = λ 1 (x/t) 2 (5.6).
The solution of the Riemann problem with the initial condition (6.1) is given by u (0) (η; λ 1 (x, where λ 1 (x, t) is the rarefaction wave (genus 0) solution (5.6).We have shown in Sec.4.1 that the genus 0 soliton condensate is almost surely described by the constant solution ϕ = (λ 1 ) 2 .In the context of the evolution of the step (6.1) λ 1 varies according to (5.6) so λ(x, t) should be treated as a slowly varying (locally constant) condensate solution.In Fig. 7 we compare the numerical realization of the evolution of genus 0 condensate with the analytical solution (5.6).

Dispersive shock wave
We now consider {N ; λ}(x, t = 0) = {0; q − = 1}, x < 0, {0; q + = 0}, x > 0. ( A numerical realization of the genus 0 soliton condensate corresponding to the step-initial condition (6.2) is presented in Fig. 8 (a): it corresponds to the vacuum ϕ = 0 for x > 0, and a constant ϕ = 1 for x < 0. The realization at t = 40 is shown in Fig. 8 (b) and it corresponds to a classical DSW solution for the KdV equation.The solution of the condensate Riemann problem with the initial condition (5.3), (6.2) is given by the genus 1 DOS (5.9) modulated by the 2-wave solution (5.10) of the Whitham equations.In order to make a quantitative comparison of this analytical solution with the numerical evolution of the soliton gas displayed in Fig. 8, we compute numerically the mean ϕ and the variance ϕ 2 − ϕ 2 , the latter being an amplitude type characteristic of the cnoidal wave.We have conjectured in Sec.4.1 that any realization of the uniform genus 1 condensate corresponds to a cnoidal wave modulo the initial phase θ 0 ∈ [0; 2π).In that case, the ensemble average of the soliton condensate reduces to an average over the phase θ 0 , or equivalently, over the period of the cnoidal wave, which can be performed on a single realization.We assume here that the result generalizes to non-uniform condensates so that the realization computed numerically and displayed in Fig. 8(b) can be consistently compared with a slowly modulated cnoidal wave solution.The averages ϕ(x, t) and  The comparison between the analytically determined averages (4.13),(4.14),(5.10)and the averages (6.3) obtained numerically is presented in Fig. 11 and shows a very good agreement.(6.2).The markers correspond to averages extracted from the numerical solution using (6.3), and the solid black lines to the corresponding analytical averages (4.13),(4.14),(5.10).

Generalized rarefaction wave
(6.4) A numerical realization of the step-initial condition is displayed in Fig. 10.The same figure displays the realization at t = 40.The realization of the condensate corresponds to the "vacuum" ϕ = 0 for x < 0, and a cnoidal wave for x > 0. Note that the KdV equation does not admit heteroclinic traveling wave solutions, rendering difficult the numerical implementation of these "generalized" Riemann problems studied for instance in [43,44].
Remarkably here, the solution depicted in Fig. 10 is an exact, n-soliton solution of the KdV equation.As highlighted previously (see also Appendix A.1), the n-soliton solution exhibits an overshoot at x = 0, regardless of the number of solitons n.The solution of the Riemann problem for the kinetic equation with the initial condition (5.14), (6.4) is given by the 3 + -wave (5.15), (5.16).The comparison between the analytical averages (4.13),(4.14),(5.16) and the averages obtained numerically is shown in Fig. 11 and shows a very good agreement.The modulation depicted in Figs.10b and 11a resembles the modulation of a cnoidal wave of an almost constant amplitude but with a varying mean.The variation of the mean ϕ is similar to the variation of the field in a classical rarefaction wave, so we call the corresponding structure shown in Fig. 10b a generalized rarefaction wave.The variance of the wavefield ϕ in the generalized rarefaction wave is shown in Fig. 11b.(6.4).The markers correspond to the averages extracted from the numerical solution using (6.3), and the solid black lines to the corresponding analytical averages (4.13),(4.14),(5.16).

Generalized dispersive shock wave
We now consider the "complementary" initial condition x > 0. (6.5)An example of the numerical realization of the soliton gas step-initial condition and its evolution at t = 40 are displayed in Fig. 12.The solution of the Riemann problem with the initial condition (6.5) is given by the 2 − -wave (5.24), (5.25).The comparison between the analytically derived averages (4.13),(4.14),(5.25) and the averages obtained numerically is displayed in Fig. 13, and shows a very good agreement.The modulation observed in Figs. 12, 13 resembles the modulation of partial dispersive shock wave: the modulated cnoidal wave reaches the soliton limit m = 1 for x → s + t but terminates at m = 0 for x → s − t.The solution then continues as a non-modulated cnoidal wave for x < s − t.This structure differs from the celebrated dispersive shock wave solution of the KdV equation involving the entire range 0 ≤ m ≤ 1 [35].We call the described structure connecting a constant state (a genus 0 condensate) at x → +∞ with a periodic solution (a genus 1 condensate) at x → −∞ a generalized DSW.We note that the soliton condensate structure shown in Fig. 12b exhibits strong similarity to the "deterministic KdV soliton gas" solution constructed in [10].

Equilibrium properties
We now introduce the notion of a "diluted" soliton condensate by considering DOS u(η) = Cu (N ) (η), where u (N ) (η) is the condensate DOS of genus N , and 0 < C < 1 is the "dilution constant".E.g. the diluted soliton condensate of genus 0 is characterized by DOS  (6.5).The markers correspond to averages extracted from the numerical solution using (6.3), and the solid black lines to the corresponding analytical averages (4.13),(4.14),(5.16).
We recover the genus 0 condensate DOS (4.1) by setting C = 1.As C decreases, the "averaged spacing" between the solitons increases and the condensate gets "diluted".Comparison between the most probable realization of the condensate (C = 1) and a typical realization of a slightly dilute condensate (C = 0.97) is given in Fig. 14.Remarkably, one can see that a slight increase of the average spacing between the solitons within the condensate results in the emergence of significant random oscillations of the KdV wave field.As follows from (2.14) we have ϕ = ϕ 2 = C for the diluted genus 0 condensate so that the variance is given by: The comparison between (7.3) and the variance obtained numerically by averaging over different diluted condensates is presented in Figure 14.Assuming ergodicity of a generic uniform soliton gas, the ensemble average . . . in Fig. 14a (and Fig. 15) is computed here numerically with a spatial average of one, spatially broad, gas realization.More generally, the diluted soliton condensate of genus N is characterized by DOS We have in the general case where ϕ , ϕ to diluted genus 1 condensate (C < 1) does not see a drastic change in the oscillations' amplitude.In particular, the oscillations seem to remain "almost" coherent -i.e. an average period can be identified -for the dilution factors C close to 1 as depicted in the inset of Fig. 15.Diluted condensates present a convenient framework to verify the prediction formulated in Remark 2.1 regarding the "backflow" effect (i.e. the existence of tracer KdV solitons moving in negative direction) in sufficiently dense soliton gases.A numerical simulation of the diluted genus 0 condensate with C = 0.9 where one can clearly see the soliton trajectory with a negative slope is presented in Fig. 16.

Riemann problem
We can now consider the soliton condensate Riemann problem for diluted condensates for which the initial DOS (5.1) is replaced by Figure 16: Soliton trajectories in a diluted genus 0 soliton condensate with C = 0.9.Highlighted is a small-amplitude tracer soliton moving backwards.
To be specific, we investigate numerically the evolution of the diluted condensate initial conditions (7.7) with N − + N + ≤ 1 and λ i chosen from the examples presented in Sec. 6. Numerical realizations of the step-initial condition and their evolution in time are presented in Fig. 17.One can see that generally, realizations of the diluted soliton condensate do not exhibit a macroscopically coherent structure as observed in Sec. 6.However, in the case N − + N + = 1, the evolution of the diluted condensate realizations, despite the visible incoherence, still qualitatively resembles the evolution of the "genuine" condensates depicted in Figs. 10, 12.One can see that the recognizable patterns of the generalized rarefaction wave (see Fig. 17f) and the generalized DSW (see Fig. 17h) persist even if C < 1.Indeed, as shown in Sec.7.1, the oscillations in a realization of the diluted genus 1 condensate appear almost coherent for a small dilution factor.The persistence of coherence can also be observed in the case N − +N + = 0 when λ − 1 > λ + 1 (Fig. 17d): a DSW develops if C = 1, and coherent, finite amplitude oscillations still develop for C = 1 at the right edge of the structure where the amplitudes of oscillations are large.In connection with the above, it is important to note that, although the initial condition (7.7) is given by the discontinuous diluted condensate DOS, u(η; x, 0) = Cu (N ) (η), the kinetic equation evolution does not imply that the DOS will remain to be of the same form for t > 0. In other words, unlike genuine condensates, the diluted condensates do not retain the spectral "diluted condensate" property during the evolution.A Numerical implementation of soliton gas

A.1 Riemann problem
The realizations of the soliton gas are approximated numerically by the n-soliton solution where the η i 's and x 0 i 's correspond respectively to the spectral parameters and the "spatial phases" of the solitons; η i < η i+1 by convention.The numerical implementation of (A.1) is described in Sec.A.3 below.The numerical solutions presented in this work are all generated with n = 200 solitons, unless otherwise stated.
Since n is finite, the n-soliton solution reduces to a sum of separated solitons in the limit |t| → ∞.By construction, we have in the limit t → ±∞ where x ± i are the spatial phases of the i-th soliton at t → ±∞.We then take the spatial phase in (A.1) to be x 0 i = (x − i + x + i )/2.Consider a uniform soliton gas with the density of states u(η).Let the spectral parameters η i be distributed on Γ + with density where the normalization by the spatial density of solitons κ ensures that φ(η) is normalized to 1.It was shown in [47] that the spatial density κ is obtained if the phases x 0 i are uniformly distributed on the interval (denoted "S-set" in [47]): where σ(η) is the spectral scaling function in the NDRs (2.9), (2.10); y(η) in [47] is given here by y(η) = u(η)σ(η)/η.The derivation of (A.4) has been revisited recently in the context of generalized hydrodynamics [22]: it was shown that κ s corresponds to the density of spatial phases x 0 i , or equivalently x ± i which are well defined asymptotically (t → ±∞) where the solitons are "non-interacting" and their position are given by x i (t) ∼ 4η 2 i t + x ± i .In the rarefied gas limit the interaction term in the NDR (2.9) is small and therefore σ(η)u(η) ≈ η so that we obtain κ s = κ as expected.In the general case though the density κ s of non-interacting phases is different from the "physical" density κ, as demonstrated with the soliton condensate examples below.In the thermodynamic limit n → ∞, the soliton solution (A.1) represents a realization of the uniform soliton gas.
Since the number n of solitons is finite, the n-soliton solution has a finite spatial extent.By distributing the phases x 0 i uniformly on the interval I s , the n-soliton solution ϕ n (x, t = 0) approximates a realization of the uniform soliton gas for x ∈ [− /2, /2] where = n/κ; ϕ n (x, t = 0) ∼ 0 outside of this interval.This naturally generates the box-like initial condition for the kinetic equation u(η; x, t = 0) ∼      0, x < − /2, u(η), − /2 < x < /2, 0, /2 < x. (A.5) Note that u(η; x, t = 0) = 0 can be seen as the genus 0 condensate where the end point of the central s-band λ 1 → 0. This limits the type of initial condition that can be implemented for the Riemann problem and we choose in practice (N − = 0, q − = 0) or (N + = 0, q + = 0).For convenience, we shift the x-axis by ± /2 to obtain one of the discontinuities at the position x = 0.The evolution in time of the soliton gas realization is obtained by varying the parameter t.Contrarily to a direct resolution of the KdV equation, via finite difference or spectral method, the time-evolution presented here is instantaneous and does not accumulate any numerical errors since the n-soliton solution is an exact solution.For the Riemann problem, the maximal time is bounded by the finite extent of the n-soliton solution: after a sufficently long time, the two hydrodynamic states originating from the discontinuities at x = − /2 and x = /2 start interacting.Longer times can be reached by choosing a larger number of solitons n.
We consider now the density of states of interest for this work: Fig. 18 shows the comparison between the spatial density of solitons κ and the density of phases κ s for the genus 0 case where κ(C) = C/π.The phases density κ s diverges in the condensate limit C → 1, and x 0 i 's are all equal to the same phase x 0 (I s → {x 0 }).This limit is in agreement with the results obtained in Sec.4.1 for genus 0 and genus 1 condensates: each realisation of the condensate (C = 1) is approximated with a coherent n-soliton solution where x 0 i = x 0 = cst, ∀i.Examples of numerical realizations of soliton condensates and diluted soliton condensates are given in Sections 4.1, 6, 7 and B. Figs. 2, 4 and 20 shows that numerical approximations of condensate via the n-soliton solution are not exactly uniform; realizations become more uniform near the center of the interval [− , ] as the number of soliton n increases.
The realization at t = 0 in Figs. 7, 8, 10 and 12 also displays the "border effects" observed at the discontinuities of the Riemann problem initial condition (located at x = 0).These border effects, manifesting as overshoots of the realization, persist regardless of the number of solitons n as shown by the comparison between the 100-soliton and 200-soliton solutions in Fig. 19.However, because of their finite size, the observed border effects seem to have no effect on the asymptotic dynamics of the condensate as demonstrated by the very good agreement between the theory and the numerical solution in Sec. 6.

A.2 Generation of spectral parameters η i
The spectral parameters of the n-soliton solution are distributed with probability density φ(η), cf.(A.3).This can be achieved by choosing the solutions of the nonlinear equation

. 6 )
Equations(3.5)  are the (transformed) NDRs for the KdV soliton condensate.To find u, v for the soliton condensate, it is sufficient to invert the FHT H on Γ. Denote by R 2N the hyperelliptic Riemann surface of the genus 2N , defined by the branchcuts (s-bands) γ k , k = 0, ±1, . . ., ±N , where γ −k = −γ k .Define two meromorphic differentials of second kind, dp and dq on R 2N by

Figure 3 :
Figure 3: Variation of the absolute error |ϕ n (x) − 1| at the center of the numerical domain x = 0 (cf.Fig.2).The markers correspond to the error obtained numerically and the solid line the corresponding fit α/n 2 where α ≈ 0.25.

Figure 9 :
Figure 9: Mean ϕ (a) and variance ϕ 2 − ϕ 2 (b) of the solution of the Riemann problem's solution with the initial condition (6.2).The markers correspond to averages extracted from the numerical solution using (6.3), and the solid black lines to the corresponding analytical averages (4.13),(4.14),(5.10).

N
− +N + = 0 in the two previous examples.In the next examples, we choose N − +N + = 1.Let's start with N + = 1:

Figure 11 :
Figure 11: Mean ϕ (a) and variance ϕ 2 − ϕ 2 (b) of the solution of the Riemann problem's solution with the initial condition(6.4).The markers correspond to the averages extracted from the numerical solution using (6.3), and the solid black lines to the corresponding analytical averages (4.13),(4.14),(5.16).

Figure 18 :
Figure 18:  The solid line represents the variation of κ s with respect to κ for a diluted genus 0 condensate, cf.(A.7).The markers are obtained using the 100-soliton solution: κ = /n where corresponds to the spatial extension of the n-soliton solution.

Figure 19 :
Figure 19:n-soliton solution approximating a realization of the condensate (N ; λ 1 , λ 2 , λ 3 ) = (1; 0, 0.5, 0.85).The solid black line represent the solution n = 100 and the red dashed line the solution n = 200.Both solutions have been shifted such that the maximum of the solution is located at x = 0.