• No results found

On variational and symplectic time integrators for Hamiltonian systems

N/A
N/A
Protected

Academic year: 2021

Share "On variational and symplectic time integrators for Hamiltonian systems"

Copied!
20
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

On

variational

and

symplectic

time

integrators

for

Hamiltonian

systems

E. Gagarina

a

,

,

V.R. Ambati

a

,

S. Nurijanyan

a

,

J.J.W. van der Vegt

a

,

O. Bokhove

b

,

aMathematicsofComputationalScienceGroup,Dept.ofAppliedMathematics,UniversityofTwente,P.O.Box217,7500AE,Enschede, The Netherlands

bSchoolofMathematics,UniversityofLeeds,LS2 9JT,Leeds,UnitedKingdom

a

r

t

i

c

l

e

i

n

f

o

a

b

s

t

r

a

c

t

Articlehistory:

Received18August2015

Receivedinrevisedform22October2015 Accepted22November2015

Availableonline2December2015

Keywords:

Nonlinearwaterwaves FiniteelementGalerkinmethod (Non-)autonomous variationalformulation Symplectictimeintegration

Various systems in nature have a Hamiltonian structure and therefore accurate time integrators for those systemsare of great practical use. In thispaper, afinite element methodwillbeexploredtoderivesymplectictimesteppingschemesfor(non-)autonomous systemsinasystematicway.The techniqueused isavariationaldiscontinuousGalerkin finite element method in time. This approach provides a unified framework to derive known and new symplectic time integrators. An extended analysis for the new time integratorswillbeprovided.The analysisshowsthatanovelthirdordertimeintegrator presented in this paper has excellent dispersion properties. These new time stepping schemesarenecessarytogetaccurateandstablesimulationsof(forced)waterwavesand othernon-autonomousvariationalsystems,whichweillustrateinournumericalresults. ©2015TheAuthors.PublishedbyElsevierInc.ThisisanopenaccessarticleundertheCC

BYlicense(http://creativecommons.org/licenses/by/4.0/).

1. Introduction

The dynamicsof various physical phenomena, such asthe movement of pendulums, planets, or waterwaves can be described inavariationalframework. Thedevelopment ofvariationalprinciplesforclassical mechanicstracesbackto Eu-ler, Lagrange, and Hamilton;an overview ofthis historycan be found in [1,19]. Thisapproach allows to expressall the dynamics of a systemin asingle functional– the Lagrangian – whichis an action integral. Hamiltonianmechanics isa reformulationofLagrangianmechanicswhichprovidesaconvenientframeworktostudythesymmetrypropertiesofa sys-tem. ThisisexpressedbyNoether’stheoremwhichestablishesthedirectconnectionbetweenthesymmetrypropertiesof Hamiltoniansystemsandconservationlaws.Whenoneapproximatesthesystemnumerically,itisadvantageoustopreserve theHamiltonianstructurealsoatthediscretelevel.GiventhatHamiltoniansystemsareabundantinnature,theirnumerical approximationisthereforeatopicofsignificantrelevance.

ThetopicoftimeintegrationofHamiltoniansystemshasseenarigorousdevelopmentduringthepastdecades.Thishas resultedinsymplectictimeintegratorsthathavebeendesignedtopreservetheHamiltonianstructureforanapproximated system.MoreinformationonsymplecticintegrationofHamiltoniansystemscanbefoundin

[12]

and

[16]

.Accordingtothe

*

Correspondingauthors.

E-mailaddresses:[email protected](E. Gagarina),[email protected](V.R. Ambati),[email protected](S. Nurijanyan),

[email protected](J.J.W. van der Vegt),[email protected](O. Bokhove).

http://dx.doi.org/10.1016/j.jcp.2015.11.049

0021-9991/©2015TheAuthors.PublishedbyElsevierInc.ThisisanopenaccessarticleundertheCCBYlicense (http://creativecommons.org/licenses/by/4.0/).

(2)

reviewin

[20]

,variationaltimeintegratorscanbeproventobesymplecticbyconstructionundercertainconditions.Inthe variationalapproach,onecanderivewell-knownschemesornewschemes,asreportedin

[10,17,22,26]

.

One of the mostactively developed numerical methods is the finite element method withtime discontinuous basis functions. Such a discontinuous Galerkin methodin time was studied in [5–7]. In particular, the variationalGalerkin fi-nite element methodintime was implementedin [11,20,22]. Integratorsfor variationalprinciplesincludingforcing were developedamongothersin

[20]

.

Thestudyofthevariationaltimeintegratorsthatarediscussedinthispaperwasmotivatedbyourresearchinto numer-icaldiscretizationsoftheequationsdescribingnonlinearwaterwaves,whichhaveaHamiltonianstructure.TheHamiltonian structure of nonlinear gravity free surface water waveswas shownby Zakharov [29].In [9] (and[8]), we constructed a numericalwaterwavetankbasedonadiscreteMiles’variationalprinciplewithforcing.Thecomputationalmethodhadto fulfillanumberofrequirementsinordertoperformthesimulationsofthelaboratoryexperimentspresentedin

[14]

.First, theexperimentswithwhichwecomparednumericalresultsrunoveralongperiodoftime,coveringalsoanextensive spa-tialdomain,whichmeantthatconservationofmassandboundedfluctuationsofenergyatthediscretelevelareimportant. Second,inoneofthetestcasesin

[9]

(also

[8]

)afocussingwavewascreatedwithawave heightfivetimesexceedingthe ambient,incomingwaveheight.Therefore numericalstabilityhadtobeensured. Third,apiston wavemaker wasusedin theexperiments,whichgivesexternalforcingtothesystemandresultsinanon-autonomousHamiltoniansystem.Itis non-trivialtomeetall theserequirements,inparticularincombinationwitha spatialdiscretizationofthe nonlinearpotential flowwaterwaveequations.Wethereforeinvestigatevariationaltimeintegratorsindetailinthatpaper.

In the construction of variational time integrators we choose to work with a discontinuous Galerkin finite element method in time, because it allows additional freedom to develop new symplectic integrators, also for non-autonomous Hamiltoniansystems.Inthismethodthetimedomainissplitintoelements,andineachelementthevariablesare approxi-matedwithpolynomialexpansions.Thediscretevariationalprincipleisthenobtainedbysubstitutionoftheapproximations in the continuum variational principle, provided one calculates the contributions of the delta functionsthat arise. After evaluation ofthe variational principle by calculating its variations, one obtains the discrete system of equations forthe variationaltimeintegrationmethod.

Acrucialpartofthediscontinuousfiniteelementmethodisthenumericalfluxarisingfromthebefore-mentioneddelta functions.Ithastobeintroduced toestablisha connectionbetweenthetimeelements sinceineachelementonlyalocal polynomialapproximationisused.Westudya speciallychosen numericalflux,somewhat inspiredbytheoneexploredin

[24] and

[25]

,whichinturnwas basedonthetheoryofnon-conservative productsdevelopedin

[4]

and

[28]

.Thefluxis alsoimplementedinthenumericaldiscretizationforthenonlinearpotentialflowwaterwaveequations,discussedin

[8,9]

andgivesexcellentresults.

Combiningthediscretevariationalprinciplewiththederived numericalflux,weobtainaunifiedapproachtoconstruct timeintegratorsfor(non-)autonomous Hamiltoniansystems.Wehavederivedbothwell-knownandnovelsymplectic time steppingschemesoffirst,secondandthirdorderaccuracy.Anextensiveanalysisforthediscretizationsisprovided,including alinearstability analysisandaninvestigation ofthesymplectic natureoftheschemes.The novelthirdorder schemewe have developedis shownto have improveddispersion properties. Furthermore,within this approachwe derive andtest time stepping schemes for non-autonomous Hamiltoniansystems, such asforced anddamped oscillators. We study the approximationofforcinganddampingtermsconsideringthediscreteversionsofcertainintegrals.

In

[10]

,a unifieddiscontinuous Galerkin frameworkfortime integration isgivenusing weighted residualsfor general nonlinearordinary differentialequations.New examplesaregivenoftwo(implicit)symplecticRunge–Kuttamethods, sat-isfyingthe symplectic condition by construction.Our workis complementary aswe derivediscrete variational principles by staying withinthe variationalframework, whichvariationsubsequently yieldsthe nonlinearalgebraic setofequations to be solved. While our schemes are always variational by construction, the symplectic andstability conditions need to be verified. These conditionscan be met depending on the choice of quadraturewe useand thechoice ofthe free pa-rameter(s) in thejump conditions. This complementsZhao and Wei’s work [10], also because we developed our stable, variationalandsymplecticintegratorsforapplicationstowaterwaveproblems,sincethesecanthenbeexpressedasspace andtime discretevariationalprinciples

[9,27]

. Extensionsofthe researchpresented herearefound inBokhoveand Kalo-girou[3].

Theoutlineofthispaperisasfollows.InSection2weintroducethedynamicsofaHamiltoniansystemwithonedegree offreedom. Next,Section 3introduces thevariational discontinuousGalerkin method.Herewe obtain secondorder time stepping schemes, which can be formulated in the form of well-known symplectic schemes. In Section 4 a novel time integratorofthirdorderaccuracyintimeisderivedandanalyzed.Weanalyzeitslinearstabilityandsymplecticconditions. InSection 5wepresentnumericalresultsfornon-autonomoussystemsby extendingthewell-knownsymplectic schemes wederivedinthiscomplementaryvariationalframework.Ournovelthirdordertimeintegratorisusedtosimulatenonlinear waterwavesinSection6.ConclusionsaredrawninSec.7.Moredetailsontheanalysisofthetimeintegrationmethodsare presentedintwoappendices.

(3)

where p

(

t

)

isthemomentum,q

(

t

)

thecoordinate,andH

(

p

,

q

)

theenergyorHamiltonian.Thevariationalprincipleforthe systemis

δ

L

:= δ

p

L

+ δ

q

L

=

0,where

δ

p

L

and

δ

q

L

arethefunctionalderivativeswithrespectto p and q. Thefunctional

derivativesaredefinedas

δ

L

=

lim →0 1





L



p

+



δ

p

,

q

+



δ

q



L



p

,

q



.

(2)

ConsiderthevariationoftheLagrangianfunctional

(1)

δ

L

(

p

,

q

)

=

T



0



dq dt

δ

p

+

p d

δ

q dt

H

p

δ

p

H

q

δ

q



dt

=

0

.

(3)

Afterintegrationby partsof

(3)

,usingtheendpointconditions

δ

q

(

0

)

= δ

q

(

T

)

=

0,andthearbitrarinessofthevariations, thedynamicsofaHamiltoniansystememergesasfollows:

δ

p

:

dq dt

H

p

=

0 and

δ

q

:

dp dt

+

H

q

=

0

,

(4)

withinitialconditions p

(

t

=

0

)

=

p0 andq

(

t

=

0

)

=

q0.

3. VariationaldiscontinuousGalerkintimediscretizationofaHamiltoniansystem

3.1. Discretefunctional

The accurate numerical approximation ofequations (4)is a well-developed subjectof research. Geometric integrators target thepreservationofsystempropertiesatthe discretelevelandsymplecticintegratorsensurethat theapproximated systemisalsoHamiltonian

[12]

.WestarttoapproximatetheLagrangian

(1)

ratherthanapproximatingequations

(4)

.

Toapproximatethefunctional

(1)

forasingle-degree-of-freedomsystemintime,wefirstdividethetimedomain

[

0

,

T

]

intoN finitetimeintervalsIn

= (

tn

,

tn+1

)

,n

=

0

,

. . . ,

N

1,withlength



t

=

tn+1

tn.Eachtimeinterval In hasaconstant

lengthandisrelatedtoareferencedomain

ˆ

I

= (−

1

,

1

)

throughthemappingFn,definedas

Fn

: ˆ

I

In

:

τ

→

t

=

1 2



tn

(

1

τ

)

+

tn+1

(

1

+

τ

)



.

(5)

Second,functions

(

p

,

q

)

areapproximatedelement-wisewithapolynomialexpansion.Ineveryelementbasisfunctionsare continuous,butcouldbediscontinuousacrosselementboundaries.Thefiniteelementspaceisdefinedas

:= {

|

L2

(

[

0

,

T

]),



I

n

Ps

(

In

),

In

,

n

=

0

,

· · · ,

N

1

},

(6)

where Ps is the space ofpolynomials of degree s. Eachvariable in finite element In is now approximated as

V τ ,

V τ andrepresentedinatimeslab

(

tn

,

tn+1

)

as

=

pi

ϕ

i

,

=

qi

ψ

i

,

(7)

withbasis functions

ϕ

i,

ψ

i,which donot necessarilyhaveto coincide,andexpansion coefficients pi,qi.We willin

par-ticularconsiderLagrangeandBernsteinpolynomials.Also,theEinsteinsummationconventionwillbeused,whichimplies summationoverrepeatingindices.

Inordertoaccountforthediscontinuities attheelementboundaryweintroducetherightandlefttracesofavariable

d

(

t

)

attimetnas

dn,+

:=

lim

↓0d

(

tn

+



)

and d

n,

:=

lim

↓0d

(

tn



),

(8)

respectively.Attimeleveltn thefollowingjump

[[·]]

andaverage

{

{·}

}

βα operatorscanthenbedefined

[[

d

]]





tn

=

dn,

dn,+ and

{{

d

}}

βα





tn

=

(4)

Fig. 1. Piecewise linear approximation in time.

where

α

,

β

are arbitraryrealnumbers with

α

+ β =

1 and

α

,

β

0.The discrete functional fortheHamiltonian system

(1)isnow obtainedafterintroducingpolynomial approximationsof p andq intothefunctional andsplitting ofthetime integralintoasummationovertimeintervals

L

τ

(

pτ

,

qτ

)

:=

N−1



n=0 tn+1



tn



pτdq τ dt

H

(

p τ

,

qτ

)



dt

N−1



n=−1

[[

]]{{

}}

βα





tn+1

.

(10)

Thelasttermin

(10)

comesasanumericalflux.1 Thefluxisrequiredtoestablishaconnectionbetweenthetimeelement

boundaries,asweusediscontinuousbasisfunctions.

There is still some freedom in the definition of the discrete Lagrangian (10). In the first place we need to specify the polynomial order ofthe basis functions. As in generalit is not possible ordesirable to compute the integral ofthe Hamiltoniananalytically,wealsohavetochooseaquadraturerule

[20]

.In

[13]

itisproventhattheorderofthequadrature rulewillgiveanupperboundfortheattainableorderofthetimeintegrationscheme.Finally,thechoiceoftheweight

α

in thefluxtermalsoleavessomefreedomtoderiveandoptimizedifferenttimeintegrationmethods.

The derivation ofa time integration scheme isnow performedas follows.We choose a polynomial approximation of orders.Toobtainaschemeoforders

+

1 weshouldtakeaquadraturerulewithanorderofaccuracythatisatleasts

+

1

[13].Aftertheschemeisderived,alinearstabilityanalysiswillbeperformedtofindappropriateweights

α

inthefluxterm. Forournovelschemefurtheranalysisisdonetoshowthattheschemeissymplectic.

3.2. Secondordervariationaltimediscretization:Störmer–Verlet

We have rederivedand reinterpreted the symplectic Euler scheme asa genuine discontinuous Galerkin schemewith piecewiseconstantpolynomialsforp andq,ineachtime slab,aswellasthe(modified)midpointschemeusinga discon-tinuousGalerkinschemeinwhichp andq areexpandedusingquadraticpolynomialsandbothevaluatedatthemid-points

pn+1/2 andqn+1/2 oftheintegrationintervalonly(see,

[8]

).

Nextweshowhowthiscanbedoneforaschemeofsecondorderaccuracybecauseweuseanextensionoftheresulting Störmer–Verlet schemefor the non-autonomoussystems considered in §5. To obtain a second order time integrator we needtochooselinearbasisfunctionsinthepolynomialexpansions.Variousoptionsfortheapproximationofthevariables andintegralsarepossible.Since wewantto derivethe knownStörmer–Verletschemeinournewapproach,wetake the trapezoidalruleforp andthemidpointrulefor q,yielding

tn+1



tn H

(

,

)

dt

=



t 2



H

(

pn,+

,

qn+1/2

)

+

H

(

pn+1,

,

qn+1/2

)



,

(11)

wheretheexpansioncoefficientqn+1/2isthevalueinthemiddleofthetimeinterval.Weapproximatethevariablesineach timeelementInas

=

t n+1

t



t p n,+

+

t

tn



t p n+1,

,

(12a)

=

2

(

t

t n

)



t q n+1/2

+

tn

+

tn+1

2t



t q n,+

,

(12b)

see

Fig. 1

.Introducing

(11)

–(12)inthediscretefunctional

(10)

,weobtain

(5)

Fig. 2. Piecewise linear approximation in time.

L

τ

(

pτ

,

qτ

,

t

)

=

N



−1 n=0

(

pn,+

+

pn+1,

)(

qn+1/2

qn,+

)



t 2



H

(

pn,+

,

qn+1/2

)

+

H

(

pn+1,

,

qn+1/2

)



N−1



n=−1

(

2qn+1/2

qn,+

qn+1,+

)(

α

pn+1,

+ β

pn+1,+

).

(13)

Applying thevariational principle

δ

L

τ

=

0, usingthearbitrariness ofthe variations andend-pointconditions

δ(

2q−1/2

q−1,+

)

:= δ

q0,

=

0

,

δ

p0,

=

0,

δ

qN,+

=

0

,

δ

pN,+

=

0,weobtainthefollowingvariationaltimeintegrator

δ

qn,+

: (β −

1

)

pn,+

+ (

α

1

)

pn+1,

+ β

pn+1,+

+

α

pn,

=

0

,

(14a)

δ

pn,+

:

qn+1/2

=

qn,+

+ β(

2qn−1/2

qn−1,+

qn,+

)

+



t 2

H

(

pn,+

,

qn+1/2

)

pn,+

,

(14b)

δ

qn+1/2

:

2

β

pn+1,+

+ (

2

α

1

)

pn+1,

=

pn,+



t 2



H

(

pn,+

,

qn+1/2

)

qn+1/2

+

H

(

pn+1,

,

qn+1/2

)

qn+1/2



,

(14c)

δ

pn+1,

:

qn+1/2

α

(

2qn+1/2

qn,+

qn+1,+

)

=

qn,+

+



t 2

H

(

pn+1,

,

qn+1/2

)

pn+1,

.

(14d)

In Appendix Bweshow thatthisschemeisstableforweights

α

∈ [

0

.

5

,

1

]

andcoincides underthischoice withthe well-knownsecondorderStörmer–Verlettimeintegrator.Itisinterestingtonotethatwestartwithtwodiscontinuousvariables, butattheendthereisnojumpinp atthetimelevelstn,n

=

0

,

. . . ,

N anymore.Moreover,thepresenceofajumpintheq

variabledoesnotresultinaschemedifferentfromtheclassicalone(see

Appendix B

).

An adjoint Störmer–Verlet schemecan be obtainedvia a swapped linearapproximation of the variables in each ele-ment In

=

t n+1

t



t q n,+

+

t

tn



t q n+1,

,

(15a)

=

2

(

t

t n

)



t p n+1/2

+

tn

+

tn+1

2t



t p n,+

,

(15b)

see

Fig. 2

,andatrapezoidalruleforq andamidpointruleforp

tn+1



tn H

(

,

)

dt

=



t 2



H

(

pn+1/2

,

qn,+

)

+

H

(

pn+1/2

,

qn+1,

)



.

(16)

Analogously totheprevious case,itcanbeshownthat thisweightedschemeisstablefor

α

∈ [

0

,

0

.

5

]

andareformulation allowstorecoverawellknownformulationofthescheme,asgivenin

[12]

.

4. Newvariationaltimeintegrators

Anaturalquestioniswhetheritispossibletofindnewtimeintegratorsfollowingthevariationalapproachdescribedin theprevious section.Inthissectionwe willconstructanewtime integrationschemewiththirdorderaccuracyusingthe variationalapproach.Wewillinvestigateconvergence,symplecticity,linearstabilityanddispersionproperties.

4.1. Thirdorderscheme

(6)

Fig. 3. Piecewise quadratic approximation in time.

=

(

t n

+

tn+1

2t

)(

tn+1

t

)



t2 p n,+

+

4

(

t

tn

)(

tn+1

t

)



t2 p n+1/2

(

tn

+

tn+1

2t

)(

t

tn

)



t2 p n+1,

,

(17a)

=

(

t n

+

tn+1

2t

)(

tn+1

t

)



t2 q n,+

+

4

(

t

tn

)(

tn+1

t

)



t2 q n+1/2

(

tn

+

tn+1

2t

)(

t

tn

)



t2 q n+1,

,

(17b)

ascanbeseenin

Fig. 3

.Therearethreeindependentexpansioncoefficientspresentinthepolynomialrepresentation:pn,+

attheleftboundaryoftheinterval, pn+1/2 atthemiddleoftheintervaland pn+1,− attherightboundaryoftheinterval andsimilarlyfor q.WeapproximatetheintegralovertheHamiltonianwithSimpson’sthirdorderquadratureruleas

tn+1



tn H

(

,

)

dt

=



t 6



H

(

pn,+

,

qn,+

)

+

4H

(

pn+1/2

,

qn+1/2

)

+

H

(

pn+1,

,

qn+1,

)



.

(18)

Thediscretefunctional

(10)

thenbecomes

L

τ

(

pτ

,

qτ

)

=

N



−1 n=0 tn+1



tn pτdq τ dt dt



t 6



H

(

pn,+

,

qn,+

)

+

4H

(

pn+1/2

,

qn+1/2

)

+

H

(

pn+1,

,

qn+1,

)



N



−1 n=−1

(

qn+1,

qn+1,+

)(

α

pn+1,

+ β

pn+1,+

).

(19)

This choice of quadrature rule and basis functions corresponds to the choices made in [22] for the scheme called “ P 2N3Q 4Lob” in their paper (keeping this acronym). Nevertheless, the resulting scheme is different due to the choice ofthenumericalflux.

Applyingthevariationalprinciple

δL

τ

=

0,usingthearbitrarinessofthevariations andend-pointconditions

δ

q0,

=

0,

δ

p0,

=

0,

δ

qN,+

=

0

,

δ

pN,+

=

0,wegetanewthirdorderscheme

qn+1/2

= (

1

3 2

β)

q n,+

+

3 2

β

q n,

+



t 4



H

(

pn,+

,

qn,+

)

pn,+

+

H

(

pn+1/2

,

qn+1/2

)

pn+1/2



,

(20a) pn+1/2

= (

1

3 2

α

)

p n,+

+

3 2

α

p n,



t 4



H

(

pn,+

,

qn,+

)

qn,+

+

H

(

pn+1/2

,

qn+1/2

)

qn+1/2



,

(20b) qn+1,

=

qn,+

+ 

t

H

(

p n+1/2

,

qn+1/2

)

pn+1/2

,

(20c) pn+1,

=

pn,+

− 

t

H

(

p n+1/2

,

qn+1/2

)

qn+1/2

,

(20d)

α

qn+1,+

= −

1 6q n,+

+

2 3q n+1/2

+ (

α

1 2

)

q n+1,

+



t 6

H

(

pn+1,

,

qn+1,

)

pn+1,

,

(20e)

β

pn+1,+

= −

1 6p n,+

+

2 3p n+1/2

+ (β −

1 2

)

p n+1,



t 6

H

(

pn+1,

,

qn+1,

)

qn+1,

.

(20f)

Equations

(20a)

and

(20b)

havetobesolvedtogetherasanimplicitsystem.Theotherfourequationsareexplicit.

4.1.1. Linearstability

ToperformthelinearstabilityanalysisweintroducetheHamiltonianoftheharmonicoscillatorH

(

p

,

q

)

=

12

ω

2q2

+

1 2p

2 intoscheme

(20)

.WiththeprescribedHamiltonianwecanformulatescheme

(20)

inaform

(7)

Fig. 4. Modulusofeigenvaluesλiofsystem(20)foralinearharmonicoscillator.Theshadowedareacorrespondstotheregionwherethemodulusofall theeigenvaluesisequaltoone,i.e.,wheretheschemeisstable.

Fig. 5. Modulus of the eigenvalues for the linear system(22)withα=0.5 – solid line versusλ=1 – dotted line.

Toensure thatthenumericalsolutionisbounded, itisrequiredfortheeigenvalues

λ

i ofthematrix A to belessthanor

equal toone inmodulus

[12]

.Thecharacteristicpolynomial ofthematrix A isaquartic functionin

λ

.Since,theexplicit formoftheeigenvaluesiscomplicatedwe thereforecompute thestabilitycriterianumericallyinMatlab.We takearange of weights

α

, a range of frequencies multiplied by time step

ω

t, substitute them into the expressions for the exact solutions ofa quartic function, andshow thedomains wherethe maximum in modulus eigenvalueis smaller than one

maxi=1,...,4

i

|

1.Onecan seein Fig. 4that theonly stability regionlocated near

ω

t

=

0 is theone corresponding to

α

=

0

.

5.

For

α

=

0

.

5 andtheHamiltonianoftheharmonicoscillatorthetransformationmatrixbecomesequalto

A

=

3 5g

12g 5t 1

g

ω

2



t 1−g 4 12g 5tω2

35g



t 1−g 4 1

g 1

g

ω

2



t1−g 4 1 15g

(

t2

ω

2

9

)

4g 15t

(

t2

ω

2

9

)



t1−4g 1

g

4g 15tω2

(

t2

ω

2

9

)

151g

(

t2

ω

2

9

)

,

(22)

where g

=

5t2ωt22ω+216.The eigenvalues are computednumerically, see

Fig. 5

,which isa two-dimensional slice ofthe plot in

Fig. 4

withafixedweight

α

=

0

.

5.Withinthe(grey)stability domain,alltheeigenvaluesareequaltoone inmodulus, whichleadstoanabsenceofdissipationinthenumericalscheme.Thenumericalcalculationoftheeigenvaluesprovidesthe linearstability condition

|

ω



t

|

1

.

757,whichisslightlymorerestrictive thanthecriteriafortheStörmer–Verletscheme. ComparedwiththeschemeP 2N3Q 4Lob in

[22]

,weseethatbumpsarepresentinthelinearstabilitydomainforbothcases, butthestability restrictionfor P 2N3Q 4Lob islessrestrictiveandequals

|

ω



t

|

2

2.Astheauthorsmentionin

[22]

,the scheme P 2N3Q 4Lob isimplicitandall theequationshaveto besolved simultaneously, whichmayposeamore difficult numerical challenge. The third orderscheme proposed heredoes not possessthisshortcoming, as willbe demonstrated further.

Sincethevalue

α

=

0

.

5 givesthebeststabilityresults,thetimeintegrationscheme

(20)

becomes qn+1/2

=

3 4q n,

+

1 4q n,+

+



t 4



H

(

pn,+

,

qn,+

)

pn,+

+

H

(

pn+1/2

,

qn+1/2

)

pn+1/2



,

(23a) pn+1/2

=

3 4p n,

+

1 4p n,+



t 4



H

(

pn,+

,

qn,+

)

qn,+

+

H

(

pn+1/2

,

qn+1/2

)

qn+1/2



,

(23b)

(8)

Table 1

ConvergenceinL∞-,L2-normsoftheerrorinq foraharmonicoscillator,andL-errorintheenergyofthesystem.

Initialconditionsareq0,=q0,+= −0.001, p0,=p0,+=0,ω2=0

.1,thebiggesttimestep t=1,thefinaltime

T=40.Theprecisionsettosolvetheimplicitsystemis=10−12.

Step q q Energy

L∞-error order L2-error order

H-error order

t 4.1204E−6 – 6.1191E−6 – 1.3489E−9 –

t/2 5.1937E−7 2.9879 7.0457E−7 3.1185 1.6565E−10 3.0256

t/4 6.5058E−8 2.9970 8.6159E−8 3.0317 2.0613E−11 3.0065

t/8 8.1366E−9 2.9992 1.0710E−8 3.0081 2.5735E−12 3.0017

t/16 1.0172E−9 2.9998 1.3369E−9 3.0020 3.2171E−13 2.9999

t/32 1.2716E−10 3.0000 1.6705E−10 3.0005 4.0211E−14 3.0001

t/64 1.5895E−11 3.0000 2.0879E−11 3.0001 5.0263E−15 3.0000

qn+1,

=

qn,+

+ 

t

H

(

p n+1/2

,

qn+1/2

)

pn+1/2

,

(23c) pn+1,

=

pn,+

− 

t

H

(

p n+1/2

,

qn+1/2

)

qn+1/2

,

(23d) qn+1,+

=

4 3q n+1/2

1 3q n,+

+



t 3

H

(

pn+1,

,

qn+1,

)

pn+1,

,

(23e) pn+1,+

=

4 3p n+1/2

1 3p n,+



t 3

H

(

pn+1,

,

qn+1,

)

qn+1,

.

(23f)

The accuracy of the scheme (23) is verified for a linear systemwith Hamiltonian H

=

12p2

+

12

ω

2q2. The results in

Table 1showthatthescheme

(23)

isthirdorderaccurate.WedefinetheL2errorasL2

err

=



N n=1



tn tn−1



qex

(

t

)



2 dt for thepolynomial approximationqτ definedin

(17b)

andtheexact solutionqex oftheautonomoussystemderived in(A.8).

Thefinalresultsoftheschemearethevaluesqn+1,+, pn+1,+;thereforetheL–errorand



H –erroraredefinedas Lerr

=

max 1≤nN

|

q n,+

q ex

(

tn

)|,

(24a)



Herr

=

max 1≤nN



H

(

pn,+

,

qn,+

)



min 1≤nN



H

(

pn,+

,

qn,+

)



.

(24b) 4.1.2. Dispersionrelation

Thedispersionanalysisisperformedfollowing

[15]

.Inordertocomputethedispersionpropertiesofthenewvariational timeintegrationscheme

(23)

,wetaketheFouriermodes(i.e.,wenowtake

λ

=

eˆt suchthat

|λ|

=

1)

pn,qn,pn,+ qn,+

⎠ =

aeˆnt beˆnt ceˆnt deˆnt

(25)

andsubstitutetheseintothesystem

(23)

,whichgivesalinearsystem

eˆt

(

a

,

b

,

c

,

d

)

T

=

A

(

a

,

b

,

c

,

d

)

T

.

(26)

Ingeneral, we are notinterested inthe resultsforthe variables pn+1,−,qn+1,−,asthose areintermediate data.What mattersisarelationforthevariables pn+1,+,qn+1,+.Inthecontinuumcase,asshownin

Appendix A

,theexactdispersion

relationisc

= ±

id

ω

,cf.

(A.7)

.Nevertheless,astherearefourequations,allofthemhavetobeincludedintheanalysis.We manipulatesystemofequations

(26)

symbolicallywithMatlab tofindtherelations betweena, b,c andd;and, toobtain thenumericalfrequency

ω

ˆ

.

Forthedispersionanalysisweintroducethevariables

x

=



1



t 6

ω

6 36

(

4

− 

t2

ω

2

)

2

,

y

=



t3

ω

3 6

(

4

− 

t2

ω

2

)

.

(27)

Notice,thatx

1

,

y

0,when



t

0.Thefirstfamilyofsolutionsof

(26)

is a

= −

ib

ω

,

c

= −

id

ω

,

b

= −



x

+

iy



d

,

(28a)

ˆ

ω

=

1



tarccos

4

(

4

− 

t2

ω

2

)

x

+ 

t2

ω

2

(

t2ω2 6

3

)



t2

ω

2

+

16

.

(28b)

(9)

Fig. 6. Adifferencebetweennumericalandexactfrequenciesω− ˆω.ThereddashlinepresentsthedispersionrelationfortheStörmer–Verletschemeand the

blue

solidlinethedispersionrelation(29b)forthethirdorderscheme(23).

Wesee,thatthesecondrelationin

(28)

istheexactone.Thenumericalfrequencyis,however,wrongascanbeverified bytakingthelimit



t

0 in

(28b)

.

Thesecondfamilyofsolutionsis a

= −

ib

ω

,

c

= −

id

ω

,

b

=



x

iy



d

,

(29a)

ˆ

ω

=

1



tarccos 4

(

4

− 

t2

ω

2

)

x

+ 

t2

ω

2

(

t2ω2 6

3

)



t2

ω

2

+

16

.

(29b)

The relationc

= −

id

ω

istheexactdispersion relation,andthenumericalfrequencyconvergestothe exactone

ω

ˆ

ω

if



t

0 in

(29b)

,see

Fig. 6

.

Thethirdfamilyofsolutionsis a

=

ib

ω

,

c

=

id

ω

,

b

=



x

+

iy



d

,

(30a)

ˆ

ω

= −

1



tarccos 4

(

4

− 

t2

ω

2

)

x

+ 

t2

ω

2

(

t2ω2 6

3

)



t2

ω

2

+

16

.

(30b)

Inthiscasethenumericalfrequencyconvergestothenegativevalue,

ω

ˆ

→ −

ω

when



t

0. Thefourthfamilyofsolutionsis

a

=

ib

ω

,

c

=

id

ω

,

b

=



x

+

iy



d

,

(31a)

ˆ

ω

= −

1



tarccos

4

(

4

− 

t2

ω

2

)

x

+ 

t2

ω

2

(

t2ω2 6

3

)



t2

ω

2

+

16

.

(31b)

Herethenumericalfrequencydoesnotconvergetothecorrectvaluewhen



t

0.

Sincetherearetwoparasiticmodesweneedtobecarefulthattheydonotpollutethesolution.Fortheparasiticmodes therelationb

→ −

d holds.Oneimportantstepistochoosea

=

c andb

=

d,i.e.take p0,

=

p0,+andq0,

=

q0,+asinitial

conditions.Inthiscasetheparasiticmodesareeliminated.Forthenonlinearwaterwavecaseweverifiedtheconsequence ofthisinitialfilteringnumericallyin§6,whichappearstobesufficienttoensurestabilityinthenonlinearcase.Thisabsence ofaninitialjumpleadstosatisfactoryresults.

4.1.3. Symplecticity

Ifaone-degree-of-freedomHamiltoniansystemisapproximatedwithtwovariables pn andqn,thesymplecticity condi-tionisformulatedas

MTJ−1M

=

J−1

,

(32)

wheretheJacobianofthetransformationisdefinedas

M

=

∂(

q

n+1

,

pn+1

)

∂(

qn

,

pn

)

.

(33)

Thestructurematrix J ,equalto

J

=



0 I

I 0



,

(34)

(10)

Fig. 7. Evolutionofvariables(pn,+,qn,+)inphasespaceoveronetimeperiod.System(23)withω=0.3162,t=0.2484 issolvedforfourinitialconditions.

Theerrorinsolvingthelinearsystemintheimplicitstepof(23)issetto=10−15.

where I istheidentity matrixwiththedimensionequal tothedegreesoffreedomofthe Hamiltoniansystem,relatesto theHamiltoniansystemas



q p



t

=

J

H

=



0 1

1 0

 

Hq Hp



.

(35)

Here thesubscript

(

·)

t refers totakinga time derivative and Hq

≡ ∂

H

/∂

q, etc.Fordetails we referto

[12]

. Sincewe are

workingwith an extended system, i.e.a one-degree-of-freedom Hamiltoniansystem is approximatedwith fourvariables

pn,

,

pn,+andqn,

,

qn,+,thematricesinthesymplecticitycondition

(32)

arealsoextended.Wetake

M

=

∂(

q

n+1,

,

qn+1,+

,

pn+1,

,

pn+1,+

)

∂(

qn,

,

qn,+

,

pn,

,

pn,+

)

,

(36)

andthestructurematrix J ,definedasin

(34)

fora two-dimensionalsystem.TheHamiltoniansystemcanthenbewritten as

qq+ pp+

t

= (

J

)∇

H

=

0 0 0 1 0 0 1 0 0

1 0 0

1 0 0 0

HqHq+ HpHp+

⎠ .

(37)

WeverifiedinMatlabusingsymbolicmanipulationthatthecondition

(32)

isvalidforthenewsystem

(23)

.Thedetailsof thematrixM arenotgivenexplicitlyheresincetheexpressionsaretoolargetopresent.

For a Hamiltoniansystem with one degree of freedom the symplecticity condition means preservation of an area in phasespace

[12]

.Aphase–spaceplaneisshownin

Fig. 7

.A pointontheplaneisgivenas

(

pn,+

,

qn,+

)

,asourprimeinterest liesinthesevariables.We definefour initialconditionsinthe plane,that constitutea quadrilateralshape.Thenumerical approximationofaharmonicoscillatorsystemdevelopsaccordingtothescheme

(23)

.Thesystemcyclesovertimethrough thesamestates,whicharedefinedbytheinitialconditions.The areaoftherectangularshapeoscillatesaroundtheinitial state,see

Fig. 8

.

From a geometrical point ofview, the symplecticity condition (32) means in the generalcase withd

>

1 degrees of freedomthatthesumoftheorientedareasoftheprojectionsofashapein2d spaceontotheplanes

(

pi

,

qi

)

isconserved [12].Therefore

Figs. 7 and 8

donotprovesymplecticity,butillustratethepropertyoftheplus-variables pn,+

,

qn,+tocycle

throughthesamestates.

Theconclusions onthenovelthirdorderscheme

(23)

areasfollows.Theschemeissymplectic,butthelinearstability conditionismorerestrictive thantheconditionfortheStörmer–Verletscheme.Theschemeisthird orderaccurate, which isverifiedbothforlinearandnonlinearproblems(see§6andalsoBokhoveandKalogirou

[3]

).

5. Applicationstonon-autonomoussystems

Inthefollowingsection,wedeveloptimeintegrationofnon-autonomousHamiltoniansystems.

5.1. Dampedoscillator

Consideradampedone-degree-of-freedomHamiltoniansystemwiththefollowingnon-autonomousvariationalprinciple, (see

[23]

and

[27]

forrelatedexamples):

(11)

Fig. 8. Oscillationintheareaofaquadrilateralshapeinphase–spaceshowninFig. 7fortheharmonicoscillatorcomputedwiththethirdorderaccurate symplectictimeintegrator(23).System(23)issolvedover10timeperiodswithω=0.3162,t=0.2484.Theprecisioninsolvingtheimplicitstepin(23)

issetto=10−15. 0

= δ ˜

L

(

p

,

q

)

= δ

T



0



pdq dt

H

(

p

,

q

)



eγtdt

=

T



0



dq dt

H

p



δ(

peγt

)



d

(

peγt

)

dt

+

H

qe γt



δ

qdt

+

peγt

δ

q

|

T 0

,

(38)

with

γ

>

0 the coefficient of the linear momentum damping and end-point conditions

δ

q

(

0

)

= δ

q

(

T

)

=

0. Variation of

(38)withrespecttothevariables p andq yieldsHamilton’sequationsforthedampedoscillatorwhentheHamiltonianis

H

(

p

,

q

)

=

12p2

+

12q2 (andunitfrequency).Wefind

δ(

peγt

)

:

dq dt

=

H

p

=

p

,

(39a)

δ

q

:

dp dt

+

γ

p

= −

H

q

= −

q

.

(39b)

Withthecoordinatetransformationq

=

Q exp

(

γ

t

/

2

)

andp

=

P exp

(

γ

t

/

2

)

,thevariationalprinciplethenbecomes

0

= δ

T



0



PdQ dt

− ˜

H

(

P

,

Q

)



dt

,

(40)

withmodifiedHamiltonian

˜

H

(

P

,

Q

)

=

1 2P 2

+

1 2Q 2

+

1 2

γ

P Q

.

(41)

Hence, thesystem

(40)

isreformulatedasanautonomoussystem,viz.themodifiedHamiltonian

(41)

istime independent inthenewvariables P and Q .WecannowmonitorthismodifiedHamiltonianatthediscretelevel.

5.1.1. Discretization

Westartwithafirstorderapproximationofthefunctional

(38)

intime.Weconsiderthediscretevariationalprinciple

˜

L

τ

(

pτ

,

qτ

)

:=

N



−1 n=0 tn+1



tn



pτdq τ dt

H

(

p τ

,

qτ

)



eγtdt

N



−1 n=−1

[[

]]{{

pτeγt

}}

βα





tn+1

,

(42)

where the variables

(

p

,

q

)

are approximated as piecewise-constant per time interval

(

tn

,

tn+1

)

. As in [8], to obtain the well-knownformulationofthesymplecticEulerscheme,werenametheapproximationsas

=

qn,+

,

=

pn+1,−andtake

α

=

1

,

β

=

0.Theexponentialtime-dependenttermresponsibleforthedampingisnewandwillbeapproximatedusingthe valueattherightboundaryofthetimeelementeγtn+1

. Substitutingtheseapproximationsinto

(42)

,weobtain

˜

L

τ

(

pτ

,

qτ

)

:=

N



−1 n=0

−

t H

(

pn+1,

,

qn,+

)

eγtn+1

N



−1 n=−1

(

qn,+

qn+1,+

)(

pn+1,eγtn+1

).

(43)

(12)

Fig. 9. ModifiedtotalenergyHexforadampedoscillatorversustime.Thediscretemodifiedenergyforapproximation(44a)isplottedasasolidline,the discretemodifiedenergyforapproximation(48)isplottedwithcrossesandthediscretemodifiedenergyforapproximation(47)isplottedversustime withcircles.

We take variations

δ ˜

L

τ

=

0 of (43) with respect to the variables pn+1,

,

qn,+, use the arbitrariness of variations and end-pointconditions

δ

q0,

=

0,

δ

p0,

=

0,

δ

qN,+

=

0,toobtain

pn+1,

=

pn,

− 

t

H

(

p n+1,

,

qn,+

)

qn,+



1

eγ(tntn+1)



pn,

,

(44a) qn+1,+

=

qn,+

+ 

t

H

(

p n+1,

,

qn,+

)

pn+1,

,

(44b)

afterdivisionbytheexponentialtermeγtn+1.Weseethatthefirststepisimplicitandthesecondstepisexplicit. Theexponentialtermin

(44a)

needssomeclarification.Using

1

eγ(tntn+1)

=

1

eγt

γ



t

,

(45)

showsthatthediscreteequation

(44a)

isanapproximationtothedampedequation

˙

p

+

H

q

+

γ

p

=

0

.

(46)

Thisensuresthatthemodifiedtotalenergy

(41)

willbepreservedaswillbedemonstratednext.

5.1.2. Numericalresults

Consider theHamiltonian H

(

p

,

q

)

=

12p2

+

12q2.Wecompare threecasesforthedampedvariational principle,viz. ap-proximation

(44a)

andthemorestraightforward(forwardandbackwardEuler)approximationsforthedampingterm:

pn+1

=

pn

− 

t

H

(

p n+1

,

qn

)

qn

− 

t

γ

p n

,

(47) or pn+1

=

pn

− 

t

H

(

p n+1

,

qn

)

qn

− 

t

γ

p n+1

,

(48)

whilethesecondequation

(44b)

inthesystemremains unchanged.Weverifytheabsenceofdriftinadiscreteversion of themodifiedenergy

(41)

ateachtimeleveltn,n

=

0

,

. . . ,

N,

Hex

(

pn,

,

qn,+

,

tn

)

=

1 2



(

pn,

)

2

+ (

qn,+

)

2

+

γ

pn,qn,+



eγtn (49)

forthedifferentapproximations.Theresultsofthediscretemodifiedenergyarepresentedin

Fig. 9

forthedifferent approx-imations versus time. Wesee, that themodified energyfor approximation

(44a)

oscillatesaround the initial state,while the other two approximations reveal a drift in energy. The latter was expected for the forward Eulerapproximation of theforcing termin

(47)

.Nevertheless,theresultisunexpected forthe implicitscheme

(48)

,wheretheapproximation of thedampingtermisdone analogouslytothesymplectic Eulerscheme.Thereforeourvariationalapproachallowsalsothe derivationoftimeintegratorsthatresultinaboundedfluctuationofspecialintegrals.

(13)

Weconsiderthesimplecaseofaforcedoscillator.TheHamiltonianisH

(

p

,

q

)

=

21p2

+

12q2withforcingfunction f

(

p

,

q

,

t

)

=

a

γ

tq,wherea

γ

istheamplitude.Thecorrespondingsystemreads

dq

dt

=

p and

dp

dt

= −

q

+

a

γ

t

.

(51)

Thissystemisnon-autonomous,butwecanintroduceacoordinatetransformationtomakeitautonomous,asfollows

q

=

Q

+

a

γ

t

,

p

=

P

.

(52)

TheLagrangian

(50)

foraforcedharmonicoscillatoristhenreformulatedas

L

(

p

,

q

)

=

T



0



PdQ dt



1 2P 2

+

1 2Q 2

a

γ

P



dt

+

1 6a 2

γ

2T3

.

(53)

AnimportantquantitytomonitoristheHamiltonianinthenewcoordinates

ˆ

H

=

1 2P 2

+

1 2Q 2

a

γ

P

,

(54)

whichwillbeusedtocomputetheorderofaccuracyoftheforcedscheme.Theexactsolutiontotheproblem

(51)

is qex

=

q

(

0

)

cos

(

t

)

+



p

(

0

)

a

γ



sin

(

t

)

+

a

γ

t

.

(55)

Next,wewillconsiderthesymplecticStörmer–Verletschemetocomputetheevolutionofthisforcedsystem.

5.2.1. ForcedsymplecticStörmer–Verletscheme

Weconsiderthesecondorderapproximationwithaddedforcing,andinvestigatetheaccuracyfordifferentdiscretizations oftheforcingterm.WeconstructaStörmer–Verlettimesteppingmethodadjointtotheonediscussedindetailin§3.2.We take appropriate polynomial approximations (15), the mixedquadrature rule (16)and

α

=

0. Then we obtaina discrete approximationoftheLagrangian

(50)

formulatedasfollows

L

τ

(

pτ

,

qτ

)

=

N



−1 n=0

pn+1/2

(

qn+1,

qn,+

)



t 2



H

(

pn+1/2

,

qn,+

)

+

H

(

pn+1/2

,

qn+1,

)





t 2



f

(

pn+1/2

,

qn,+

,

t

)

+

f

(

pn+1/2

,

qn+1,

,

t∗∗

)



N



−1 n=−1

(

qn+1,

qn+1,+

)

pn+1,+

.

(56)

Computingthevariations,weobtainthefollowingsystemofequations

δ

pn,+

:

qn+1,+

=

qn+1,

,

(57a)

δ

qn,+

:

pn+1/2

=

pn,+



t 2

H

(

pn+1/2

,

qn,+

)

qn,+



t 2

f

(

pn+1/2

,

qn,+

,

t

)

qn,+

,

(57b)

δ

pn+1/2

:

qn+1,

=

qn,+

+



t 2



H

(

pn+1/2

,

qn,+

)

pn+1/2

+

H

(

pn+1/2

,

qn+1,

)

pn+1/2



,

+



t 2



f

(

pn+1/2

,

qn,+

,

t

)

pn+1/2

+

f

(

pn+1/2

,

qn+1,

,

t∗∗

)

pn+1/2



(57c)

δ

qn+1,

:

pn+1,+

=

pn+1/2



t 2

H

(

pn+1/2

,

qn+1,

)

qn+1,



t 2

f

(

pn+1/2

,

qn+1,

,

t∗∗

)

qn+1,

,

(57d)

Referenties

GERELATEERDE DOCUMENTEN

Voor deze gemeenten geldt dat ze op basis van beide modellen te maken hebben met relatief veel leerlingen met een hoge verwachte achterstand, maar deze achterstand

Pre- processing input data is important for training SVMs: most importantly, the data should first be transformed into fea- tures of a type that can be processed by the specific

Comparison of the proposed algorithm to the bisection search [1], the subgradient search [4], and the step-adaptive subgra- dient search [5] is not sensible as those algorithms

With the use of different econometric techniques (cf. cross-country regression, panel regression) and different data samples, they find robust evidence that higher levels of aid

In this study, no difference was found in the association of parental expressed anxiety and children’s fear and avoidance between mothers and fathers, therefore it makes no

The numerical algorithm for two-fluid flows presented here combines a space-time discontinuous Galerkin (STDG) discretization of the flow field with a cut-cell mesh refinement

The numerical algorithm for two fluid flows presented here combines a space-time discontinuous Galerkin (STDG) discretization of the flow field with a cut-cell mesh refinement

The numerical algorithm for two fluid flows presented here combines a space-time discontinuous Galerkin (STDG) discretization of the flow field with a cut-cell mesh refinement