Contents lists available atScienceDirect
Journal
of
Computational
Physics
www.elsevier.com/locate/jcp
Variational
space–time
(dis)continuous
Galerkin
method
for
nonlinear
free
surface
water
waves
E. Gagarina
a,
∗
,
V.R. Ambati
a,
J.J.W. van der Vegt
a,
O. Bokhove
b,
a,
∗
aMathematicsofComputationalScienceGroup,Dept.ofAppliedMathematics,UniversityofTwente,P.O.Box217,7500AE,Enschede, The Netherlands
bSchoolofMathematics,UniversityofLeeds,LS29JT,Leeds,UnitedKingdom
a
r
t
i
c
l
e
i
n
f
o
a
b
s
t
r
a
c
t
Articlehistory:
Received25October2013
Receivedinrevisedform21May2014 Accepted18June2014
Availableonline26June2014 Keywords:
Nonlinearwaterwaves FiniteelementGalerkinmethod Variationalformulation Symplectictimeintegration Deforminggrids
A new variational finite element method is developed for nonlinear free surface gravity water waves using the potential flow approximation. This method also handles waves generated by a wave maker. Its formulation stems from Miles’ variational principle for water waves together with a finite element discretization that is continuous in space and discontinuous in time. One novel feature of this variational finite element approach is that the free surface evolution is variationally dependent on the mesh deformation vis-à-vis the mesh deformation being geometrically dependent on free surface evolution. Another key feature is the use of a variational (dis)continuous Galerkin finite element discretization in time. Moreover, in the absence of a wave maker, it is shown to be equivalent to the second order symplectic Störmer–Verlet time stepping scheme for the free-surface degrees of freedom. These key features add to the stability of the numerical method. Finally, the resulting numerical scheme is verified against nonlinear analytical solutions with long time simulations and validated against experimental measurements of driven wave solutions in a wave basin of the Maritime Research Institute Netherlands.
©2014 Published by Elsevier Inc.
1. Introduction
Thehydrodynamicsofwaterwavesinoffshoreregions ofseasandoceansareofsignificantinterest tonavalarchitects andmarineengineers.Particularlyimportantisthedynamicsofextremewavephenomena,suchasroguewaves,andtheir effectonoffshorestructuresandships.Engineersoftentestprototypemodelsofshipsandoffshorestructuresin experimen-talwavebasinswithwavemakerstomimicrealisticmaritimeenvironments.Forextremewavesitisnontrivialtogenerate waveswithspecificpropertiesatcertainmeasurementlocationsinawavebasin.Numericalmodelingofwavesistherefore animportantcomplementaryactivity.
A class of water wave problems is described by the Laplace equation for the velocity potential with Neumann and nonlinearfreesurfaceboundaryconditions.ThesefreesurfacegravitywaveequationsareobtainedfromtheEulerequations offluidmotionundertheassumptionsthatthefluidisinviscidandincompressible,andthevelocityfieldirrotational
[18]
.*
Correspondingauthors.E-mailaddresses:E.Gagarina@utwente.nl(E. Gagarina),vrambati@gmail.com(V.R. Ambati),j.j.w.vandervegt@utwente.nl(J.J.W. van der Vegt), o.bokhove@leeds.ac.uk(O. Bokhove).
http://dx.doi.org/10.1016/j.jcp.2014.06.035 0021-9991/©2014PublishedbyElsevierInc.
Free surface gravity waterwave equationscanalso beobtained inasuccinct wayvia Luke’svariationalprinciple
[26]
orfromitsdynamical equivalentpresentedby Miles
[30]
.Inthevariationalprinciple,thecompleteproblemisembedded in asingle functional.In addition,thevariational formulationisassociatedwithconservationofenergy andphase space. Improvedfiniteelementsolutionsofthefreesurfacewaterwaveequationscanbeconstructeddirectlyfromthisvariational formulationratherthanfromaseparateweakformulation.Sincevariationalfiniteelementformulationshaveasmainbenefit thattheyprovideanaturalsettingtoensurediscreteenergyandphasespaceconservation,theycanmorenaturallyleadto stablenumericalschemes.Variational andfinite element formulations for free surface waves usingpotential flow can be found in Kim and Bai
[19] and Kim et al. [20]. Their formulation is, however, restricted to an unbounded domain and involves a coordinate transformation toa referencedomain.Klopmanetal.
[21]
derived avariational Boussinesqmodel fromMiles’variational principle (see also [6,12]). More, standard finiteelement methods for free surface gravity waterwaves can be found in[27–29,42–45].
Another widely used numericalmethod forfree surface wavesusing potential flow is the boundary integral method, whichstartedwiththeworkofLonguet-HigginsandCokelet
[25]
,andVinjeandBrevig[40]
.Thismethodhasbeenapplied extensivelytotwodimensionalfreesurface waves,seethesurveysofRomateandZandbergen[33]
andTsaiandYue[37]
. Applicationsinthreedimensions(3D) usingboundaryintegralmethodsarewidespread[3,5,9,10,14,17]
.Acomparison be-tween the workloadofboundary andfinite elementmethods ismadeinBettess [4], withfinite elementmethods being competitiveinanisotropicdomains.Morerecently,discontinuousGalerkin(DG)methodsforellipticproblemshaveenabledresearcherstomodelfreesurface waterwaveswithDGmethods(seetheoverviewinArnoldetal.
[2]
).Inparticular,space–timeDGmethods,inwhichtimeis consideredasanadditionalcoordinateandtheproblemissolvedind+
1 space,withd thespatialdimension,arepromising forfreesurface flowswiththeirdeforming domains.Space(–time)DGfiniteelementmethodsforlinearfree surfacewave problemsweredevelopedinVan derVegtandTomar[38]
andfornonlinearflowsinVanderVegtandXu[39].Thelatter approach suffers,however, from instabilities forhigher amplitude waves because the couplingbetween the free surface dynamicsandtheinteriormeshmovementissuboptimal.We haveovercomethisshortcomingbydirectlydiscretizingthe fluiddynamicalvariationalprincipleforpotentialflowwaterwaves.Numericallysolvingthenonlinearfreesurfacegravitywaveequationsposesanumberofchallenges:
(i) thesolutionofthegoverningequationsdependsonthepositionofthefreesurface,whichisnotknownapriori; (ii) theflowdomaincontinuously deformsintime,notonlyduetothefreesurfacemotion,butalsoduetothepresence
ofawavemaker;
(iii) energy drift needs to be avoidedin time inorder tominimize numerical decayofwave amplitude (in the unforced limit);and,
(iv) dispersionerrorsneedtobesmallforaccuratecapturingofcomplexwaveinteractions.
To copewiththesechallenges,we developeda variationalfiniteelement methodfornonlinearfree surfacegravity water wavesbasedonMiles’variationalprinciple.
In our space-plus-time approach, space is discretized first by considering expansions in terms of continuous basis functions inspace. Theseare substituted directlyintoMiles’ variationalprinciple. Theresulting spacediscrete variational principleiseitherautonomous(i.e.,withnoexplicittimedependence)ornon-autonomous(i.e.,includingtheexplicittime dependenceduetothewavemaker)intime.Subsequently,wedevelopatime(dis)continuousGalerkinapproachbyusing discontinuousbasisfunctionsintimetodiscretizethisspatiallydiscretevariationalprinciple,byfirsteliminatingtheinterior degreesoffreedom. Theresultis thatthefree surface becomes continuouswhile the(surface) velocitypotential remains discontinuous intime. A posteriori,we alsoestablishthetime discretizationoftheinteriordegreesoffreedom. Thefinal resultisaspaceandtimediscretevariationalprinciple.
By taking variations of thisspace(–time) discrete variational principle, a system of nonlinear ordinary-differential (or algebraic equations) for the free surface height and the velocity potential is obtained. Besides directly discretizing the variationalprinciple,thecentralkeyfeaturesthatmakethisdiscretizationrobustandstableareasfollows:
(i) Variationsofthepositionsofinteriornodesofthedynamicmeshmustberelatedvariationallytothefreesurfacenodes. Ifoneremovesthisintrinsicdependencetheresultingnumericalschemeispronetobeunstable.
(ii) Thenewvariationaltimediscretizationdealswiththeintrinsicallycoupleddynamicalsystem,bothintheautonomous andnon-autonomouscases,thelatterwithdrivenwaves.
Thesetwofeaturesappeartocontrastwithearlier(DG)finiteelementapproaches,andresultinastablenumericalscheme withnodriftofthediscreteenergyandpreservationofdiscretephasespace.
Fora certainlinear approximationoftheflow fieldsintime, ourspace–timevariationalfiniteelement methodresults inatimediscretizationsimilartothesymplecticStörmer–Verlettimediscretization.Intheautonomouscasewithoutwave maker, we show that it is a Störmer–Verlet time discretization [15] of the dynamics atthe free surface. The latter dy-namics constituteastandardyetnonlinearcanonicalHamiltoniansystem(ofordinarydifferentialequationsbeforetimeis discretizedaswell).Thefirsttwostepsinthetimeintegrationschemeareimplicit,andthethirdstepisexplicit.Hence,the
Fig. 1. Sketch of the numerical wave basin with water waves generated by a piston wave maker.
variationalfiniteelementdiscretizationleadstoasystemofnonlinearalgebraicequations.ItissolvedbyaNewtonmethod yieldingasparsematrix.Thesparsitydependsdirectlyonthenumberofnodessurroundingeachnodeintheflowdomain. Thesparsematrixstorageroutinesandsparseiterativeordirectsolversofthe PETSc packageareused
[34–36]
.Ourvariationalfinite elementmethodis verifiedagainst anonlinear semi-analyticalsolutionby FentonandRienecker
[8]forhorizontallyperiodicwavesandvalidatedagainstexperimentaldatasetsprovidedbytheMaritimeResearchInstitute Netherlands (MARIN).Theseexperimentsare conductedusingtwo wave basin configurations,one withavarying bottom andone withaflatbottom.Inbothcases,wavesaregeneratedwithapistontypewave makeratoneendofthedomain. Thisexperimentalsetupcanleadtohighlyirregularwavesaswellaswavefocussing,inwhichaslowmovingwavetrainis overtakenbyafastmovingwavetrain.Moreinformationontheexperimentscanbefoundin
[16]
andanothernumerical validationinLatifahandVanGroesen[23]
.The outline ofthe paperis asfollows. InSection
2
, we presentMiles’ variationalprinciple for nonlinear free surface wavesandderivethegoverningequations.InSection3
,thevariationalfiniteelementmethodisformulated.Subsequently, the numericalverification andexperimental validation are discussed in Section 4.Finally, conclusions are drawn in Sec-tion5.2. Variationaldescriptionofnonlinearinviscidwaterwaves
Weconsiderwaterwavesgeneratedbyawavemakerinatwo-dimensionalwavebasininaverticalplane.Thisrestriction to two dimensionsis notessential to our approach.The fluid is assumedto be inviscid,irrotational and incompressible. A sketchofthewavebasinisshownin
Fig. 1
.Thedynamicsofwaterwavesaregovernedbythefollowingvariationalprinciple(cf.,Miles
[30]
):0
= δ
L
(φ,
η
, φ
s)
dt:= δ
T 0L R(t)
φ
s∂
η
∂
t−
1 2gη
2−
H2dx−
L R(t) η(x,t) −H(x) 1 2
|∇φ|
2dzdx−
η(R(t),t) −H(R(t)) dR dt
φ
wdz dt,
(1)where
(
x,
z)
are the horizontal and vertical coordinates, respectively,∇
is the gradient operator in the vertical plane,φ (
x,
z,
t)
the velocity potential, u:= ∇φ
the irrotational velocity field, andΩ
= {
R(
t)
<
x<
L,
−
H(
x)
<
z<
η
(
x,
t)
}
⊂ R
2thetime dependentflowdomain.Theboundariesof
Ω
are thefreesurface boundary SF:
z=
η
(
x,
t)
withη
thefree sur-face height, the fixed bed at the bottom SB:
z= −
H(
x)
(z=
0 is the fixed referencelevel ofthe free surface at rest), a piston wave maker SW:
x=
R(
t)
and a solid wall SL:
x=
L. For brevity’s sake, we defineφ
s(
x,
t)
= φ(
x,
η
(
x,
t),
t)
,φ
w(
z,
t)
= φ(
R(
t),
z,
t)
,η
w(
t)
=
η
(
R(
t),
t)
, Hw=
H(
R(
t))
andφ
sw(
t)
= φ(
R(
t),
η
(
R(
t),
t),
t)
. Note that the wave maker movesonlyhorizontallyandthatthefreesurfaceisassumedtobesingly-valued.Takingthevariationalderivativeswithrespectto
φ
,η
andφ
s in(1)
yields0
= δ
L
=
T 0−
Ω(t)∇φ · ∇δφ
dxdz−
ηw(t) −Hw(t) dR dtδφ
wdz+
L R(t)∂
η
∂
tδφ
s+ φ
s∂δ
η
∂
t−
gη
+
1 2|∇φ|
2 sδ
η
dx−
dR dtφ
swδ
η
w dt.
(2)Wesimplytookthevariationswithrespecttothetime-dependentboundary z
=
η
ofthedomainΩ(
t)
,butcould alterna-tivelyhaveusedavariationalanalogueoftheReynoldstransporttheoremasin[12]
.Integrating(2)
bypartsinspaceusing Gauss’divergencetheoremaswellasintegratingthetermφ
s∂δ
η
/∂
t in(2)
bypartsintimeusingLeibnitz’s ruleyields0
= δ
L
=
T 0Ω(t)
∇
2φδφ
dxdz−
∂Ω(t) n· ∇φδφ
dS−
ηw(t) −Hw(t) dR dtδφ
wdz+
L R(t)∂
η
∂
tδφ
s−
∂φ
s∂
t+
gη
+
1 2|∇φ|
2 sδ
η
dx+
L R(t)φ
sδ
η
dx|
0T dt,
(3)with
∂Ω
:=
SF∪
SB∪
SW∪
SL andn the outward unit normalvector attheboundary∂Ω
, anddS aninfinitesimal line elementalongsuchaboundary.Duetotheintegrationbypartsintimeanadditionaltermarisessuchthatthelasttermin(2),thepointatthefreesurfaceandwave-maker,cancels.Byusingtherelations
δφ
s= (δφ)
s+ (∂φ/∂
z)
sδ
η
,
(4a) SF dS=
L R(t)∇
(
z−
η
)
dx
,
(4b) n|
SF= ∇(
z−
η
)/
∇
(
z−
η
)
,
(4c)δ
η
(
x,
0)
= δ
η
(
x,
T)
=
0 (4d)andaftersplittingtheboundaryintegralsoverthedifferenttypesofboundaryfaces,thevariationsin
(3)
become0
= δ
L
=
T 0Ω(t)
∇
2φδφ
dxdz−
SB∪SL n· ∇φδφ
dS−
ηw(t) −Hw(t) dR dt−
∂φ
∂
x wδφ
wdz+
L R(t)∂
η
∂
t+
∂φ
∂
x s∂
η
∂
x−
∂φ
∂
z sδφ
s−
∂φ
s∂
t+
gη
+
1 2∂φ
s∂
x 2−
1 2∂φ
∂
z 2 s 1+
∂
η
∂
x 2δ
η
dx dt.
(5)Giventhearbitrarinessofthevariationsinvolvedin
(5)
,thefollowingdimensionalequationsofmotionemerge∇
2φ
=
0 inΩ(
t),
(6a) dR dt=
∂φ
∂
x at SW(
t)
:
x=
R(
t),
(6b) n· ∇φ =
0 at SB:
z= −
H(
x)
∪
SL:
x=
L,
(6c)∂
η
∂
t+
∂φ
s∂
x∂
η
∂
x−
∂φ
∂
z s 1+
∂
η
∂
x 2=
0 at SF(
t)
:
z=
η
(
x,
t),
(6d)∂φ
s∂
t+
1 2∂φ
s∂
x 2+
gη
−
1 2∂φ
∂
z 2 s 1+
∂
η
∂
x 2=
0 at SF(
t)
:
z=
η
(
x,
t),
(6e)viz. theLaplaceequation withNeumannboundaryconditions(atsolid walls)andthefree surfaceequationsexpressed in termsofthesurfacepotential
φ
s andwaveheightη
.Recallthat∂(φ
s)/∂
t= (∂φ/∂
t)
s,cf.(4a)
.3. Variationalfiniteelementformulation 3.1. Tessellation
Apoint x
∈ R
3 inthespace–timedomainE
hascoordinatesx= (
t,
x,
z)
.The flowdomainΩ(
t)
attime t isdefinedasΩ(
t)
:= {(
x,
z)
∈ R
2|
(
t,
x,
z)
∈
E}
.Thespace–timedomainboundary∂E
consistsofthehypersurfacesΩ(
0)
:= {
x∈ ∂
E |
t=
0}
,Ω(
T)
:= {
x∈ ∂
E |
t=
T}
andQ
:= {
x∈ ∂
E |
0<
t<
T}
=:
SF∪
SW∪
SB∪
SL× (
0,
T)
.Usingthepartition0
≤ · · · <
tn<
· · · ≤
tN+1=
T ofthetimeinterval(
0,
T)
,wecansubdividethespace–timedomainE
intospace–timeslabsE
n:= {
x∈
E |
t∈ (
tn,
tn+1)
}
with0≤
n≤
N. Ifthespace–timeboundaryfaces thatarepartofQ
arerestrictedtothespace–timeslab
E
nthenweusethesuperscriptn.Theremainingboundariesofthespace–timeslabE
n areΩ
n= Ω(
tn)
andΩ
n+1= Ω(
tn+1)
.The tessellation
T
h isconstructed bygenerating amesh withquadrilateralelements inthedomainΩ(
t)
,yielding the computational domainΩ
h(
t)
.Thespatial elementsaredenoted asKke,withke theelementindexinthetessellation.Duetothefreesurfaceandwavemakermotionthenodesofeachelement Kkn e att
=
tn indomain
Ω
h
(
tn)
willmovetoanew positionatt=
tn+1,resultinginthespatialelement Knk+1e anddomain
Ω
h(
tn+1
)
.Themeshdeformationduetothedomainboundarymotionisunknownaprioriandpartofthesolution.Thegeometryoftheelements isthereforeupdated during thesolutionprocess.
Wewillconsiderstructuredmeshes.Nodesatthefreesurfaceandwavemakerbelong,respectively,tothesets
N
F andN
W; nodesinthedomainΩ
h are collected inthesetN
Ωh andnodesofthe domainexcludingthefree surface nodesin¯
Ω
h\
SF,withΩ
¯
h theclosureofΩ
h, inthesetN
Ω¯h. Thedomain issplit intwo parts:inΩ1h
:
R(
t)
<
x<
Lw the nodes inthemeshcanmove horizontallyaswellasverticallyandinΩ2h
:
Lw<
x<
L with Lw<
L and−
H(
x)
<
z<
η
(
x,
t)
the nodesinthemeshmoveonlyinthevertical.3.2. Functionspacesandapproximations
Thespacefortwo-dimensionalbasisfunctions
ϕ
˜
onΩ
forthepotentialφ
isW1(Ω)
= { ˜
ϕ
∈
H1(Ω)
}
withthestandard Sobolevspace H1(Ω)
.The approximationφ
h to potential
φ
isφ
h∈
W kp h=
W1(Ω)
∪
X kp h with X kph a finiteelement space of continuous Lagrange basis functions, and includingat least polynomials of degree kp on each element Kke. The free surface SF is parameterizedwithcoordinatex
∈ [
R(
t),
L]
.The associatedspacefortheone-dimensional basisfunctionsϕ
onx∈ [
R(
t),
L]
forthefreesurfaceheightη
andthefreesurfacepotentialφ
s isW1(
[
R(
t),
L])
= {
ϕ
∈
H1(
[
R(
t),
L])}
.The nodes of the elements are time dependent, making the standard global basis functions also time dependent, as follows.Forsimplicity,we usequadrilateralelements withthestandardtwo-dimensionalpiecewise linearandcontinuous (global)basis functions
ϕ
˜
j(
x,
z,
t)
inspaceforthe“interior”potentialφ (
x,
z,
t)
.Thefourlocalbasisfunctionsona quadri-lateralelement Kke areˆψ
α(ζ
1, ζ
2)
=
1
4
(
1± ζ
1)(
1± ζ
2)
(7)on the reference element
K= (ζ
1,ζ2)
T= [−
1,
1]
2 with local node numbersα
=
1,
. . . ,
4.Physical coordinates andlocal referencecoordinatesarerelatedbyamappingFke withthesamestandardshapebasisfunctionsFke
:
K→
Kke: (ζ
1, ζ
2)
→ (
x,
z)
:= (
xke(α),
zke(α)) ˆ
ψ
α(ζ
1, ζ
2),
(8) withthe fourvertex coordinates(
xke(α)(
t),
zke(α)(
t))
of Kke attime t, globalnode number j=
ke(
α
)
, inwhich Einstein’s convention ofsummation over repeatedindices(hereα
) has beenused. Similarly,one-dimensional piecewise linear and continuousbasis functionsϕ
l(
x,
t)
inspaceareusedatthefreesurface,forη
(
x,
t)
andφ
s(
x,
t)
.Givenfree-surfaceelement¯
Kks andlocalnodenumber
β
,theglobalfree-surfacenodenumberl=
ks(β)
.Themappingforeachfreesurfaceface K¯
ks to thereferenceelement K¯
= ζ ∈ [−
1,
1]
reads¯
Fs
: ¯
K→ ¯
Kks: ζ →
x=
xks(β)(
t)ψ
β(ζ ),
(9)withx-coordinatesxks(β)
(
t)
ofthetwosurfacenodes.Thestandardtwoelementalshapefunctionswithks theglobal free-surface element indexareϕ
ks(β)(
x(ζ,
t),
t)
= ψ
β(ζ )
=
12(
1± ζ)
withlocalindexβ
=
1,
2. Whenreferencecoordinates areusedthetimedependenceintheformulationappearsintheJacobianofthemapping(seealso
Appendix A
). Theresultingglobalfiniteelementapproximationsareφ
h(
x,
z,
t)
= φ
j(
t)
ϕ
˜
j(
x,
z,
t),
(10a)φ
sh(
x,
t)
= φ
k(
t)
ϕ
k(
x,
t)
andη
h(
x,
t)
=
η
l(
t)
ϕ
l(
x,
t),
(10b)inwhichindicesi
,
j=
1,
. . . ,
Nn concernallnodesofthemeshandindicesk,
l,
r,
s=
1,
. . . ,
Nf onlythefreesurface nodes (indicesr,
s areusedlater).Summationoverrepeatedindicesisadopted.Hereafter,nodesindexedbyi,
jconcernallnodes exceptthefree surfaceones. Duetothe definitioninreferencecoordinates,it followsthat(
ϕ
˜
l)
s=
ϕ
l,i.e., alignedhereby takingζ2
=
1 (seeAppendices
AandB).Followingourrestrictiontoasingle-valuedfreesurfaceandaparameterizationofthefreesurfaceasSF
: (x
,
z=
η
(
x,
t))
, the x-coordinate of the free surface nodes is a prescribed time-dependent function xk(
t)
in the x-direction, while the z-coordinate is z=
η
h(
xk,
t)
. When there is no wave maker motion, the horizontal node positions xi are fixed in time. A consequence of thisrestriction is that the movementsof thevertically-aligned interiornodes are slavedto the corre-spondingfreesurfacenodesattherespectivex-location.ThecomputationalmeshinthecomputationalflowdomainΩ1h
(
t)
isthenobtainedbymovingeachnodeikaccordingto:
xik
(
t)
=
xik(
0)
+
γ
x,ikR(
t)
and zik(
t)
=
zik(
0)
+
γ
z,ikη
(
xk,
t),
(11) withthe multiplication factorsgiven byγ
x,ik:= (
Lw−
xik(
0))/
Lw andγ
z,ik:= (
H(
xk)
+
zik(
0))/
H(
xk)
. Nodes ik belowthe respective free surface node k lie on vertical mesh lines. For the free surface node k, we find indeed that zk=
η
(
xk,
t)
since zk(
0)
=
0. Forthe one at the bottom zik(
t)
= −
H(
xk)
since then zik(
0)
= −
H(
xk)
. When the initial free surface at t=
0 hasno elevation,then zk(
0)
=
0 for nodesatthefree surface.So herewe havelimitedthenodes xik(
0)
and zik(
0)
to form a structured mesh. InΩ
2h, only the vertical movement in (11)is retained withno horizontal node movement.Fig. 2. AsketchismadeofthediscretewavebasinwithameshintheareaR(t)<x<Lwand
−
H(x)<z<η(x,t)influencedbythepistonwavemakeratx
=
R(t)withbothhorizontalandverticalmeshmovement,andanareaLw<x<L withonlyverticalmeshmovement.A corresponding sketchofthediscretizeddomainisgivenin
Fig. 2
.Ourfiniteelementapproachpermitsthislimitation to beliftedforageneralparameterizationSF: (
xs(
t),
zs(
t))
givenfreesurfacenodesk withpositions(
xs,k,
zs,k)
.Theconsequenceofthemeshmovementisthereforethatthebasisfunctionsin
(10)
dependexplicitlyontime.Evenfor thecaseofunstructuredmeshmovement,thistimedependencecangenericallybeexpressedas˜
ϕ
j(
x,
z,
t)
= ˜
ϕ
j x,
z;
η
,
R(
t)
andϕ
j(
x,
t)
=
ϕ
j x;
R(
t)
.
(12)The vector
η
(
t)
has componentsη
r(
t)
, the vector˜φ(t
)
componentsφ
i(
t)
at interior nodes, andφ
componentsφ
l(
t)
at free surface nodes.Hence, basisfunctionsimplicitlydependontime throughthetime dependenceofthe variablesη
and explicitly depend on time through the prescribed function R(
t)
for the piston position. The basis functionson the free surfacedothereforenotdependontimewhenR(
t)
isconstant,i.e.,intheabsenceofawavemaker.Hereafterwemaynot alwaysdistinguishthesedifferenttypesoftimedependence inthebasisfunctionsexplicitly.3.3. Space-plus-timeformulation
Wedemonstratehowthetwokeychallenges(i)and(ii)mentionedinSection1areresolvedbyfirstdiscretizingthe vari-ationalprinciple
(1)
inspaceandsubsequentlyintime.WithoutanyintegrationbypartsoruseofGauss’law,substitution ofexpansions(10)
intothevariationalprinciple(1)
yields0
= δ
T 0 L˜
φ, φ,
η
;
R(
t)
dt= δ
T 0 Mklφ
k dη
l dt−
Dklφ
kη
l−
1 2g Mklη
kη
l−
1 2Ai jφ
iφ
j−
Wmφ
m dt,
(13)withthefollowingmatricesandvectorsdefinedas
Mkl
R(
t)
:=
L R(t)ϕ
kϕ
ldx,
Dkl R(
t)
:= −
L R(t)∂
ϕ
l∂
tϕ
kdx,
(14a) Ai jη
(
t),
R(
t)
:=
Ωh(t)(
∇ ˜
ϕ
i· ∇ ˜
ϕ
j)
dxdz,
(14b) Wmη
1(
t),
R(
t)
:=
η1(t) −Hw(t) dR dtϕ
˜
mx=R(t) dz
,
(14c)where
η
1(t)
isthewaveheightvariableonthewavemaker,andindexm isusedforthenodesonthewavemaker.Thefirst node withm=
1 liesatthefreesurfaceandallothernodesonthewavemakercarryindexm.Wewillalsouseindexm˜
fortheseinteriorwavemakernodes.Notethatitmaybe desirabletodiscretizethebottomboundaryalsoinapiecewise linearmanner.Nearthewavemakerthebottomis,forsimplicity,takentobeflat:Hw=
H(
R(
t))
isconstant.Thesedifferent kindsoftime dependencehavebeenexplicitlyindicatedin(14)
followingthatdependencein(12)
.ThedependenceAi j(
η
)
signifiesthat Ai j inprincipledependsonallη
k’s.Variationof
(13)
whileincorporating(14)
yields0
=
T 0 Mkl dη
l dt−
Dklη
l−
Aikφ
i−
W1δ
1kδφ
k−
d(
Mklφ
k)
dt+
Dklφ
k+
g Mklη
k+
1 2∂
Ai j∂
η
lφ
iφ
j+
∂
Wm∂
η
1δ
1lφ
mδ
η
l− (
Aijφ
i+
Aljφ
l+
Wmδ
mj)δφ
j dt,
(15)inwhichtheboundarytermarisingfromtheintegrationbypartsintimehasvanishedbecauseweused
δ
η
l(
0)
= δ
η
l(
T)
=
0 (the first relation says that the variation of the initial condition is zero, while the latter follows similarly by reversing time),andinwhichδ
mk istheKroneckerdeltasymbol:itisonewhenm=
k andzerootherwise.Theordinarydifferential equationsarethereforeδ
η
l:
d(
Mklφ
k)
dt+
Dklφ
k+
g Mklη
k+
1 2∂
Ai j∂
η
lφ
iφ
j+
∂
Wm∂
η
1δ
1lφ
m=
0 (16a)δφ
k:
Mkl dη
l dt−
Dklη
l−
Aikφ
i−
W1δ
1k=
0 (16b)δφ
j:
Aijφ
i+
Aljφ
l+
Wmδ
mj=
0,
(16c)withclearlydistinguishedvariationsofsurfacedegreesoffreedomarisingfromthearbitrarinessof
δ
η
l andδφ
k,andinterior onesarisingfromδφ
j.ThediscretizedLaplaceequationrevealsthatwecaneliminatetheinteriordegreesoffreedomindexedbyi
,
jasfollowsφ
i= −
AljA−ji1φ
l−
WmA−m1i.
(17) Substitution of (17)into the variationalprinciple(13)
then leads to Hamiltonianfree surface dynamicsgoverned by the followingvariationalprinciple0
= δ
T 0 Lφ,
η
;
R(
t)
dt= δ
T 0 Mklφ
k dη
l dt−
1 2g Mklη
kη
l−
1 2Bklφ
kφ
l−
Dklφ
kη
l−
Clφ
l−
Fw dt,
(18a)inwhichtheSchurcomplement
Bkl
η
,
R(
t)
=
Akl−
AkiA−i1jAjl(18b)
ofthefull matrix Ai j emerges asa consequenceofthiseliminationoftheinteriordegreesoffreedom,a vector Cl anda function Fw,i.e., Cl
η
,
R(
t)
=
W1δ
1l−
AljA−j1mWm and Fw(
t)
= −
1 2Wm˜A −1 ˜ mmWm.
(18c)Thenotation Bkl
(
η
)
meansthat Bkldependsinprincipleonallsurfacedegreesoffreedomη
.Variationalprinciple
(18)
inessencecapturesadiscreteboundaryelementrepresentationofthedynamics.Onecanverify thatthedynamics(16)
,inwhichtheinteriordegreesoffreedomφ
i orφ
j havebeeneliminatedusing(17)
,followsdirectly fromthisfree-surfacevariational principle(18)
.Wenevercalculatethematrixinverse A−i1j explicitly.Thisinverseisonly usedtoderivetheappropriatetimesteppingschemeinthenextstep.Intheend,we“unfold”thealgebraicsystemagainto avoidadirectcalculationofthisinversematrixbecausethatiscomputationallyexpensive.Itislargeanddependsimplicitly andexplicitlyontime.Thevariationalprinciple
(18)
isacanonicalHamiltoniansystem0
= δ
T 0 pl dη
l dt−
H p,η
;
R(
t)
dt (19)withconjugatevariables
{
pl,
η
l}
= {
pl=
Mklφ
k,
η
l}
andextended(Hamiltonian)functionH=
Hh+
Hna splitintothe follow-ingHamiltonian, Hh,andwavemakerpart,Hna (non-autonomous),Hh
≡
1
2g Mkl
η
kη
l+
12Bkl
φ
kφ
l and Hna≡
Dklφ
kη
l+
Clφ
l+
Fw.
(20)Without wave maker Hh is time independent and Hna disappears. A standard yet semi-implicit and symplectic finite-differenceStörmer–Verlettimeintegrator
[15]
wouldthensufficetodiscretize(18)
forR(
t)
=
0 (or(19)
withHna=
0).The explicit time dependence that makes (18) a non-autonomous variational principle stimulated us to develop a discontinuous Galerkin finite element approach in time. In each time slab the DG basis functions
ψ
t(
t)
are continuous and the associated space is Vkth
= {ψ
t∈
P
kt(
t∈ (
tn
,
tn+1))
}
withP
kt polynomials of degree kt. We will restrict atten-tion to piecewise linearpolynomials
ψ
t(
t)
,i.e., kt=
1. Wechoose the followinglinear expansionswithin each time slab t∈ (
tn,
tn+1=
tn+
tn)
:Fig. 3. Piecewise linear approximation in time of the potentialφ, free surface potentialφsand wave heightη.
η
l(
t)
=
η
nl,+ tn+1−
ttn
+
η
nl+1,− t−
tntn and (21a)
φ
k(
t)
= φ
kn+1/2 2(
t−
tn)
tn
+ φ
n,+ k(
tn+
tn+1−
2t)
tn
,
(21b)where
η
ln,±=
lim→0η
l(
tn±
)
,φ
kn,+=
lim→0φ
k(
tn+
)
andφ
n+1/2k
= φ
k(
t=
tn+1/2)
.(For symplectic schemes thetime step needs to be fixed, such thattn
=
t, also in the simulations presented later.) A sketch of these temporal basis functionsisgiveninFig. 3
.Theseexpansionsarecontinuouswithinthetimeslabbutdiscontinuousacross.Hence,wehave todefinethedeltafunctionarisingfromthetimederivativeinthetermMklφ
kdη
l/
dt in(18)
.Thecontributionofthisterm can eitherbeposited, introducedbyintegratingbypartstwicewhileintroducinganumericalflux inonestepbutnotthe other,orbyappealingtothetheoryofnonconservativeproducts(forhyperbolicsystems[7,32,31]
orquasi-linearequations[41]).Alternatively,forthevariationalprinciplesconsideredthiscontributionarisesasalimitofacontinuousGalerkinfinite elementmethodintimewithevenandoddnumberedelementsinwhichtheoddelementsarelimitedtozero.1 Inallthese
differenttypesofcalculations,atnodetn+1 anoutcomeisthecontribution:
Mkl
φ
k dη
l dt≈
M n+1,+ klφ
n+1,+ kη
ln+1,+−
η
ln+1,−,
(22)i.e., Mkl
φ
k is evaluated on the future side of node tn+1 anda jumpinη
across tn+1 emerges. When Mkl is considered continuousintime,i.e.,forcontinuous R(
t)
,then Mkln+1,+=
Mnkl+1.Wewilltake R(
t)
continuous.The other termsinthetime integralof
(18)
are approximatedovereach time slabsuch thatthey aresecond orderin time.Theresultingintegralsarethenapproximatedbythefollowingquadraturerules:tn+1
tn Mklφ
k dη
l dt dt≈
M n+1/2 klφ
n+1/2 kη
nl+1,−−
η
ln,+;
(23a) tn+1 tn Dklφ
kη
ldt≈
1 2t nDn+1/2 kl
φ
n+1/2 kη
nl,++
η
nl+1,−;
(23b) tn+1 tn 1 2Mklη
kη
ldt≈
1 4t nMn+1/2 kl
η
kn,+η
nl,++
η
kn+1,−η
nl+1,−;
(23c) and, tn+1 tn 1 2Bklφ
kφ
ldt≈
1 4t nBn+1/2 kl
η
n,++
Bn+1/2 klη
n+1,−φ
n+1/2 kφ
n+1/2 l,
(23d) 1 SeeAppendix C.tn+1
tn Clφ
ldt≈
1 2t nCn+1/2 l
η
n,++
Cn+1/2 lη
n+1,−φ
n+1/2 l.
(23e)Inthefirstintegral,weeitherapproximateMkl atthemid-timelevel,orwecanviewitasanexactevaluationoftheentire conjugatevariableexpandedinalinearwayintime.Theremainingintegralsareapproximatedusingamid-pointrulewith
φ
k and time evaluated at t=
tn+1/2.Here, C n+1/2l
(
η
n,+)
=
Cl(
η
n,+,
R(
tn+1/2))
, etc. The time derivative ofϕ
in Dkl leads via thechainrule toa partialderivative withrespectto R(
t)
timesdR/
dt.The latteriseither foundexplicitlyor R(
t)
is approximatedandthenallexpressions areevaluated attn+1/2.Hence,bycombiningtheresultingapproximationsderived in(22)
and(23)
thealgebraic,space–timediscretevariationalprincipleatthefreesurfaceinessencebecomes0
= δ
N n=0 Lφ
n,+, φ
n+1/2,
η
n,+,
η
n+1,−(24a)
= δ
N n=0 Mkln+1/2φ
kn+1/2η
ln+1,−−
η
nl,+−
t n 2 Hn+1/2
φ
n+1/2,
η
n,++
Hn+1/2φ
n+1/2,
η
n+1,−+ δ
N n=−1 Mkln+1φ
kn+1,+η
ln+1,+−
η
nl+1,−,
(24b) withHn+1/2(φ
n+1/2,
η
n+1,−)
=
H(φ
n+1/2,
η
n+1,−,
tn+1/2)
.Variation of(24) withrespect to the independentvariables indicated yields an extension of the symplectic Störmer– Verlettimeintegrationscheme
δφ
kn+1,+:
η
ln+1,+=
η
nl+1,− (25a)δ
η
ln,+:
Mkln+1/2φ
kn+1/2=
Mnklφ
kn,+−
1 2t n
∂
Hn+1/2(φ
n+1/2,
η
n,+)
∂
η
ln,+ (25b)δφ
kn+1/2:
Mkln+1/2η
ln+1,−=
Mkln+1/2η
nl,++
1 2t n
∂
Hn+1/2(φ
n+1/2,
η
n,+)
∂φ
nk+1/2+
∂
Hn+1/2(φ
n+1/2,
η
n+1,−)
∂φ
kn+1/2 (25c)δ
η
ln+1,−:
Mkln+1φ
kn+1,+=
Mkln+1/2φ
kn+1/2−
1 2t n
∂
Hn+1/2(φ
n+1/2,
η
n+1,−)
∂
η
ln+1,−.
(25d)Weobservethatwhilethefiniteelementexpansionintimewasoriginallyposedtobediscontinuous,thevariationsenforce
η
l to be continuous whileφ
k remains discontinuous in time. Both the choice of the numerical flux (or path) and the quadraturesusedabovewereguidedbyourintentiontoderivetheclassicStörmer–Verletschemeintheabsenceofexplicit timedependence,i.e.,herewhenR(
t)
=
0.Finally,theinverseofthematrix Aij inthenon-constantmatrixBklandthenon-constantvector Cl canbeavoidedby unfoldingthefreesurfacedynamicsagaintoincludetheinteriordegreesoffreedom.Whenweuse
φ
in,+= −
Aljn+1/2η
n,+A−ji1η
n,+,
tn+1/2φ
ln+1/2 (26a)φ
ni+1,−= −
Anlj+1/2η
n+1,−A−1 jiη
n+1,−,
tn+1/2φ
n+1/2 l (26b)attwotimelevels,theintegralofthekineticenergy K inthestandardHamiltonianHh
=
K+
P=
Ai jφ
iφ
j/
2+
g Mklη
kη
l/
2 canberewrittenas2 N n=0 1 2t nK
˜
φ
n,+, φ
n+1/2,
η
n,+,
tn+1/2+
K˜
φ
n+1,−, φ
n+1/2,
η
n+1,−,
tn+1/2≡
N n=0tn 4 Bnkl+1/2
η
n,++
Bn+1/2 klη
n+1,−φ
n+1/2 kφ
n+1/2 l=
N n=0tn 4 Akln+1/2
η
n,+φ
kn+1/2φ
nl+1/2+
Ankl+1/2η
n+1,−φ
nk+1/2φ
ln+1/22 In(18a)wederivedthatA
i jφiφj=Bklφkφlusing(17)with(18b).Herein(27),startingfrom(23d),wetracethestepsinthisderivationbackbyusing
+
Ankj+1/2η
n,+φ
n+1/2 kφ
n,+ j+
A n+1/2 kjη
n+1,−φ
n+1/2 kφ
n+1,− j+
Ani+l1/2η
n,+φ
n,+ iφ
n+1/2 l+
A n+1/2 ilη
n+1,−φ
n+1,− iφ
n+1/2 l+
Ani+j1/2η
n,+φ
in,+φ
nj,++
Ani+j1/2η
n+1,−φ
in+1,−φ
nj+1,− (27) after some algebraic manipulations. A similar unfolding can be done for the wave maker term involving Cl but is not required.Hence,itseemsthatthefiniteelementexpansionfortheinteriordegreesoffreedomisφ
i= φ
ni,+ tn+1−
ttn
+ φ
n+1,− i t−
tntn (28) with
φ
in,±=
lim→0φ
i(
tn±
)
.Analogously,wenowseethatthetimeintegralofthewavemakercontributionin
(13)
isapproximatedas T 0 Wmφ
mdt∼
=
N n=0tn 2 Wqn+1/2
η
n,+ qφ
qn+1/2+
Wqn+1/2η
n+1,− qφ
qn+1/2+
Wmn+1/2η
n,+ qφ
nm,++
Wmn+1/2η
n+1,− qφ
nm+1,−,
(29)withinteriorwavemakernodesm,thewavemakernodeq
=
1 atthefreesurfaceandWmn+1/2(
η
nq,+)
=
Wm(
η
nq,+,
tn+1/2)
, etc.Theverticesonthewavemakerarethusevaluatedattimetn+1/2.Byusingapproximations
(23a)–(23c)
forthefirstthreefreesurface andpotentialenergytermsin(13)
and approxima-tions(27)
forthekineticenergyand(29)
forthewavemakertermsin(13)
,thespacediscreteprinciple(13)
becomes the followingspace–timediscretevariationalprinciple0
= δ
L˜
φ
n,+, ˜
φ
n−1,−, φ
n,+, φ
n+1/2,
η
n,+,
η
n+1,−= δ
N n=0 Mnkl+1/2φ
ln+1/2η
kn+1,−−
η
nk,+−
1 2t nDn+1/2 kl
φ
n+1/2 lη
kn,++
η
kn+1,−−
1 2t nHn+1/2 h
˜
φ
n,+, φ
n+1/2,
η
n,++
Hn+1/2 h˜
φ
n+1,−, φ
n+1/2,
η
n+1,−−
1 2t nWn+1/2 q
η
n,+ q+
Wqn+1/2η
n+1,− qφ
qn+1/2+
Wmn+1/2η
n,+ qφ
mn+,+
Wmn+1/2η
n+1,− qφ
mn+1,−+
N n=−1 Mkln+1φ
ln+1,+η
kn+1,+−
η
kn+1,−,
(30)withindicesk
,
l∈
N
F,m∈
N
W\
N
F,i,
j∈
N
Ω¯h andq∈
N
F∩
N
W.Itconsistsofsumsofdiscretizedintegralsandjump termsoverandacrossthespace–timeslabsE
n.3.4. Dynamics
Takingvariationsof
(30)
overtheindependentvariablesφ
ln+1/2,
φ
ln,+,φ
ni,+,φ
in+1,−,η
n,+k and
η
n+1,−k yieldsanalgebraic systemforthesepotentialandwaveheightcoefficients: