EIT Agent
登录
← 校园网页目录

校园网页 · 学校官网

A new flow dynamic approach for Wasserstein gradient flows

Contents lists available at ScienceDirect Journal of Computational Physics journal homepage: www.elsevier.com/locate/jcp A new flow dynamic approach for Wasserstein gradient flows QingCheng a, , QianqianLiu b,∗, WenbinChen c, JieShen d a Key Laboratory of Intelligent Computing and Application (Tongji University), Ministry of Education, Department of Mathematics; Tongji University, Shanghai, 200092, China b School of Mathematical Sciences; Fudan University, Shanghai, 200433, China c Shanghai Key Laboratory for Contemporary Applied Mathematics, School of Mathematical Sciences; Fudan University, Shanghai, 200433, China d Eastern Institute of Technology, Ningbo, Zhejiang, 315200, China A R T I C L E I N F O A B S T R A C T MSC: 65M06 65M12 35K65 35A15 Keywords: Wasserstein gradient flow Energetic variational approach Lagrangian coordinates Structure preservation We develop in this paper a new regularized flow dynamic approach to construct efficient numerical schemes for Wasserstein gradient flows in Lagrangian coordinates. Instead of approximating the Wasserstein distance which needs to solve constrained minimization problems, we reformulate the problem using the Benamou-Brenier’s flow dynamic approach, leading to algorithms which only need to solve unconstrained minimization problem in 𝐿2 distance. Our schemes automatically inherit some essential properties of Wasserstein gradient systems such as positivity-preserving, mass conservative and energy dissipation. We present ample numerical simulations of Porous- Medium equations, Keller-Segel equations and Aggregation equations to validate the accuracy and stability of the proposed schemes. Compared to numerical schemes in Eulerian coordinates, our new schemes can capture sharp interfaces for various Wasserstein gradient flows using relatively smaller number of unknowns. 1. Introduction Equations that are gradient flows in the Wasserstein metric arise in many physical and biological applications, including Porous- Medium equations [2,43], Poisson-Nernst-Planck equations [20,21] and Keller-Segel equations [24,26,47]. In this paper, we consider numerical approximation of Wasserstein gradient flows which take the following form [1]: 𝜕𝑡𝜌=−∇⋅(𝜌𝒗), 𝒗=−∇𝛿𝐸 𝛿𝜌 , (1.1) with the initial value 𝜌(𝒙,0)= 𝜌0(𝒙) ≥0, where 𝜌(𝒙,𝑡)is the particle density on the domain Ω⊂ℝ𝑑(𝑑≥1), and 𝒗is the velocity field of the transport equation, and the energy functional is given by [14] 𝐸(𝜌)= ∫ Ω 𝐹(𝜌)d𝒙= ∫ Ω 𝑈(𝜌(𝒙))+ 𝑉(𝒙)𝜌(𝒙)d𝒙+ 1 2 ∫ Ω×Ω 𝑊(𝒙−𝒚)𝜌(𝒙)𝜌(𝒚)d𝒙d𝒚, (1.2) * Corresponding author. E-mail addresses:qingcheng@tongji.edu.cn(Q. Cheng), qianqianliu21@m.fudan.edu.cn(Q. Liu), wbchen@fudan.edu.cn(W. Chen), jshen@eitech.edu.cn (J. Shen). https://doi.org/10.1016/j.jcp.2024.113696 Received 26 June 2024; Received in revised form 17 December 2024; Accepted 18 December 2024 Journal of Computational Physics 524 (2025) 113696 Available online 27 December 2024 0021-9991/© 2024 Elsevier Inc. All rights are reserved, including those for text and data mining, AI training, and similar technologies. Q.Cheng, Q.Liu, W.Chen et al. where 𝐹(𝜌)is the energy density, 𝑈(𝜌)is the internal energy which can be taken as 𝑈𝑚(𝑠)= 𝑠log𝑠for 𝑚=1 and 𝑈𝑚(𝑠)= 𝑠𝑚 𝑚−1for 𝑚>1, 𝑉(𝒙)is a drift potential and 𝑊(𝒙, 𝒚)= 𝑊(𝒚, 𝒙)is an interaction potential, see also [5,13]. Solutions of the Wasserstein gradient flows possess three essential properties: positivity-preserving; mass conservation; and the energy dissipation in the sense that d d𝑡𝐸(𝜌)(𝑡)=− ∫ Ω 𝜌|𝒗|2d𝒙. (1.3) In recent years, considerable attention has been devoted to constructing structure-preserving schemes of various Wasserstein gradient flows (1.1), e.g., Porous-Medium equation [19,29,36,37,48], Fokker-Planck equation [18,25,32,34,40], Keller-Segel equation [16,23,35,41,44], drift diffusion and aggregation equation [9]. Specially, numerical methods based on the approximation for the Wasserstein metric have attracted much more attention, see [5,8–10,28]. For example, the celebrated Jordan-Kinderlehrer-Otto (JKO) scheme [25] is proposed to solve Fokker-Planck equation in [25]. The scheme preserves essential properties of the Wasserstein gradient flows, but a key difficulty of its numerical implementation is to approximate the Wasserstein metric efficiently. Benamou and Brenier discovered [4] that the Wasserstein metric can be rewritten into the Brenier formulae [4]. In the present work, we will adopt Benamou-Brenier’s dynamic formulation for the Wasserstein metric [4]. In particular, given two measures 𝜌0 and 𝜌1, their Wasserstein distance can be obtained by solving ⎧ ⎪ ⎨ ⎪⎩ 𝑊 2(𝜌0,𝜌1)=inf 𝜌,𝒗{∫1 0 ∫Ω|𝒗(𝒙,𝑡)|2𝜌(𝒙,𝑡)d𝒙d𝑡} 1 2 , 𝑠.𝑡. 𝜕𝑡𝜌+∇ ⋅(𝜌𝒗)=0 , (𝜌𝑣) ⋅𝒏=0 on 𝜕Ω×[0,1], 𝜌(0, 𝒙)= 𝜌0, 𝜌(1, 𝒙)= 𝜌1, (1.4) where 𝒏is the outer unit normal on the boundary of the domain Ω. Denote 𝒎 =𝜌𝒗, then the original JKO scheme, proposed by Jordan, Kinderlehrer and Otto [25], can be reformulated into the following equivalent form [9,28]: given 𝜌𝑘, solve 𝜌𝑘+1 =𝜌(1, 𝒙)as ⎧ ⎪ ⎨ ⎪⎩ (𝜌,𝒎)=arginf 𝜌,𝒗 1 2𝛿𝑡∫1 0 ∫Ω𝐺(𝜌,𝒎)d𝒙d𝑡+𝐸(𝜌(1, 𝒙)), 𝑠.𝑡. 𝜕𝑡𝜌+∇ ⋅(𝜌𝒗)=0 , (𝜌𝒗) ⋅𝒏=0 on 𝜕Ω×[0,1], 𝜌(0, 𝒙)= 𝜌𝑘, (1.5) where 𝐺(𝜌,𝒎)is defined by 𝐺(𝜌,𝒎)= ⎧ ⎪ ⎨ ⎪⎩ 𝒎2 𝜌 , if 𝜌>0, 0, if (𝜌,𝒎)=(0 , 𝟎), +∞, otherwise. Various numerical methods [6,7,9,10,27,33] are proposed based on the dynamic formulation (1.5). But they usually require solving, at each time step, a constrained minimization problem which can be difficult and costly. We adopt in this paper the flow dynamic approach to develop a new class of numerical schemes in Lagrangian coordinates which only need to solve an unconstrained min- imization problem at each time step. The relationship between the strong formula and variational formula is shown in Fig. 1. The strong formula is obtained directly by discretizing the flow map equation, while the variational formula is derived by combining the JKO scheme and the flow map. It is noteworthy that the two forms are equivalent. This flow dynamic approach also enjoys the following advantages: •It allows us to construct positivity-preserving schemes for Wasserstein gradient systems with positive solutions, and the schemes can also conserve mass in both semi-discrete and fully-discrete cases. •Since the schemes are derived from an energetic variational approach, they are energy dissipative for Wasserstein gradient flows. •The flow dynamic approach, behaving like a moving mesh method, can automatically capture the trajectory of movement in Lagrangian coordinates, and as a consequence, requires fewer spatial points than an Eulerian approach to capture the interface movements or solutions with large gradients. We present several numerical results to validate the proposed approach. In particular, for Porous-Medium equations, our numerical schemes can accurately capture the sharp interface, and obtain the correct finite propagation speed and waiting time; and for the Keller-Segel equations, they allow us to simulate the phenomenon of blow-up. The rest of the paper is organized as follows. In Section 2, the semi-discrete numerical scheme is proposed for the Wasserstein gradient flow (1.1). In Section 3, fully discrete numerical schemes for the Wasserstein gradient flow (1.1)in 1D and 2D are constructed and analyzed, respectively. Numerical experiments in 1D and 2D are carried out in Section 4to validate the theoretical results. 2. Regularized flow dynamic approach As our objective is to develop numerical methods for Wasserstein gradient flows based on flow dynamic approach, we will first introduce this approach [17,29,45] and then apply it to Wasserstein gradient flows in the semi-discrete case. Journal of Computational Physics 524 (2025) 113696 2 Q.Cheng, Q.Liu, W.Chen et al. Fig. 1.Relationship between the strong formula and the variational formula for Wasserstein gradient flows. (For interpretation of the colors in the figure(s), the reader is referred to the web version of this article.) Fig. 2.A schematic illustration of a flow map 𝒙(𝑿,𝑡)at a fixed time 𝑡: 𝒙(𝑿,𝑡)maps Ω𝑿 0 to Ω𝒙 𝑡. 𝑿 is the Lagrangian coordinate while 𝒙is the Eulerian coordinate, and 𝐹(𝑿,𝑡)= 𝜕𝒙(𝑿,𝑡) 𝜕𝑿 represents the deformation associated with the flow map. Given an initial position or a reference configuration 𝑿, and a velocity field 𝒗, define the flow map 𝒙(𝑿,𝑡)[17,18] as follows: d𝒙(𝑿,𝑡) d𝑡 = 𝒗(𝒙(𝑿,𝑡),𝑡), (2.1) 𝒙(𝑿,0)= 𝑿, (2.2) where 𝒙is the Eulerian coordinate and 𝑿 is the Lagrangian coordinate, 𝜕𝒙 𝜕𝑿 represents the deformation associated with the flow map, see Fig. 2. We assume that 𝒗is the velocity such that 𝜕𝑡𝜌+∇ ⋅(𝜌𝒗)=0 . (2.3) Then the transport equation (2.3) and the flow map (2.1)-(2.2) determine the following kinematic relationship between the Eulerian and Lagrangian coordinates: 𝜌(𝑿,0) det 𝜕𝒙 𝜕𝑿 =𝜌(𝒙,𝑡). (2.4) According to the Energetic Variational Approach [21,30,31,38,39,42], from the energy dissipative law (1.3)of Wasserstein gra- dient flows, we can use the least action principle and the maximum dissipation law to derive the conservative and dissipative forces, respectively [17–19,29–31,45,46]: 𝐹conservative =−𝛿𝐸 𝛿𝒙 =−𝜌∇𝒙 𝛿𝐸 𝛿𝜌 , 𝐹dissipative = 𝛿1 2 ∫Ω𝜌|𝒗|2d𝒙 𝛿𝒗 =𝜌𝒗, and then apply the force balance law to obtain the following constitutive relation: Journal of Computational Physics 524 (2025) 113696 3 Q.Cheng, Q.Liu, W.Chen et al. 𝐹conservative =−𝛿𝐸 𝛿𝒙 =𝜌𝒗=𝐹dissipative. (2.5) Combining (2.5)with Wasserstein gradient system (1.1), we derive the following equivalent formulation: 𝜌𝒗=𝜌d𝒙 d𝑡 =−𝛿𝐸 𝛿𝒙 =−𝜌∇𝒙 𝛿𝐸 𝛿𝜌 , (2.6) which can be written in Lagrangian coordinates as 𝜌(𝑿,0)d𝒙 d𝑡 +𝜌(𝑿,0)∇𝒙 𝛿𝐸 𝛿𝝆 =0. (2.7) Notice that equation (2.7)is a fully nonlinear equation with respect to 𝒙in Lagrangian coordinate. By adding an extra regularizing term into (2.7), we obtain 𝜌(𝑿,0)d𝒙 d𝑡 −𝜖Δ𝐗 𝒙+𝜌(𝐗,0)∇𝒙 𝛿𝐸 𝛿𝝆 =0, (2.8) where 𝜖≪1is a non-negative regularization parameter. Notice that 𝐹(𝑿,𝑡)= 𝜕𝒙(𝑿,𝑡) 𝜕𝑿 represents the deformation associated with the flow map, the term 𝜖Δ𝐗 𝒙can be interpreted as a viscous term to smooth the computational meshes from a geometric perspective. Taking the inner product of (2.8)with 𝒙𝑡, we obtain the following energy dissipative law: d d𝑡 ̃𝐸(𝑡)=− ∫ Ω𝑿 0 𝜌(𝑿,0)|d𝒙 d𝑡 |2d𝑿, (2.9) where ̃𝐸is defined by ̃𝐸(𝑡)= 𝐸(𝑡)+ 𝜖 2 ∫Ω𝑿 0 |∇𝑿 𝒙|2d𝑿. Another regularized approach is 𝜌(𝑿,0)d𝒙 d𝑡 −𝜖Δ𝑿 d𝒙 d𝑡 +𝜌(𝑿,0)∇𝒙 𝛿𝐸 𝛿𝝆 =0, (2.10) which satisfies the following energy dissipative law: d d𝑡𝐸(𝑡)=− ∫ Ω𝑿 0 𝜌(𝑿,0)|d𝒙 d𝑡 |2d𝑿 −∫ Ω𝑿 0 𝜖|∇𝑿 d𝒙 d𝑡 |2d𝑿 ≤0. (2.11) This regularized approach can be used to construct second-order Lagrangian schemes for wasserstein gradient flow (1.1)where the regularization term is 𝜖Δ𝑿 d𝒙 d𝑡 in (2.10)with 0 ≤𝜖≪1. Remark 2.1. For both regularized approaches proposed above, the regularized terms in the force balance equations (2.8)and (2.10) can be regarded as adding a small extra force into the original force balance equations 𝐹𝑐𝑜𝑛𝑠𝑒𝑟𝑣𝑎𝑡𝑖𝑣𝑒−𝐹𝑑𝑖𝑠𝑠𝑖𝑝𝑎𝑡𝑖𝑣𝑒=𝜖𝐹𝑒𝑥𝑡𝑟𝑎 𝑓𝑜𝑟𝑐𝑒, (2.12) where the extra force can be frictional force or viscous force. Actually, the extra energy dissipative term in (2.11) ∫Ω𝑿 0 𝜖|∇𝑿 d𝒙 d𝑡 |2d𝑿 will be converted into heat due to the work done by frictional force. 2.1. Numerical schemes based on the FDM approach We observed from (2.9) that the flow map 𝒙also satisfies a gradient flow structure in Lagrangian coordinate. A benefit of the gradient flow structure is that one can construct numerical schemes to inherit the energy dissipation of the gradient flows. In contrast to the classic JKO scheme [25], we shall construct numerical schemes based on FDM approach which do not involve the calculation of the Wasserstein metric, but only of a 𝐿2 distance which is much easier to obtain. 2.1.1. First-order scheme Given 𝛿𝑡>0, 𝑡𝑘=𝑘𝛿𝑡for 𝑘=0, 1, ⋯, 𝑇 𝛿𝑡, let 𝒙𝑘denote the numerical approximation to 𝒙(⋅,𝑡𝑘). Then, a first-order scheme in a variational form to the solution of (2.8)at 𝑡𝑘+1 can be obtained by ⎧ ⎪ ⎨ ⎪⎩ 𝒙 𝑘+1 ∶=arginf𝒙 1 2𝛿𝑡∫Ω𝑿 0 𝜌(𝑿,0)|𝒙−𝒙𝑘|2d𝑿 + 𝜖 2 ∫Ω𝑿 0 |∇𝐗 𝒙|2d𝐗 +𝐸(𝒙), 𝜌𝑘+1 = 𝜌(𝑿,0) det𝜕𝒙𝑘+1 𝜕𝑿 . (2.13) Motivated from the minimization problem (2.13), a first-order semi-discrete scheme for (1.1)based on (2.8)with 𝜖=𝛿𝑡and (2.13) is: Journal of Computational Physics 524 (2025) 113696 4 Q.Cheng, Q.Liu, W.Chen et al. 𝜌(𝑿,0) 𝒙𝑘+1 −𝒙𝑘 𝛿𝑡 −𝛿𝑡Δ𝑿 𝒙𝑘+1 +𝜌(𝑿,0)∇𝒙𝐹′ ⎛ ⎜ ⎜⎝ 𝜌(𝑿,0) det𝜕𝒙𝑘+1 𝜕𝑿 ⎞ ⎟ ⎟⎠ =0, (2.14) 𝜌𝑘+1 = 𝜌(𝑿,0) det𝜕𝒙𝑘+1 𝜕𝑿 , (2.15) with the Dirichlet boundary condition 𝒙𝑘+1|𝜕Ω= 𝑿|𝜕Ω, and Ω𝒙 0 =Ω𝑿 0 . We will show that the numerical scheme (2.14)-(2.15)in Lagrangian coordinate achieves a first-order accuracy to (1.1)in Eulerian coordinate: Proposition 2.1. The solution 𝜌𝑘+1 to numerical scheme (2.14)-(2.15) is a first-order approximation to the exact solution of Wasserstein gradient flow (1.1)at 𝑡𝑘+1. Proof. Firstly, we shall calculate the variational derivative of the energy 𝐸: 𝛿𝐸= ∫ Ω𝑿 0 −𝐹′ ( 𝜌(𝑿,0) det 𝜕𝒙 𝜕𝑿 ) 𝜌(𝑿,0) ( det 𝜕𝒙 𝜕𝑿 )2 det 𝜕𝒙 𝜕𝑿 𝜕𝛿𝒙 𝜕𝑿 +𝐹 ( 𝜌(𝑿,0) det 𝜕𝒙 𝜕𝑿 ) 𝜕𝛿𝒙 𝜕𝑿 d𝑿 = ∫ Ω𝑿 0 𝜕𝑿 ⎛ ⎜ ⎜ ⎜⎝ 𝐹 ′ ( 𝜌(𝑿,0) det 𝜕𝒙 𝜕𝑿 ) 𝜌(𝑿,0) ( det 𝜕𝒙 𝜕𝑿 )2 det 𝜕𝒙 𝜕𝑋−𝐹 ( 𝜌(𝑿,0) det 𝜕𝒙 𝜕𝑿 )⎞ ⎟ ⎟ ⎟⎠ 𝛿𝒙d𝑿 = ∫ Ω𝑿 0 𝜕𝑿 ( 𝐹′ ( 𝜌(𝑿,0) det 𝜕𝒙 𝜕𝑿 ) 𝜌(𝑿,0) det 𝜕𝒙 𝜕𝑿 −𝐹 ( 𝜌(𝑿,0) det 𝜕𝒙 𝜕𝑿 )) 𝛿𝒙d𝑿 = ∫ Ω𝑿 0 𝜕𝒙 ( 𝐹′(𝜌)𝜌−𝐹(𝜌) ) 𝛿𝒙d𝒙= ∫ Ω𝑿 0 𝜌𝜕𝒙𝐹′(𝜌)𝛿𝒙d𝒙. (2.16) We can then derive from (2.16)the variational derivatives of 𝐸in Eulerian coordinates and Lagrangian coordinates, respectively: 𝛿𝐸 𝛿𝒙 =𝜌𝜕𝒙𝐹′(𝜌), (2.17) 𝛿𝐸 𝛿𝒙 =𝜕𝑿 ( 𝐹′ ( 𝜌(𝑿,0) det 𝜕𝒙 𝜕𝑿 ) 𝜌(𝑿,0) det 𝜕𝒙 𝜕𝑿 −𝐹 ( 𝜌(𝑿,0) det 𝜕𝒙 𝜕𝑿 )) =𝜌(𝑿,0) 𝜕𝑿 𝐹′ ( 𝜌(𝑿,0) det 𝜕𝒙 𝜕𝑿 ) det 𝜕𝒙 𝜕𝑿 . (2.18) From (2.18), we observe that the last term in (2.14) is exactly the variational derivative of 𝐸(𝜌(𝑿,0) det 𝜕𝒙 𝜕𝑿 ) with respective to 𝒙 in Lagrangian coordinates. Then the equation (2.14) can be obtained by taking the variational derivative of (2.13) with respect to 𝒙, which also show that the minimizer (𝒙𝑘+1,𝜌𝑘+1) of the variational problem (2.13) is the solution of (2.14)-(2.15). Assuming that 𝜌(𝐗,0) ≠0and rewriting the equation (2.14)into the following equivalent form: 𝒙𝑘+1 −𝒙𝑘 𝛿𝑡 = 𝛿𝑡 𝜌(𝑿,0)Δ𝑿 𝒙𝑘+1 −∇𝒙𝐹′ ⎛ ⎜ ⎜⎝ 𝜌(𝑿,0) det𝜕𝒙𝑘+1 𝜕𝑿 ⎞ ⎟ ⎟⎠ . (2.19) Notice the definition of flow map 𝒗(𝑿,𝑡𝑘+1)= d𝒙(𝑿,𝑡𝑘+1) d𝑡 , we can easily derive from (2.19)that 𝒗𝑘+1 =−∇𝒙𝐹′(𝜌(𝒙𝑘+1))+ 𝑂(𝛿𝑡)=−∇𝒙(𝛿𝐸 𝛿𝜌 )𝑘+1 +𝑂(𝛿𝑡). Then we conclude that the numerical scheme (2.14)achieves a first-order accuracy in time for the Wasserstein gradient flow (1.1). □ Remark 2.2. It is worth mentioning that there are several choices to add the regularization term in scheme (2.13), such as ∫Ω𝑿 0 𝛿𝑡𝜌(𝑿,0)|∇𝑿 𝒙|2d𝑿 and ∫Ω𝑿 0 |∇𝑿 (𝒙−𝒙𝑘)|2d𝑿, which can also be proved to be a first-order approximation to the Wasserstein gradient flow (1.1). Remark 2.3. We can solve the nonlinear scheme (2.14)–(2.15) by using the damped Newton’s iteration. Denote the linear and nonlinear operators by Journal of Computational Physics 524 (2025) 113696 5 Q.Cheng, Q.Liu, W.Chen et al. (𝒙𝑘+1)∶=𝜌(𝑿,0) 𝛿𝑡 𝒙𝑘+1 −𝛿𝑡Δ𝑿 𝒙𝑘+1,  (𝒙𝑘+1)∶=𝜌(𝑿,0)∇𝒙𝐹′ ⎛ ⎜ ⎜⎝ 𝜌(𝑿,0) det𝜕𝒙𝑘+1 𝜕𝑿 ⎞ ⎟ ⎟⎠ , and 𝑏(𝒙𝑘)∶=𝜌(𝑿,0) 𝛿𝑡 𝒙𝑘, then the scheme (2.14)can be reformulated as a nonlinear system (𝒙𝑘+1)+  (𝒙𝑘+1)= 𝑏(𝒙𝑘), which can be solved iteratively by finding 𝒙𝑘+1,𝑛+1, such that 𝒙𝑘+1,𝑛+1 = 𝒙𝑘+1,𝑛+𝛼𝛿𝒙, with 𝛿𝒙= 𝑏(𝒙𝑘)−(𝒙𝑘+1,𝑛)− (𝒙𝑘+1,𝑛) ′(𝒙𝑘+1,𝑛)+  ′(𝒙𝑘+1,𝑛) , where 0<𝛼≤1is a damping coefficient. For Keller-Segel equations, Porous medium equations and Aggregation diffusion equations, we can obtain good accuracy and convergence rates by using the standard Newton’s iteration with 𝛼=1. Then, we just set the damped coefficient 𝛼=1 to compute numerical solutions in the numerical experiments presented in Section 4. 2.1.2. Second-order scheme In analogy to the first-order scheme (2.14)-(2.15), we can construct a second-order scheme for (1.1)based on a Crank-Nicolson discretization of (2.10)with 𝜖=𝛿𝑡2: ⎧ ⎪ ⎪ ⎨ ⎪ ⎪⎩ 𝒙 𝑘+1 =arginf 𝒙 1 2𝛿𝑡∫Ω𝑿 0 𝜌(𝑿,0)|𝒙−𝒙𝑘|2 +𝛿𝑡2(|∇𝑿 (𝒙−𝒙𝑘)|2)d𝑿 +1 2𝐸 ( 𝜌(𝑿,0) det 𝜕𝒙 𝜕𝑿 ) + 1 2 ∫Ω𝑿 0 𝒙(𝛿𝐸 𝛿𝒙 )𝑘d𝑿, 𝜌𝑘+1 = 𝜌(𝑿,0) det𝜕𝒙𝑘+1 𝜕𝑿 . (2.20) Next, we show that the above unconstrained minimization problem is equivalent to a Crank-Nicolson discretization. Theorem 2.4. For any 𝑘>0, the minimizer of the variational problem (2.20)is the solution of the following second-order Crank-Nicolson scheme: given (𝒙𝑘,𝜌(𝑿,0)), solve (𝒙𝑘+1,𝜌𝑘+1)from 𝜌(𝑿,0) 𝒙𝑘+1 −𝒙𝑘 𝛿𝑡 −𝛿𝑡(Δ𝑿 𝒙𝑘+1 −Δ𝑿 𝒙𝑘)+ 1 2𝜌(𝑿,0)∇𝒙𝐹′ ⎛ ⎜ ⎜⎝ 𝜌(𝑿,0) det𝜕𝒙𝑘+1 𝜕𝑿 ⎞ ⎟ ⎟⎠ + 1 2𝜌(𝑿,0)∇𝒙𝐹′ ⎛ ⎜ ⎜⎝ 𝜌(𝑿,0) det𝜕𝒙𝑘 𝜕𝑿 ⎞ ⎟ ⎟⎠ =0, (2.21) 𝜌𝑘+1 = 𝜌(𝑿,0) det𝜕𝒙𝑘+1 𝜕𝑿 , (2.22) with the Dirichlet boundary condition 𝒙𝑘+1|𝜕Ω= 𝑿|𝜕Ω. Proof. The equation (2.21) can be obtained by taking the variational derivative of (2.20) with respect to 𝒙, then the minimizer (𝒙𝑘+1,𝜌𝑘+1)of the minimization problem (2.20)is the solution of (2.21)with (2.15). The equation (2.21)can be rewritten into 𝒙𝑘+1 −𝒙𝑘 𝛿𝑡 − 𝛿𝑡 𝜌(𝑿,0)(Δ𝑿 𝒙𝑘+1 −Δ𝑿 𝒙𝑘)+ 1 2∇𝒙𝐹′ ⎛ ⎜ ⎜⎝ 𝜌(𝑿,0) det𝜕𝒙𝑘+1 𝜕𝑿 ⎞ ⎟ ⎟⎠ + 1 2∇𝒙𝐹′ ⎛ ⎜ ⎜⎝ 𝜌(𝑿,0) det𝜕𝒙𝑘 𝜕𝑿 ⎞ ⎟ ⎟⎠ =0, which is equivalent to 𝒗𝑘+1 2 =−∇𝒙𝐹′(𝜌(𝒙𝑘+1 2 ))+ 𝑂(𝛿𝑡2)=−∇𝒙(𝛿𝐸 𝛿𝜌 )𝑘+1 2 +𝑂(𝛿𝑡2), where the fact that the term 1 2∇𝒙𝐹′(𝜌(𝒙𝑘))+ 1 2∇𝒙𝐹′(𝜌(𝒙𝑘+1))is a second-order approximation to ∇𝒙𝐹′(𝜌(𝒙𝑘+1 2 ))has been utilized. Then the numerical scheme (2.21)is a second-order time discretization for the Wasserstein gradient flow (1.1). □ Similarly as in the last subsection, we can also show that 𝜌𝑘+1 obtained from (2.20)is a second-order approximation to the solution 𝜌(𝒙,𝑡)at 𝑡=𝑡𝑘+1. Proposition 2.2. The solution 𝜌𝑘+1 to numerical scheme (2.21)-(2.22)is a second-order approximation to the exact solution of Wasserstein gradient flow (1.1)at 𝑡𝑘+1. The proof is analogous to that of Proposition 2.1so we omit it for the sake of brevity. Journal of Computational Physics 524 (2025) 113696 6 Q.Cheng, Q.Liu, W.Chen et al. Remark 2.5. Similarly as (2.14), the nonlinear scheme (2.21)can also be reformulated as a nonlinear system (𝒙𝑘+1)+ 1 2  (𝒙𝑘+1)= (𝒙𝑘)−1 2  (𝒙𝑘), which can be solved by finding 𝒙𝑘+1,𝑛+1, such that 𝒙𝑘+1,𝑛+1 = 𝒙𝑘+1,𝑛+𝛼𝛿𝒙, with 𝛿𝒙= (𝒙𝑘−𝒙𝑘+1,𝑛)−1 2  (𝒙𝑘)−1 2  (𝒙𝑘+1,𝑛) ′(𝒙𝑘+1,𝑛)+ 1 2  ′(𝒙𝑘+1,𝑛) , where 0<𝛼≤1is a damping coefficient. Remark 2.6. From energy stability we can only derive that the norm ‖∇𝑿 𝒙𝑘+1‖is bounded. For both first-order and second-order Lagrangian schemes proposed above based on the regularized flow dynamic approach, we shall make very refined error analysis to clarify that the regularized terms should be 𝛿𝑡Δ𝑿 𝒙𝑘+1 =𝑂(𝛿𝑡)and 𝛿𝑡(Δ𝑿 𝒙𝑘+1 −Δ𝑿 𝒙𝑘)= 𝑂(𝛿𝑡2)in which the bound of ‖Δ𝑿 𝒙𝑘+1‖∞ is needed. 2.2. Properties of numerical schemes based on FDM approach Now we show that our numerical schemes based on the FDM approach inherit essential properties of the Wasserstein gradient flows. More precisely, we have Theorem 2.7. For any 0 ≤𝑘≤ 𝑇 𝛿𝑡, assume initial value 𝜌(𝑿,0)> 0 and consider the internal energy to be the form of 𝑈(𝑠)= 𝑠log𝑠in (2.13), then the solution 𝜌𝑘+1(𝒙)of numerical scheme (2.14)-(2.15)satisfies the following properties: •The numerical solution 𝜌𝑘+1 >0is also positive. •The scheme (2.14)-(2.15)is mass conservative in the sense that ∫ Ω𝒙 𝑡 𝜌𝑘+1(𝒙)d𝒙= ∫ Ω𝑿 0 𝜌(𝑿,0)d𝑿. (2.23) •It is unconditionally energy stable in the sense that 𝐸(𝒙𝑘+1)+ 𝛿𝑡 2 ∫ Ω𝑿 0 |∇𝑿 𝒙𝑘+1|2d𝑿 ≤𝐸(𝒙𝑘)+ 𝛿𝑡 2 ∫ Ω𝑿 0 |∇𝑿 𝒙𝑘|2d𝑿. (2.24) Proof. Since we choose the internal energy 𝑈(𝑠)to be the form of 𝑠log𝑠and 𝒙𝑘+1 is the minimizer of variational problem (2.13), then 𝜌(𝑿,0) det𝜕𝒙𝑘+1 𝜕𝑿 should stay in the domain of the logarithmic function which implies 𝜌𝑘+1 >0. Using the equality (2.15), we derive ∫ Ω𝒙 𝑡 𝜌(𝑿,0) det𝜕𝒙𝑘+1 𝜕𝑿 d𝒙= ∫ Ω𝑿 0 𝜌(𝑿,0) det𝜕𝒙𝑘+1 𝜕𝑿 det𝜕𝒙𝑘+1 𝜕𝑿 d𝑿 = ∫ Ω𝑿 0 𝜌(𝑿,0)d𝑿, where the equality det𝜕𝒙𝑘+1 𝜕𝑿 d𝑿 =d 𝒙has been used. Then the scheme (2.14)-(2.15)is mass conservative. From the minimization problem (2.13), we obtain that 𝐸(𝒙𝑘+1)+ 𝛿𝑡 2 ∫ Ω𝑿 0 |∇𝑿 𝒙𝑘+1|2d𝑿 ≤𝐸(𝒙𝑘)+ 𝛿𝑡 2 ∫ Ω𝑿 0 |∇𝑿 𝒙𝑘|2d𝑿, the energy stability property is arrived. □ Remark 2.8. If the regularization term in (2.13)is taken as ∫Ω𝑿 0 |∇𝑿 (𝒙−𝒙𝑘)|2d𝑿, the energy dissipation 𝐸(𝒙𝑘+1) ≤𝐸(𝒙𝑘)for any 0 ≤𝑘≤ 𝑇 𝛿𝑡can also be derived. Remark 2.9. Similarly to the first-order scheme (2.14)-(2.15), we can show that the second-order Crank-Nicolson scheme (2.21)is mass conservative and its numerical solution 𝜌𝑘+1 is also positivity-preserving if the internal energy is chosen as a logarithm type function. But we are unable to prove that the Crank-Nicolson scheme (2.21)is energy dissipative. Journal of Computational Physics 524 (2025) 113696 7 Q.Cheng, Q.Liu, W.Chen et al. 3. Fully discretizations based on FDM approach In this section, we provide more details about the spatial discretizations and propose full discrete schemes for the Wasserstein gradient flows (1.1)based on the FDM approach. To better explain our approach, we first consider the discretization in one dimension, then we generalize our FDM approach to two-dimensional case. More specifically, we show that our fully discrete schemes are also positivity-preserving, mass conservative and energy dissipative. 3.1. Numerical scheme in 1D In this subsection, we develop an implicit finite difference scheme for the Wasserstein gradient flows (1.1). For convenience, we define some notations, let Ω𝑋 0 =[−𝐿,𝐿]and Ω𝑥 0 =[−𝐿,𝐿]be the computational domain in Lagrangian and Eulerian coordinate and choose the spatial grids: −𝐿=𝑋0 <𝑋1 < ⋯ <𝑋𝑁=𝐿. We define 𝑥𝑗(𝑡𝑘)= 𝑥(𝑋𝑗,𝑡𝑘), 0 ≤𝑗≤𝑁, 0 ≤𝑘≤ 𝑇 𝛿𝑡, 𝜌𝑗(𝑡𝑘)= 𝜌(𝑥𝑗,𝑡𝑘), 0 ≤𝑗≤𝑁, 0 ≤𝑘≤ 𝑇 𝛿𝑡, where 𝑋𝑗=𝑋0 +𝑗𝛿𝑋, 𝛿𝑋=𝑋𝑗+1 −𝑋𝑗. For the following finite dimensional minimization problem, we define the admissible set 𝑆𝑎𝑑∶={𝒙∶𝑥𝑗+1 >𝑥𝑗for𝑗=0,1, ⋯ ,𝑁− 1, and 𝑥0 =𝑋0, 𝑥𝑁=𝑋𝑁}: ⎧ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪⎩ 𝒙 𝑘+1 ∶=arginf𝒙∈𝑆𝑎𝑑 1 2𝛿𝑡 𝑁−1∑ 𝑗=0 𝜌(𝑋𝑗+1 2 ,0)|𝑥𝑗+1 2 −𝑥𝑘 𝑗+1 2 |2𝛿𝑋+ 𝜖 2 𝑁−1∑ 𝑗=0 | 𝑥𝑗+1 −𝑥𝑗 𝛿𝑋 |2𝛿𝑋 +𝐸ℎ(𝒙), 𝜌𝑘+1 𝑗+1 2 ∶= 𝜌(𝑋𝑗+1 2 ,0) 𝑥𝑘+1 𝑗+1−𝑥𝑘+1 𝑗 𝛿𝑋 , (3.1) where 𝒙=(𝑥0,𝑥1,… ,𝑥𝑁−1,𝑥𝑁), 𝑥𝑗+1 2 ∶=1 2(𝑥𝑗+1 +𝑥𝑗), and the discrete energy is defined by 𝐸ℎ(𝒙)∶= 𝑁−1∑ 𝑗=0 𝐹 ⎛ ⎜ ⎜⎝ 𝜌(𝑋𝑗+1 2 ,0) 𝑥𝑗+1−𝑥𝑗 𝛿𝑋 ⎞ ⎟ ⎟⎠ 𝑥𝑗+1 −𝑥𝑗 𝛿𝑋 𝛿𝑋. (3.2) Lemma 3.1. The minimizer of the variational problem (3.1)is the solution of the following numerical scheme with 𝜖=𝛿𝑡: given (𝒙𝑘,𝜌(𝑋,0)), we solve (𝒙𝑘+1,𝜌𝑘+1)from 1 2𝛿𝑡𝜌(𝑋𝑗+1 2 ,0)(𝑥𝑘+1 𝑗+1 2 −𝑥𝑘 𝑗+1 2 )𝛿𝑋+ 1 2𝛿𝑡𝜌(𝑋𝑗−1 2 ,0)(𝑥𝑘+1 𝑗−1 2 −𝑥𝑘 𝑗−1 2 )𝛿𝑋 −𝛿𝑡 𝑥𝑘+1 𝑗+1 −2𝑥𝑘+1 𝑗 +𝑥𝑘+1 𝑗−1 (𝛿𝑋)2 𝛿𝑋+ 𝛿𝐸ℎ 𝛿𝑥𝑗 (𝒙𝑘+1)=0 , (3.3) 𝜌𝑘+1 𝑗+1 2 ∶= 𝜌(𝑋𝑗+1 2 ,0) 𝑥𝑘+1 𝑗+1−𝑥𝑘+1 𝑗 𝛿𝑋 , 𝑗=0,1 ⋯ ,𝑁−1, (3.4) with the initial and boundary conditions 𝒙0 =(𝑋0,𝑋1, ⋯ ,𝑋𝑁) and 𝑥𝑘+1 0 =𝑋0, 𝑥𝑘+1 𝑁 =𝑋𝑁. (3.5) The last term 𝛿𝐸ℎ 𝛿𝑥𝑗 (𝒙𝑘+1)in (3.3)is defined as follows: 𝛿𝐸ℎ 𝛿𝑥𝑗 (𝒙𝑘+1)=𝐹′ ⎛ ⎜ ⎜ ⎜⎝ 𝜌(𝑋 𝑗+1 2 ,0) 𝑥𝑘+1 𝑗+1−𝑥𝑘+1 𝑗 𝛿𝑋 ⎞ ⎟ ⎟ ⎟⎠ 𝜌(𝑋 𝑗+1 2 ,0)𝛿𝑋 (𝑥𝑘+1 𝑗+1 −𝑥𝑘+1 𝑗 )2 𝑥𝑘+1 𝑗+1 −𝑥𝑘+1 𝑗 𝛿𝑋 𝛿𝑋−𝐹 ⎛ ⎜ ⎜ ⎜⎝ 𝜌(𝑋 𝑗−1 2 ,0) 𝑥𝑘+1 𝑗+1−𝑥𝑘+1 𝑗 𝛿𝑋 ⎞ ⎟ ⎟ ⎟⎠ −𝐹 ′ ⎛ ⎜ ⎜ ⎜⎝ 𝜌(𝑋 𝑗−1 2 ,0) 𝑥𝑘+1 𝑗 −𝑥𝑘+1 𝑗−1 𝛿𝑋 ⎞ ⎟ ⎟ ⎟⎠ 𝜌(𝑋 𝑗−1 2 ,0)𝛿𝑋 (𝑥𝑘+1 𝑗 −𝑥𝑘+1 𝑗−1)2 𝑥𝑘+1 𝑗 −𝑥𝑘+1 𝑗−1 𝛿𝑋 𝛿𝑋+𝐹 ⎛ ⎜ ⎜ ⎜⎝ 𝜌(𝑋 𝑗−1 2 ,0) 𝑥𝑘+1 𝑗 −𝑥𝑘+1 𝑗−1 𝛿𝑋 ⎞ ⎟ ⎟ ⎟⎠ Journal of Computational Physics 524 (2025) 113696 8 Q.Cheng, Q.Liu, W.Chen et al. =𝐹′ ⎛ ⎜ ⎜ ⎜⎝ 𝜌(𝑋 𝑗+1 2 ,0) 𝑥𝑘+1 𝑗+1−𝑥𝑘+1 𝑗 𝛿𝑋 ⎞ ⎟ ⎟ ⎟⎠ 𝜌(𝑋 𝑗+1 2 ,0) 𝑥𝑘+1 𝑗+1−𝑥𝑘+1 𝑗 𝛿𝑋 −𝐹 ⎛ ⎜ ⎜ ⎜⎝ 𝜌(𝑋 𝑗−1 2 ,0) 𝑥𝑘+1 𝑗+1−𝑥𝑘+1 𝑗 𝛿𝑋 ⎞ ⎟ ⎟ ⎟⎠ −𝐹 ′ ⎛ ⎜ ⎜ ⎜⎝ 𝜌(𝑋 𝑗−1 2 ,0) 𝑥𝑘+1 𝑗 −𝑥𝑘+1 𝑗−1 𝛿𝑋 ⎞ ⎟ ⎟ ⎟⎠ 𝜌(𝑋 𝑗−1 2 ,0) 𝑥𝑘+1 𝑗 −𝑥𝑘+1 𝑗−1 𝛿𝑋 +𝐹 ⎛ ⎜ ⎜ ⎜⎝ 𝜌(𝑋 𝑗−1 2 ,0) 𝑥𝑘+1 𝑗 −𝑥𝑘+1 𝑗−1 𝛿𝑋 ⎞ ⎟ ⎟ ⎟⎠ . Numerical scheme (3.3)-(3.4)can be applied to various Wasserstein gradient flows, for example: •For the linear Fokker-Planck equation with one-well energy potential: 𝐸ℎ(𝒙)∶= 𝑁−1∑ 𝑗=0 𝛿𝑋𝜌(𝑋𝑗+1 2 ,0) ⎛ ⎜ ⎜⎝ log ⎛ ⎜ ⎜⎝ 𝜌(𝑋𝑗+1 2 ,0) 𝑥𝑗+1−𝑥𝑗 𝛿𝑋 ⎞ ⎟ ⎟⎠ + |𝑥𝑗+1 +𝑥𝑗|2 8 ⎞ ⎟ ⎟⎠ , (3.6) then we have 𝛿𝐸ℎ 𝛿𝑥𝑗 (𝒙𝑘+1)=𝛿𝑋 𝜌(𝑋𝑗+1 2 ,0) 𝑥𝑘+1 𝑗+1 −𝑥𝑘+1 𝑗 −𝛿𝑋 𝜌(𝑋𝑗−1 2 ,0) 𝑥𝑘+1 𝑗 −𝑥𝑘+1 𝑗−1 + 𝛿𝑋 4 ( 𝜌(𝑋𝑗+1 2 ,0)(𝑥𝑘+1 𝑗+1 +𝑥𝑘+1 𝑗 )+ 𝜌(𝑋𝑗−1 2 ,0)(𝑥𝑘+1 𝑗 +𝑥𝑘+1 𝑗−1) ) . (3.7) •For the porous medium equation: 𝐸ℎ(𝒙)∶= 1 𝑚−1 𝑁−1∑ 𝑗=0 (𝛿𝑋)𝑚𝜌𝑚(𝑋𝑗+1 2 ,0)(𝑥𝑗+1 −𝑥𝑗)−𝑚+1, 𝑚>1, (3.8) we obtain 𝛿𝐸ℎ 𝛿𝑥𝑗 (𝒙𝑘+1)=( 𝛿𝑋)𝑚 ⎛ ⎜ ⎜⎝ 𝜌𝑚(𝑋𝑗+1 2 ,0) (𝑥𝑘+1 𝑗+1 −𝑥𝑘+1 𝑗 )𝑚 − 𝜌𝑚(𝑋𝑗−1 2 ,0) (𝑥𝑘+1 𝑗 −𝑥𝑘+1 𝑗−1)𝑚 ⎞ ⎟ ⎟⎠ . (3.9) •For the aggregation equation with the interaction potential 𝑊(𝑥), we consider the discrete energy as follows by treating 𝑥implicit and 𝑦explicit: 𝐸ℎ(𝒙𝑘+1)∶= 𝑁−1∑ 𝑗=0 𝛿𝑋𝜌(𝑋𝑗+1 2 ,0) 𝑁−1∑ 𝑖=0 𝜌𝑘 𝑖+1 2 𝑥𝑘 𝑖+1 ∫ 𝑥𝑘 𝑖 𝑊(𝑥𝑘+1 𝑗+1 2 −𝑦)d𝑦, (3.10) it can be calculated that 𝛿𝐸ℎ 𝛿𝑥𝑘+1 𝑗 (𝒙𝑘+1)=𝛿𝑋𝜌(𝑋𝑗+1 2 ,0) 𝑁−1∑ 𝑖=0 𝜌𝑘 𝑖+1 2 𝑥𝑘 𝑖+1 ∫ 𝑥𝑘 𝑖 1 2𝑊′ 𝑥(𝑥𝑘+1 𝑗+1 2 −𝑦)d𝑦 +𝛿𝑋𝜌(𝑋𝑗−1 2 ,0) 𝑁−1∑ 𝑖=0 𝜌𝑘 𝑖+1 2 𝑥𝑘 𝑖+1 ∫ 𝑥𝑘 𝑖 1 2𝑊′ 𝑥(𝑥𝑘+1 𝑗−1 2 −𝑦)d𝑦. (3.11) The Hessian matrix can be calculated by ∇2𝐸ℎ= ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢⎣ 𝛿2𝐸ℎ 𝛿(𝑥𝑘+1 1 )2 𝛿2𝐸ℎ 𝛿𝑥𝑘+1 1 𝛿𝑥𝑘+1 2 𝛿2𝐸ℎ 𝛿𝑥𝑘+1 2 𝛿𝑥𝑘+1 1 𝛿2𝐸ℎ 𝛿(𝑥𝑘+1 2 )2 𝛿2𝐸ℎ 𝛿𝑥𝑘+1 2 𝛿𝑥𝑘+1 3 𝛿2𝐸ℎ 𝛿𝑥𝑘+1 3 𝛿𝑥𝑘+1 2 𝛿2𝐸ℎ 𝛿(𝑥𝑘+1 3 )2 𝛿2𝐸ℎ 𝛿𝑥𝑘+1 3 𝛿𝑥𝑘+1 4 ⋱⋱ ⋱ 𝛿2𝐸ℎ 𝛿𝑥𝑘+1 𝑁−2𝛿𝑥𝑘+1 𝑁−3 𝛿2𝐸ℎ 𝛿(𝑥𝑘+1 𝑁−2)2 𝛿2𝐸ℎ 𝛿𝑥𝑘+1 𝑁−2𝛿𝑥𝑘+1 𝑁−1 𝛿2𝐸ℎ 𝛿𝑥𝑘+1 𝑁−1𝛿𝑥𝑘+1 𝑁−2 𝛿2𝐸ℎ 𝛿(𝑥𝑘+1 𝑁−1)2 ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥⎦ . Journal of Computational Physics 524 (2025) 113696 9 Q.Cheng, Q.Liu, W.Chen et al. The discrete energy is strictly convex if the Hessian matrix ∇2𝐸ℎis positive definite. For instance, when choosing 𝑊(𝑥)= |𝑥|2 2 −ln|𝑥|, we can find that the discrete energy 𝐸ℎ(𝒙𝑘+1)is convex since 𝑊′′(𝑥)=1+ 1 𝑥2 >0. However, for the Keller-Segel equation with 𝑈(𝜌)= 𝜌log𝜌and 𝑊(𝑥)= 1 2𝜋ln|𝑥|, we consider the discrete energy 𝐸ℎ(𝒙𝑘+1)= 𝑁−1∑ 𝑖=0 𝛿𝑋𝜌(𝑋𝑖+1 2 ,0)log ⎛ ⎜ ⎜ ⎜⎝ 𝜌(𝑋 𝑖+1 2 ,0) 𝑥𝑘+1 𝑖+1 −𝑥𝑘+1 𝑖 𝛿𝑋 ⎞ ⎟ ⎟ ⎟⎠ −𝛿𝑋 2𝜋 𝑁−1∑ 𝑖=0 𝜌(𝑋𝑖+1 2 ,0) × 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 ( (𝑥𝑘+1 𝑖+1 2 −𝑥𝑘 𝑗+1)ln(|𝑥𝑘+1 𝑖+1 2 −𝑥𝑘 𝑗+1|)−(𝑥𝑘+1 𝑖+1 2 −𝑥𝑘 𝑗)ln(|𝑥𝑘+1 𝑖+1 2 −𝑥𝑘 𝑗|) ) , (3.12) it is uncertain whether the discrete energy is convex. The details are shown in Appendix. The fully discretized numerical scheme (3.3)-(3.4)in one dimensional case holds the following structure-preserving properties. Theorem 3.2. Assume the initial value 𝜌(𝑋,0)>0for 𝑋∈Ω𝑋 0 , the energy density 𝐹(𝑠)satisfies 𝐹(𝑠) ≥0for 𝑠≥0, and lim 𝑠→0 𝐹(1 𝑠 )𝑠=∞, then the scheme (3.3)-(3.4)has a unique solution 𝒙𝑘+1 ∈𝑆𝑎𝑑when 𝛿2𝐸ℎ 𝛿𝒙2 >0, and the following properties hold: •the solution to numerical scheme (3.3)-(3.4)is positive, 𝜌𝑘+1 𝑗+1 2 >0, •the numerical scheme (3.3)-(3.4)satisfies the property of mass conserving for the density 𝜌𝑘+1 in the sense that 𝑁−1∑ 𝑗=0 𝜌𝑘+1 𝑗+1 2 (𝑥𝑘+1 𝑗+1 −𝑥𝑘+1 𝑗 )= 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 (𝑥𝑘 𝑗+1 −𝑥𝑘 𝑗)= 𝑁−1∑ 𝑗=0 𝜌(𝑋𝑗+1 2 ,0)𝛿𝑋, (3.13) •the discrete energy in scheme (3.3)-(3.4)is dissipative in the sense that ̃𝐸ℎ(𝒙𝑘+1) ≤ ̃𝐸ℎ(𝒙𝑘), (3.14) where the energy ̃𝐸ℎ(𝒙𝑘+1)is defined by ̃𝐸ℎ(𝒙𝑘+1)= 𝐸ℎ(𝒙𝑘+1)+ 𝑁−1∑ 𝑖=0 𝛿𝑡 2 || | | || 𝑥 𝑘+1 𝑗+1 −𝑥𝑘+1 𝑗 𝛿𝑋 || | | || 2 𝛿𝑋. (3.15) Proof. Step 1 (energy law): We can easily check that 𝒙𝑘+1 is the minimizer of the following Lagrangian function which is defined by 𝐿(𝒙𝑘+1)= 1 2𝛿𝑡 𝑁−1∑ 𝑗=0 ( 𝜌(𝑋𝑗+1 2 ,0)|𝑥𝑘+1 𝑗+1 2 −𝑥𝑘 𝑗+1 2 |2𝛿𝑋+𝛿𝑡2| 𝑥𝑘+1 𝑗+1 −𝑥𝑘+1 𝑗 𝛿𝑋 |2𝛿𝑋 ) +𝐸ℎ(𝒙𝑘+1). (3.16) Since 𝑥𝑘+1 𝑗 is the minimizer of (3.1), it is easy to show that the discrete energy is dissipative in the sense that 𝐸ℎ(𝒙𝑘+1)+ 𝑁−1∑ 𝑖=0 𝛿𝑡 2 | 𝑥𝑘+1 𝑗+1 −𝑥𝑘+1 𝑗 𝛿𝑋 |2𝛿𝑋≤𝐸ℎ(𝒙𝑘)+ 𝑁−1∑ 𝑖=0 𝛿𝑡 2 | 𝑥𝑘 𝑗+1 −𝑥𝑘 𝑗 𝛿𝑋 |2𝛿𝑋 ≤𝐸ℎ(𝒙0)+ 𝑁−1∑ 𝑖=0 𝛿𝑡 2 | 𝑥0 𝑗+1 −𝑥0 𝑗 𝛿𝑋 |2𝛿𝑋. Step 2 (positivity-preserving): Taking variational derivative with respect to the Lagrangian 𝜕𝐿 𝜕𝑥𝑘+1 𝑗 =0 for 𝑗=1, ⋯, 𝑁−1, we derive the numerical scheme (3.3). Obviously, the first two terms of (3.16)are strictly convex with respect to 𝒙𝑘+1. Combining the assumption that 𝛿2𝐸ℎ 𝛿𝒙2 >0, we find there exists a unique minimizer 𝒙𝑘+1 belonging to the closed convex set 𝑆𝑎𝑑={ 𝒙∶𝑥𝑗+1 ≥𝑥𝑗for 𝑗=0,1, ⋯ ,𝑁−1, 𝑥𝑗0+1 = 𝑥𝑗0 for some 0 ≤𝑗0 ≤𝑁−1, and 𝑥0 =𝑋0, 𝑥𝑁=𝑋𝑁}. Next, we prove that the minimizer does not lie on the boundary of 𝑆𝑎𝑑by contradiction. We assume there exists a minimizer 𝒙𝑘+1 satisfies 𝑥𝑘+1 𝑗0+1 =𝑥𝑘+1 𝑗0 for some 0 ≤𝑗0 ≤𝑁−1, then we obtain 𝐸(𝒙𝑘+1)=∞ since we have Journal of Computational Physics 524 (2025) 113696 10 Q.Cheng, Q.Liu, W.Chen et al. 𝐹 ⎛ ⎜ ⎜ ⎜⎝ 𝜌(𝑋 𝑗0+1 2 ,0) 𝑥𝑘+1 𝑗0+1−𝑥𝑘+1 𝑗0 𝛿𝑋 ⎞ ⎟ ⎟ ⎟⎠ 𝑥 𝑘+1 𝑗0+1 −𝑥𝑘+1 𝑗0 𝛿𝑋 =∞, under the assumption lim 𝑠→0 𝐹(1 𝑠 )𝑠=∞. The above result implies 𝐿(𝒙𝑘+1)=∞ , which leads to a contradiction. Then the minimizer 𝒙𝑘+1 must lie in the interior of the admissible set 𝑆𝑎𝑑satisfying 𝑥𝑘+1 𝑗+1 >𝑥𝑘+1 𝑗 for all 𝑗=0, 1, ⋯, 𝑁−1. Combining the 𝑥𝑗+1 ≥𝑥𝑗and using the equality (3.4), the positivity of the numerical solution 𝜌𝑘+1 𝑗+1 2 can easily be obtained. Step 3 (mass conserving): From the equality (3.4), we derive the following result: 𝑁−1∑ 𝑗=0 𝜌𝑘+1 𝑗+1 2 (𝑥𝑘+1 𝑗+1 −𝑥𝑘+1 𝑗 )= 𝑁−1∑ 𝑗=0 𝜌(𝑋𝑗+1 2 ,0) 𝑥𝑘+1 𝑗+1−𝑥𝑘+1 𝑗 𝛿𝑋 (𝑥𝑘+1 𝑗+1 −𝑥𝑘+1 𝑗 )= 𝑁−1∑ 𝑗=0 𝜌(𝑋𝑗+1 2 ,0)𝛿𝑋, which implies that the proposed scheme is mass conserving. Finally, the proof is completed. □ Remark 3.3. Specifically, for the porous medium equation and the Fokker-Planck equation, we have 𝛿2𝐸ℎ 𝛿𝒙2 >0since the convexity of the energy, then Theorem 3.2 will also hold without the regularization term. Actually, numerical experiments for both models are implemented without the regularization term in Section 4. Remark 3.4. To be specific, for the Fokker-Planck equation with energy (3.6)and porous medium equation with energy (3.8), from the energy dissipation law 𝐸ℎ(𝒙𝑘+1) ≤𝐸ℎ(𝒙0)+ 𝑇𝛿𝑋 2 , we have 𝐹 ⎛ ⎜ ⎜ ⎜⎝ 𝜌(𝑋𝑗+1 2 ,0) 𝑥𝑘+1 𝑗+1−𝑥𝑘+1 𝑗 𝛿𝑋 ⎞ ⎟ ⎟ ⎟⎠ 𝑥𝑘+1 𝑗+1 −𝑥𝑘+1 𝑗 𝛿𝑋 ≤𝐸ℎ(𝒙0)+ 𝑇𝛿𝑋 2 , 0 ≤𝑗≤𝑁−1. Using the fact that energy density in both cases satisfies 𝐹(1 𝑠 )𝑠→∞as 𝑠→0, we derive that 𝑥𝑘+1 𝑗+1−𝑥𝑘+1 𝑗 𝛿𝑋 >0, 0 ≤𝑗≤𝑁−1is uniformly away from zero. Remark 3.5. If the regularization term is taken as ∑ 𝑗| (𝑥𝑘+1 𝑗+1−𝑥𝑘 𝑗+1)−(𝑥𝑘+1 𝑗 −𝑥𝑘 𝑗) 𝛿𝑋 |2𝛿𝑋, properties in Theorem 3.2will also be derived, and the unconditionally discrete energy dissipation law 𝐸ℎ(𝒙𝑘+1) ≤𝐸ℎ(𝒙𝑘)holds. Remark 3.6. In fact, the first term of the optimization problem (3.1)can also be substituted by 1 2 𝑁−1∑ 𝑗=0 𝜌(𝑋𝑗,0)|𝑥𝑘+1 𝑗 −𝑥𝑘 𝑗|2𝛿𝑋+𝜌(𝑋𝑗+1,0)|𝑥𝑘+1 𝑗+1 −𝑥𝑘 𝑗+1|2𝛿𝑋, which is also an approximation to ∫Ω𝑿 0 𝜌(𝑋,0)|𝑥𝑘+1 −𝑥𝑘|2d𝑋. Then the corresponding numerical scheme follows 𝜌(𝑋𝑗,0) 𝑥𝑘+1 𝑗 −𝑥𝑘 𝑗 𝛿𝑡 𝛿𝑋−𝛿𝑡 𝑥𝑘+1 𝑗+1 −2𝑥𝑘+1 𝑗 +𝑥𝑘+1 𝑗−1 (𝛿𝑋)2 𝛿𝑋+ 𝛿𝐸ℎ 𝛿𝑥𝑗 (𝒙𝑘+1)=0 , (3.17) with the initial and boundary conditions (3.5), and 𝜌𝑘+1 defined by (3.4). The solution to scheme (3.17) also preserves properties proved in Theorem 3.2. 3.2. Two dimensional case We extend our numerical approach to multidimensional case, for simplicity, we only consider two-dimensions. Denote 𝒙=(𝑥,𝑦), 𝑿 =(𝑋,𝑌), and the Jacobian matrix 𝜕𝒙 𝜕𝑿 = 𝜕(𝑥,𝑦) 𝜕(𝑋,𝑌). Set Ω𝑿 0 =[−𝐿𝑥,𝐿𝑥]×[−𝐿𝑦,𝐿𝑦]with 𝐿𝑥, 𝐿𝑦>0, and Ω𝒙 0 =Ω𝑿 0 . Let 𝑀𝑥, 𝑀𝑦∈ℕ be given, and define the grid spacing ℎ𝑥= 2𝐿𝑥 𝑀𝑥 , ℎ𝑦= 2𝐿𝑦 𝑀𝑦 . Let 𝑋𝑖𝑗=𝑋0 +𝑗ℎ𝑥, 𝑌𝑖𝑗=𝑌0 +𝑖ℎ𝑦for 0 ≤𝑗≤𝑀𝑥, 0 ≤𝑖≤𝑀𝑦. We define 𝒙𝑖𝑗(𝑡𝑘)= 𝒙(𝑋𝑖𝑗,𝑌𝑖𝑗,𝑡𝑘), 0 ≤𝑗≤𝑀𝑥, 0 ≤𝑖≤𝑀𝑦, 1 ≤𝑘≤ 𝑇 𝛿𝑡, Journal of Computational Physics 524 (2025) 113696 11 Q.Cheng, Q.Liu, W.Chen et al. 𝜌0 𝑖𝑗=𝜌(𝑋𝑖𝑗,𝑌𝑖𝑗,0) ≥0. The explicit and implicit numerical schemes will be proposed in the following. 3.2.1. Implicit numerical scheme The following fully implicit numerical scheme with the regularization term 𝜖Δ𝑿 𝒙, 𝜖=𝛿𝑡can be proposed: given (𝑥𝑘,𝑦𝑘), solving (𝑥𝑘+1,𝑦𝑘+1)from 𝜌0 𝑖𝑗 𝑥𝑘+1 𝑖𝑗−𝑥𝑘 𝑖𝑗 𝛿𝑡 −𝛿𝑡 (𝑥𝑘+1 𝑖,𝑗+1 +𝑥𝑘+1 𝑖,𝑗−1−2𝑥𝑘+1 𝑖𝑗 ℎ2 𝑥 + 𝑥𝑘+1 𝑖+1,𝑗+𝑥𝑘+1 𝑖−1,𝑗−2𝑥𝑘+1 𝑖𝑗 ℎ2 𝑦 ) + 𝛿̄𝐸ℎ 𝛿𝑥 (𝒙𝑘+1 𝑖𝑗)=0 , (3.18) 𝜌0 𝑖𝑗 𝑦𝑘+1 𝑖𝑗−𝑦𝑘 𝑖𝑗 𝛿𝑡 −𝛿𝑡 (𝑦𝑘+1 𝑖,𝑗+1 +𝑦𝑘+1 𝑖,𝑗−1−2𝑦𝑘+1 𝑖𝑗 ℎ2 𝑥 + 𝑦𝑘+1 𝑖+1,𝑗+𝑦𝑘+1 𝑖−1,𝑗−2𝑦𝑘+1 𝑖𝑗 ℎ2 𝑦 ) + 𝛿̄𝐸ℎ 𝛿𝑦 (𝒙𝑘+1 𝑖𝑗)=0 , (3.19) with the following initial and boundary conditions: 𝒙0 = 𝑿, 𝒙𝑘+1|𝜕Ω= 𝑿|𝜕Ω. (3.20) Then the density 𝜌𝑘+1 𝑖𝑗can be obtained by 𝜌𝑘+1 𝑖𝑗= 𝜌0 𝑖𝑗 𝑘+1 𝑖𝑗 with 𝑘+1 𝑖𝑗= |||| | | | 𝜕𝑥𝑘+1 𝑖𝑗 𝜕𝑋 𝜕𝑦𝑘+1 𝑖𝑗 𝜕𝑋 𝜕𝑥𝑘+1 𝑖𝑗 𝜕𝑌 𝜕𝑦𝑘+1 𝑖𝑗 𝜕𝑌 |||| | | | = || ||| | | | 𝑥𝑘+1 𝑖,𝑗+1−𝑥𝑘+1 𝑖,𝑗−1 2ℎ𝑥 𝑦𝑘+1 𝑖,𝑗+1−𝑦𝑘+1 𝑖,𝑗−1 2ℎ𝑥 𝑥𝑘+1 𝑖+1,𝑗−𝑥𝑘+1 𝑖−1,𝑗 2ℎ𝑦 𝑦𝑘+1 𝑖+1,𝑗−𝑦𝑘+1 𝑖−1,𝑗 2ℎ𝑦 || ||| | | | . (3.21) The proposed fully implicit scheme (3.18)-(3.19)is highly nonlinear and should be solved in the admissible set 𝐸𝑎𝑑={ 𝒙∶d e t𝜕𝒙 𝜕𝑿 |𝑖𝑗> 0 for all 𝑖,𝑗∈ℕ, 𝒙|𝜕Ω= 𝑿|𝜕Ω}. The solution of the implicit scheme (3.18)-(3.19)is the minimizer of the minimization problem: 𝒙𝑘+1 ∶=arg inf 𝒙∈𝐸𝑎𝑑 𝐽𝑘(𝒙), (3.22) where 𝐽𝑘(𝒙)is defined by 𝐽𝑘(𝒙)= 1 2𝛿𝑡 ∑ 𝑖,𝑗 𝜌0 𝑖𝑗|𝒙𝑖𝑗−𝒙𝑘 𝑖𝑗|2ℎ𝑥ℎ𝑦+𝛿𝑡2(| 𝒙𝑖,𝑗+1 −𝒙𝑖,𝑗 ℎ𝑥 |2 +| 𝒙𝑖+1,𝑗−𝒙𝑖,𝑗 ℎ𝑦 |2)ℎ𝑥ℎ𝑦+ ̄𝐸ℎ(𝒙), with ̄𝐸ℎ(𝒙)= ∑ 𝑖,𝑗𝐹 ( 𝜌0 𝑖𝑗 det 𝜕𝒙 𝜕𝑿 |𝑖𝑗 ) det 𝜕𝒙 𝜕𝑿 |𝑖𝑗ℎ𝑥ℎ𝑦. Following the analysis in [10,29], we obtain the following result for the implicit nu- merical scheme (3.18)-(3.19). Theorem 3.7. Assume the density of energy 𝐹(𝑠)satisfies lim 𝑠→0 𝐹(1 𝑠 )𝑠=∞, and 𝐹(𝑠) ≥0for 𝑠≥0. Then there exists a solution 𝒙𝑘+1 ∈𝐸𝑎𝑑 to the nonlinear numerical scheme (3.18)-(3.19), and the following energy dissipation law holds: ̄𝐸ℎ(𝒙𝑘+1)+ ℎ𝑥ℎ𝑦 2 ∑ 𝑖,𝑗 𝛿𝑡 ⎛ ⎜ ⎜⎝ || | | | | 𝒙 𝑘+1 𝑖,𝑗+1 −𝒙𝑘+1 𝑖,𝑗 ℎ𝑥 || | | | | 2 + || | | | | 𝒙 𝑘+1 𝑖+1,𝑗−𝒙𝑘+1 𝑖,𝑗 ℎ𝑦 || | | | | 2⎞ ⎟ ⎟⎠ ≤ ̄𝐸ℎ(𝒙𝑘)+ ℎ𝑥ℎ𝑦 2 ∑ 𝑖,𝑗 𝛿𝑡 ⎛ ⎜ ⎜⎝ || | ||| 𝒙 𝑘 𝑖,𝑗+1 −𝒙𝑘 𝑖,𝑗 ℎ𝑥 || | ||| 2 + || | ||| 𝒙 𝑘 𝑖+1,𝑗−𝒙𝑘 𝑖,𝑗 ℎ𝑦 || | ||| 2⎞ ⎟ ⎟⎠ . (3.23) Proof. The existence of the solution to the nonlinear numerical scheme (3.18)-(3.19) is equivalent to obtaining the minimizer of 𝐽𝑘(𝒙) in the admissible set 𝐸𝑎𝑑. Then we turn to prove the existence of the minimizer of the minimization problem (3.22). If the minimizer lies on the boundary of the admissible set, i.e. 𝒙∈𝜕𝐸𝑎𝑑, we have 𝐽𝑘(𝒙)=∞ , which is a contradiction. Following the proof in [10,29], the claim of the theorem will be derived once we show that the sub-level set  ∶= { 𝒙∈𝐸𝑎𝑑∶ 𝐽𝑘(𝒙) ≤ ̄𝐸ℎ(𝒙𝑘)+ ℎ𝑥ℎ𝑦 2 ∑ 𝑖,𝑗 𝛿𝑡(| 𝒙𝑘 𝑖,𝑗+1 −𝒙𝑘 𝑖,𝑗 ℎ𝑥 |2 +| 𝒙𝑘 𝑖+1,𝑗−𝒙𝑘 𝑖,𝑗 ℎ𝑦 |2)∶=𝛾 } is a non-empty compact subset of ℝ2. Clearly, 𝒙𝑘∈, so it is non-empty. is bounded.Assume the initial value 𝜌0 𝑖𝑗>0, there exists 𝜆>0such that 𝜆 2𝛿𝑡 ∑ 𝑖,𝑗 |𝒙𝑖𝑗−𝒙𝑘 𝑖𝑗|2ℎ𝑥ℎ𝑦≤ 1 2𝛿𝑡 ∑ 𝑖,𝑗 𝜌0 𝑖𝑗|𝒙𝑖𝑗−𝒙𝑘 𝑖𝑗|2ℎ𝑥ℎ𝑦≤𝛾. (3.24) Then is bounded. Journal of Computational Physics 524 (2025) 113696 12 Q.Cheng, Q.Liu, W.Chen et al. is a closed subset of ℝ2.It suffices to show that the limit ̃𝒙of any sequence {𝒙(𝑘)}∞ 𝑘=1 ⊂𝐸𝑎𝑑belongs to 𝐸𝑎𝑑. For all 𝑘, we have 𝛾≥ ̄𝐸ℎ(𝒙(𝑘)) ≥ℎ𝑥ℎ𝑦𝐹 ⎛ ⎜ ⎜⎝ 𝜌0 𝑖𝑗 det𝜕𝒙(𝑘) 𝜕𝑿 |𝑖𝑗 ⎞ ⎟ ⎟⎠ det𝜕𝒙(𝑘) 𝜕𝑿 |||𝑖𝑗 . (3.25) Since 𝐹 ( 𝜌0 𝑖𝑗 det𝜕𝒙(𝑘) 𝜕𝑿 |𝑖𝑗 ) det𝜕𝒙(𝑘) 𝜕𝑿 |𝑖𝑗→ ∞as det𝜕𝒙(𝑘) 𝜕𝑿 |𝑖𝑗→ 0, it follows that det𝜕𝒙(𝑘) 𝜕𝑿 |𝑖𝑗> 0 is bounded away from zero, uniformly in 𝑘. Then we obtain det 𝜕̃𝒙 𝜕𝑿 |𝑖𝑗>0, and ̃𝒙∈𝐸𝑎𝑑. If 𝒙𝑘+1 ∈is a minimizer of the minimization problem (3.22), we have ̄𝐸ℎ(𝒙𝑘+1)+ ℎ𝑥ℎ𝑦 2 ∑ 𝑖,𝑗 𝛿𝑡 ( | 𝒙𝑘+1 𝑖,𝑗+1 −𝒙𝑘+1 𝑖,𝑗 ℎ𝑥 |2 +| 𝒙𝑘+1 𝑖+1,𝑗−𝒙𝑘+1 𝑖,𝑗 ℎ𝑦 |2 ) ≤ ̄𝐸ℎ(𝒙𝑘)+ ℎ𝑥ℎ𝑦 2 ∑ 𝑖,𝑗 𝛿𝑡 ( | 𝒙𝑘 𝑖,𝑗+1 −𝒙𝑘 𝑖,𝑗 ℎ𝑥 |2 +| 𝒙𝑘 𝑖+1,𝑗−𝒙𝑘 𝑖,𝑗 ℎ𝑦 |2 ) , which completes the proof. □ Remark 3.8. As stated in [10,29], we do not claim the uniqueness of the solution to the nonlinear numerical scheme (3.18)-(3.19) due to the lack of convexity of 𝐽𝑘(𝒙)and ̄𝐸ℎ(𝒙)in 𝑑-dimension (𝑑≥2). Remark 3.9. The regularization term can also be taken as 𝜖∑ 𝑖,𝑗(| 𝒙𝑖,𝑗+1−𝒙𝑖,𝑗−(𝒙𝑘 𝑖,𝑗+1−𝒙𝑘 𝑖,𝑗) ℎ𝑥 |2 +| 𝒙𝑖+1,𝑗−𝒙𝑖,𝑗−(𝒙𝑘 𝑖+1,𝑗−𝒙𝑘 𝑖,𝑗) ℎ𝑦 |2), then the energy dissipation law still holds ̄𝐸ℎ(𝒙𝑘+1) ≤ ̄𝐸ℎ(𝒙𝑘). 3.2.2. Explicit numerical scheme The trajectories (𝑥𝑘+1,𝑦𝑘+1)can also be solved by the following linear scheme with the regularization term 𝜖Δ𝑿 𝒙𝑘+1, 𝜖=𝛿𝑡, for given (𝑥𝑘,𝑦𝑘): 𝜌0 𝑖𝑗 𝑥𝑘+1 𝑖𝑗−𝑥𝑘 𝑖𝑗 𝛿𝑡 −𝛿𝑡 (𝑥𝑘+1 𝑖,𝑗+1 +𝑥𝑘+1 𝑖,𝑗−1−2𝑥𝑘+1 𝑖𝑗 ℎ2 𝑥 + 𝑥𝑘+1 𝑖+1,𝑗+𝑥𝑘+1 𝑖−1,𝑗−2𝑥𝑘+1 𝑖𝑗 ℎ2 𝑦 ) + 𝛿̄𝐸ℎ 𝛿𝑥 (𝒙𝑘 𝑖𝑗)=0 , (3.26) 𝜌0 𝑖𝑗 𝑦𝑘+1 𝑖𝑗−𝑦𝑘 𝑖𝑗 𝛿𝑡 −𝛿𝑡 (𝑦𝑘+1 𝑖,𝑗+1 +𝑦𝑘+1 𝑖,𝑗−1−2𝑦𝑘+1 𝑖𝑗 ℎ2 𝑥 + 𝑦𝑘+1 𝑖+1,𝑗+𝑦𝑘+1 𝑖−1,𝑗−2𝑦𝑘+1 𝑖𝑗 ℎ2 𝑦 ) + 𝛿̄𝐸ℎ 𝛿𝑦 (𝒙𝑘 𝑖𝑗)=0 , (3.27) with the initial and boundary conditions (3.20), then density 𝜌𝑘+1 will be derived by (3.21). The last term 𝛿̄𝐸ℎ 𝛿𝒙 (𝒙𝑘) of the proposed numerical scheme (3.26)-(3.27) is taken to be fully explicit in the following numerical experiments. Obviously, the proposed scheme (3.26)-(3.27)admits a unique solution from its linearity. To be specific, we give some explicit formulas of 𝛿̄𝐸ℎ 𝛿𝒙 (𝒙𝑘)for various kinds of gradient flows. For the porous medium equation, we have the following results for 𝑚>1: 𝛿̃𝐸ℎ 𝛿𝑥 (𝒙𝑛)= 𝜕 𝜕𝑋 (𝜌0 𝑛 )𝑚𝜕𝑦𝑛 𝜕𝑌− 𝜕 𝜕𝑌 (𝜌0 𝑛 )𝑚𝜕𝑦𝑛 𝜕𝑋, (3.28) 𝛿̃𝐸ℎ 𝛿𝑦 (𝒙𝑛)= 𝜕 𝜕𝑌 (𝜌0 𝑛 )𝑚 𝜕𝑥𝑛 𝜕𝑋− 𝜕 𝜕𝑋 (𝜌0 𝑛 )𝑚 𝜕𝑥𝑛 𝜕𝑌. (3.29) For the aggregation-diffusion models, we have 𝛿̃𝐸ℎ 𝛿𝑥 (𝒙𝑛 𝑖𝑗)= 𝜕 𝜕𝑋 (𝜌0 𝑛 )𝑚𝜕𝑦𝑛 𝜕𝑌 |||𝑖𝑗 − 𝜕 𝜕𝑌 (𝜌0 𝑛 )𝑚𝜕𝑦𝑛 𝜕𝑋 |||𝑖𝑗 +𝜈𝜌0 𝑖𝑗 ∑ 𝑝,𝑞 𝜌𝑛 𝑝,𝑞 𝑊′ 𝑥(𝒙𝑛 𝑖𝑗−𝒛𝑛 𝑝𝑞)𝑉𝑝𝑞, (3.30) 𝛿̃𝐸ℎ 𝛿𝑦 (𝒙𝑛 𝑖𝑗)= 𝜕 𝜕𝑌 (𝜌0 𝑛 )𝑚 𝜕𝑥𝑛 𝜕𝑋 |||𝑖𝑗 − 𝜕 𝜕𝑋 (𝜌0 𝑛 )𝑚 𝜕𝑥𝑛 𝜕𝑌 |||𝑖𝑗 +𝜈𝜌0 𝑖𝑗 ∑ 𝑝,𝑞 𝜌𝑛 𝑝,𝑞 𝑊′ 𝑦(𝒙𝑛 𝑖𝑗−𝒛𝑛 𝑝𝑞)𝑉𝑝𝑞, (3.31) where 𝑉𝑝𝑞represents the area of the control volume of 𝒙𝑛 𝑝𝑞, 𝑚=1 represents the linear diffusion case where 𝑈(𝜌)= 𝜌log𝜌, and 𝑚>1 denotes the nonlinear diffusion case where 𝑈(𝜌)= 1 𝑚−1𝜌𝑚. Let us discuss the explicit numerical scheme (3.26)-(3.27) with a different regularization term 𝜖𝑘Δ𝑿 (𝒙𝑘+1 −𝒙𝑘), 𝜖𝑘≥ 0, which also has a unique solution. We assume the solution belongs to the set 𝐸𝑎𝑑∶={𝒙∶d e t𝜕𝒙 𝜕𝑿 |𝑖𝑗>0 for all 𝑖,𝑗∈ℕ, 𝒙|𝜕Ω= 𝑿|𝜕Ω}, and introduce the following minimization problem in the admissible set 𝐸𝑎𝑑: Journal of Computational Physics 524 (2025) 113696 13 Q.Cheng, Q.Liu, W.Chen et al. 𝒙𝑘+1 ∶=arg inf 𝒙∈𝐸𝑎𝑑 𝐿𝑘(𝒙), (3.32) where 𝐿𝑘(𝒙)is defined by 𝐿𝑘(𝒙)= 1 2𝛿𝑡 ∑ 𝑖,𝑗 𝜌0 𝑖𝑗|𝒙𝑖𝑗−𝒙𝑘 𝑖𝑗|2ℎ𝑥ℎ𝑦+ 𝜖𝑘 2 ‖∇𝑿 (𝒙−𝒙𝑘)‖2 + ̄𝐸ℎ(𝒙𝑘)+( 𝛿̄𝐸ℎ 𝛿𝒙 (𝒙𝑘), 𝒙−𝒙𝑘), with ̄𝐸ℎ(𝒙)= ∑ 𝑖,𝑗𝐹 ( 𝜌0 𝑖𝑗 det 𝜕𝒙 𝜕𝑿 |𝑖𝑗 ) det 𝜕𝒙 𝜕𝑿 |𝑖𝑗ℎ𝑥ℎ𝑦. Then the solution to the explicit numerical scheme (3.26)-(3.27)with regularization term 𝜖Δ𝑿 (𝒙𝑘+1 −𝒙𝑘)is the minimizer of the minimization problem (3.32). For the sake of simplicity, we consider the Porous-Medium equation in 2D, we have (𝛿̄𝐸ℎ 𝛿𝑥 (𝒙𝑘),𝑥−𝑥𝑘 ) =− ⎛ ⎜ ⎜⎝ ( 𝜌0 det𝜕𝒙𝑘 𝜕𝑿 )𝑚,det𝜕((𝑥−𝑥𝑘),𝑦𝑘) 𝜕(𝑋,𝑌) ⎞ ⎟ ⎟⎠ , (𝛿̄𝐸ℎ 𝛿𝑦 (𝒙𝑘),𝑦−𝑦𝑘 ) =− ⎛ ⎜ ⎜⎝ ( 𝜌0 det𝜕𝒙𝑘 𝜕𝑿 )𝑚,det𝜕(𝑥𝑘,(𝑦−𝑦𝑘)) 𝜕(𝑋,𝑌) ⎞ ⎟ ⎟⎠ , (𝛿2 ̄𝐸ℎ 𝛿𝑥2 (𝒙𝑘),(𝑥−𝑥𝑘)2 ) =𝑚 ⎛ ⎜ ⎜⎝ (𝜌0)𝑚 (det𝜕𝒙𝑘 𝜕𝑿 )𝑚+1 ,(det𝜕((𝑥−𝑥𝑘),𝑦𝑘) 𝜕(𝑋,𝑌) )2 ⎞ ⎟ ⎟⎠ , (𝛿2 ̄𝐸ℎ 𝛿𝑦2 (𝒙𝑘),(𝑦−𝑦𝑘)2 ) =𝑚 ⎛ ⎜ ⎜⎝ (𝜌0)𝑚 (det𝜕𝒙𝑘 𝜕𝑿 )𝑚+1 ,(det𝜕(𝑥𝑘,(𝑦−𝑦𝑘)) 𝜕(𝑋,𝑌) )2 ⎞ ⎟ ⎟⎠ . Assume that the initial value 𝜌(𝑿,0) ≥0is bounded, and det𝜕𝒙𝑘 𝜕𝑿 >0is uniformly bounded away from zero in 𝑘satisfying det𝜕𝒙𝑘 𝜕𝑿 ≥𝛿0 for some 𝛿0 >0, we have ‖𝑚(𝜌0)𝑚 (det 𝜕𝒙 𝜕𝑿 )𝑚+1‖∞ ≤ 𝐶0 𝛿𝑚+1 0 , where 𝐶0 is a positive constant depending on 𝑚and 𝜌0. Then the following estimates will be obtained: || | | | | | 𝑚 ⎛ ⎜ ⎜⎝ (𝜌 0)𝑚 (det𝜕𝒙𝑘 𝜕𝑿 )𝑚+1 ,(det𝜕((𝑥−𝑥𝑘),𝑦𝑘) 𝜕(𝑋,𝑌) )2 ⎞ ⎟ ⎟⎠ || | | | | | ≤ 2𝐶 0 𝛿𝑚+1 0 ‖∇𝑿 𝑦𝑘‖2 ∞‖∇𝑿 (𝑥−𝑥𝑘)‖2, (3.33) || | | | | | 𝑚 ⎛ ⎜ ⎜⎝ (𝜌 0)𝑚 (det𝜕𝒙𝑘 𝜕𝑿 )𝑚+1 ,(det𝜕(𝑥𝑘,(𝑦−𝑦𝑘)) 𝜕(𝑋,𝑌) )2 ⎞ ⎟ ⎟⎠ || | | | | | ≤ 2𝐶 0 𝛿𝑚+1 0 ‖∇𝑿 𝑥𝑘‖2 ∞‖∇𝑿 (𝑦−𝑦𝑘)‖2. (3.34) Under these assumptions, the following energy dissipation law can be obtained. Theorem 3.10. The solution to the explicit numerical scheme (3.26)-(3.27) with the regularization term 𝜖𝑘Δ𝑿 (𝒙𝑘+1 −𝒙𝑘), 𝜖𝑘≥ 0 is the minimizer of the minimization problem (3.32). If either of the following conditions is true: •𝜖𝑘=0, choose suitable time step controlled by 𝛿𝑡≤𝜏min = min𝜌0 𝑖𝑗𝛿𝑚+1 0 ℎ2 2𝐶1𝐶0‖∇𝑿 𝒙𝑘‖2∞ with ℎ=ℎ𝑥=ℎ𝑦, •choose suitable regularization parameter 𝜖𝑘≥ 𝐶0‖∇𝑿 𝒙𝑘‖2 ∞ 𝛿𝑚+1 0 , then we have the following energy dissipation law: ̄𝐸ℎ(𝒙𝑘+1) ≤ ̄𝐸ℎ(𝒙𝑘). (3.35) Proof. Notice that 𝐿𝑘(𝒙𝑘+1) ≤𝐿𝑘(𝒙𝑘)= ̄𝐸ℎ(𝒙𝑘), and ̄𝐸ℎ(𝒙𝑘+1)= ̄𝐸ℎ(𝒙𝑘)+( 𝛿̄𝐸ℎ 𝛿𝒙 (𝒙𝑘), 𝒙𝑘+1 −𝒙𝑘)+ 1 2(𝛿2 ̃𝐸 𝛿𝒙2 ((1−𝑡)𝒙𝑘+𝑡𝒙𝑘+1),(𝒙𝑘+1 −𝒙𝑘)2) ≤ ̄𝐸ℎ(𝒙𝑘)+( 𝛿̄𝐸ℎ 𝛿𝒙 (𝒙𝑘), 𝒙𝑘+1 −𝒙𝑘)+ 𝐶0 𝛿𝑚+1 0 ‖∇𝑿 𝒙𝑘‖2 ∞‖∇𝑿 (𝒙𝑘+1 −𝒙𝑘)‖2, for 0<𝑡<1, then the energy dissipation law will be derived once we choose suitable 𝜖𝑘and time step 𝛿𝑡such that the following inequality holds: Journal of Computational Physics 524 (2025) 113696 14 Q.Cheng, Q.Liu, W.Chen et al. ̄𝐸ℎ(𝒙𝑘)+( 𝛿̄𝐸ℎ 𝛿𝒙 (𝒙𝑘), 𝒙𝑘+1 −𝒙𝑘)+ 𝐶0 𝛿𝑚+1 0 ‖∇𝑿 𝒙𝑘‖2 ∞‖∇𝑿 (𝒙𝑘+1 −𝒙𝑘)‖2 ≤𝐿𝑘(𝒙𝑘+1), we only need to guarantee that 𝐶0 𝛿𝑚+1 0 ‖∇𝑿 𝒙𝑘‖2 ∞‖∇𝑿 (𝒙𝑘+1 −𝒙𝑘)‖2 ≤ 1 2𝛿𝑡 ∑ 𝑖,𝑗 𝜌0 𝑖𝑗|𝒙𝑘+1 𝑖𝑗−𝒙𝑘 𝑖𝑗|2ℎ2 +𝜖𝑘‖∇𝑿 (𝒙𝑘+1 −𝒙𝑘)‖2. In the case where 𝜖𝑘=0, using the inverse estimate, we have 𝐶0 𝛿𝑚+1 0 ‖∇𝑿 𝒙𝑘‖2 ∞‖∇𝑿 (𝒙𝑘+1 −𝒙𝑘)‖2 ≤ 𝐶1𝐶0‖∇𝑿 𝒙𝑘‖2 ∞ ℎ2𝛿𝑚+1 0 ‖𝒙𝑘+1 −𝒙𝑘‖2, then the left hand side of above inequality will be controlled by 1 2𝛿𝑡 ∑ 𝑖,𝑗𝜌0 𝑖𝑗|𝒙𝑘+1 𝑖𝑗−𝒙𝑘 𝑖𝑗|2ℎ2 once we choose suitable time step 𝛿𝑡≤ min𝜌0 𝑖𝑗𝛿𝑚+1 0 ℎ2 2𝐶1𝐶0‖∇𝑿 𝒙𝑘‖2∞ ∶=𝜏min such that 𝐶1𝐶0‖∇𝑿 𝒙𝑘‖2 ∞ 𝛿𝑚+1 0 ℎ2 ≤ min𝜌0 𝑖𝑗 2𝛿𝑡 . The energy dissipation law can be obtained. In the other case where we choose suitable regularization parameter 𝜖𝑘≥ 𝐶0‖∇𝑿 𝒙𝑘‖2 ∞ 𝛿𝑚+1 0 such that 𝐶0 𝛿𝑚+1 0 ‖∇𝑿 𝒙𝑘‖2 ∞‖∇𝑿 (𝒙𝑘+1−𝒙𝑘)‖2 ≤ 𝜖𝑘‖∇𝑿 (𝒙𝑘+1 −𝒙𝑘)‖2, the desired energy dissipation law is derived. □ Remark 3.11. In the proof of Theorem 3.10, we assume that det 𝜕𝒙 𝜕𝑿 ≥𝛿0 >0is away from zero. From determinant plots depicted by numerical experiments in Section 4.2, we observe that the determinant of the deformation gradient for the Porous-Medium equation with Barenblatt solution and Aggregation equation satisfies this assumption. However, for the Keller-Segel model, where the particles aggregate at the center or at the circumference under certain conditions, the positivity of the determinant will not be maintained with time, and eventually the trajectory will become distorted, and once this distortion occurs, the numerical experiment will be stopped. Such cases need to be further investigated. Remark 3.12. Similarly, if we consider the minimization problem with the regularization term 𝜖𝑘𝛿𝑡‖∇𝑿 𝒙𝑘+1‖2, the energy dissipation law ̄𝐸ℎ(𝒙𝑘+1)+ 𝜖𝑘𝛿𝑡‖∇𝑿 𝒙𝑘+1‖2 ≤ ̄𝐸ℎ(𝒙𝑘)+ 𝜖𝑘𝛿𝑡‖∇𝑿 𝒙𝑘‖2 is derived if we choose suitable 𝜖𝑘and 𝛿𝑡such that the following inequality holds: 𝐶0 𝛿𝑚+1 0 ‖∇𝑿 𝒙𝑘‖2 ∞‖∇𝑿 (𝒙𝑘+1 −𝒙𝑘)‖2 ≤ 1 2𝛿𝑡 ∑ 𝑖,𝑗 𝜌0 𝑖𝑗|𝒙𝑖𝑗−𝒙𝑘 𝑖𝑗|2ℎ2 +𝜖𝑘𝛿𝑡‖∇𝑿 𝒙𝑘+1‖2. In the case where we choose suitable regularization parameter 𝜖𝑘to control the left hand side of above inequality by the regularization term, it can be roughly estimated that 𝜖𝑘≥ 1 𝛿𝑡 𝐶0‖∇𝑿 𝒙𝑘‖2 ∞‖∇𝑿 (𝒙𝑘+1 −𝒙𝑘)‖2 𝛿𝑚+1 0 ‖∇𝑿 𝒙𝑘+1‖2 = 𝐶0‖∇𝑿 𝒙𝑘‖2 ∞‖∇𝑿 𝒙𝑘+1−𝒙𝑘 𝛿𝑡 ‖2 𝛿𝑚+1 0 ‖∇𝑿 𝒙𝑘+1‖2 𝛿𝑡≥𝐶2𝛿𝑡. Remark 3.13. It is worth noting that when we simulate numerical experiments using the explicit numerical scheme without regu- larization term, the time step 𝛿𝑡is supposed to be sufficient small to guarantee the stability of the numerical scheme. If we carry out numerical experiments with the regularization term 𝜖𝑘‖∇𝑿 (𝒙𝑘+1 −𝒙𝑘)‖2, the regularization parameter should be taken appro- priately through 𝜖𝑘≥𝐶0‖∇𝑿 𝒙𝑘‖2 ∞∕𝛿𝑚+1 0 to ensure the stability of the numerical scheme. The regularization term can also be taken as 𝜖𝑘𝛿𝑡‖∇𝑿 𝒙𝑘+1‖2 with 𝜖𝑘≥𝐶2𝛿𝑡, as displayed in the following numerical experiments. 4. Numerical simulations In this section, numerical experiments for Porous-Medium equation, Fokker-Planck equation, Keller-Segel equation and Aggrega- tion equation will be considered in one dimension and two dimension to validate the accuracy and stability of our proposed numerical schemes based on our flow dynamic approach. 4.1. One dimension For simplicity, we shall first show numerical experiments for models in 1D, then we consider numerical simulations in 2D in next subsection. 4.1.1. Porous medium equation The porous medium equation 𝜕𝑡𝜌=Δ𝜌𝑚, 𝑚>1, can be regarded as the Wasserstein gradient flow with energy defined by 𝐸(𝜌)= ∫ Ω 1 𝑚−1𝜌𝑚d𝑥. Journal of Computational Physics 524 (2025) 113696 15 Q.Cheng, Q.Liu, W.Chen et al. Table 1 Convergence order of trajectory 𝑥and density 𝜌with 𝑚=2 at 𝑇=0.5. M 𝛿𝑡 𝐿2 ℎerror (𝑥) order 𝐿∞ error (𝑥) order 𝐿2 ℎ error (𝜌) order 100 1/100 4.0522e-04 2.3834e-04 3.6068e-04 200 1/400 9.6283e-05 2.0734 5.6442e-05 2.0782 8.8534e-05 2.0624 400 1/1600 2.3484e-05 2.0356 1.3746e-05 2.0377 2.2188e-05 1.9964 800 1/6400 5.5614e-06 2.0781 3.2461e-06 2.0822 5.4442e-06 2.0270 Fig. 3.The evolutions of energy and mass with respective to time under 𝑚=2 with 𝑀=800, 𝛿𝑡=1∕6400. Convergence test. Consider the following smooth initial value: 𝜌0(𝑥)=cos (𝜋𝑥 2 ) , 𝑥∈[−1,1], (4.1) with Dirichlet boundary condition 𝑥|𝜕Ω=𝑋|𝜕Ω. The numerical solution is solved by using scheme (3.3)-(3.4)without regularization term. The reference solution is computed under very fine meshes with 𝑀=8000, 𝛿𝑡=1∕64000. The convergence rates for density 𝜌 and trajectories 𝒙in 𝐿2 and 𝐿∞ norms are shown in Table 1. We also depict the evolutions of energy and mass in Fig. 3which show the property of energy dissipation and mass conserving with respective to time. Free boundaries.Considering the Barenblatt solution for Porous medium equation with free boundaries [43]: 𝐵𝑚(𝑥,𝑡)=( 𝑡+1)−𝑘 ( 1−𝑘(𝑚−1) 2𝑚 |𝑥|2 (𝑡+1)2𝑘 )1∕(𝑚−1) + , (4.2) where 𝑘=(𝑚+1)−1. The support set of the solution is [𝑙𝑚(𝑡),𝑟𝑚(𝑡)]with the moving interface 𝑟𝑚(𝑡)=−𝑙𝑚(𝑡)∶= √ 2𝑚 𝑘(𝑚−1)(𝑡+1)𝑘. Using scheme (3.3)-(3.4)without regularization term to calculate the interior points, and (A.2)-(A.3)to compute the boundaries. We choose the Barenblatt solution 𝐵𝑚(𝑥,0) as the initial value to simulate the phenomenon of moving interface. The results are displayed in Fig. 4, it can be found that the free boundaries move with a finite speed, and the numerical propagation speed is consistent with the exact solution. The proposed scheme satisfies the property of energy dissipating, positivity-preserving and mass conserving for the density 𝜌. Comparison between Eulerian and Lagrangian schemes.We add one example in Fig. 4to compare numerical solutions between Eulerian and Lagrangian coordinates. We compute the Porous Medium equations in 1D by using the following fully implicit scheme 𝜌𝑛+1 𝑖 −𝜌𝑛 𝑖 𝛿𝑡 = (𝜌𝑛+1 𝑖+1 )𝑚+(𝜌𝑛+1 𝑖−1)𝑚−2(𝜌𝑛+1 𝑖 )𝑚 𝛿𝑋2 . (4.3) The computational domain is 𝑋∈[−8,8]. For implementation, we use 𝑀=800 mesh points and time step 𝛿𝑡=1∕800. We compute the evolutions of density for Porous Medium equations in 1D in Fig. 4(a-b), and the convergence results of scheme (4.3)are shown in Table 4. From the following Fig. 4(b), compared with numerical solutions in Eulerian coordinate, we observe that the right boundary of the moving interface can be computed more accurately for various times by using the Lagrangian scheme (3.3)-(3.4). In conclusion, for Porous Medium equations we find that the Lagrangian scheme (3.3)-(3.4) can capture the moving interface more accurately compared with the Eulerian scheme (4.3)from Fig. 4. Convergence results of the trajectory and Barenblatt solution with 𝑚=2 are shown in Table 2. The reference solution of trajectory is obtained on refine meshes, i.e. 𝑀=8000, 𝛿𝑡=1∕64000. The Barenblatt solution 𝐵𝑚(𝑥,0.5)is taken as the exact solution to test the convergence rate for density 𝜌. It is observed in Table 2and Table 3that the convergence rates in time remain to be second order with 𝑚=2, and we can not achieve optimal convergence rate when we take 𝑚=2.5due to limitation of regularity for density 𝜌. We also observe that the errors for density 𝜌at 𝑥=0 away from the boundaries remains to be second order convergence rate when we take 𝑚=2.5. Journal of Computational Physics 524 (2025) 113696 16 Q.Cheng, Q.Liu, W.Chen et al. Fig. 4.The evolutions of density, energy and mass for the Barenblatt solution solved by the Lagrangian scheme (3.3)-(3.4)with 𝑀=800, 𝛿𝑡=1∕6400. The numerical solutions in Eulerian coordinate are solved by the fully implicit scheme: 𝜌𝑛+1 𝑖 −𝜌𝑛 𝑖 𝛿𝑡 = (𝜌𝑛+1 𝑖+1 )𝑚+(𝜌𝑛+1 𝑖−1)𝑚−2(𝜌𝑛+1 𝑖 )𝑚 𝛿𝑋2 with 𝑀=800, 𝛿𝑡=1∕800. Table 2 Convergence order of trajectory 𝑥and density 𝜌with 𝐵𝑚(𝑥,𝑇)at 𝑇=0.5, 𝑚=2. M 𝛿𝑡 𝐿2 ℎerror (𝑥) order 𝐿∞ error (𝑥) order 𝐿2 ℎ error (𝜌) order runtime (s) 100 1/100 0.0014 8.3240e-04 5.5360e-04 0.0340 200 1/400 3.4387e-04 2.0315 1.8335e-04 2.1827 1.3922e-04 1.9915 0.0681 400 1/1600 8.3217e-05 2.0496 4.4631e-05 2.0385 3.4935e-05 1.9946 0.4879 800 1/6400 1.8721e-05 2.1522 1.0040e-05 2.1523 8.7565e-06 1.9963 2.6089 Table 3 Convergence order of trajectory 𝑥and density 𝜌with 𝐵𝑚(𝑥,𝑇)at 𝑇=0.5, 𝑚=2.5. M 𝛿𝑡 𝐿2 ℎerror (𝑥) order 𝐿2 ℎ error (𝜌) order error (0) order 100 1/100 0.0011 8.0390e-04 2.2763e-04 200 1/400 3.7503e-04 1.5509 3.6544e-04 1.1374 5.7061e-05 1.9961 400 1/1600 1.5814e-04 1.2458 1.8045e-04 1.0181 1.4262e-05 2.0003 800 1/6400 6.5878e-05 1.2634 8.7376e-05 1.0463 3.5611e-06 2.0017 Journal of Computational Physics 524 (2025) 113696 17 Q.Cheng, Q.Liu, W.Chen et al. Table 4 Convergence order of density 𝜌solved by scheme (4.3)with 𝐵𝑚(𝑥,𝑇) at 𝑇=0.5, 𝑚=2. M 𝛿𝑡 𝐿2 Euler error (𝜌) order runtime (s) 100 1/100 0.0106 0.0193 200 1/400 0.0027 1.9893 0.0566 400 1/1600 6.6560e-04 1.9977 0.3178 800 1/6400 1.7630e-04 1.9166 2.0652 1600 1/25600 4.2717e-05 2.0451 16.9118 Fig. 5.Density plots for the initial value (4.4)with 𝑚=2, 𝜃=0.25, 𝑀=800, 𝛿𝑡=1∕800. Notice that we use the same number of spatial points as the proposed Lagrangian scheme to solve the Eulerian scheme (4.3) in computational domain 𝑋∈[−5,5]with 𝑚=2 and 𝑇=0.5. We take the exact solution to be 𝐵2(𝑥,0.5). The convergence results and computational CPU times of the Eulerian scheme (4.3) are shown in Table 4. We also show the CPU time in Table 2 by using the proposed Lagrangian scheme. We run the Eulerian scheme (4.3) and Lagrangian scheme (3.3)-(3.4) in MATLAB on a laptop with 2.2 GHz Inter(R) Core(TM) i9-14900HX and 32 GB of RAM. We observe from Table 2and Table 4that to obtain the same accuracy in 𝐿2 the Lagrangian method (3.3)-(3.4) requires fewer spatial points than the full-Implicit Eulerian method (4.3) from the CPU time. We can also observe that the Lagrangian scheme (3.3)-(3.4)achieves better accuracy than Eulerian acheme (4.3)with the same spatial points. Waiting time. It is known that solutions to the porous medium equation may show the phenomenon of waiting time. This phenomenon indicates that the support set of solutions will not expand during a positive time 𝑡∗, after which, it will start moving at a finite speed. 𝑡∗is called the waiting time. To be specific, the propagation speed at the boundary for the porous medium equation can be calculated by [18,19] 𝜕𝑡𝑥=− 𝑚 𝑚−1 𝜕𝑋(𝜌(𝑋,0))𝑚−1 (𝜕𝑋𝑥)𝑚 . The numerical waiting time can be calculated as the first instance such that 𝜕𝑡𝑥≠0as stated in [18,19]. Considering the following initial value: 𝜌0(𝑥)= (𝑚−1 𝑚 ( (1−𝜃)sin2(𝑥)+ 𝜃sin4(𝑥) ))1∕(𝑚−1) , 𝑥∈[−𝜋,0], (4.4) where 𝜃∈[0,0.25]. For the initial value (4.4), 𝑚=2 and 𝜃=0.25, we use scheme (3.3)-(3.4)without regularization term to calculate the interior points, and use (A.2)-(A.3)to calculate the boundaries, the numerical results are displayed in Fig. 5, the free boundaries remain to be static during 0<𝑡≤0.22. After the moment 𝑡=0.22, the free boundaries begin to move at a finite speed. The waiting time for the initial value (4.4) is given theoretically in [3] by 𝑡𝑤,𝑒∶= 1 2(𝑚+1)(1−𝜃). Now, by using scheme (3.3)-(3.4) without regularization term to calculate the interior points and (A.2)-(A.3)to compute the boundaries, we calculate the waiting time numerically with different 𝜃and 𝑚to compare the numerical waiting time with the exact formulation, the results are shown in Fig. 6, it can be observed that the tendency of the numerical waiting time is consistent with the theoretical result, and it will converge to the exact waiting time when we reduce time steps, as displayed in Table 5. Journal of Computational Physics 524 (2025) 113696 18 Q.Cheng, Q.Liu, W.Chen et al. Fig. 6.Influence of the parameter 𝜃and 𝑚with different 𝛿𝑡and 𝑀=1∕𝛿𝑡. Table 5 Convergence order of the waiting time with the initial value (4.4), 𝑚=2 , 𝜃=0 .25, the exact waiting time is 𝑡𝑤,𝑒= 1 2(𝑚+1)(1−𝜃) = 2 9. M 𝛿𝑡 𝑡𝑤,ℎ |𝑡𝑤,ℎ−𝑡𝑤,𝑒| order 1000 1/1000 0.2240 0.0018 2000 1/2000 0.2235 0.0013 0.4695 4000 1/4000 0.2233 0.0011 0.2410 8000 1/8000 0.2229 0.0007 0.6521 4.1.2. Fokker-Planck equation In this subsection, we will discuss the Fokker-Planck equation with different potentials by choosing various 𝑈(𝜌), 𝑉(𝑥)and taking 𝑊(𝑥)=0 . Nonlinear Fokker-Planck equation. For the nonlinear Fokker-Planck equation, 𝑈(𝜌) is taken to be 1 𝑚−1𝜌𝑚, and 𝑉(𝑥) will be taken as one-well and double-well potential, respectively. If 𝑉(𝑥)is a confining drift potential, all solutions will approach to a unique steady state which is formulated as, see [9,12,15] 𝜌∞(𝑥)= ( 𝐶𝑓𝑝−𝑚−1 𝑚 𝑉(𝑥) )1 𝑚−1 + , (4.5) where 𝐶𝑓𝑝> 0 is determined by the mass of initial value such that ∫Ω𝜌0(𝑥)d𝑥= ∫Ω𝜌∞(𝑥)d𝑥. In the following, one-well potential 𝑉(𝑥)= |𝑥|2 2 and double-well potential 𝑉(𝑥)= |𝑥|4 4 −|𝑥|2 2 will be considered. One well. Taking 𝑉(𝑥)= |𝑥|2 2 , we consider the following energy with one-well potential: 𝐸(𝜌)= ∫ Ω 1 𝑚−1𝜌𝑚+|𝑥|2 2 𝜌 d𝑥. Consider 𝑚=2 and the initial value to be 𝜌0(𝑥)=max{1− |𝑥|,0}. (4.6) In this case, the stationary solution 𝜌∞ is given in [18], formulated as 𝜌∞ =max {(3 8 )2 3 −𝑥2 4 ,0 } , (4.7) where (3 8) 2 3 is determined by the mass conservative property, such that ∫Ω𝜌∞d𝑥= ∫Ω𝜌0d𝑥. The relative energy is defined by 𝐸(𝑡)= 𝐸(𝑡|∞)∕𝐸(0|∞)with 𝐸(𝑡|∞)= 𝐸(𝑡)−𝐸(∞). Using scheme (3.3)-(3.4) and enforcing the free boundary (A.4) without regularization term to solve the Fokker-Planck model, the numerical results are displayed in Fig. 7. As time increases, the profile of density converges to the steady state when time goes Journal of Computational Physics 524 (2025) 113696 19 Q.Cheng, Q.Liu, W.Chen et al. Fig. 7.Fokker-Planck equation with the one-well potential, 𝑚=2, 𝑀=800, 𝛿𝑡=1∕800. to 𝑇=10. The convergence rate for the density is computed at the stationary time 𝑇=10. It can be observed that the convergence rates of 𝐿2 error and error at 𝑥=0 are second-order. The proposed scheme is mass-conserving, and is also energy dissipative in time. As shown in diagram (d) in Fig. 7, the scaling law of the relative energy is about 𝑒−6𝑡. Double well. Taking 𝑉(𝑥)= |𝑥|4 4 −|𝑥|2 2 , we consider the following energy with double-well potential: 𝐸(𝜌)= ∫ Ω 1 𝑚−1𝜌𝑚+ (|𝑥|4 4 −|𝑥|2 2 ) 𝜌 d𝑥. Let 𝑚=2, choosing the following initial value with 𝜎=1: 𝜌0(𝑥)=( 𝑥2 +10−6𝑒 −𝑥2 2𝜎2 )(1−𝑥2), 𝑥∈[−1,1]. (4.8) Now, we implement numerical simulations with initial value (4.8)by using scheme (3.3)-(3.4)and (A.4)without regularization term, where the potential is taken as 𝑉(𝑥)= |𝑥|4 4 −|𝑥|2 2 and 𝑉(𝑥)= |𝑥|2 2 , respectively, the results are shown in Fig. 8. When the numerical solution is computed with double-well potential 𝑉(𝑥)= |𝑥|4 4 −|𝑥|2 2 , the stationary state will also be double-well. If the potential is set to be one-well 𝑉(𝑥)= |𝑥|2 2 , the stationary state will also be one-well. If we take the following one-well value as the initial condition: 𝜌0(𝑥)=1− 𝑥2, 𝑥∈[−1,1], (4.9) Journal of Computational Physics 524 (2025) 113696 20 Q.Cheng, Q.Liu, W.Chen et al. Fig. 8.Double-well initial problem for the Fokker-Planck equation with the one-well potential and the double-well potential, 𝑚=2, 𝑀=800, 𝛿𝑡=1∕800. Fig. 9.One-well initial value for the Fokker-Planck equation with the double-well potential, 𝑚=2, 𝑀=800, 𝛿𝑡=1∕800. Fig. 10.One-well initial value for the Fokker-Planck equation with logarithmic potential, 𝑀=800, 𝛿𝑡=1∕800. and calculate the numerical solution with the double-well potential, it will also converge to a double-well stationary state, as displayed in Fig. 9. Linear Fokker-Planck equation with the logarithmic potential.Now, we consider the linear Fokker-Planck equation, i.e. taking 𝑈(𝜌)= 𝜌log𝜌. Consider the following energy with one-well logarithmic potential: 𝐸(𝜌)= ∫ Ω 𝜌log𝜌+|𝑥|2 2 𝜌 d𝑥. Numerical experiments are implemented by using scheme (3.3)-(3.4)without regularization term, and the following initial condition is considered: 𝜌0(𝑥)= 𝐶𝑔 √ 2𝜋 𝑒−𝑥2∕𝜎, 𝑥∈[−5,5], (4.10) with 𝐶𝑔=𝜎=1. The results shown in Fig. 10 imply that numerical solution will converge to a one-well stationary state, and the curve of energy is dissipative with respective to time. Journal of Computational Physics 524 (2025) 113696 21 Q.Cheng, Q.Liu, W.Chen et al. Fig. 11.Aggregation equation solved by (3.3)-(3.4)with the regularization term 𝜖Δ𝑋𝑥𝑘+1, the last term of (3.3)is defined by (A.6). The initial value (4.10), 𝐶𝑔=𝜎=1, 𝑁=200, 𝛿𝑡=1∕200. 4.1.3. Aggregation equation Considering the aggregation equation with the energy defined by 𝐸(𝜌)= ∫ Ω×Ω 𝑊(𝑥−𝑦)𝜌(𝑥)𝜌(𝑦)d𝑥d𝑦, with 𝑊(𝑥)= |𝑥|2 2 −ln|𝑥|. We show that taking variational of 𝐸(𝜌(𝑥))with respect to 𝑥leads to the following equations in Eulerian coordinate: 𝛿𝐸 𝛿𝑥 =𝜌∇𝑥𝐹′(𝜌)= 𝜌∇𝑥 ⎛ ⎜ ⎜⎝∫ Ω 𝑊(𝑥−𝑦)𝜌(𝑦)d𝑦 ⎞ ⎟ ⎟⎠ =𝜌∫ Ω 𝑊′(𝑥−𝑦)𝜌(𝑦)d𝑦, and in Lagrangian coordinate: 𝛿𝐸 𝛿𝑥 =𝜌(𝑋,0) ∫ Ω 𝑊′(𝑥−𝑦)𝜌(𝑦)d𝑦. Let’s set 𝑥to be implicit and 𝑦to be explicit, details can be reached in Appendix. Taking the initial value (4.10)with 𝐶𝑔=𝜎=1, we apply scheme (3.3)-(3.4), incorporating the regularization term 𝜖Δ𝑋𝑥𝑘+1, and define the last term of (3.3)as provided in (A.6), to simulate the numerical experiments. The density plot at 𝑡=10 and energy plot with different regularization parameter 𝜖are shown in Fig. 11. It can be observed that the density achieves the equilibrium state [11] 𝜌∞ = 𝐶𝑎𝑔 𝜋 √ (2−𝑥2)+, (4.11) as 𝜖decreases, where 𝐶𝑎𝑔=1∕ √ 2is determined by the property of mass conservation. Now we use scheme (3.3)-(3.4) with the regularization term 𝜖Δ𝑋𝑥𝑘+1, 𝜖=10−4𝛿𝑡to make numerical experiments by choosing the initial value (4.10)with 𝜎=𝐶𝑔=1. As shown in Fig. 12, the solution will converge to the equilibrium state. If we take the initial value (4.10) with 𝜎=0.1, 𝐶𝑔=1, it will converge to 𝜌∞ (4.11) with 𝐶𝑎𝑔= √ 0.1∕2where the numerical results are displayed in Fig. 13. Both results indicate that the numerical solution will converge to a stationary state which is consistent with the theoretical result, and the proposed scheme is mass conserving and energy dissipating. As shown in diagram (d) in Fig. 12and Fig. 13, the scaling law of the relative energy is also verified with theoretical results. For the fully explicit numerical scheme, the corresponding modified discrete energy can be taken by ̂𝐸𝑘+1 ℎ =∑𝑁−1 𝑗=0 𝛿𝐸ℎ 𝛿𝑥𝑗 (𝒙𝑘)(𝑥𝑘+1 𝑗 − 𝑥𝑘 𝑗)+ 𝐸ℎ(𝒙𝑘), then the last term in the numerical scheme (3.3)will be taken as 𝛿𝐸ℎ 𝛿𝑥𝑗 (𝒙𝑘). Now we make the numerical experiments by using (3.3)-(3.4)with the regularization term 𝜖Δ𝑋𝑥𝑘+1, 𝜖=10−2𝛿𝑡where numerical results are shown in Fig. 14. It can be observed that the numerical solution also converges to stationary state, and the total mass is preserved well. If we set 𝑥to be explicit and 𝑦to be implicit in the numerical scheme, details can be found in Appendix. We use scheme (3.3)-(3.4), in which the last term is adjusted according to (A.7), and the regularization term 𝜖Δ𝑋𝑥𝑘+1, 𝜖=10−4𝛿𝑡to conduct numerical exper- Journal of Computational Physics 524 (2025) 113696 22 Q.Cheng, Q.Liu, W.Chen et al. Fig. 12.Aggregation equation solved by (3.3)-(3.4)with the last term defined by (A.6), the regularization term 𝜖Δ𝑋𝑥𝑘+1, 𝜖=10−4𝛿𝑡. The initial value (4.10), 𝐶𝑔=𝜎=1, 𝑁=200, 𝛿𝑡=1∕200. iments, the numerical results can be found in Fig. 15which show that the scheme preserves total mass, and the numerical solution will converge to its stationary state. The energy is also dissipative with 𝐸ℎ(𝒙𝑘+1)defined by (A.5)in Appendix. We set 𝑥and 𝑦both implicit in numerical scheme (3.3)-(3.4), and implement numerical experiments by using scheme (3.3)-(3.4) with the last term defined by (A.8), and the regularization term 𝜖Δ𝑋𝑥𝑘+1, 𝜖=10−2𝛿𝑡, the numerical results are displayed in Fig. 16 which implies that the proposed numerical scheme is also stable with 𝐸ℎ(𝒙𝑘+1)defined by (A.5)in Appendix. 4.1.4. Keller-Segel model Consider the Keller-Segel model [24] with the following energy: 𝐸(𝜌)= ∫ Ω 𝑈(𝜌(𝑥))+ 𝜌𝑉(𝑥)d𝑥+ ∫ Ω×Ω 𝑊(𝑥−𝑦)𝜌(𝑥)𝜌(𝑦)d𝑥d𝑦, where 𝑈=𝜌log𝜌, 𝑉(𝑥)=0 and 𝑊(𝑥)= 1 2𝜋ln|𝑥|. Taking variational derivative with respective to 𝑥, we have 𝛿𝐸 𝛿𝑥 =𝜌∇𝑥𝑈′(𝜌(𝑥))+ 𝜌∫ Ω 𝑊′(𝑥−𝑦)𝜌(𝑦)d𝑦. (4.12) Rewriting (4.12)into Lagrangian coordinate: Journal of Computational Physics 524 (2025) 113696 23 Q.Cheng, Q.Liu, W.Chen et al. Fig. 13.Aggregation equation solved by (3.3)-(3.4)with the last term defined by (A.6), the regularization term 𝜖Δ𝑋𝑥𝑘+1, 𝜖=10−4𝛿𝑡. The initial value (4.10), 𝐶𝑔=1, 𝜎=0.1, 𝑁=200, 𝛿𝑡=1∕200. Fig. 14.Aggregation equation solved by fully explicit scheme with the regularization term 𝜖Δ𝑋𝑥𝑘+1, 𝜖=10−2𝛿𝑡, the initial value is taken as (4.10)with 𝐶𝑔=𝜎=1, 𝑀=200, 𝛿𝑡=1∕200. Journal of Computational Physics 524 (2025) 113696 24 Q.Cheng, Q.Liu, W.Chen et al. Fig. 15. Aggregation equation solved by (3.3)-(3.4) with the last term modified by (A.7), the regularization term 𝜖Δ𝑋𝑥𝑘+1, 𝜖=1 0−4𝛿𝑡. The initial value (4.10), 𝐶𝑔=𝜎=1, 𝑁=200, 𝛿𝑡=1∕200. Fig. 16.Aggregation equation solved by (3.3)-(3.4)with the last term defined by (A.8), the regularization term 𝜖Δ𝑋𝑥𝑘+1, 𝜖=10−2𝛿𝑡. The initial value (4.10), 𝐶𝑔=𝜎=1, 𝑀=200, 𝛿𝑡=1∕200. 𝛿𝐸 𝛿𝑥 =𝜌(𝑋,0) ⎛ ⎜ ⎜⎝ 𝜕𝑋𝑈′(𝜌(𝑋,0) 𝜕𝑋𝑥 ) 𝜕𝑋𝑥 + ∫ Ω 𝑊′(𝑥−𝑦)𝜌(𝑌,0)d𝑌 ⎞ ⎟ ⎟⎠ . (4.13) Consider the following initial value with one well: 𝜌0(𝑥)= 𝐶𝑘𝑠 √ 2𝜋 𝑒−𝑥2∕2+10−8, 𝑥∈[−15,15], (4.14) and the initial condition with double well: 𝜌0(𝑥)= 𝐶𝑘𝑠 √ 𝜋 (𝑒−4(𝑥+2)2 +𝑒−4(𝑥−2)2 )+10 −8, 𝑥∈[−15,15], (4.15) combined with the Dirichlet boundary condition 𝑥|𝜕Ω=𝑋|𝜕Ω. We simulate numerical experiments by using scheme (3.3)-(3.4)with- out regularization term, and the last term of (3.3)defined by (A.9). Taking 𝐶𝑘𝑠=1 in (4.14) and (4.15) to implement numerical experiments, respectively. As shown in Fig. 17 and Fig. 18, it can be observed that numerical solutions remain to be positivity and bounded for all time. If we choose 𝐶𝑘𝑠=5𝜋to make numerical simulations, solutions also remain to be positivity. Finally, we observe that numerical solutions blow up in finite time shown in Fig. 17and Fig. 18. 4.2. Two dimension In this subsection, we focus on numerical simulations in 2D. For simplicity, to avoid solving nonlinear equations, we only validate the accuracy and efficiency for explicit numerical schemes (3.26)-(3.27)proposed in Section 3.2. We also take the Porous-Medium equation, Keller-Segel equation and Aggregation equation as examples. 4.2.1. Porous-medium equation The 2-D Barenblatt solution takes on the following form: 𝐵𝑚,2(𝒙,𝑡)= ( 𝐶𝐵2 −𝜅(𝑚−1) 4𝑚 |𝒙|2 (𝑡+1)𝜅 )1∕(𝑚−1) + , (4.16) Journal of Computational Physics 524 (2025) 113696 25 Q.Cheng, Q.Liu, W.Chen et al. Fig. 17.Keller-Segel model solved by (3.3)-(3.4)without regularization term, the last term of (3.3)is defined by (A.9). The initial value (4.14)with 𝐶𝑘𝑠=1 and 5𝜋, 𝑀=800, 𝛿𝑡=1∕800. Fig. 18.Keller-Segel model solved by (3.3)-(3.4)without regularization term, the last term of (3.3)is defined by (A.9). The double-well initial value (4.15), 𝐶𝑘𝑠=1 and 5𝜋, 𝑀=800, 𝛿𝑡=1∕800. where 𝜅=1∕𝑚, and 𝐶𝐵2 is a positive constant. The solution has a compact support |𝒙|≤𝜉𝑚(𝑡)for any finite time with 𝜉𝑚(𝑡)= √ 4𝑚𝐶𝐵2 𝜅(𝑚−1)(𝑡+1)𝜅∕2. (4.17) Now, we take the Barenblatt solution with 𝐶𝐵2 =0.1as initial condition to make numerical experiments by using scheme (3.26)-(3.27) with the regularization term 𝜖Δ𝑿 𝒙𝑘+1, 𝜖=10−3𝛿𝑡for 𝑚=2, 𝜖=10−1𝛿𝑡for 𝑚=5. The evolution of the numerical solution is shown in Fig. 19and Fig. 21for 𝑚=2, 𝑚=5, respectively, it can be found that the profile of density changes as the trajectory moves outward, and the free boundaries move at a finite speed. The plots of the absolute error between the numerical solution and the exact solution are also displayed, it can be observed that the main part of the error is around the free boundaries. The trajectories at various times are shown in Fig. 20and Fig. 22for 𝑚=2 and 𝑚=5, respectively, which implies that the tendency of the numerical interface is consistent with the exact one calculated by (4.17). The energy curves are shown in Fig. 23 which indicates that the energy dissipation law holds in both cases where 𝑚=2 and 𝑚=5. Fig. 24 illustrates the minimum and maximum determinant values for both 𝑚=2 and 𝑚=5 with various regularization terms, respectively. It is evident from the plots that the determinant value maintains its positivity. Further, a positive distance can be observed between the minimum value and zero. The convergence order of the numerical solution with the exact solution 𝐵𝑚,2(𝒙,0.1), 𝑚=2 and 𝑚=2.5are shown in Table 6. Journal of Computational Physics 524 (2025) 113696 26 Q.Cheng, Q.Liu, W.Chen et al. Fig. 19.Numerical solution solved by (3.26)-(3.27)with the regularization term 𝜖Δ𝑿 𝒙𝑘+1, 𝜖=10−3𝛿𝑡, the initial value is Barenblatt solution with 𝐶𝐵2 =0.1, 𝑚=2, 𝑀𝑥=𝑀𝑦=64, 𝛿𝑡=0.01. Fig. 20.Trajectories solved by (3.26)-(3.27)with the regularization term 𝜖Δ𝑿 𝒙𝑘+1, 𝜖=10−3𝛿𝑡, the initial value is Barenblatt solution with 𝐶𝐵2 =0.1, 𝑚=2, 𝑀𝑥= 𝑀𝑦=64, 𝛿𝑡=0.01. The blue line represents the exact interface of the support set calculated by (4.17). Journal of Computational Physics 524 (2025) 113696 27 Q.Cheng, Q.Liu, W.Chen et al. Fig. 21.Numerical solution solved by (3.26)-(3.27)with the regularization term 𝜖Δ𝑿 𝒙𝑘+1, 𝜖=10−1𝛿𝑡, the initial value is Barenblatt solution with 𝐶𝐵2 =0.1, 𝑚=5, 𝑀𝑥=𝑀𝑦=64, 𝛿𝑡=0.01. Fig. 22.Trajectories solved by (3.26)-(3.27)with the regularization term 𝜖Δ𝑿 𝒙𝑘+1, 𝜖=10−1𝛿𝑡, the initial value is Barenblatt solution with 𝐶𝐵2 =0.1, 𝑚=5, 𝑀𝑥= 𝑀𝑦=64, 𝛿𝑡=0.01. The blue line represents the exact interface of the support set calculated by (4.17). Journal of Computational Physics 524 (2025) 113696 28 Q.Cheng, Q.Liu, W.Chen et al. Fig. 23.Energy solved by (3.26)-(3.27)with different regularization terms. Set 𝑀𝑥=𝑀𝑦=64, 𝛿𝑡=0.01, the initial value is Barenblatt solution with 𝐶𝐵2 =0.1, 𝑚=2, 𝑚=5. The blue solid lines: 𝜖Δ𝑿 𝒙𝑘+1, 𝜖=ℎ2 𝑥. The red dashed lines: 𝜖𝑘Δ𝑿 (𝒙𝑘+1 −𝒙𝑘), 𝜖𝑘=0.1. Fig. 24. Determinant values solved by (3.26)-(3.27) with different regularization terms. Set 𝑀𝑥=𝑀𝑦=6 4, 𝛿𝑡=0.01, the initial value is Barenblatt solution with 𝐶𝐵2 =0.1, 𝑚=2, 𝑚=5. The blue lines: 𝜖Δ𝑿 𝒙𝑘+1, 𝜖=ℎ2 𝑥. The red lines: 𝜖𝑘Δ𝑿 (𝒙𝑘+1 −𝒙𝑘), 𝜖𝑘=0.1. Table 6 Convergence order with 𝐵𝑚,2(𝒙,0.1), 𝐶𝐵2 =0.1, 𝑚=2 and 𝑚=2.5in [−2,2]× [−2,2]. Numerical solutions are solved by (3.26)-(3.27) with regularization term 𝜖Δ𝑿 𝒙𝑘+1, 𝜖=ℎ2 𝑥. 𝑚=2 𝑚=2.5 𝑀𝑥×𝑀𝑦 𝑁𝑡 𝐿2 ℎerror (𝜌) order 𝐿2 ℎ error (𝜌) order 16x16 16 0.0029 0.0054 32x32 32 0.0014 1.0506 0.0026 1.0544 64x64 64 7.5117e-04 0.8982 0.0014 0.8931 128x128 128 3.6211e-04 1.0527 6.5371e-04 1.0987 256x256 256 1.7947e-04 1.0127 3.0605e-04 1.0949 Journal of Computational Physics 524 (2025) 113696 29 Q.Cheng, Q.Liu, W.Chen et al. Fig. 25. Numerical solution solved by (3.26)-(3.27) with the regularization term 𝜖Δ𝑿 𝒙𝑘+1, 𝜖=0 .1𝛿𝑡, 𝑚=3, the initial value (4.18) in [−1.5,1.5] × [−1.5,1.5], 𝑀𝑥=𝑀𝑦=64, 𝛿𝑡=0.001. Non-radial problem.Consider the following initial value: 𝜌0(𝑥,𝑦)= ⎧ ⎪ ⎪ ⎨ ⎪ ⎪⎩ 25(0.252 −( √ 𝑥2 +𝑦2 −0.75)2) 3 2 , √ 𝑥2 +𝑦2 ∈[0.5,1] and (𝑥<0 or 𝑦<0), 25(0.252 −𝑥2 −(𝑦−0.75)2) 3 2 , 𝑥2 +(𝑦−0.75)2 ≤0.252 and 𝑥≥0, 25(0.252 −(𝑥−0.75)2 −𝑦2) 3 2 , (𝑥−0.75)2 +𝑦2 ≤0.252 and 𝑦≥0, 0, otherwise, (4.18) which has a partial donut-shaped support [29]. Let’s set 𝑚=3, 𝑀𝑥=𝑀𝑦=6 4, 𝛿𝑡=0.001, and use scheme (3.26)-(3.27) with the regularization term 𝜖Δ𝑿 𝒙𝑘+1, 𝜖=0.1𝛿𝑡to implement the numerical experiments, numerical results are shown in Fig. 25, where the evolution of the trajectories can be found. We can observe that the scheme (3.26)-(3.27) handles this situation well. However, it should be noted that this approach cannot handle topological changes automatically, which serves as a limitation of our method. Now we take the initial value as 𝜌0(𝑥,𝑦)= 𝑒−20((𝑥−0.5)2+(𝑦−0.5)2), 𝑥∈[−2,2]×[−2,2]. (4.19) Let’s set 𝑚=2, 𝑀𝑥=𝑀𝑦=64, 𝛿𝑡=0.01, and use scheme (3.26)-(3.27)with the regularization term 𝜖Δ𝑿 𝒙𝑘+1, 𝜖=0.1𝛿𝑡to simulate the numerical experiments, results are shown in Fig. 26. It can be found that the proposed scheme (3.26)-(3.27) can handle the nonradial case well. 4.2.2. Aggregation equation Consider the following aggregation equation: 𝜕𝑡𝜌=∇ ⋅(𝜌∇𝑊∗𝜌), 𝑊 ∶ℝ2 → ℝ. (4.20) We simulate the evolution of solutions to (4.20)with 𝑊(𝒙)= |𝒙|2 2 −ln|𝒙|, and the initial value 𝜌0(𝑥,𝑦)= 𝐶2𝑑𝑒−𝑥2−𝑦2 , (4.21) Journal of Computational Physics 524 (2025) 113696 30 Q.Cheng, Q.Liu, W.Chen et al. Fig. 26.Numerical solution solved by (3.26)-(3.27)with the regularization term 𝜖Δ𝑿 𝒙𝑘+1, 𝜖=0.1𝛿𝑡, 𝑚=2, the initial value (4.19)in [−2,2]×[−2,2], 𝑀𝑥=𝑀𝑦=64, 𝛿𝑡=0.01. Fig. 27. Aggregation equation solved by (3.26)-(3.27) with the regularization term 𝜖Δ𝑿 𝒙𝑘+1, 𝜖=0.1𝛿𝑡, the initial value (4.21) in [−2,2]×[−2,2], 𝑀𝑥=𝑀𝑦=6 4, 𝛿𝑡=0.01. in [−2,2]×[−2,2], 𝐶2𝑑=1, 𝑀𝑥=𝑀𝑦=64, 𝛿𝑡=0.01. Using scheme (3.26)-(3.27)with the regularization term 𝜖Δ𝑿 𝒙𝑘+1, 𝜖=0.1𝛿𝑡 to simulate the numerical experiments, the numerical solution and trajectory plots at 𝑡=1 are shown in Fig. 27. The blue line in the trajectory plot represents the unit circle. As can be observed the solution converges to a characteristic function on the disk of radius 1, centered at (0,0), recovering analytic results on solutions of the aggregation equation with Newtonian repulsion [9,22,28]. Moreover, the determinant value plot is also presented in Fig. 27, we find that despite the minimum value diminishing over time, the distance between the minimum and zero remains positive as the density tends to a steady state. 4.2.3. Aggregation diffusion equation Now we simulate several examples of aggregation-diffusion equation: 𝜕𝑡𝜌=∇ ⋅(𝜌∇𝑊∗𝜌)+ 𝜈Δ𝜌𝑚, 𝑊∶ℝ2 → ℝ, 𝑚≥1. (4.22) For the aggregation diffusion equation (4.22), we take 𝑊(𝒙)=− 1 𝜋𝑒−|𝒙|2 , 𝑚=3 and 𝜈=0.1. The initial value is taken as 𝜌0(𝑥,𝑦)= 1 2𝜒|𝑥|≤2.5,|𝑦|≤2.5(𝑥,𝑦). (4.23) Journal of Computational Physics 524 (2025) 113696 31 Q.Cheng, Q.Liu, W.Chen et al. Fig. 28.Evolution of the numerical solution for the aggregation diffusion equation solved by (3.26)-(3.27) with the regularization term 𝜖Δ𝑿 𝒙𝑘+1, 𝜖=0.1𝛿𝑡, initial value (4.23)in [−3,3]×[−3,3], 𝑚=3, 𝜈=0.1, 𝑀𝑥=𝑀𝑦=32, 𝛿𝑡=0.01. Fig. 29.Trajectory and determinant value for the aggregation diffusion equation solved by (3.26)-(3.27)with the regularization term 𝜖Δ𝑿 𝒙𝑘+1, 𝜖=𝛿𝑡, initial value (4.23)in [−3,3]×[−3,3], 𝑚=3, 𝜈=0.1, 𝑀𝑥=𝑀𝑦=32, 𝛿𝑡=0.01. Using scheme (3.26)-(3.27) with the regularization term 𝜖Δ𝑿 𝒙𝑘+1, 𝜖=0.1𝛿𝑡to carry out numerical experiments, the evolution of density can be found in Fig. 28, the solution tends to form four bumps at the four angles at the beginning, and finally approaches a single bump equilibrium [8,9]. The trajectory and determinant value plots are depicted in Fig. 29, which implies that there is no distortion or swap during the evolution of the solution, and that the minimum value of the determinant is lower bounded away from zero. We also simulate the evolution of the solution for the Keller-Segel equation, which is the aggregation-diffusion equation (4.22) with the kernel 𝑊(𝒙)= 1 2𝜋ln(|𝒙|)for 𝜈=1, 𝑚=1 and 𝑚=2, the global existence and blow-up of solutions are displayed. Taking the Journal of Computational Physics 524 (2025) 113696 32 Q.Cheng, Q.Liu, W.Chen et al. Fig. 30.Keller-Segel model solved by (3.26)-(3.27)with the regularization term 𝜖Δ𝑿 𝒙𝑘+1, 𝜖=0.1𝛿𝑡, initial value (4.21), 𝑚=1, 𝑀𝑥=𝑀𝑦=64, 𝛿𝑡=0.001. initial value (4.21), and the constant 𝐶2𝑑will be chosen as 1and 20in the following numerical experiments. The numerical solution is solved by scheme (3.26)-(3.27)with regularization term 𝜖Δ𝑿 𝒙𝑘+1, 𝜖=0.1𝛿𝑡. For the case when 𝑚=1, the numerical solution can be found in Fig. 30. The solution decays to zero as time increases, given 𝐶2𝑑=1. Conversely, when 𝐶2𝑑=2 0, the solution becomes sharply peaked at the origin, which can be regarded as the blow-up phenomenon. As for the case when 𝑚=2, we can observe from Fig. 31 that the solution converges to a stable state denoted by a single bump, provided 𝐶2𝑑=2 0. Fig. 32 illustrates the determinant value plots for 𝑚=1 and 𝑚=2. It can be noticed that the determinant values remain positive for the given time. However, since the particles are clustered at the center for 𝑚=1 and at the circumference for 𝑚=2, the particle trajectories will actually be distorted or exchanged as time increases, and the positive value of the determinant will not always be maintained. 5. Concluding remarks We constructed in this paper new numerical schemes for the Wasserstein gradient flows using a flow dynamic approach based on the Benamou-Bernier formula. We showed that the new schemes preserve essential structures of the Wasserstein gradient flows. More precisely, the fully discrete schemes are shown to be positivity-preserving, mass conservative and energy dissipative. Moreover, it is shown that the schemes are uniquely solvable in the one dimensional case. We presented ample numerical experiments to show that the proposed schemes are indeed positivity preserving, mass conservative and energy stable. Our numerical results also indicate that the new schemes can capture accurately the movement of the trajectory and the finite propagation speed for the Porous-Medium equation, and can simulate blow-up phenomenon of the Keller-Segel equation. Journal of Computational Physics 524 (2025) 113696 33 Q.Cheng, Q.Liu, W.Chen et al. Fig. 31.Keller-Segel model solved by (3.26)-(3.27)with the regularization term 𝜖Δ𝑿 𝒙𝑘+1, 𝜖=0.1𝛿𝑡, initial value (4.21)at 𝑡=0.12, 𝑚=2, 𝑀𝑥=𝑀𝑦=64, 𝛿𝑡=0.001. Fig. 32. Determinant value for the Keller-Segel model with 𝑚=1, 2, solved by (3.26)-(3.27) with the regularization term 𝜖Δ𝑿 𝒙𝑘+1, 𝜖=0.1𝛿𝑡, initial value (4.21), 𝑀𝑥=𝑀𝑦=64, 𝛿𝑡=0.001. CRediT authorship contribution statement Qing Cheng: Writing – review & editing, Writing – original draft, Visualization, Supervision, Methodology, Conceptualization. Qianqian Liu: Writing – review & editing, Visualization, Software, Conceptualization. Wenbin Chen: Writing – review & editing, Methodology, Funding acquisition, Conceptualization. Jie Shen:Writing – review & editing, Writing – original draft, Methodology, Funding acquisition, Conceptualization. Declaration of competing interest The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. Acknowledgements Cheng is supported by NSFC 12301522 and the Fundamental Research Funds for the Central Universities, Liu is supported by NSFC 123B2015, Chen is supported by the NSFC 12071090 and NSFC 12241101, and Shen is supported by NSFC 12371409. Journal of Computational Physics 524 (2025) 113696 34 Q.Cheng, Q.Liu, W.Chen et al. Appendix A In this section, some details about the numerical experiments are presented. A.1. Porous-medium and Fokker-Planck equations in 1D For the Porous-Medium problem with free boundaries, the following boundary condition can be obtained by using the fact that 𝜌|𝜕Ω=0 as discussed in [19]: (𝜕𝑋𝑥)𝑚−1𝜕𝑡𝑥=− 𝑚 𝑚−1 𝜕𝑋(𝜌(𝑋,0))𝑚−1 𝜕𝑋𝑥 . (A.1) The numerical free boundary conditions are proposed as follows: ( 𝑥𝑘 1 −𝑥𝑘 0 𝛿𝑋 )𝑚−1𝑥𝑘+1 0 −𝑥𝑘 0 𝛿𝑡 =− 𝑚 𝑚−1 (𝜌(𝑋1,0))𝑚−1−(𝜌(𝑋0,0))𝑚−1 𝛿𝑋 𝑥𝑘+1 1 −𝑥𝑘+1 0 𝛿𝑋 , (A.2) ( 𝑥𝑘 𝑁−𝑥𝑘 𝑁−1 𝛿𝑋 )𝑚−1 𝑥𝑘+1 𝑁 −𝑥𝑘 𝑁 𝛿𝑡 =− 𝑚 𝑚−1 (𝜌(𝑋𝑁,0))𝑚−1−(𝜌(𝑋𝑁−1,0))𝑚−1 𝛿𝑋 𝑥𝑘+1 𝑁 −𝑥𝑘+1 𝑁−1 𝛿𝑋 . (A.3) The free boundaries problem for the Porous-Medium equation in the numerical experiments is solved with above free boundary conditions. Similarly, for the Fokker-Planck equation with free boundaries, the following boundary condition can be obtained by using the fact that 𝜌|𝜕Ω=0: 𝜕𝑡𝑥=− 𝑚 𝑚−1 𝜕𝑋(𝜌(𝑋,0))𝑚−1 (𝜕𝑋𝑥)𝑚 −𝑉′(𝑥), (A.4) which can be solved by equations analogous to (A.2)-(A.3). A.2. Aggregation equation in 1D In the subsection, we give details about the numerical experiments for the aggregation equation in 1D. Implicit-explicit. Let us set 𝑥to be implicit and 𝑦to be explicit in scheme (3.3)-(3.4), define the following discrete energy: 𝐸ℎ(𝒙𝑘+1)= 𝛿𝑋 𝑁−1∑ 𝑖=0 𝜌(𝑋𝑖+1 2 ,0) 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 𝑥𝑘 𝑗+1 ∫ 𝑥𝑘 𝑗 ⎛ ⎜ ⎜ ⎜⎝ |𝑥𝑘+1 𝑖+1 2 −𝑦|2 2 −ln(|𝑥𝑘+1 𝑖+1 2 −𝑦|) ⎞ ⎟ ⎟ ⎟⎠ d𝑦, =𝛿𝑋 𝑁−1∑ 𝑖=0 𝜌(𝑋𝑖+1 2 ,0) 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 ( −1 6(𝑥𝑘+1 𝑖+1 2 −𝑦)3 +(𝑥𝑘+1 𝑖+1 2 −𝑦)ln(|𝑥𝑘+1 𝑖+1 2 −𝑦|)−(𝑥𝑘+1 𝑖+1 2 −𝑦) ) || | 𝑥𝑘 𝑗+1 𝑥𝑘 𝑗 =𝛿𝑋 𝑁−1∑ 𝑖=0 𝜌(𝑋𝑖+1 2 ,0) 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 ( −1 6(𝑥𝑘+1 𝑖+1 2 −𝑥𝑘 𝑗+1)3 + 1 6(𝑥𝑘+1 𝑖+1 2 −𝑥𝑘 𝑗)3 +𝑥𝑘 𝑗+1 −𝑥𝑘 𝑗 ) +𝛿𝑋 𝑁−1∑ 𝑖=0 𝜌(𝑋𝑖+1 2 ,0) 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 ( (𝑥𝑘+1 𝑖+1 2 −𝑥𝑘 𝑗+1)ln(|𝑥𝑘+1 𝑖+1 2 −𝑥𝑘 𝑗+1|)−(𝑥𝑘+1 𝑖+1 2 −𝑥𝑘 𝑗)ln(|𝑥𝑘+1 𝑖+1 2 −𝑥𝑘 𝑗|) ) , (A.5) and the following result can be obtained by simple calculations: 𝛿𝐸𝑘+1 ℎ 𝛿𝑥𝑘+1 𝑖 =𝛿𝑋𝜌(𝑋𝑖+1 2 ,0) 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 ( −1 4(𝑥𝑘+1 𝑖+1 2 −𝑥𝑘 𝑗+1)2 + 1 4(𝑥𝑘+1 𝑖+1 2 −𝑥𝑘 𝑗)2 ) +𝛿𝑋𝜌(𝑋𝑖−1 2 ,0) 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 ( −1 4(𝑥𝑘+1 𝑖−1 2 −𝑥𝑘 𝑗+1)2 + 1 4(𝑥𝑘+1 𝑖−1 2 −𝑥𝑘 𝑗)2 ) +𝛿𝑋𝜌(𝑋𝑖+1 2 ,0) 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 ( 1 2 ln(|𝑥𝑘+1 𝑖+1 2 −𝑥𝑘 𝑗+1|)−1 2 ln(|𝑥𝑘+1 𝑖+1 2 −𝑥𝑘 𝑗|) ) +𝛿𝑋𝜌(𝑋𝑖−1 2 ,0) 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 ( 1 2 ln(|𝑥𝑘+1 𝑖−1 2 −𝑥𝑘 𝑗+1|)−1 2 ln(|𝑥𝑘+1 𝑖−1 2 −𝑥𝑘 𝑗|) ) . (A.6) Journal of Computational Physics 524 (2025) 113696 35 Q.Cheng, Q.Liu, W.Chen et al. One can also find that 𝛿2𝐸𝑘+1 ℎ 𝛿(𝑥𝑘+1 𝑖 )2 =𝛿𝑋(𝜌(𝑋𝑖+1 2 ,0)+ 𝜌(𝑋𝑖−1 2 ,0)) 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 4 (𝑥𝑘 𝑗+1 −𝑥𝑘 𝑗) +𝛿𝑋𝜌(𝑋𝑖+1 2 ,0) 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 4 ⎛ ⎜ ⎜ ⎜⎝ 1 𝑥𝑘+1 𝑖+1 2 −𝑥𝑘 𝑗+1 − 1 𝑥𝑘+1 𝑖+1 2 −𝑥𝑘 𝑗 ⎞ ⎟ ⎟ ⎟⎠ +𝛿𝑋𝜌(𝑋 𝑖−1 2 ,0) 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 4 ⎛ ⎜ ⎜ ⎜⎝ 1 𝑥𝑘+1 𝑖−1 2 −𝑥𝑘 𝑗+1 − 1 𝑥𝑘+1 𝑖−1 2 −𝑥𝑘 𝑗 ⎞ ⎟ ⎟ ⎟⎠ >0, where the fact that 1 𝑥−𝑦|𝑏 𝑎= ∫𝑏 𝑎 1 (𝑥−𝑦)2 d𝑦>0for 𝑎<𝑏has been utilized in the last inequality. Then the discrete energy is convex since the Hessian matrix ∇2𝐸ℎis positive definite. Explicit-implicit. If we set 𝑥to be explicit and 𝑦to be implicit in scheme (3.3)-(3.4), i.e. 𝛿𝐸𝑘+1 ℎ 𝛿𝑥𝑘+1 𝑖 =𝛿𝑋𝜌(𝑋𝑖+1 2 ,0) 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 ( −1 4(𝑥𝑘 𝑖+1 2 −𝑥𝑘+1 𝑗+1)2 + 1 4(𝑥𝑘 𝑖+1 2 −𝑥𝑘+1 𝑗 )2 ) +𝛿𝑋𝜌(𝑋𝑖−1 2 ,0) 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 ( −1 4(𝑥𝑘 𝑖−1 2 −𝑥𝑘+1 𝑗+1)2 + 1 4(𝑥𝑘 𝑖−1 2 −𝑥𝑘+1 𝑗 )2 ) +𝛿𝑋𝜌(𝑋𝑖+1 2 ,0) 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 ( 1 2 ln(|𝑥𝑘 𝑖+1 2 −𝑥𝑘+1 𝑗+1|)−1 2 ln(|𝑥𝑘 𝑖+1 2 −𝑥𝑘+1 𝑗 |) ) +𝛿𝑋𝜌(𝑋𝑖−1 2 ,0) 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 ( 1 2 ln(|𝑥𝑘 𝑖−1 2 −𝑥𝑘+1 𝑗+1|)−1 2 ln(|𝑥𝑘 𝑖−1 2 −𝑥𝑘+1 𝑗 |) ) . (A.7) Implicit-implicit. If we take both 𝑥and 𝑦implicit in scheme (3.3)-(3.4), set 𝛿𝐸𝑘+1 ℎ 𝛿𝑥𝑘+1 𝑖 as follows: 𝛿𝐸𝑘+1 ℎ 𝛿𝑥𝑘+1 𝑖 =𝛿𝑋𝜌(𝑋𝑖+1 2 ,0) 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 ( −1 4(𝑥𝑘+1 𝑖+1 2 −𝑥𝑘+1 𝑗+1)2 + 1 4(𝑥𝑘+1 𝑖+1 2 −𝑥𝑘+1 𝑗 )2 ) +𝛿𝑋𝜌(𝑋𝑖−1 2 ,0) 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 ( −1 4(𝑥𝑘+1 𝑖−1 2 −𝑥𝑘+1 𝑗+1)2 + 1 4(𝑥𝑘+1 𝑖−1 2 −𝑥𝑘+1 𝑗 )2 ) +𝛿𝑋𝜌(𝑋𝑖+1 2 ,0) 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 ( 1 2 ln(|𝑥𝑘+1 𝑖+1 2 −𝑥𝑘+1 𝑗+1|)−1 2 ln(|𝑥𝑘+1 𝑖+1 2 −𝑥𝑘+1 𝑗 |) ) +𝛿𝑋𝜌(𝑋𝑖−1 2 ,0) 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 ( 1 2 ln(|𝑥𝑘+1 𝑖−1 2 −𝑥𝑘+1 𝑗+1|)−1 2 ln(|𝑥𝑘+1 𝑖−1 2 −𝑥𝑘+1 𝑗 |) ) . (A.8) A.3. Keller-Segel model in 1D The discrete energy for the Keller-Segel model in 1D is defined as follows: 𝐸ℎ(𝒙𝑘+1)= 𝑁−1∑ 𝑖=0 𝛿𝑋𝜌(𝑋𝑖+1 2 ,0)log ⎛ ⎜ ⎜ ⎜⎝ 𝜌(𝑋 𝑖+1 2 ,0) 𝑥𝑘+1 𝑖+1 −𝑥𝑘+1 𝑖 𝛿𝑋 ⎞ ⎟ ⎟ ⎟⎠ −𝛿𝑋 2𝜋 𝑁−1∑ 𝑖=0 𝜌(𝑋𝑖+1 2 ,0) × 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 ( (𝑥𝑘+1 𝑖+1 2 −𝑥𝑘 𝑗+1)ln(|𝑥𝑘+1 𝑖+1 2 −𝑥𝑘 𝑗+1|)−(𝑥𝑘+1 𝑖+1 2 −𝑥𝑘 𝑗)ln(|𝑥𝑘+1 𝑖+1 2 −𝑥𝑘 𝑗|) ) , it can be calculated that 𝛿𝐸𝑘+1 ℎ 𝛿𝑥𝑘+1 𝑖 =−𝛿𝑋 2𝜋𝜌(𝑋𝑖+1 2 ,0) 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 ( 1 2 ln(|𝑥𝑘+1 𝑖+1 2 −𝑥𝑘 𝑗+1|)−1 2 ln(|𝑥𝑘+1 𝑖+1 2 −𝑥𝑘 𝑗|) ) Journal of Computational Physics 524 (2025) 113696 36 Q.Cheng, Q.Liu, W.Chen et al. −𝛿𝑋 2𝜋𝜌(𝑋𝑖−1 2 ,0) 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 ( 1 2 ln(|𝑥𝑘+1 𝑖−1 2 −𝑥𝑘 𝑗+1|)−1 2 ln(|𝑥𝑘+1 𝑖−1 2 −𝑥𝑘 𝑗|) ) + 𝛿𝑋𝜌(𝑋𝑖+1 2 ,0) 𝑥𝑘+1 𝑖+1 −𝑥𝑘+1 𝑖 − 𝛿𝑋𝜌(𝑋𝑖−1 2 ,0) 𝑥𝑘+1 𝑖 −𝑥𝑘+1 𝑖−1 , (A.9) and we have 𝛿2𝐸ℎ 𝛿(𝑥𝑘+1 𝑖 )2 =−𝛿𝑋 2𝜋𝜌(𝑋𝑖+1 2 ,0) 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 4 ⎛ ⎜ ⎜ ⎜⎝ 1 𝑥𝑘+1 𝑖+1 2 −𝑥𝑘 𝑗+1 − 1 𝑥𝑘+1 𝑖+1 2 −𝑥𝑘 𝑗 ⎞ ⎟ ⎟ ⎟⎠ −𝛿𝑋 2𝜋𝜌(𝑋𝑖−1 2 ,0) 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 4 ⎛ ⎜ ⎜ ⎜⎝ 1 𝑥𝑘+1 𝑖−1 2 −𝑥𝑘 𝑗+1 − 1 𝑥𝑘+1 𝑖−1 2 −𝑥𝑘 𝑗 ⎞ ⎟ ⎟ ⎟⎠ + 𝛿𝑋𝜌(𝑋𝑖+1 2 ,0) (𝑥𝑘+1 𝑖+1 −𝑥𝑘+1 𝑖 )2 + 𝛿𝑋𝜌(𝑋𝑖−1 2 ,0) (𝑥𝑘+1 𝑖 −𝑥𝑘+1 𝑖−1)2 . (A.10) Notice that − 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 ⎛ ⎜ ⎜ ⎜⎝ 1 𝑥𝑘+1 𝑖+1 2 −𝑥𝑘 𝑗+1 − 1 𝑥𝑘+1 𝑖+1 2 −𝑥𝑘 𝑗 ⎞ ⎟ ⎟ ⎟⎠ = 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 𝑥𝑘 𝑗+1 ∫ 𝑥𝑘 𝑗 −1 (𝑥𝑘+1 𝑖+1 2 −𝑦)2 d𝑦<0, (A.11) − 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 ⎛ ⎜ ⎜ ⎜⎝ 1 𝑥𝑘+1 𝑖−1 2 −𝑥𝑘 𝑗+1 − 1 𝑥𝑘+1 𝑖−1 2 −𝑥𝑘 𝑗 ⎞ ⎟ ⎟ ⎟⎠ = 𝑁−1∑ 𝑗=0 𝜌𝑘 𝑗+1 2 𝑥𝑘 𝑗+1 ∫ 𝑥𝑘 𝑗 −1 (𝑥𝑘+1 𝑖−1 2 −𝑦)2 d𝑦<0. (A.12) However, the positivity or negativity of 𝛿2𝐸ℎ 𝛿(𝑥𝑘+1 𝑖 )2 is not determined. Whether the discrete energy is convex or not is uncertain, since the positivity or negativity of the Hessian matrix ∇2𝐸ℎis not clear. Data availability No data was used for the research described in the article. References [1] Luigi Ambrosio, Nicola Gigli, Giuseppe Savaré, Gradient Flows: in Metric Spaces and in the Space of Probability Measures, Springer Science & Business Media, 2005. [2] Donald G. Aronson, The porous medium equation, in: Nonlinear Diffusion Problems: Lectures given at the 2nd 1985 Session of the Centro Internazionale Matermatico Estivo (CIME) held at Montecatini Terme, Italy, June 10–June 18, 1985, 2006, pp. 1–46. [3] Donald G. Aronson, Luis A. Caffarelli, Shoshana Kamin, How an initially stationary interface begins to move in porous medium flow, SIAM J. Math. Anal. 14 (4) (1983) 639–658. [4] Jean-David Benamou, Yann Brenier, A computational fluid mechanics solution to the Monge-Kantorovich mass transfer problem, Numer. Math. 84 (3) (2000) 375–393. [5] Jean-David Benamou, Guillaume Carlier, Maxime Laborde, An augmented Lagrangian approach to Wasserstein gradient flows and applications, ESAIM Proc. Surv. 54 (2016) 1–17. [6] Clément Bonet, Nicolas Courty, François Septier, Lucas Drumetz, Efficient gradient flows in sliced-Wasserstein space, Trans. Mach. Learn. Res. (2022). [7] Clément Cances, Thomas O. Gallouët, Gabriele Todeschi, A variational finite volume scheme for Wasserstein gradient flows, Numer. Math. 146 (2020) 437–480. [8] José A. Carrillo, Alina Chertock, Yanghong Huang, A finite-volume method for nonlinear nonlocal equations with a gradient flow structure, Commun. Comput. Phys. 17 (1) (2015) 233–258. [9] José A. Carrillo, Katy Craig, Li Wang, Chaozhen Wei, Primal dual methods for Wasserstein gradient flows, Found. Comput. Math. 22 (2022) 1–55. [10] José A. Carrillo, Bertram Düring, Daniel Matthes, David S. McCormick, A Lagrangian scheme for the solution of nonlinear diffusion equations using moving simplex meshes, J. Sci. Comput. 75 (2018) 1463–1499. [11] José A. Carrillo, Lucas C.F. Ferreira, Juliana C. Precioso, A mass-transportation approach to a one dimensional fluid mechanics model with nonlocal velocity, Adv. Math. 231 (1) (2012) 306–327. [12] José A. Carrillo, Ansgar Jüngel, Peter A. Markowich, Giuseppe Toscani, Andreas Unterreiter, Entropy dissipation methods for degenerate parabolicproblems and generalized Sobolev inequalities, Monatshefte Math. 133 (2001) 1–82. [13] Jose A. Carrillo, Daniel Matthes, Marie-Therese Wolfram, Lagrangian schemes for Wasserstein gradient flows, Handb. Numer. Anal. 22 (2021) 271–311. [14] José A. Carrillo, Robert J. McCann, Cédric Villani, Kinetic equilibration rates for granular media and related equations: entropy dissipation and mass transportation estimates, Rev. Mat. Iberoam. 19 (3) (2003) 971–1018. [15] José A. Carrillo, Giuseppe Toscani, Asymptotic L1-decay of solutions of the porous medium equation to self-similarity, Indiana Univ. Math. J. 49 (2000) 113–142. [16] Wenbin Chen, Qianqian Liu, Jie Shen, Error estimates and blow-up analysis of a finite-element approximation for the parabolic-elliptic Keller-Segel system, Int. J. Numer. Anal. Model. 19 (2022) 275–298. Journal of Computational Physics 524 (2025) 113696 37 Q.Cheng, Q.Liu, W.Chen et al. [17] Qing Cheng, Chun Liu, Jie Shen, A new interface capturing method for Allen-Cahn type equations based on a flow dynamic approach in Lagrangian coordinates, I. One-dimensional case, J. Comput. Phys. 419 (2020) 109509. [18] Chenghua Duan, Wenbin Chen, Chun Liu, Xingye Yue, Shenggao Zhou, Structure-preserving numerical methods for nonlinear Fokker–Planck equations with nonlocal interactions by an energetic variational approach, SIAM J. Sci. Comput. 43 (1) (2021) B82–B107. [19] Chenghua Duan, Chun Liu, Cheng Wang, Xingye Yue, Numerical methods for porous medium equation by an energetic variational approach, J. Comput. Phys. 385 (2019) 13–32. [20] Bob Eisenberg, Computing the field in proteins and channels, J. Membr. Biol. 150 (1) (1996) 1–25. [21] Bob Eisenberg, Yunkyong Hyon, Chun Liu, Energy variational analysis of ions in water and channels: field theory for primitive models of complex ionic fluids, J. Chem. Phys. 133 (10) (2010). [22] Razvan C. Fetecau, Yanghong Huang, Theodore Kolokolnikov, Swarm dynamics and equilibria for a nonlocal aggregation model, Nonlinearity 24 (10) (2011) 2681. [23] Francis Filbet, A finite volume scheme for the Patlak–Keller–Segel Chemotaxis model, Numer. Math. 104 (2006) 457–488. [24] Dirk Horstmann, From 1970 until present: the Keller-Segel model in Chemotaxis and its consequences I, Jahresber. Dtsch. Math.-Ver. 105 (3) (2003) 103–165. [25] Richard Jordan, David Kinderlehrer, Felix Otto, The variational formulation of the Fokker–Planck equation, SIAM J. Math. Anal. 29 (1) (1998) 1–17. [26] Evelyn F. Keller, Lee A. Segel, Initiation of slime mold aggregation viewed as an instability, J. Theor. Biol. 26 (3) (1970) 399–415. [27] David Kinderlehrer, Léonard Monsaingeon, Xiang Xu, A Wasserstein gradient flow approach to Poisson-Nernst-Planck equations, ESAIM Control Optim. Calc. Var. 23 (1) (2017) 137–164. [28] Wuchen Li, Jianfeng Lu, Li Wang, Fisher information regularization schemes for Wasserstein gradient flows, J. Comput. Phys. 416 (2020) 109449. [29] Chun Liu, Yiwei Wang, On Lagrangian schemes for porous medium type generalized diffusion equations: a discrete energetic variational approach, J. Comput. Phys. 417 (2020) 109566. [30] Chun Liu, Yiwei Wang, A variational Lagrangian scheme for a phase-field model: a discrete energetic variational approach, SIAM J. Sci. Comput. 42 (6) (2020) B1541–B1569. [31] Chun Liu, Hao Wu, An energetic variational approach for the Cahn–Hilliard equation with dynamic boundary condition: model derivation and mathematical analysis, Arch. Ration. Mech. Anal. 233 (1) (2019) 167–247. [32] Fawang Liu, Vo Anh, Ian Turner, Numerical solution of the space fractional Fokker–Planck equation, J. Comput. Appl. Math. 166 (1) (2004) 209–219. [33] Hailiang Liu, Wumaier Maimaitiyiming, A dynamic mass transport method for Poisson-Nernst-Planck equations, J. Comput. Phys. 473 (2023) 111699. [34] Hailiang Liu, Zhongming Wang, An entropy satisfying discontinuous Galerkin method for nonlinear Fokker–Planck equations, J. Sci. Comput. 68 (2016) 1217–1240. [35] Jianguo Liu, Li Wang, Zhennan Zhou, Positivity-preserving and asymptotic preserving method for 2D Keller-Segal equations, Math. Comput. 87 (311) (2018) 1165–1189. [36] Qianqian Liu, Chenghua Duan, Wenbin Chen, EnVarA-FEM for the flux-limited porous medium equation, J. Comput. Phys. 493 (2023) 112432. [37] Cuong Ngo, Weizhang Huang, A study on moving mesh finite element solution of the porous medium equation, J. Comput. Phys. 331 (2017) 357–380. [38] Lars Onsager, Reciprocal relations in irreversible processes. I, Phys. Rev. 37 (4) (1931) 405. [39] Lars Onsager, Reciprocal relations in irreversible processes. II, Phys. Rev. 38 (12) (1931) 2265. [40] Lorenzo Pareschi, Mattia Zanella, Structure preserving schemes for nonlinear Fokker–Planck equations and applications, J. Sci. Comput. 74 (2018) 1575–1600. [41] Jie Shen, Jie Xu, Unconditionally bound preserving and energy dissipative schemes for a class of Keller–Segel equations, SIAM J. Numer. Anal. 58 (3) (2020) 1674–1695. [42] John William Strutt, Some general theorems relating to vibrations, Proc. Lond. Math. Soc. 1 (1) (1871) 357–368. [43] Juan Luis Vázquez, The Porous Medium Equation: Mathematical Theory, Oxford University Press on Demand, 2007. [44] Shufen Wang, Simin Zhou, Shuxun Shi, Wenbin Chen, Fully decoupled and energy stable BDF schemes for a class of Keller-Segel equations, J. Comput. Phys. 449 (2022) 110799. [45] Yiwei Wang, Chun Liu, Some recent advances in energetic variational approaches, Entropy 24 (5) (2022) 721. [46] Yiwei Wang, Tengfei Zhang, Chun Liu, A two species micro–macro model of wormlike micellar solutions and its maximum entropy closure approximations: an energetic variational approach, J. Non-Newton. Fluid Mech. 293 (2021) 104559. [47] Michael Winkler, Aggregation vs. Global diffusive behavior in the higher-dimensional Keller–Segel model, J. Differ. Equ. 248 (12) (2010) 2889–2905. [48] Qiang Zhang, Zilong Wu, Numerical simulation for porous medium equation by local discontinuous Galerkin finite element method, J. Sci. Comput. 38 (2009) 127–148. Journal of Computational Physics 524 (2025) 113696 38

采集于

查看校方原文 ↗