# Compact Local Structure-Preserving Algorithms for the Nonlinear Schrödinger Equation with Wave Operator

Authors: Langyang Huang; Zhaowei Tian; Yaoxiong Cai
Journal: Mathematical Problems in Engineering
 (2020)

---

## Abstract

Combining the compact method with the structure-preserving algorithm, we propose a compact local energy-preserving scheme and a compact local momentum-preserving scheme for the nonlinear Schrödinger equation with wave operator (NSEW). The convergence rates of both schemes areOh4+τ2. The discrete local conservative properties of the presented schemes are derived theoretically. Numerical experiments are carried out to demonstrate the convergence order and local conservation laws of the developed algorithms.


---

## Body

## 1. Introduction

The nonlinear Schrödinger equation with wave operator (NSEW) is a very important model in mathematical physics with applications in a wide range, such as plasma physics, water waves, nonlinear optics, and bimolecular dynamics [1, 2]. In this paper, we consider the periodic initial-boundary value problem of the NSEW as(1)utt−uxx+iαut+βu2u=0,x∈xL,xR,0<t≤T,(2)ux,0=u0x,utx,0=u1x,x∈xL,xR,(3)uxL,t=uxR,t,0≤t≤T,where ux,t is a complex function, u0x and u1x are known complex functions, α and β are real constants, and i2=−1. Several numerical algorithms have been studied for solving the NSEW (Refs. [3–11] and references therein).Recently, structure-preserving algorithms were proposed to solving the Hamiltonian systems [12–15] and applied to various PDEs, such as the nonlinear Schrödinger-type equation [16–19], wave equation [20], and KdV equation [21]. The important feature of the structure-preserving algorithm is that it can maintain certain invariant quantities and has the ability of long-term simulation. It should be pointed out that Wang et al. [22] presented the concept of the local structure-preserving algorithm for PDEs and then proposed several algorithms which preserved the multisymplectic conservation law and local energy and momentum conservation laws for the Klein–Gordon equation. For the next few years, the theory of the local structure-preserving algorithm was used successfully for solving the PDEs (Refs. [23–30] and references therein), and the main advantage of the method is that it can keep the local structures of PDEs independent of boundary conditions.As is known to all, high accuracy [31] and conservation algorithm are two important aspects of the numerical solutions. However, there are few local structure-preserving algorithms with high-order approximation to equation (1) in the literature. In this paper, using the high precision of the compact algorithm, we construct two new schemes (i.e., compact local energy-preserving scheme and compact local momentum-preserving scheme) with fourth-order accuracy in the space for the NSEW.The outline of this paper is as follows: In Section2, some preliminary knowledge is given, such as divided grid point, operator definitions, and their properties. In Section 3, the local energy-preserving algorithm is proposed and the local energy conservation law is proved. In Section 4, the local momentum-preserving algorithm is presented and the local momentum conservation law is analyzed. Numerical experiments are shown in Section 5. At last, we make some conclusions in Section 6.


## 2. Preliminary Knowledge

Firstly, letN and Nt be two positive integers; we then divide the space region xL,xR and the time interval, respectively, into N parts and Nt parts. Thus, we introduce some notations: h=xR−xL/N,τ=T/Nt, xj=xL+jh,j=0,1,…,N, and tn=nτ,n=0,1,…,Nt, where h is the spatial step span and τ is the temporal length. The numerical solution and exact value of the function ux,t at the node xj,tn are denoted by ujn and uxj,tn, respectively.Secondly, we define operators as follows:(4)Dtujn=ujn+1−ujnτ,Dxujn=uj+1n−ujnh,Atujn=ujn+1+ujn2,Axujn=uj+1n+ujn2,At2ujn=ujn+2+2ujn+1+ujn4,Ax2ujn=uj+2n+2uj+1n+ujn4,δxujn=uj+1n+4ujn+uj−1n6,δx2ujn=uj+1n+10ujn+uj−1n12,Dt2ujn−1=ujn+1−2ujn+ujn−1τ2,Dx2uj−1n=uj+1n−2ujn+uj−1nh2.According to Taylor’s expansion, it is easy to get that(5)Dxujn=δx∂u∂xjn+Oh4,Dx2uj−1n=δx2∂2u∂x2jn+Oh4.Then,(6)δx−1Dxujn=∂u∂xjn+Oh4,δx−2Dx2uj−1n=∂2u∂x2jn+Oh4.By some simple computations, it is not difficult to obtain the following:(i)
Commutative law:(7)DxDt=DtDx,AD=AD,whereA represents At or Ax and D represents Dt or Dx.(ii)
Chain rule:(8)DtFun=DuFunDtun+Oτ,DxFuj=DuFujDxuj+Oh.(iii)
Discrete Leibniz rule:(9)Dxf⋅gj=θfj+1+1−θfj⋅Dxgj+1−θgj+1+θgj⋅Dxfj,∀0≤θ≤1,Dtf⋅gn=θfn+1+1−θfn⋅Dtgn+1−θgn+1+θgn⋅Dtfn,∀0≤θ≤1.In particular, we have the following two equalities forθ=1/2 and θ=1:(10)θ=12,Dxf⋅gi=Axfi⋅Dxgi+Dxfi⋅Axgi,θ=1,Dxf⋅gi=fi+1⋅Dxgi+Dxfi⋅gi.Lettingf=g=u, we have(11)Dt12un2=Dtun⋅Atun,Dt12un⋅un−1=un⋅DtAtun−1.Furthermore, we get(12)Dxδx−1fgj=δx−1fj+1⋅Dxgj+Dxδx−1fj⋅gj.For anyu,v∈Vh=vv=v0,v1,…,vNT,v0=vN, we define the inner product and norms as(13)u,v=h∑j=0Nujvj¯,u2=h∑j=0Nujn2,u∞=max0≤j≤Nujn.For constructing algorithms conveniently, takingu=p+iq in equation (1), where p and q are real-valued functions, we derive(14)ptt−pxx−αqt+βp2+q2p=0,qtt−qxx+αpt+βp2+q2q=0.Furthermore, lettingpt=ξ, qt=η, px=ω, and qx=ν, system (14) can be written as(15)ξt−αqt−ωx=−βp2+q2p,ηt+αpt−νx=−βp2+q2q,pt=ξ,qt=η,px=ω,qx=ν.For system (15), using ωx=φ and νx=ϕ, we obtain(16)px=ω,ωx=φ,qx=ν,νx=ϕ,(17)pt=ξ,qt=η,(18)ξt−αqt−φ+βp2+q2p=0,(19)ηt+αpt−ϕ+βp2+q2q=0.


## 3. Compact Local Energy-Preserving Algorithm

Firstly, we consider the local energy conservation law for system (15). Multiplying the first line of equation (15) by pt, and the second line of equation (15) by qt, we derive(20)ξtpt−αqtpt−ωxpt+βp2+q2ppt=0,(21)ηtqt+αptqt−νxqt+βp2+q2qqt=0.Summing equations (20) and (21), we obtain(22)ξtpt+ηtqt−ωxpt−νxqt+βp2+q2ppt+qqt=0.Also by equations (16) and (17), we have(23)ξtξ+ηtη+ωωt+ννt+βp2+q2ppt+qqt−ωxξ+ωξx+νxη+νηx=0.Through further processing, we know that system (15) admits the local energy conservation law:(24)∂t12ξ2+η2+ω2+ν2+β4p2+q22=∂xωξ+νη.In equations (16)–(19), discretizing the space derivatives by using the compact leap-frog rule, the time derivatives by using the midpoint rule, and the nonlinear term with the discrete chain rule in the time direction, we obtain(25)Dxpjn=δxωj+1n,Dxωjn=δxφjn,Dxqjn=δxνj+1n,Dxνjn=δxϕjn,(26)Dtpjn=Atξjn,Dtqjn=Atηjn,(27)DtAtξjn−1−αDtAtqjn−1−φjn+β4Atpjn2+Atqjn2+Atpjn−12+Atqjn−12Atpjn+Atpjn−1=0,(28)DtAtηjn−1+αDtAtpjn−1−ϕjn+β4Atpjn2+Atqjn2+Atpjn−12+Atqjn−12Atqjn+Atqjn−1=0.From equations (25)–(28), eliminating φ and ϕ, we have(29)DtAtξjn−1−αDtAtqjn−1−Dxδx−1ωjn+β4Atpjn2+Atqjn2+Atpjn−12+Atqjn−12Atpjn+Atpjn−1=0,(30)DtAtηjn−1+αDtAtpjn−1−Dxδx−1νjn+β4Atpjn2+Atqjn2+Atpjn−12+Atqjn−12Atqjn+Atqjn−1=0.Furthermore, eliminatingω,ν,ξ, and η, we get the following discrete scheme:(31)Dt2pjn−1−αDtAtqjn−1−Dx2δx−2pj−1n+β4Atpjn2+Atqjn2+Atpjn−12+Atqjn−12Atpjn+Atpjn−1=0,Dt2qjn−1+αDtAtpjn−1−Dx2δx−2qj−1n+β4Atpjn2+Atqjn2+Atpjn−12+Atqjn−12Atqjn+Atqjn−1=0,i.e., (32)Dt2ujn−1+iαDtAtujn−1−Dx2δx−2uj−1n+β4Atujn2+Atujn−12Atujn+Atujn−1=0.Lemma 1.
Grid functionfjn satisfies the following identical equation:(33)fj+1nDtAtfj+2n−1+fj+1nDtAtfjn−1=12τhDxfjnfj+1n+1+τDtfjn−1fj+1n−hDxfjnfj+1n−1+τDtfjnfj+1n−1.Proof.
The left-hand term in equation (33) is equal to(34)fj+1nDtAtfj+2n−1+fj+1nDtAtfjn−1=12τfj+1nfj+2n+1−fj+1nfj+2n−1+fj+1nfjn+1−fj+1nfjn−1=12τfj+1nfj+2n+1−fjnfj+1n+1+fjnfj+1n+1−fjn−1fj+1n−fj+1nfj+2n−1−fjnfj+1n−1+fj+1nfjn+1−fjnfj+1n−1=12τhDxfjnfj+1n+1+τDtfjn−1fj+1n−hDxfjnfj+1n−1+τDtfjnfj+1n−1.This completes the proof.Theorem 1.
Scheme (32) meets the discrete local energy conservation law:(35)ejn=Dt12Atξjn−12+Atηjn−12+12410δx−1ωj+1n−1δx−1ωj+1n+δx−1ωjn−1δx−1ωj+1n+δx−1ωjnδx−1ωj+1n−1+10δx−1νj+1n−1δx−1νj+1n+δx−1νjn−1δx−1νj+1n+δx−1νjnδx−1νj+1n−1+β4Atpjn−12+Atqjn−122−Dxδx−1ωjnDtAtpjn−1−h24τδx−1ωjnδx−1ωj+1n+1−δx−1ωjnδx−1ωj+1n−1+δx−1νjnDtAtpjn−1−h24τδx−1νjnδx−1νj+1n+1−δx−1νjnδx−1νj+1n−1=0.That is to say, scheme (32) is a local energy-preserving algorithm.Proof.
Multiplying equation (29) by DtAtpjn−1 and equation (30) by DtAtqjn−1 and then adding them together, we get(36)DtAtξjn−1DtAtpjn−1−Dxδx−1ωjnDtAtpjn−1+DtAtηjn−1DtAtqjn−1−Dxδx−1νjnDtAtqjn−1+β4Atpjn2+Atqjn2+Atpjn−12+Atqjn−12×Atpjn+Atpjn−1DtAtpjn−1+Atqjn+Atqjn−1DtAtqjn−1=0.
By the discrete Leibniz rule and equations (26)–(28), the first and third terms in the left side of (36) are(37)DtAtξjn−1DtAtpjn−1=DtAtξjn−1AtAtξjn−1=Dt12Atξjn−12,(38)DtAtηjn−1DtAtqjn−1=DtAtηjn−1AtAtηjn−1=Dt12Atηjn−12.
From Lemma1, equation (25), and the second term in the left side of equation (36), we obtain(39)Dxδx−1ωjnDtAtpjn−1=Dxδx−1ωjnDtAtpjn−1−δx−1ωj+1nDtAtDxpjn−1=Dxδx−1ωjnDtAtpjn−1−δx−1ωj+1nDtAtδxωj+1n−1=Dxδx−1ωjnDtAtpjn−1−δx−1ωj+1nδx2DtAtδx−1ωj+1n−1=Dxδx−1ωjnDtAtpjn−1−112δx−1ωj+1nDtAtδx−1ωj+2n−1+10DtAtδx−1ωj+1n−1+DtAtδx−1ωjn−1=Dxδx−1ωjnDtAtpjn−1−124Dt10δx−1ωj+1nδx−1ωj+1n−1−124τhDxδx−1ωjnδx−1ωj+1n+1+τDtδx−1ωjn−1δx−1ωj+1n−hDxδx−1ωjnδx−1ωj+1n−1+τDtδx−1ωjnδx−1ωj+1n−1=Dxδx−1ωjnDtAtpjn−1−h24τδx−1ωjnδx−1ωj+1n+1−δx−1ωjnδx−1ωj+1n−1−Dt12410δx−1ωj+1nδx−1ωj+1n−1+δx−1ωjn−1δx−1ωj+1n+δx−1ωjnδx−1ωj+1n−1.
Similarly, the fourth term in the left side of equation (36) is equal to(40)Dxδx−1νjnDtAtqjn−1=Dxδx−1νjnDtAtqjn−1−h24τδx−1νjnδx−1νj+1n+1−δx−1νjnδx−1νj+1n−1−Dt12410δx−1νj+1nδx−1νj+1n−1+δx−1νjn−1δx−1νj+1n+δx−1νjnδx−1νj+1n−1.
The last term in the left side of equation (36) is(41)β4Atpjn2+Atqjn2+Atpjn−12+Atqjn−12Atpjn+Atpjn−1DtAtpjn−1+Atqjn+Atqjn−1DtAtqjn−1=β4Atpjn2+Atqjn22−Atpjn−12+Atqjn−122Atpjn2+Atqjn2−Atpjn−12+Atqjn−12×Atpjn2+Atqjn2−Atpjn−12+Atqjn−12τ=Dtβ4Atpjn−12+Atqjn−122.
From equations (36)–(41), we complete the proof of Theorem 1.


## 4. Compact Local Momentum-Preserving Algorithm

Now, we consider the local momentum conservation law for system (15). Multiplying the first line of equation (15) by px, and the second line of equation (15) by qx, we have(42)ξtpx−αqtpx−ωxpx+βp2+q2ppx=0,(43)ηtqx+αptqx−νxqx+βp2+q2qqx=0.Then adding equations (42) to (43), we get(44)ξtpx+ηtqx−αqtpx+αptqx−ωxpx−νxqx+βp2+q2ppx+qqx=0.Additionally,(45)∂tξpx=ξtpx+ξpxt=ξtpx+ξξx=ξtpx+∂x12ξ2,∂tηqx=ηtqx+ηqxt=ηtqx+ηηx=ηtqx+∂x12η2,ptqx−qtpx=∂t12pqx−12qpx+12ptqx−12pqxt−12qtpx+12qpxt=∂t12pqx−12qpx+12ptqx+12qpxt−12qtpx+12pqxt=∂t12pqx−12qpx+∂x12qpt−12pqt,ωxpx+νxqx=ωxω+νxν=12∂xω2+ν2,βp2+q2ppx+qqx=∂xβ4p2+q22.Thus, system (15) possesses the following local momentum conservation law:(46)∂xα2pqt−qpt+12ξ2+η2+ω2+ν2−β4p2+q22=∂tξpx+ηqx+α2pqx−α2qpx.In equations (16)–(19), applying the compact midpoint rule to space derivatives, the midpoint rule to time derivatives, and the discrete chain rule to the nonlinear term in the spatial direction, we obtain(47)Dxpjn=δxAxωjn,Dxωjn=δxAxφjn,Dxqjn=δxAxνjn,Dxνjn=δxAxϕjn,(48)Dtpjn=Atξjn,Dtqjn=Atηjn,(49)DtAtAx2ξjn−1−αDtAtAx2qjn−1−At2Ax2φjn−1+β2At2Axpj+1n−12+At2Axqj+1n−12+At2Axpjn−12+At2Axqjn−12At2Ax2pjn−1=0,(50)DtAtAx2ηjn−1+αDtAtAx2pjn−1−At2Ax2ϕjn−1+β2At2Axpj+1n−12+At2Axqj+1n−12+At2Axpjn−12+At2Axqjn−12At2Ax2qjn−1=0.By equations (47)–(50), we have(51)DtAtAx2ξjn−1−αDtAtAx2qjn−1−DxAt2Axδx−1ωjn−1+β2At2Axpj+1n−12+At2Axqj+1n−12+At2Axpjn−12+At2Axqjn−12At2Ax2pjn−1=0,(52)DtAtAx2ηjn−1+αDtAtAx2pjn−1−DxAt2Axδx−1νjn−1+β2At2Axpj+1n−12+At2Axqj+1n−12+At2Axpjn−12+At2Axqjn−12At2Ax2qjn−1=0.From equations (47)–(52), we obtain the following discrete scheme:(53)Dt2Ax2pjn−1−αDtAtAx2qjn−1−Dx2At2δx−2pjn−1+β2At2Axpj+1n−12+At2Axqj+1n−12+At2Axpjn−12+At2Axqjn−12At2Ax2pjn−1=0,Dt2Ax2qjn−1+αDtAtAx2pjn−1−Dx2At2δx−2qjn−1+β2At2Axpj+1n−12+At2Axqj+1n−12+At2Axpjn−12+At2Axqjn−12At2Ax2qjn−1=0,i.e., (54)Dt2Ax2ujn−1+iαDtAtAx2ujn−1−Dx2At2δx−2ujn−1+β2At2Axuj+1n−12+At2Axujn−12At2Ax2ujn−1=0.Lemma 2.
Grid functionfjn satisfies the following identical equation:(55)Dxfjn−1Axfj+1n−1+Dxfjn−1Axfj−1n−1=12Dxfjn−1fj+1n−1+fjn−1fjn−1+fjn−1fj−1n−1−fj+1n−1fj−1n−1.Proof.
The term in the left-hand side of (55) is equal to(56)Dxfjn−1Axfj+1n−1+Dxfjn−1Axfj−1n−1=12hfj+1n−1−fjn−1fj+2n−1+fj+1n−1+fj+1n−1−fjn−1fjn−1+fj−1n−1=12hfj+1n−1fj+2n−1+fj+1n−1fj+1n−1−fjn−1fj+2n−1−fjn−1fj+1n−1+fj+1n−1fjn−1+fj+1n−1fj−1n−1−fjn−1fjn−1−fjn−1fj−1n−1=12Dxfjn−1fj+1n−1+fjn−1fjn−1+fjn−1fj−1n−1−fj+1n−1fj−1n−1.
This completes the proof.Theorem 2.
Scheme (54) possesses the discrete local momentum conservation law as(57)mjn=Dxα2DtAtAxpjn−1At2Axqjn−1−DtAtAxqjn−1At2Axpjn−1−12At2Axξjn−12+At2Axηjn−12−12411At2Axδx−1ωjn−12+At2Axδx−1ωjn−1At2Axδx−1ωj+1n−1+At2Axδx−1ωjnAt2Axδx−1ωj−1n−1−At2Axδx−1ωj+1n−1At2Axδx−1ωj−1n−1+11At2Axδx−1νjn−12+At2Axδx−1νjn−1At2Axδx−1νj+1n−1+At2Axδx−1νjnAt2Axδx−1νj−1n−1−At2Axδx−1νj+1n−1At2Axδx−1νj−1n−1+β4At2Axpjn−12+At2Axqjn−122+DtAtAx2ξjn−1DxAtAxpjn−1+AtAx2ηjn−1DxAtAxqjn−1+α2AtAx2pjn−1DxAtAxqjn−1−AtAx2qjn−1DxAtAxpjn−1=0.That is to say, scheme (54) is a local momentum-preserving algorithm.Proof.
Multiplying (51) by DxAt2Axpjn−1 and (52) by DxAt2Axqjn−1 and then adding them together, we derive(58)DtAtAx2ξjn−1DxAt2Axpjn−1−αDtAtAx2qjn−1DxAt2Axpjn−1−DxAt2Axδx−1ωjn−1DxAt2Axpjn−1+DtAtAx2ηjn−1DxAt2Axqjn−1+αDtAtAx2pjn−1DxAt2Axqjn−1−DxAt2Axδx−1νjn−1DxAt2Axqjn−1+β2At2Axpj+1n−12+At2Axqj+1n−12+At2Axpjn−12+At2Axqjn−12×At2Ax2pjn−1DxAt2Axpjn−1+At2Ax2qjn−1DxAt2Axqjn−1=0.
According to discrete Leibniz rules, the first term in the left-hand side of (58) can be expressed as(59)DtAtAx2ξjn−1DxAt2Axpjn−1=DtAtAx2ξjn−1DxAtAxpjn−1−At2Ax2ξjn−1DtDxAtAxpjn−1=DtAtAx2ξjn−1DxAtAxpjn−1−At2Ax2ξjn−1DxAt2Axξjn−1=DtAtAx2ξjn−1DxAtAxpjn−1−Dx12At2Axξjn−12.
Similarly, from the fourth term in the left side of (58), we have(60)DtAtAx2ηjn−1DxAt2Axqjn−1=DtAtAx2ηjn−1DxAtAxqjn−1−Dx12At2Axηjn−12.
The second and fifth terms in the left side of (58) are equal to(61)αDtAtAx2pjn−1DxAt2Axqjn−1−αDtAtAx2qjn−1DxAt2Axpjn−1=Dtα2AtAx2pjn−1DxAtAxqjn−1−α2AtAx2qjn−1DxAtAxpjn−1+α2DtAtAx2pjn−1DxAt2Axqjn−1−α2At2Ax2pjn−1DxDtAtAxqjn−1−α2DtAtAx2qjn−1DxAt2Axpjn−1+α2At2Ax2qjn−1DxDtAtAxpjn−1=Dtα2AtAx2pjn−1DxAtAxqjn−1−α2AtAx2qjn−1DxAtAxpjn−1+Dxα2DtAtAxpjn−1At2Axqjn−1−α2DtAtAxqjn−1At2Axpjn−1.
From the third term in the left side of (58) and Lemma 2, we can obtain(62)DxAt2Axδx−1ωjn−1DxAt2Axpjn−1=DxAt2Axδx−1ωjn−1At2Ax2δxωjn−1=DxAt2Axδx−1ωjn−1δx2At2Ax2δx−1ωjn−1=112DxAt2Axδx−1ωjn−1At2Ax2δx−1ωj+1n−1+10DxAt2Axδx−1ωjn−1At2Ax2δx−1ωjn−1+DxAt2Axδx−1ωjn−1At2Ax2δx−1ωj−1n−1=124Dx10At2Axδx−1ωjn−12+At2Axδx−1ωjn−1At2Axδx−1ωj+1n−1+At2Axδx−1ωjn−1At2Axδx−1ωjn−1+At2Axδx−1ωjn−1At2Axδx−1ωj−1n−1−At2Axδx−1ωj+1n−1At2Axδx−1ωj−1n−1=124Dx11At2Axδx−1ωjn−12+At2Axδx−1ωjn−1At2Axδx−1ωj+1n−1+At2Axδx−1ωjn−1At2Axδx−1ωj−1n−1−At2Axδx−1ωj+1n−1At2Axδx−1ωj−1n−1.
Similarly, the sixth term in the left side of (58) is equal to(63)DxAt2Axδx−1νjn−1DxAt2Axqjn−1=124Dx11At2Axδx−1νjn−12+At2Axδx−1νjn−1At2Axδx−1νj+1n−1+At2Axδx−1νjn−1At2Axδx−1νj−1n−1−At2Axδx−1νj+1n−1At2Axδx−1νj−1n−1.
From the last term in the left-hand side of (58), we have(64)β2At2Axpj+1n−12+At2Axqj+1n−12+At2Axpjn−12+At2Axqjn−12×At2Ax2pjn−1DxAt2Axpjn−1+At2Ax2qjn−1DxAt2Axqjn−1=β2At2Axpj+1n−12+At2Axqj+1n−122−At2Axpjn−12+At2Axqjn−122At2Axpj+1n−12+At2Axqj+1n−1−At2Axpjn−1+At2Axqjn−12×At2Axpj+1n−12+At2Axqj+1n−1−At2Axpjn−1+At2Axqjn−122τ=Dxβ4At2Axpjn−12+At2Axqjn−122.
Through equations (58)–(64), we complete the proof of Theorem 2.


## 5. Numerical Experiments

In this section, numerical experiments are designed to show the accuracies and conservation properties of the schemes which we have obtained above. Takingα=β=1, equation (1) has exact solution ux,t=eix+t. In numerical calculations, we let x∈−π,π.In order to verify the convergence rates of the proposed schemes (32) and (54), we define ε=ujNt−uxj,tNt and ReLρ=Reερ,ImLρ=Imερ, where ρ=∞ or ρ=2. Tables 1–4 show the L∞ and L2 errors of the numerical solutions with respect to the exact ones for both schemes. In these tables, we can confirm that the two schemes have the accuracy of Oτ2+h4.Table 1
Temporal errors and convergence rates of scheme (32) at T = 1 with h=π/64.
τ
Re
L
ρ
Order
Im
L
ρ
Order
ρ
=
∞
ρ
=
2
ρ
=
∞
ρ
=
2
ρ
=
∞
ρ
=
2
ρ
=
∞
ρ
=
2
1
/
40
5.21E − 05
9.24E − 05
—
—
5.21E − 05
9.24E − 05
—
—
1
/
80
1.31E − 05
2.33E − 05
1.99
1.99
1.31E − 05
2.33E − 05
1.99
1.99
1
/
160
3.31E − 06
5.86E − 06
1.99
1.99
3.31E − 06
5.86E − 06
1.99
1.99Table 2
Spatial errors and convergence rates of scheme (32) at T = 1 with τ=0.0005.
h
Re
L
ρ
Order
Im
L
ρ
Order
ρ
=
∞
ρ
=
2
ρ
=
∞
ρ
=
2
ρ
=
∞
ρ
=
2
ρ
=
∞
ρ
=
2
π
/
4
5.50E − 04
9.75E − 04
—
—
5.50E − 04
9.75E − 04
—
—
π
/
8
3.38E − 05
5.99E − 05
4.02
4.02
3.38E − 05
5.99E − 05
4.02
4.02
π
/
16
2.12E − 06
3.76E − 06
3.99
3.99
2.12E − 06
3.76E − 06
3.99
3.99Table 3
Temporal errors and convergence rates of scheme (54) at T = 1 with h=π/64.
τ
Re
L
ρ
Order
Im
L
ρ
Order
ρ
=
∞
ρ
=
2
ρ
=
∞
ρ
=
2
ρ
=
∞
ρ
=
2
ρ
=
∞
ρ
=
2
1
/
40
1.56E − 04
2.77E − 04
—
—
1.56E − 04
2.77E − 04
—
—
1
/
80
3.93E − 05
6.96E − 05
1.99
1.99
3.93E − 05
6.96E − 05
1.99
1.99
1
/
160
9.78E − 06
1.73E − 05
2.01
2.01
9.78E − 06
1.73E − 05
2.01
2.01Table 4
Spatial errors and convergence rates of scheme (54) at T = 1 with τ=0.0005.
h
Re
L
ρ
Order
Im
L
ρ
Order
ρ
=
∞
ρ
=
2
ρ
=
∞
ρ
=
2
ρ
=
∞
ρ
=
2
ρ
=
∞
ρ
=
2
π
/
4
8.02E − 03
1.42E − 02
—
—
8.02E − 03
1.42E − 02
—
—
π
/
8
4.80E − 04
8.46E − 04
4.06
4.07
4.79E − 04
8.46E − 04
4.07
4.07
π
/
16
2.96E − 05
5.22E − 05
4.02
4.02
2.96E − 05
5.22E − 05
4.02
4.02Next, we investigate the local conservation properties of the schemes (32) and (54). To compute the discrete local energy and local momentum at tn=nτ, we define elocaln=max0≤j≤Nejn and mlocaln=max0≤j≤Nmjn, where ejn and mjn can be calculated by (35) and (57), respectively. In our experiments, we take T = 100, h=π/128, and τ=0.02. Figures 1 and 2 show the numerical results for the local energy and local momentum errors using schemes (32) and (54), respectively. The figures indicate that the developed schemes can preserve the local energy and local momentum of the system very well over long-time simulations, which is consistent with the theoretical results of Theorem 1 and Theorem 2 in this paper.Figure 1
Local energyelocal of scheme (32).Figure 2
Local momentummlocal of scheme (54).


## 6. Conclusions

In this paper, two new compact local structure-preserving algorithms are constructed for solving the NSEW. Local conservation laws of the proposed schemes are derived theoretically. Numerical results are shown to verify the accuracy, validity, and long-time numerical behavior of the schemes obtained in this work. Hence, the compact local structure-preserving method can be used for many Hamiltonian systems.



---

*Source: 4345278-2020-01-28.xml*