ContentslistsavailableatScienceDirect
Computers and Fluids
journalhomepage:www.elsevier.com/locate/compfluid
On moving mesh WENO schemes with characteristic boundary conditions for Hamilton-Jacobi equations
Yue Li
a, Juan Cheng
b,c,1, Yinhua Xia
d,2, Chi-Wang Shu
e,3,∗aGraduate School, China Academy of Engineering Physics, Beijing 10 0 088, China
bLaboratory of Computational Physics, Institute of Applied Physics and Computational Mathematics, Beijing 10 0 088, China
cCenter for Applied Physics and Technology, Peking University, Beijing 100871, China
dSchool of Mathematics Sciences, University of Science and Technology of China, Hefei, Anhui 230026, PR China
eDivision of Applied Mathematics, Brown University, Providence, RI 02912, USA
a rt i c l e i n f o
Article history:
Received 1 October 2019 Revised 20 March 2020 Accepted 11 May 2020 Available online 14 May 2020 Keywords:
Hamilton-Jacobi equation Moving mesh ALE method
High order WENO finite difference method Boundary conditions
a b s t r a c t
Inthispaper,weareconcernedwiththestudyofefficientandhighorderaccuratenumericalmethods forsolvingHamilton-Jacobi(HJ) equationswithinitialconditionsdefinedinthewholedomain. Oneof thecommonlyusedstrategyistosolvetheproblemonlyinafinitedomain, butthedeterminationof boundaryconditionsattheartificialboundaryofthefinitecomputational domainis aproblem. Ifthe initialconditiondecaysfastinspace,one couldusezeroboundaryconditionattheartificialboundary ifthedomainislargeenough,butthismaynot beveryefficientsincethecomputationaldomainmay needtobeverylargetojustifythischoice.Inthispaperweusethehighordermovingmesharbitrary LagrangianEulerian(ALE)weightedessentiallynon-oscillatory(WENO)finitedifferencescheme,recently developedin[13], inafiniteand movingcomputational domain,with numericalboundaryconditions obtainedbysolvingthecharacteristicordinarydifferentialequations(ODEs)alongtheartificialboundary ofthemoving computationaldomain.The usageofthismovingcharacteristic boundaryconditionsal- lowsustosolvetheHJequationsinanyinitialfinitedomainthatweareinterestedin,regardlessofthe magnitudeoftheinitialconditionattheartificialdomainboundary.Thismethodworkswellwhensin- gularitiesdonotappearattheartificialboundary.Extensivenumericaltestsinoneandtwodimensions aregiventodemonstratetheflexibilityand efficiencyofourmethodinsolving bothsmoothproblems andproblemswithcornersingularities.
© 2020ElsevierLtd.Allrightsreserved.
1. Introduction
The Hamilton-Jacobiequationshavewide applicationsinopti- mal control, image processing, andmechanics, among manyoth- ers. In nonlinear solid mechanics, the Hamilton-Jacobi equations have their spatialvariablesdefinedover non-periodic unbounded orsemi-unboundeddomains[12].Suchproblemswithunbounded domainsalsoappearinotherapplications.
∗ Corresponding author.
E-mail addresses: [email protected] (Y. Li), [email protected] (J.
Cheng), [email protected] (Y. Xia), [email protected] (C.-W. Shu).
1Research is supported in part by Science Challenge Project . No. TZ2016002 , NSFC grants 11871111 andU1630247 .
2Research is supported in part by NSFC grant 11871449 .
3Research is supported in part by AFOSR grant FA9550-20-1-0055 and NSF grant DMS-1719410 .
Inthispaper,weare interestedinsolving theHamilton-Jacobi (HJ)equations
φ
t+H(
x,φ
x,φ
,t)
=0φ (
x,0)
=φ
0(
x)
(1)inonespacedimension,and
φ
t+H(
x,y,φ
x,φ
y,φ
,t)
=0φ (
x,y,0)
=φ
0(
x,y)
(2)intwo spacedimensions,forwhichtheinitial condition
φ
0 isde- finedoverthewholedomainRorR2.Onemajordifficultyinsolv- ingsuch problemsis theinfinitecomputational domain.Forgen- eralpartial differentialequations (PDEs) definedoverinfinite do- main,therearedifferentapproachesinsolvingthem,forexample the infinite element method and the boundary element method [2,7],spectral methodsinusingbasisfunctionsdefinedinthein- finitedomain [3],and theregion decomposition algorithm based https://doi.org/10.1016/j.compfluid.2020.1045820045-7930/© 2020 Elsevier Ltd. All rights reserved.
onnaturalboundarynaturalization[5].Boundaryelementmethod mainlystartswithGreenfunctionandGreenformula,thebound- aryvalue problem of partial differential equation is transformed intoastronglysingularintegralequationontheboundary.Another commonlyusedstrategyistosolvetheproblemonlyinafinitedo- main.Thishastheadvantage that mostnumericalmethods,such asfinitedifferenceandfiniteelementmethods,canbedirectlyap- plied.However, the determination of boundary conditions atthe artificialboundary of thefinite computational domain is a prob- lem.Iftheinitialcondition
φ
0decaysfastinspacetowardsacon- stant(e.g.zero),onecould usezeroboundaryconditionatthear- tificialboundaryifthedomainislargeenough.This,however,may notleadtothemostefficientnumericalmethod,sincethecompu- tationaldomainmayneedtobe verylarge inordertojustifythe choiceof zeroboundary condition. Moreover,if theinitial condi- tiondoesnot go to zero(or constant)at infinity, thenit is diffi- culttocuttheinitialcomputationaldomaintoafinitedomain,no matterhow large,andfigure out suitable boundaryconditions at theartificialboundary,ifthefinitecomputationaldomainremains fixedintime.EngquistandMajdadevelopedasystematicmethod forobtainingahierarchyoflocalboundaryconditionsatthesear- tificialboundariesforwaveequations[6],seealso[8,9].Itguaran- teesstabledifferenceapproximationsandalsominimizesthe(un- physical) artificialreflections whichoccur atthe boundaries. No- ticethatthedeterminationofboundaryconditionsattheartificial boundaryofthefinitecomputationaldomainisverydifficult,ifnot impossible, based solely on the initial condition inside the com- putationaldomain andthe PDE,especially for theinflow bound- ary,because the boundary values ofthe exact solution atan in- flowboundarydependson theinitialconditionoutsidetheinitial finitecomputationaldomain.Itishoweverdifficult,inmanycases, tohavetheartificialboundaryofthefinitecomputationaldomain tobe only outflow boundary, especiallyif the computational do- mainisfixedintime.FortheHJEqs.(1)and(2)thatweareinterestedinthispaper, onepossible remedyofthisdifficulty is tousea moving compu- tational domain,whoseboundary corresponds to thecharacteris- ticcurvesoftheHJequations.Thiswouldensurethatthebound- aryofthecomputationaldomainisneitheran inflownoranout- flow,butis acharacteristicboundary. Thatis,theinformationon thismovingcharacteristicboundarycanbecompletelydetermined bythe values ofthe initialcondition atthe boundaryof theini- tialcomputational boundary. The numerical boundary conditions canbe obtainedbysolving the characteristicordinarydifferential equations(ODEs)alongtheartificialboundaryofthismovingcom- putationaldomain.Thismethodworkswell whensingularitiesdo notappearattheartificialboundary.Inordertoapplythisframe- work,weneedastableandaccuratenumericalmethodwhichcan be applied to such moving computational domains. The high or- dermovingmesharbitraryLagrangianEulerian(ALE)weightedes- sentiallynon-oscillatory(WENO)finitedifferencescheme,recently developedin [13], isa goodchoice andwill be used in thispa- per.Intwodimensions,thismethodisbasedonmovingquadrilat- eralmeshes,whichareoftenusedinLagrangiantypemethods.We willonlygiveaverybriefdescriptionofthismethodinSection2, inorder to describe our algorithm, and will refer the readersto [13]andthereferencesthereinformoredetailsandforthehistory ofnumericalmethodsforsolvingHJequations.
This paperis organizedasfollows.InSection 2,wegive ade- tailed discussion on our algorithm for solving the HJ equations, paying special attention to the procedure of obtaining the char- acteristicboundaryconditionsnumericallyinoneandtwodimen- sionalcases.InSection3,thenumericalresultssolvingseveraltyp- icalHJ equations are presented,to demonstrate thegood perfor- manceofouralgorithm. Finally,we willgive concludingremarks inSection4.
2. Algorithm
2.1. Characteristicboundaryconditions
Thebasicideabehindthemethodofcharacteristicsistorecast (appropriatetypesof)thePDEsasasystemofordinarydifferential equations(ODEs).Forthetype ofHJequation underinvestigation here,themethodamountsto findingcurves,whicharecalledthe characteristics,alongwhichthesolution
φ
canbe computedfromthegivinginitialcondition.Thisisachievedbyintegratingasystem ofODEs. Demidov hasa historical perspective onthis methodin [4].Wecompute ourunknownboundaryconditionsalongamov- ingcomputationaldomainbysolvingthecharacteristicODEs.Once the numerical boundary values are obtained in this fashion, we willusethehighorderfinitedifferenceALE-WENOschemedevel- opedin[13]tosolvethePDEinsidethecomputationaldomain.We nowdescribetheproceduretoobtainanddiscretizethecharacter- isticODEs.
FortheonedimensionalHJEq.(1),webeginbywritingitinto theform
F(
p,r,φ
,x,t)
=r+H(
x,p,φ
,t)
=0φ
0=φ (
x0,0)
withtheparameterization
⎧ ⎨
⎩
p
(
t)
=∂φ∂x(
x(
t)
,t)
, r(
t)
=∂φ∂t(
x(
t)
,t)
,ϕ (
t)
=φ (
x(
t)
,t)
(3)
alongthecharacteristiccurve(x(t),t),withaninitialconditionx0= x(0).Using the HJEq.(1),we canobtain thecharacteristic curve initiatingfromx0bythesystemofODEs
⎧ ⎪
⎪ ⎪
⎨
⎪ ⎪
⎪ ⎩
dx dt =∂∂Hp,
dp
dt =−∂∂Hx −∂∂φHp,
dr
dt =−r∂∂φH,
dϕ
dt =p∂∂Hp+r,
(4)
togetherwiththecompatibilityequations
F(
p0,r0,
φ
0,x0,0)
=r0+H(
x0,p0,φ
0,0)
=0p0=∂φ∂x
(
x0,0)
(5)thatdefine p0=p(0),r0=r(0).
Notice that thecharacteristicEq.(4)form acoupled ODEsys- tem. We cansolve thissystemalong thetwo boundarypointsof theinitialcomputationaldomain,thusobtainingthemovingcom- putationaldomainanditsboundaryconditionsforthelatertime.
Similarly,forthetwodimensionalHJEq.(2),wealsobeginby writingtheHJequationintotheform
F(
p1,p2,r,φ
,x,y,t)
=r+H(
x,y,p1,p2,φ
,t)
=0,φ
0=φ (
x0,y0,0)
,withtheparameterization,
⎧ ⎪
⎪ ⎪
⎨
⎪ ⎪
⎪ ⎩
p1
(
t)
= ∂φ∂x(
x(
t)
,y(
t)
,t)
, p2(
t)
= ∂φ∂y(
x(
t)
,y(
t)
,t)
, r(
t)
=∂φ∂t(
x(
t)
,y(
t)
,t)
,ϕ (
t)
=φ (
x(
t)
,y(
t)
,t)
,(6)
along the characteristic curve (x(t), y(t), t), with the initial con- ditionx0=x(0),y0=y(0).Now thecharacteristiccurve initiating
from(x0,y0)isdefinedbythesystemofODEs
⎧ ⎪
⎪ ⎪
⎪ ⎪
⎪ ⎪
⎪ ⎨
⎪ ⎪
⎪ ⎪
⎪ ⎪
⎪ ⎪
⎩
dx dt =∂∂Hp1,
dy dt =∂∂pH
2,
dp1
dt =−∂∂Hx −∂∂φHp1,
dp2
dt =−∂∂Hy −∂∂φHp2,
dr
dt =−r∂∂φH,
dϕ dt =p1∂H
∂p1+p2∂H
∂p2+r,
(7)
togetherwiththecompatibilityequations
⎧ ⎪
⎨
⎪ ⎩
F
(
p0,r0,φ
0,x0,y0,0)
=r0+H(
x0,y0,p0,φ
0,0)
=0, p10=∂φ∂x(
x0,y0,0)
,p20=∂φ∂y
(
x0,y0,0)
(8)
thatdefine p10=p1(0),p20=p2(0),r0=r(0).Wecanthensolve thesecharacteristicODEsalongtheboundariesoftheinitial com- putationaldomaintoupdatethex,y,
ϕ
,thusobtainingthemovingcomputational domain and its boundary conditions for the later time. We can find that the grid point x, y and the value
ϕ
(i.e.φ
) inthispointdependon p1,p2,r.Weexpectto getthird order accuracy,thusweusethethirdorderRunge-Kuttamethodtosolve thesecharacteristicODEs.Inordertomatchthecalculationinsidethecomputationaldo- mainwhichwillbeintroducedlater,wetakethesameODEsolver asthatforthetimediscretizationofthePDEsolverinsidethecom- putational domain, namely,the following third order SSP Runge- Kuttamethod[14],
φ
(1)=φ
n+tL
( φ
n,tn)
φ
(2)= 34φ
n+14( φ
(1)+tL
( φ
(1),tn+t
))
(9)φ
n+1= 13
φ
n+2 3φ
(2)+tL
φ
(2),tn+1 2t
forsolvingtheODE
φ
t=L(φ
,t),whereListherelatedderivative operator.This procedure can be used if the singularities of the solu- tiondonotreachtheboundaryofthecomputationaldomain.That meanstheforwardgoingcharacteristicsalongtheboundaryofthe computational domain do not intersect with each other, nor do they intersect with anycharacteristics frominside the computa- tionaldomain.
2.2. TheALE-WENOschemeinsidethecomputationaldomain
Oncewehavedeterminedtheboundaryofthemovingcompu- tational region,we need ahighorder numericalmethodto com- pute the solution inside the this moving computational domain.
The method should work well for moving meshes, and should not require too stringent smoothness for the mesh movements.
The high orderfinite difference ALE-WENO schemedeveloped in [13]tosolvetheHJequationisagoodchoiceforthispurpose,as itcanachievehighorderaccuracywithonlyboundednessandLip- schitz continuityrequirementson themoving meshes. Firstly, we willgiveabriefdiscussiononthemeshmovementhere.
Wewillintroduceavariable
ω
itodescribethemovingspeedof thenode xiinone-dimension andavariableω
i,j=(ω
xi,j,ω
yi,j)to describethemovingspeedofthenode(xi,j,yi,j)intwo-dimensions, from thetime level n (denotedastn) ton+1 (denotedastn+1).We assume that the familyof themesh
{
Tn,n=0...,L}
at all thetime levelsgivesthesamemeshtopology,i.e., themeshTn+1 has thesamenumberofnodesandthesameconnectivityasTn.Under suchrestriction,wecansetupamovingmeshconnectingthenode atthetimelevelnandthecorrespondingnodeatthetimeleveln
+1linearly.ThislinearmappingbetweenTn andTn+1 isthecru- cialingredientfortheALE-DGmethodin[11]tomaintainstability andaccuracywhileallowingonlyverymildregularityofthemesh movementfunction (Lipschitz continuityisenough), anditis the frameworkadoptedbythehighorderfinitedifferenceALE-WENO schemeforsolvingHJequationsdevelopedin[13]aswell.
Inonedimension,themeshvelocity
ω
inandthenodexi(t) are definedasω
ni :=xni+1−xnit , xi
(
t)
:=xni+ω
ni(
t−tn)
, t∈[tn,tn+1]. (10) Similarly,intwodimensions,wehavethedefinitionas,ω
nxi,j:=xni,+j1−xni,jt , xi,j(t):=xni,j+
ω
nxi,j(t−tn), t∈[tn,tn+1],ω
nyi,j:=yni,+1j −yni,jt , yi,j(t):=yni,j+
ω
nyi,j(t−tn), t∈[tn,tn+1]. (11) For the one dimensional HJ Eq. (1), its semi-discrete scheme is givenby∂ ∂
tφ
i(
t)
+Hˆ(
x,φ
x−i,φ
+xi;φ
i,t)
=0 (12)where
φ
i(t)isthenumericalapproximationtotheexactsolutionat themeshpointφ
(xi(t),t),φ
x−i andφ
+xi aretheleft-biasedandright- biasedWENOapproximationstothederivative ofφ
atthenodei,whichareobtainedfromtheinterpolationpolynomialswithsten- cilsbiasedtotheleftandtotherightrespectively,inaWENOfash- ion, pleasesee [13]formore details. Hˆ isa monotone numerical Hamiltonian,whichismonotonicallynon-decreasinginthesecond argumentandmonotonicallynon-increasinginthethirdargument.
Themethodin[13]combinesthesolutionevolutionandthemesh movementintoonestep.WewillusethesimpleLax-Friedrichsnu- mericalHamiltonianasourfirstordermonotonenumericalHamil- tonian,suitablytakingthemeshmovementintoaccount:
Hˆ
(
xi,u−i,u+i;φ
i,t)
=H xi,u−i +u+i 2 ,φ
i,t−1
2
ω
i(
u−i +u+i)
−1
2
α
i(
u+i −u−i)
(13)where
α
i= maxa≤u≤b
{|
Hu(
x,u,φ
,t)
−ω
i|}
,a=min
{
u−i,u+i}
, b=max{
u−i,u+i}
,α
=maxi
{ α
i}
. (14)HereHu denotesthepartialderivative ofH(x,u,
φ
,t) withrespecttou,and
ω
iisdefinedby(10).ForthetwodimensionalHJEq.(2),itssemi-discreteschemeis givenby
∂ ∂
tφ
i,j(
t)
+Hˆ
(
xi,j,yi,j,( ∇φ
i,j)
1,( ∇φ
i,j)
2,( ∇φ
i,j)
3,( ∇φ
i,j)
4;φ
i,j,t)
=0 (15) whereφ
i,j(t) is the numerical approximation to the exact solu- tion at the mesh pointφ
(xi(t), yj(t), t), (∇φ
i,j)=(φ
xi,j,φ
yi,j), =1,2,3,4, are the WENO approximationsto the derivatives ofφ
at the node (xi,j, yi,j) obtained from the interpolation polyno- mialswithstencilsbiasedtothe fourquadrants,againpleasesee [13] for more details. Just as in the one dimensional case, Hˆ is amonotone Hamiltonian,whichwe take tobe theLax-FriedrichsFig. 1. The node ( x i,j, y i,j) and its angular sectors.
typemonotoneHamiltonianonunstructuredmeshesdevelopedby Abgrallin[1].Forourmovingmeshcase,theLax-Friedrichsmono- toneHamiltonianisdefinedas
Hˆ
(
xi,j,yi,j,( ∇φ
i,j)
1,( ∇φ
i,j)
2,( ∇φ
i,j)
3,( ∇φ
i,j)
4,φ
i,j,t)
=H
(
xi,j,yi,j,ui,j,v
i,j;φ
i,j,t)
−ω
xi,jui,j−ω
yi,jv
i,j−D( φ
xi,j,φ
yi,j)
(16) whereui,j= 4
=1
θ
( φ
xi,j)
2
π
,v
i,j= 4=1
θ
( φ
yi,j)
2
π
,D
( φ
xi,j,φ
yi,j)
=α
i,j4 4 =1
β
+12( ( ∇φ
i,j)
+( ∇φ
i,j)
+12
)
·n+12, (17)
β
+12 =tanθ
2
+tan
θ
+12
, (18)
αi,j= max
a≤u≤b,c≤v ≤d{|Hu(x,y,u,v,φ,t)−ωxi,j|,|Hv (x,y,u,v,φ,t)−ωyi,j|}, α=max
i,j {αi,j}. (19)
θ
, for =1,...,4, are the angles between two neigh- boring edges connecting the node (i, j), and n+12, for =1,...,4, are the unit vectors along the edges passing through the node (i, j) (See Fig. 1). a=min
{
(φ
xi,j)1,(φ
xi,j)2, (φ
xi,j)3,(φ
xi,j)4}
, b=max{
(φ
xi,j)1,(φ
xi,j)2, (φ
xi,j)3,(φ
xi,j)4}
; c= min{
(φ
yi,j)1,(φ
yi,j)2,(φ
yi,j)3,(φ
yi,j)4}
, d=max{
(φ
yi,j)1,(φ
yi,j)2, (φ
yi,j)3,(φ
yi,j)4}
.Following the above spacial discretization, we will use the third order SSP Runge-Kutta method (9) for the time dis- cretization of the HJ Eqs. (1) and (2) respectively, where the operator L in the one dimensional scheme represents
−Hˆ(
φ
x−i,φ
x−i,xi,t),andinthetwodimensionalschemerepresents−Hˆ((
∇φ
i,j)1,(∇φ
i,j)2,(∇φ
i,j)3,(∇φ
i,j)4,xi,j,yi,j,t). 2.3.ThetimestepandevolutionofthecomputationaldomainIn order to determine the computational domain at the next timestep,we needtofirstchoosea suitabletime stept.While thereisnostabilityissueforsolvingthecharacteristicODEsatthe boundary ofthe computational domain,there is a CFL condition forsolvingthePDEinsidethisdomain,whichisgivenby
t = c1h
α
(20)wherec1 istheCFL number,herewe chooseitas0.6. Thecoeffi- cient
α
iscomputedby(14)or(19)intheonedimensionalortwo dimensional cases respectively. Inthe one dimensional case, h is theminimumsizeofallthecellsinthecomputationaldomain,and inthetwodimensionalcase,histheminimumdiameterofthein- scribedcircles forall thequadrilateralcellsinthedomain.Inthe situationofthemeshmovingalongcharacteristics,α
in(20)couldbe very small,leadingtoa very larget determined by thesta- bilityconstraint(20).Insuch cases,it isprudent toreduce tin ordertoensuretemporalaccuracy. Inournumericaltestsofchar- acteristictypemovingmesh,whentdeterminedby(20)islarger than5h,wewillsetittobe5h.
Inthetemporal discretization,inordertoensure theaccuracy ofthealgorithmonamovingmesh,assuggestedin[11],themesh movement speed should satisfy the following boundedness and Lipschitzcontinuityproperties,
| ω
i|
≤c2,| ω
i|
=ω
i+1−ω
ixi+1−xi
≤c3. (21)
In thefollowing one- andtwo- dimensionalnumerical examples, weusec2=10andc3=10toenforcetheseconditions.
Generally we can easily choose the mesh motion which can guarantee the condition (21). For the case that the mesh moves alongthecharacteristics,andthecasethat themeshisperturbed randomly from the characteristic-type moving mesh, in order to make the mesh velocity satisfy the condition (21), we need to make some modification tothe meshmoving speed ifnecessary.
We refer to[13] formoredetails of thesemodifications andwill notrepeatthemhere.
Oncethetimestepisdetermined,we willfirstsolvethechar- acteristicODE(4)or(7)forthemeshpointsattheboundaryand at the necessary ghost points(needed for the high orderWENO scheme)nearandoutsidetheboundaryofthecomputationaldo- main, to determine the values of the numerical solution at the boundary and for these ghost points. We will use the third or- der SSPRunge-Kuttamethod (9)todetermine theboundarycon- ditionof thecomputational domain. We willthen determine the movement of the mesh points inside the computational domain, andthen apply theabove describedthird orderALE-WENOfinite differenceschemewiththethirdorderSSPRunge-Kuttatimedis- cretization.
3. Numericalexamples
In all the numerical examples of this section, we use the fully discrete third order ALE-WENO scheme with a characteris- tically moving computational domain, with the boundary condi- tions andthepoint valuesatthenecessaryghost pointsobtained fromsolvingthecharacteristicODEs. Twodifferenttypesofmov- ing meshesinsidethe computational domainare used: themesh withmeshpointsmovingalong thecharacteristicdirections,sub- jecttoadjustmentstosatisfytheboundednessofmeshmovements (21) (to be denoted by “characteristic-type moving mesh”), and the meshwithits pointsrandomly perturbed (upto 12.5%)from thecharacteristic-typemovingmesh(tobe denotedby “randomly moving mesh”). Some ofthe examples in thissection havebeen takenfromLietal.[13],howeverin[13]periodic boundarycon- ditions were used, and herewe use different computational do- mainnotcorresponding toaperiodtotestourcharacteristictype boundaryconditions.
Example3.1. We solve theone-dimensional linearequation with variablecoefficient
φ
t+sin(
x) φ
x=0, (22)by the characteristicboundary condition, that is,the initialcom- putationaldomainisx∈[−1,2]anditisevolvedintimebychar-
Table 1
Numerical errors and orders of accuracy at t = 1 for Example 3.1 with the initial condition (23) on the randomly moving mesh with N mesh points.
N L 1error order L 2error order L ∞error order
32 1.75E-04 1.98E-04 3.97E-04
64 1.60E-05 3.45 2.42E-05 3.03 1.08E-04 1.88 128 2.71E-06 2.56 6.83E-06 1.83 3.56E-05 1.60 256 4.12E-07 2.72 7.23E-07 3.24 4.69E-06 2.92 512 6.63E-08 2.63 9.65E-08 2.91 5.87E-07 3.00
Table 2
Numerical errors and orders of accuracy at t = 1 for Example 3.1 with the initial condition (23) on the characteristic-type moving mesh with ω(x )= sin x and with N mesh points.
N L 1error order L 2error order L ∞error order
32 2.74E-04 1.63E-04 2.77E-04
64 9.71E-06 4.82 6.05E-06 4.75 1.18E-05 4.55 128 1.07E-06 3.18 4.90E-07 3.63 4.64E-07 4.67 256 1.31E-07 3.03 5.96E-08 3.04 5.26E-08 3.14 512 1.63E-08 3.00 7.53E-09 2.99 6.74E-09 2.96
acteristics. Thisisa linearvariablecoefficient equation,we useit toverifythethird-orderaccuracyofouralgorithmforsmoothso- lutions.
First,wechoosetheinitialconditionas
φ (
x,0)
=sin(
x)
. (23) Theexactsolutionforthisproblemisφ (
x,t)
=sin2tan−1
e−ttan
x2
.Wecompute theequation uptothetimet=1.Thenumericaler- rorsandordersofaccuracyareshowninTables1–2forbothtypes ofmeshes.TheL2errorsversusthenumberofgridpointsareplot- tedinFig.2.Thetimehistoryoftheerroratthemiddlepointver- sus time, forN=256grid pointsandboth typesof meshmove- ments, isplottedinFig.3.It showsthat theerrordoesnotgrow fastintimeafteraninitialtransit,especiallyforthecharacteristic- typemeshmovements.
Fig. 2. L 2errors versus the number of grid points. The characteristic-type moving mesh and the randomly moving mesh for Example 3.1 with the initial condition (23) . In this and later error plots a dashed line with slope -3 is plotted to compare the results with the designed third order accuracy.
Fig. 3. The error of the middle point in the computational domain versus time, N = 256 grid points. The characteristic-type moving mesh and the randomly moving mesh for Example 3.1 with the initial condition (23) .
From the errortables we can seethe scheme witheach type ofmeshmotions hasachievedtheexpected thirdorderaccuracy.
From the error tables and figures it is obvious that the magni- tudeoftheerroronthecharacteristic-typemovingmeshismuch smaller than that on the randomly moving mesh with the same numberofmeshnodes.
Next,weusetheinitialcondition
φ (
x,0)
=e−x22 +1 2e−(x−1)2
4 (24)
and compute the equation up to the time t=1 using the characteristic-typemovingmesh.Theexactsolutionforthisprob- lemis
φ (
x,t)
=e−2tan−1(
e−ttan(
x2) )
+e−−
(
2tan−1e−ttan(
x2)
−1)
22 .
ThenumericalerrorsandordersofaccuracyareshowninTable3. Wecanfindthateventhoughwecomputeinaverysmallregion, withtheexactsolutionfarfromzeroattheboundaryofthecom- putationaldomain,wecanstill getaverysmallerrorandtheex- pectedthirdorderaccuracy.Ifwewouldliketousethetraditional approachprescribingzeroboundary conditionatthe boundaryof thecomputationaldomain,thisdomainmust beverylarge inor- der to justify the choice of zero boundary condition and to get goodaccuracy.
Example3.2. Wesolvetheone-dimensionalBurgersequation
φ
t+12( φ
x+1)
2=0, (25)Table 3
Numerical errors and orders of accuracy at t = 1 for Example 3.1 with the initial condition (24) on the characteristic-type moving mesh with ω(x )= sin x and with N mesh points.
N L 1error order L 2error order L ∞error order
32 1.21E-04 8.49E-05 1.10E-04
64 6.21E-06 4.29 3.37E-06 4.65 6.29E-06 4.13 128 6.24E-07 3.31 2.94E-07 3.52 2.14E-07 4.87 256 8.04E-08 2.96 3.84E-08 2.94 2.90E-08 2.89 512 1.03E-08 2.97 4.93E-09 2.96 3.76E-09 2.95
Table 4
Numerical errors and orders of accuracy at t = 0π.52 for Example 3.2 with the initial condition (26) on the randomly moving mesh with N mesh points.
N L 1error order L 2error order L ∞error order
32 1.83E-02 1.63E-02 2.59E-02
64 3.70E-03 2.30 3.66E-03 2.16 6.37E-03 2.02 128 3.30E-04 3.49 3.89E-04 3.23 9.70E-04 2.72 256 1.14E-05 4.85 1.26E-05 4.94 3.87E-05 4.65 512 4.94E-07 4.53 3.84E-07 5.04 6.65E-07 5.86
Table 5
Numerical errors and orders of accuracy at t = 0π.52 for Example 3.2 with the initial condition (26) on the characteristic-type moving mesh with ω(x )= φx+ 1 and with N mesh points.
N L 1error order L 2error order L ∞error order
32 2.30E-03 1.81E-03 1.91E-03
64 3.64E-04 2.66 3.29E-04 2.46 4.14E-04 2.21 128 4.59E-05 2.99 4.79E-05 2.78 7.57E-05 2.45 256 1.79E-06 4.68 1.42E-06 5.08 2.34E-06 5.02 512 1.06E-07 4.08 7.16E-08 4.31 6.96E-08 5.07
withthecharacteristicboundarycondition,thatis,theinitialcom- putationaldomain is x∈[−1.6,1.6] and it is evolved in time by characteristics.Thisisanonlinearequation.Weuseittoshowthat ouralgorithm canobtainthedesignedthirdorderaccuracywhen thesolutionissmooth,andcanaccurately capturethecornersin- gularity without generatingoscillations when the singularity ap- pearsatlatertime.
First,weusetheinitialcondition
φ (
x,0)
=−cos( π
x)
, (26) andcalculatetheequation tot=0π.52.Atthistime,the solutionis stillsmooth.Wetesttheschemeonthetwotypesofmeshes,and listthenumericalerrorsandordersofaccuracyinTables4–5.We alsodrawtheL2errorversusthenumberofgridpointsinFig.4for thetwomeshmovementmethods.Wecanobservethatitismore efficienttouse thecharacteristic-type moving mesh,asthe error issmallerthanthe randomlymoving meshforthe samenumber ofmeshpoints.Fig. 4. L 2errors versus the number of grid points. The characteristic-type moving mesh and the randomly moving mesh for Example 3.2 with the initial condition (23) .
Table 6
Numerical errors and orders of accuracy at t = 0 . 5 for Example 3.2 with the initial condition (24) on the characteristic-type moving mesh with ω(x )= φx+ 1 and with N mesh points.
N L 1error order L 2error order L ∞error order
32 3.30E-04 2.65E-04 4.36E-04
64 1.32E-05 4.64 9.44E-06 4.81 1.14E-05 5.26 128 1.69E-06 2.97 1.14E-06 3.05 1.43E-06 2.99 256 2.18E-07 2.96 1.45E-07 2.98 1.79E-07 3.00 512 2.73E-08 2.99 1.81E-08 3.00 2.24E-08 3.00
Table 7
Numerical errors and orders of accuracy at t = 0π.52 for Example 3.3 with the initial condition (28) on the randomly moving mesh with N mesh points.
N L 1error order L 2error order L ∞error order
32 2.46E-03 2.35E-03 3.53E-03
64 4.95E-04 2.31 5.30E-04 2.15 1.10E-03 1.68 128 4.83E-05 3.36 6.10E-05 3.12 1.62E-04 2.77 256 2.88E-06 4.07 3.94E-06 3.95 2.09E-05 2.95 512 1.87E-07 3.94 1.65E-07 4.58 4.06E-07 5.69 1024 2.32E-08 3.01 2.08E-08 2.99 5.32E-08 2.93 2048 3.00E-09 2.95 2.69E-09 2.95 6.82E-09 2.96 4096 3.79E-10 2.99 3.40E-10 2.99 8.63E-10 2.98
Next,wecalculatetheequationfromthesameinitialcondition (26)to the time t=1π.52, whenthe solution isno longer smooth.
We use the numerical solution on the characteristic-type mesh with2048nodesasthereferencesolution,andplottheresultsof ourALE-WENOschemeinFig.5.Wecanseethat ourschemecan achievehighresolutioninthisexample,andthecharacteristic-type moving mesh produces better resultsthan the randomly moving mesh.
Finally,we choose theGaussian type function (24)asour ini- tial condition, andcompute the equation up to the time t=0.5. ThenumericalerrorsandordersofaccuracyareshowninTable6, forthecharacteristic-typemeshmovement.Wecanseethat,even thoughourcomputationaldomainisrelativelysmallandthesolu- tionisfarfromzeroatitsboundary,we haveobtainedverysmall errorswiththedesignedorderofaccuracyforthisexample.
When we compute to the timet=0.85with thesame initial condition(24),thesolutionis nolonger smooth.We usethe nu- mericalsolutiononthecharacteristic-typemovingmeshwith2048 pointsasthe referencesolution,andplot theresults ofourALE- WENOscheme inFig. 6.We can see that the numericalsolution with16pointsisveryclosetothereferencesolution.
Example3.3. Wesolvetheone-dimensionalnonlinearproblem
φ
t−cos( φ
x+1)
=0, (27) withthecharacteristicboundarycondition,thatis,theinitialcom- putationaldomainisx∈[−1.5,1.5]anditisevolvedintimebythe characteristics.Wefirstchoosetheinitialconditionφ (
x,0)
=−cos( π
x)
. (28) Thisisanonlinear,nonconvexHamiltonianproblem.Weuseitto verify the third-order accuracy of our algorithm when the solu- tion issmooth, andtheaccurate andnon-oscillatorycapturingof thecornersingularitywhenitappears atlater time.First,weuse ourALE-WENOscheme(9)tocalculatethesolutionuptothetime t= 0π.52, when thesolution is still smooth, andlist thenumerical errors andorders of accuracyin Tables 7–8. We alsoplot the L2 errorsinFig.7.Fromthetablesandfigure,wecanclearlyseethe thesuperiorityofthecharacteristic-type movingmeshversus the randomlymovingmesh.Similar to Example 3.2, we compute the solution to the later timet=1π.52,whena cornersingularityhasalreadyappeared.We again choose the numerical solution on the characteristic-type
Fig. 5. φat t = 1π.52 with N = 8 , 16 mesh points for Example 3.2 with the initial condition (26) .
Fig. 6. φat t = 0 . 85 with N = 8 , 16 mesh points on the characteristic-type moving mesh for Example 3.2 with the initial condition (24) .
mesh with 2048 points as the reference solution in the figures.
ThenumericalresultsareshowninFig.8.Wecanobservethatthe characteristic-typemeshleadstobetterresolutionwith32points, thantherandomlymovingmesh,especiallyatthethecornersin- gularities.
Next,we choosethe Gaussiantype function (24)astheinitial condition,andcomputetheequationup tot=0.5.The numerical errorsandordersofaccuracyareshowninTable9.Wenoticethat theerrorisalreadyclosetomachinezeroforN=256,andhigher thantheexpectedthirdorderaccuracyhasbeenachievedforthis example.
From thesame initialcondition(24),we compute tothe time t=2.0.The solutionis notsmooth anymore. Weusethe thenu- mericalsolutiononthecharacteristic-typemeshwith2048points asthereferencesolutionandthenweplottheresultsofourALE-
WENOschemeinFig.9.The solutionwith10pointsisveryclose tothe“exact” referencesolution.Eventheresultwith5pointshas goodresolution.
Example3.4. Wesolvetheproblem
φ
t+14( φ
x2−1)( φ
x2−4)
=0, (29)whichcomesfromZhangandShu[15],asadifficulttest casefor nonconvex Hamiltonians and entropy conditions (viscosity solu- tions).Weusetheinitialcondition
φ (
x,0)
=−2|
x|
(30)and compute the equation up to t=1, and plot the results in Fig. 10, in which we compare the results of the characteristic- typemovingmeshes,andtherandomlymovingmeshes,bothwith N=32,64and128meshpoints,againstthe“exact” referenceso- lution.Wechoose theinitial computationaldomain asx∈[−4,4]
Table 8
Numerical errors and orders of accuracy at t = 0π.52 for Example 3.3 with the initial condition (28) on the characteristic-type moving mesh with ω(x )= sin (φx+ 1) and with N mesh points.
N L 1error order L 2error order L ∞error order
32 1.12E-04 1.08E-04 2.16E-04
64 6.56E-05 0.78 7.56E-05 0.51 1.62E-04 0.41 128 8.94E-06 2.88 1.21E-05 2.65 3.33E-05 2.28 256 5.09E-07 4.13 4.30E-07 4.81 9.15E-07 5.19 512 4.95E-08 3.36 3.84E-08 3.49 5.97E-08 3.94 1024 1.15E-08 2.10 9.12E-09 2.07 1.42E-08 2.07 2048 2.04E-09 2.49 1.62E-09 2.49 2.45E-09 2.54 4096 2.97E-10 2.78 2.37E-10 2.77 4.13E-10 2.57
Table 9
Numerical errors and orders of accuracy at t = 0 . 5 for Example 3.3 with the initial condition (24) on the characteristic-type moving mesh with ω(x )= sin (φx+ 1) and with N mesh points.
N L 1error order L 2error order L ∞error order
32 9.80E-08 1.25E-07 3.53E-07
64 2.25E-10 8.77 2.09E-10 9.22 4.05E-10 9.77 128 3.27E-12 6.11 3.22E-12 6.02 6.30E-12 6.01 256 5.36E-14 5.93 5.20E-14 5.95 1.04E-13 5.92