<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">JAMP</journal-id><journal-title-group><journal-title>Journal of Applied Mathematics and Physics</journal-title></journal-title-group><issn pub-type="epub">2327-4352</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/jamp.2021.96088</article-id><article-id pub-id-type="publisher-id">JAMP-109919</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Physics&amp;Mathematics</subject></subj-group></article-categories><title-group><article-title>
 
 
  Numerical Approximation of Port-Hamiltonian Systems for Hyperbolic or Parabolic PDEs with Boundary Control
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Andrea</surname><given-names>Brugnoli</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Ghislain</surname><given-names>Haine</given-names></name><xref ref-type="aff" rid="aff2"><sup>2</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Anass</surname><given-names>Serhani</given-names></name><xref ref-type="aff" rid="aff3"><sup>3</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Xavier</surname><given-names>Vasseur</given-names></name><xref ref-type="aff" rid="aff2"><sup>2</sup></xref></contrib></contrib-group><aff id="aff2"><addr-line>ISAE-SUPAERO, Université de Toulouse, Toulouse, France</addr-line></aff><aff id="aff1"><addr-line>Robotics and Mechatronics Department, University of Twente, Enschede, Netherlands</addr-line></aff><aff id="aff3"><addr-line>CERFACS, Toulouse, France</addr-line></aff><pub-date pub-type="epub"><day>09</day><month>06</month><year>2021</year></pub-date><volume>09</volume><issue>06</issue><fpage>1278</fpage><lpage>1321</lpage><history><date date-type="received"><day>29,</day>	<month>March</month>	<year>2021</year></date><date date-type="rev-recd"><day>15,</day>	<month>June</month>	<year>2021</year>	</date><date date-type="accepted"><day>18,</day>	<month>June</month>	<year>2021</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  We consider the design of structure-preserving discretization methods for the solution of systems of boundary controlled Partial Differential Equations (PDEs) thanks to the port-Hamiltonian formalism. We first provide a novel general structure of infinite-dimensional port-Hamiltonian systems (pHs) for which the Partitioned Finite Element Method (PFEM) straightforwardly applies. The proposed strategy is applied to abstract multidimensional linear hyperbolic and parabolic systems of PDEs. Then we show that instructional model problems based on the wave equation, Mindlin equation and heat equation fit within this unified framework. Secondly, we introduce the ongoing project SCRIMP (Simulation and Control of Interactions in Multi-Physics) developed for the numerical simulation of infinite-dimensional pHs. SCRIMP notably relies on the FEniCS open-source computing platform for the finite element spatial discretization. Finally, we illustrate how to solve the considered model problems within this framework by carefully explaining the methodology. As additional support, companion interactive Jupyter notebooks are available.
 
</p></abstract><kwd-group><kwd>Port-Hamiltonian Systems</kwd><kwd> Partial Differential Equations</kwd><kwd> Boundary Control</kwd><kwd> Structure-Preserving Discretization</kwd><kwd> Finite Element Method</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>The efficient numerical simulation of complex multiphysics systems is ubiquitous in Computational Science and Engineering. Although a wide range of methods exists to tackle specific problems, they often lack versatility and adaptability, especially when the modelling is of increasing complexity as in real-world applications.</p><p>Infinite-dimensional port-Hamiltonian systems (pHs) have been first introduced in [<xref ref-type="bibr" rid="scirp.109919-ref1">1</xref>] using the language of differential geometry. They provide a powerful tool to model complex multiphysics open systems (whether or not being linear) for control purpose. A wide range of physical systems has been written within this formalism, see e.g. [<xref ref-type="bibr" rid="scirp.109919-ref2">2</xref>] [<xref ref-type="bibr" rid="scirp.109919-ref3">3</xref>] [<xref ref-type="bibr" rid="scirp.109919-ref4">4</xref>]. This twenty-year-old framework [<xref ref-type="bibr" rid="scirp.109919-ref5">5</xref>] enjoys nice properties, such as the relevant physical meaning of the variables, a useful underlying linear structure (namely Stokes-Dirac structure) which encodes the power balance satisfied by the Hamiltonian (often chosen as energy), and last but not least: the interconnection of multiple pHs remains a pHs. This allows “modular” modelling of complex multiphysics systems.</p><p>Since then, many researchers have developed numerical methods to discretize these systems in a structure-preserving manner, hence keeping the advantages of the infinite-dimensional pHs. Such methods aim at constructing approximate finite-dimensional pHs at the discrete level. Our aim is to show the versatility of PFEM thanks to a new unified framework and to introduce the ongoing project SCRIMP together with companion Jupyter notebooks [<xref ref-type="bibr" rid="scirp.109919-ref6">6</xref>]. Each particular example discussed here has been treated previously [<xref ref-type="bibr" rid="scirp.109919-ref7">7</xref>] [<xref ref-type="bibr" rid="scirp.109919-ref8">8</xref>] [<xref ref-type="bibr" rid="scirp.109919-ref9">9</xref>] [<xref ref-type="bibr" rid="scirp.109919-ref10">10</xref>]. Here, the existence of an underlying common structure for many pHs is highlighted. Obtaining such a general scheme for infinite-dimensional pHs is of major importance for control purposes [<xref ref-type="bibr" rid="scirp.109919-ref11">11</xref>], and for coupling atomic elements into a more complex system with the guarantee of well-preserved energy exchanges between subsystems [<xref ref-type="bibr" rid="scirp.109919-ref12">12</xref>].</p><p>The first proposed structure-preserving scheme for pHs dates back to [<xref ref-type="bibr" rid="scirp.109919-ref13">13</xref>], where the authors proposed a mixed finite element spatial discretization for hyperbolic systems of conservation laws. Pseudo-spectral methods relying on higher-order global polynomial approximations were studied in [<xref ref-type="bibr" rid="scirp.109919-ref14">14</xref>]. Unfortunately, this method seems to be limited to the one-dimensional case. A finite difference method with staggered grids was developed in [<xref ref-type="bibr" rid="scirp.109919-ref15">15</xref>] for two-dimensional domains, but complex geometries are then difficult to tackle. Weak formulations leading to Galerkin numerical approximations began to be explored in the past few years. In [<xref ref-type="bibr" rid="scirp.109919-ref16">16</xref>] the prototypical example of hyperbolic systems of two conservation laws has been discretized by a weak formulation. However, the construction of the necessary power-preserving mappings is not straightforward on arbitrary meshes. All these methods require ad hoc implementations and are usually restricted to particular cases of pHs. Furthermore, since they do not rely on well-established and versatile numerical libraries, using such techniques remains confined within a small community of experts. We refer the reader for a more complete overview of structure-preserving discretization for pHs to [<xref ref-type="bibr" rid="scirp.109919-ref5">5</xref>] [<xref ref-type="bibr" rid="scirp.109919-ref17">17</xref>] and the references therein.</p><p>Thanks to [<xref ref-type="bibr" rid="scirp.109919-ref8">8</xref>] it has become clear that there exists a deep relation between structure-preserving discretization of pHs and Mixed Finite Element Method (MFEM). Indeed velocity-stress formulations for the wave dynamics [<xref ref-type="bibr" rid="scirp.109919-ref18">18</xref>] and elastodynamics problems are of Hamiltonian type and their mixed discretization preserves this structure for closed systems. This leads to the intuition that the MFEM may be used to discretize the underlying geometric structure of pHs in a unified way, even for open systems, translating the infinite-dimensional Stokes-Dirac structure into a finite Dirac structure. A first successful application has already been achieved in [<xref ref-type="bibr" rid="scirp.109919-ref19">19</xref>] for discretizing the 1-D Navier-Stokes equations for reactive flows formulated in a port-Hamiltonian formulation. The discretization strategy relies on the partitioned structure of the problem and for this reason, goes under the name of Partitioned Finite Element Method (PFEM). This method proves nice convergence properties, see e.g. [<xref ref-type="bibr" rid="scirp.109919-ref20">20</xref>] for a recent proof on the wave equation, that does not require the fulfilment of the usual inf-sup condition for MFEM, generalizing the results cited in ( [<xref ref-type="bibr" rid="scirp.109919-ref21">21</xref>], Remark 6).</p><p>It has to be pointed out that the core idea of PFEM, i.e. performing integration by parts on a partition of the weak formulation of the system of equations, has already been proposed for closed hyperbolic systems in [<xref ref-type="bibr" rid="scirp.109919-ref21">21</xref>]. Therein, the formulations are called either primal-dual or dual-primal, depending on the chosen partition of the system.</p><p>The major difference between MFEM and PFEM relies on the choice of the test functions in the weak formulation, hence on the finite element form functions. Indeed, in PFEM, they never carry homogeneous boundary conditions. In e.g. ( [<xref ref-type="bibr" rid="scirp.109919-ref22">22</xref>], Section 7.1), it is shown that for a Dirichlet control, test functions are taken in the kernel of the Dirichlet trace. As already mentioned, in [<xref ref-type="bibr" rid="scirp.109919-ref21">21</xref>], the proposed primal-dual and dual-primal discretizations are then suitable for the structure-preserving discretization of closed systems. Nevertheless, by keeping these homogeneous conditions in the test functions, not only the application of Dirichlet control is difficult, but the definition of the Neumann observation, necessary for the discrete power balance, would be more complex. PFEM aims at easing the mimicking of the continuous power balance at the discrete level, by relaxing the test functions used in [<xref ref-type="bibr" rid="scirp.109919-ref21">21</xref>]. To the best of our knowledge, this relaxation has not been investigated yet in the case of boundary controlled wave-like systems, and this probably comes from the fact that MFEM has been first developed for elliptic systems. Indeed, in this case, such a boundary condition is mandatory for well-posedness (especially to obtain the ellipticity in the kernel condition ( [<xref ref-type="bibr" rid="scirp.109919-ref22">22</xref>], Eq. (5.1.7)), while PFEM is made for evolution systems, and more especially for pHs.</p><p>In our opinion, the driving forces of PFEM are threefold: first, PFEM takes collocated boundary controls and observations into account in a simple manner; secondly, PFEM is structure-preserving, meaning in particular that the discrete power balance perfectly mimics the continuous one; thirdly, the implementation of PFEM only relies on existing finite element libraries, such as FEniCS [<xref ref-type="bibr" rid="scirp.109919-ref23">23</xref>], selected in the ongoing project SCRIMP for its robustness and efficiency. Last but not least, the pHs point of view allows us to separate axioms of physics (such as conservation laws) from constitutive laws and equations of state (such as Hooke’s law and ideal gas law). PFEM is based on this separation, providing the possibility to tackle parabolic or nonlinear systems, at the price of solving a finite-dimensional port-Hamiltonian Differential Algebraic Equation (pHDAE). In the particular case of linear hyperbolic PDE, as shown in Section 2, the constitutive laws can be easily (i.e. without matrix inversions) taken into account in order to recover an Ordinary Differential Equation (ODE).</p><p>PFEM could also be named e.g. extended MFEM or relaxed MFEM. Since only evolution systems are considered (not necessarily of hyperbolic type, see e.g. Section 3.4), relaxed conditions for the selection of the test functions hold, hence for the finite elements as well. We choose to follow the terminology introduced in [<xref ref-type="bibr" rid="scirp.109919-ref8">8</xref>] and widely used since then. Furthermore, it emphasizes the pH formulation of the initial system to discretize.</p><p>Main contributions</p><p>We first aim at presenting the strategy of the structure-preserving discretization PFEM, in a new unified abstract framework, allowing for an easy application to a wide class of boundary controlled partial differential equations. Then, in order to show the versatility of our approach, we successively apply PFEM to the boundary controlled wave equation, the boundary controlled Mindlin plate model, and the boundary controlled heat equation with a thermodynamically well-founded Hamiltonian (namely the internal energy, instead of the quadratic functional commonly used). Taking advantage of the strong underlying structure, we finally describe a unified object-oriented implementation of these models via PFEM. Companion interactive Jupyter notebooks [<xref ref-type="bibr" rid="scirp.109919-ref6">6</xref>] are discussed to illustrate our methodology. For the purpose of this manuscript, smooth functions are selected for the physical parameters of the problem under considerations. Nothing prevents from choosing less regular coefficients. This will of course affect the global convergence of the underlying finite elements [<xref ref-type="bibr" rid="scirp.109919-ref20">20</xref>].</p><p>Structure of the manuscript</p><p>The manuscript is organized as follows. In Section 2 the abstract pHs framework is introduced, with a particular focus on both hyperbolic and parabolic linear systems of partial differential equations. In Section 3 the general structure-preserving discretization is presented, and then specialized on the two cases previously mentioned. In Section 4 the ongoing environment SCRIMP is described in detail. In Section 5 the three companion interactive Jupyter notebooks [<xref ref-type="bibr" rid="scirp.109919-ref6">6</xref>] are thoroughly explained. Conclusions and perspectives are finally drawn in Section 6.</p></sec><sec id="s2"><title>2. Definition of the General Framework</title><p>In this section, we introduce an abstract class of pHs and their underlying geometric structure: the Dirac structure for the finite-dimensional case and the Stokes-Dirac structure for the infinite-dimensional case. For the infinite-dimensional case it is shown how hyperbolic and parabolic systems easily fit into this framework.</p><sec id="s2_1"><title>2.1. Finite Dimensional Port-Hamiltonian Systems</title><p>State representation</p><p>Let us begin with a classical definition of a pHs in finite dimension. Consider the time-invariant dynamical system [<xref ref-type="bibr" rid="scirp.109919-ref24">24</xref>]:</p><p>( d x d t = ( J ( x ) − R ( x ) ) ∇ H ( x ) + B ( x ) u , y = B ( x ) Τ   ∇ H ( x ) , (1)</p><p>where H ( x ) : X ≃ ℝ n → ℝ , the Hamiltonian, is a real-valued function of the vector of energy variables x , bounded from below. Matrix-valued functions J ( x ) (the structure operator) and R ( x ) (the dissipative or resistive operator) are skew-symmetric and symmetric positive semi-definite respectively. The control u ∈ ℝ m is applied thanks to the matrix-valued control function B ( x ) of size n &#215; m . Variable y ∈ ℝ m is the power conjugated output to the input.</p><p>Such a system is called a port-Hamiltonian system, as it arises from the Hamiltonian modelling of a physical system and it interacts with the environment via the input u and the output y , included in the formulation. The vector ∇ H ( x ) is made of the co-energy variables.</p><p>Due to the structural properties of J ( x ) and R ( x ) , the port-Hamiltonian system enjoys the nice following power balance:</p><p>d H d t = − ( ∇ H ( x ) ) Τ   R ( x ) ∇ H ( x ) + u Τ   y   ≤   u Τ   y , (2)</p><p>meaning that R ( x ) accounts for dissipation, and that the input-output product corresponds to the power supplied to (or taken from) the system, through the control u .</p><p>Flow-effort representation</p><p>Consider two finite-dimensional vector spaces E = F ≃ ℝ n . The elements of F are called flows, while the elements of E are called efforts. Those are port variables and their combination gives the power flowing inside the system. The space B : = F &#215; E is called the bond space of power variables. Therefore, identifying E as the dual of F, the power is defined as 〈 e , f 〉 : = e ( f ) .</p><p>Definition 1 ( [<xref ref-type="bibr" rid="scirp.109919-ref25">25</xref>], Def. 1.1.1) Given the finite-dimensional space F and its dual E with respect to the inner product 〈 ⋅ , ⋅ 〉 F : F &#215; F → ℝ , consider the symmetric bilinear form:</p><p>〈 〈 ( f 1 , e 1 ) , ( f 2 , e 2 ) 〉 〉 : = 〈 e 1 , f 2 〉 + 〈 e 2 , f 1 〉 ,   where     ( f i , e i ) ∈ B ,   i = 1,2.</p><p>A Dirac structure on B : = F &#215; E is a subspace D ⊂ B , which is maximally isotropic under 〈 〈 ⋅ , ⋅ 〉 〉 . Equivalently, a Dirac structure on B : = F &#215; E is a subspace D ⊂ B which equals its orthogonal companion with respect to 〈 〈 ⋅ , ⋅ 〉 〉 , i.e. D = D [ ⊥ ] , where:</p><p>D [ ⊥ ] : = { ( f , e ) ∈ B   |   〈 〈 ( f , e ) , ( f ˜ , e ˜ ) 〉 〉 = 0,   ∀   ( f ˜ , e ˜ ) ∈ D } .</p><p>The connection between the concept of Dirac structure and pHs in its canonical form (1) is achieved by considering the following ports:</p><p>&#183; the storage ports ( f x , e x ) : = ( d x d t , ∇ H ( x ) ) ∈ ℝ n &#215; ℝ n , made of the storage flow f x (time-derivative of the energy variables) and storage effort e x (the co-energy variables);</p><p>&#183; the resistive (or dissipative) ports ( f R , e R ) ∈ ℝ k &#215; ℝ k , made of the resistive (or dissipative) flow f x and resisitive (or dissipative) effort e R ;</p><p>&#183; the interconnection ports ( f u , e u ) : = ( − y , u ) ∈ ℝ m &#215; ℝ m , made of the interconnection flow f u and interconnection effort e u .</p><p>Assuming that the matrix R ( x ) has constant rank, from classical matrix factorizations there exist matrices G (not necessarily square, of size k &#215; n ) and K symmetric positive semi-definite of size k &#215; k such that R = G Τ K G . These notations at hand, the pHs (1) rewrites:</p><p>( f x ( x ) f R ( x ) f u ( x ) ) = [ J ( x ) − G ( x ) Τ B ( x ) G ( x ) 0 0 − B ( x ) Τ 0 0 ] ︸ J e ( e x ( x ) e R ( x ) e u ( x ) ) , (3)</p><p>together with the (dissipative or resistive) constitutive relation:</p><p>e R ( x ) = K ( x ) f R ( x ) . (4)</p><p>It is clear that the extended structure operator J e appearing in (3) is skew-symmetric of size ( n + k + m ) &#215; ( n + k + m ) . Its graph is a Dirac structure with respect to the Euclidean inner product, as a kernel representation, see [<xref ref-type="bibr" rid="scirp.109919-ref24">24</xref>]. Hence, it comes:</p><p>〈 e x ( x ) , f x ( x ) 〉 ℝ n + 〈 e R ( x ) , f R ( x ) 〉 ℝ k + 〈 e u ( x ) , f u ( x ) 〉 ℝ m = 0.</p><p>Noting that d H d t = 〈 e x ( x ) , f x ( x ) 〉 ℝ n (by definition of the storage port) leads to:</p><p>d H d t = − 〈 e R ( x ) , f R ( x ) 〉 ℝ k − 〈 e u ( x ) , f u ( x ) 〉 ℝ m ,</p><p>and thanks to the symmetry of R , (4) gives:</p><p>d H d t = − 〈 f R ( x ) , K ( x ) f R ( x ) 〉 ℝ m − 〈 e u ( x ) , f u ( x ) 〉 ℝ m .</p><p>Finally, from (3) and the definition of the storage and interconnection ports, the power balance (2) is recovered.</p><p>The relation between (1) and (3)-(4) can be understood as follows: the power balance (2) is encoded in the Dirac structure (obtained from the extended structure operator J e ) together with the resistive constitutive relation.</p><p>Remark 1. The canonical Euclidean inner product has been used here, but other inner products are allowed to take into account mass matrices (symmetric positive definite) on the left-hand side of (1), (3), and (4). This is crucial after the spatial discretization procedure. This corresponds to a kernel representation of Dirac structure [<xref ref-type="bibr" rid="scirp.109919-ref24">24</xref>].</p><p>System 1 is a pHs in canonical form. Recently, finite-dimensional differential algebraic port-Hamiltonian systems (pHDAE) have been introduced both for linear [<xref ref-type="bibr" rid="scirp.109919-ref26">26</xref>] and nonlinear systems [<xref ref-type="bibr" rid="scirp.109919-ref27">27</xref>]. This enriched description shares not only all the crucial features of ordinary pHs, but also easily accounts for algebraic constraints, time-dependent transformations and explicit dependence on time in the Hamiltonian. The application of the proposed discretization method naturally leads to pHDAEs. Indeed, a constitutive relation between f x : = d x d t and e x : = ∇ H ( x ) is needed to be well-defined. But PFEM takes into account constitutive relations apart from (3) as constraints. However, as shown later in Sections 3.2 and 3.3, the method simplifies in the case, for instance, of linear hyperbolic systems.</p></sec><sec id="s2_2"><title>2.2. Infinite-Dimensional Port-Hamiltonian Systems</title><p>In this section an infinite-dimensional generalization of pHs is presented. For sake of readability, the (Stokes-) Dirac structure is first defined, and secondly, infinite-dimensional pHs are then described in both hyperbolic and parabolic cases. A more general framework can be designed, but this goes beyond the aim of this present work.</p><p>Structure operator</p><p>As to avoid functional difficulties, the analogue of the extended structure operator will not be written as in (3). More precisely, the control operator will not be included in an extended structure unbounded operator, but given apart. The Stokes-Dirac will be then obtained thanks to a structure operator related to the boundary control operator through an abstract Green formula. However, like in finite dimension, the aim is to establish a link between flow and effort variables. Most importantly, the underlying Stokes-Dirac structure must encode the power balance of the dynamical system under study.</p><p>Consider a Lipschitz domain Ω ⊂ ℝ d ,   d ∈ { 1,2,3 } , and the relation:</p><p>( f 1 f 2 ) = [ 0 − L * L 0 ] ( e 1 e 2 ) ,   e 1 ∈ H L , e 2 ∈ H − L * , (5)</p><p>with:</p><p>H L : { e 1 ∈ L 2 ( Ω , A )   |   L e 1 ∈ L 2 ( Ω , B ) } , H − L * : { e 2 ∈ L 2 ( Ω , B )   |   − L * e 2 ∈ L 2 ( Ω , A ) } .</p><p>By L 2 ( Ω , X ) we denote the space of square integrable X -valued functions. Symbol A , B denote either the space of scalars ℝ , vectors ℝ d , symmetric tensors ℝ sym d &#215; d = : S or a Cartesian product of those, depending on the particular example. The operator L : H L → L 2 ( Ω , B ) is a generic differential, and therefore linear but unbounded, operator. The notation L * : H − L * → L 2 ( Ω , A ) denotes the formal adjoint of L , defined by the relation:</p><p>〈 L e 1 , e 2 〉 L 2 ( Ω , B ) = 〈 e 1 , L * e 2 〉 L 2 ( Ω , A ) ,   e 1 ∈ C 0 ∞ ( Ω , A ) ,   e 2 ∈ C 0 ∞ ( Ω , B ) . (6)</p><p>Of course, for (5) to be well-defined, constitutive relations are needed. Only physical laws will be taken into account when constructing the above relation on concrete examples. As pointed out in the introduction, PFEM aims at both preserving this relation and discretizing constitutive laws to close the system.</p><p>Remark 2. One can be confused by the lack of evolution in time in (5). However, this emphasizes an important paradigm in the proposed point of view: this relation translates the time-independent geometric structure of the pHs as an equation with differential operator (ill-posed on its own), while constitutive relations will bring back the time dependency of the problem. In particular, some flows must be the time derivative of the energy variables.</p><p>Throughout the paper, 〈 ⋅ , ⋅ 〉 X denotes the inner product of the Hilbert space X. Definition (6) is analogous to Definition 5.80 in [<xref ref-type="bibr" rid="scirp.109919-ref28">28</xref>]. In Section 3.2, the operator L is the gradient, denoted by grad, and its formal adjoint is minus the divergence, denoted by -div, from the so-called Green’s formula (integration by parts). In Section 3.3, the operator L contains both grad and Grad. This latter corresponds to the symmetric part of the gradient and represents the deformation tensor in continuum mechanics:</p><p>Grad ( e ) : = 1 2 ( ∇ e + ∇ Τ e ) ,   e ∈ C ∞ ( ℝ d ) .</p><p>The formal adjoint of Grad is minus the tensor divergence -Div. For a tensor field E : Ω → M : = ℝ d &#215; d , with components e i j , the divergence is a vector, defined columnwise as:</p><p>Div ( E ) : = ( ∑ i = 1 d     ∂ x i e i j ) j = 1, ⋯ , d .</p><p>Finally, in Section 3.4, L is made of the gradient and the identity operator.</p><p>Stokes-Dirac structure</p><p>Definition 1 still remains valid in infinite dimension. Nevertheless, as stated above, the structure operator in (5) is not extended to include the control operator. Hence an additional assumption has to be made for [ 0 − L * L 0 ] to define a Dirac structure in relation with a pHs coming from boundary control of partial differential equations. In other words, a Stokes-Dirac structure requires the specification of boundary variables in order to express a general power conservation property for open physical systems. This assumption is based on the so-called Stokes’ theorem (also known as the divergence theorem, Gauss’s theorem or Ostrogradsky’s theorem) and its corollaries, as the Green’s formula.</p><p>Assumption 1 (Abstract Green’s formula) The operator L is assumed to satisfy the abstract Green’s formula:</p><p>〈 L e 1 , e 2 〉 L 2 ( Ω , B ) − 〈 e 1 , L * e 2 〉 L 2 ( Ω , A ) = 〈 Γ 0 e 1 , Γ ⊥ e 2 〉 V ∂ , ( V ∂ ) ′ ,     ∀ e 1 ∈ H L , e 2 ∈ H − L * , (7)</p><p>where the right-hand side is the duality bracket at the boundary, on a well-suited boundary functional space V ∂ for some trace operators Γ 0 ,   Γ ⊥ . From now on, this duality bracket will be denoted by 〈 ⋅ , ⋅ 〉 ∂ Ω with a slight abuse of notation.</p><p>Remark 3. This abstract formula is well-known in the boundary control systems theory, see e.g. ( [<xref ref-type="bibr" rid="scirp.109919-ref29">29</xref>], Chapter 10).</p><p>Remark 4. In practice, Equation (7) dictates the causalities, i.e. the possible choices for the boundary control u ∂ and the boundary observation y ∂ , via the equality 〈 Γ 0 e 1 , Γ ⊥ e 2 〉 ∂ Ω = 〈 u ∂ , y ∂ 〉 ∂ Ω (with a slight abuse of notation for the right-hand side to make sense). Of course, the admissible causalities are also related to the well-posedness of the system under study, and in particular to the definitions of the boundary functional spaces.</p><p>For sake of simplicity, a focus on the two following causalities will be made. Let the boundary variables associated to system (5) be defined by:</p><p>e ∂ = Γ ⊥ e 2 ∈ ( V ∂ ) ′ ,   f ∂ = − Γ 0 e 1 ∈ V ∂ , (8)</p><p>or the other way:</p><p>e ∂ = Γ 0 e 1 ∈ V ∂ ,   f ∂ = − Γ ⊥ e 2 ∈ ( V ∂ ) ′ . (9)</p><p>In light of (7), systems:</p><p>( f 1 f 2 ) = [ 0 − L * L 0 ] ( e 1 e 2 ) ,   ( e ∂ f ∂ ) = [ 0 Γ ⊥ − Γ 0 0 ] ( e 1 e 2 ) , (10)</p><p>and:</p><p>( f 1 f 2 ) = [ 0 − L * L 0 ] ( e 1 e 2 ) ,   ( e ∂ f ∂ ) = [ Γ 0 0 0 − Γ ⊥ ] ( e 1 e 2 ) , (11)</p><p>define Stokes-Dirac structures with respect to the bilinear pairing:</p><p>〈 〈 ( f 1 1 , f 2 1 , f ∂ 1 , e 1 1 , e 2 1 , e ∂ 1 ) , ( f 1 2 , f 2 2 , f ∂ 2 , e 1 2 , e 2 2 , e ∂ 2 ) 〉 〉 = 〈 f 1 1 , e 1 2 〉 L 2 ( Ω , A ) + 〈 f 2 1 , e 2 2 〉 L 2 ( Ω , B ) + 〈 f 1 2 , e 1 1 〉 L 2 ( Ω , A )     + 〈 f 2 2 , e 2 1 〉 L 2 ( Ω , B ) + 〈 f ∂ 1 , e ∂ 2 〉 ∂ Ω + 〈 f ∂ 2 , e ∂ 1 〉 ∂ Ω .</p><p>Obviously, for systems (10) and (11) to be well-defined, constitutive relations are needed.</p><p>In the remaining part of this section, only (10) will be treated in details. The other canonical causality (11), figuring in Section 3.4, straightforwardly follows with the same strategy.</p><p>Hyperbolic systems</p><p>In the hyperbolic case, both flows represent the dynamics of the independent energy variables α 1 , α 2 . The Hamiltonian is a generic functional of these variables H = H ( α 1 , α 2 ) . The co-energy variables are by definition the variational derivatives (see e.g. [<xref ref-type="bibr" rid="scirp.109919-ref1">1</xref>] ) of H with respect to the energy variables:</p><p>f 1 = ∂ t α 1 ,   e 1 : = δ α 1 H ,   f 2 = ∂ t α 2 ,   e 2 : = δ α 2 H . (12)</p><p>Then system (10) possesses the equivalent state representation:</p><p>( ∂ t α 1 ∂ t α 2 ) = [ 0 − L * L 0 ] ( δ α 1 H δ α 2 H ) ,   ( u ∂ y ∂ ) = [ 0 Γ ⊥ Γ 0 0 ] ( δ α 1 H δ α 2 H ) . (13)</p><p>It holds u ∂ = e ∂ ,   y ∂ = − f ∂ . The power balance is naturally embedded in the Stokes-Dirac structure defined by (10):</p><p>d d t H ( α 1 , α 2 ) = 〈 y ∂ , u ∂ 〉 ∂ Ω . (14)</p><p>Linear hyperbolic systems</p><p>The system is linear when the Hamiltonian has the form:</p><p>H ( α 1 , α 2 ) = 1 2 〈 α 1 , Q 1 α 1 〉 L 2 ( Ω , A ) + 1 2 〈 α 2 , Q 2 α 2 〉 L 2 ( Ω , B ) ,</p><p>where Q 1 : L 2 ( Ω , A ) → L 2 ( Ω , A ) , Q 2 : L 2 ( Ω , B ) → L 2 ( Ω , B ) are positive symmetric operators, bounded from below and above:</p><p>m 1 I A ≼ Q 1 ≼ M 1 I A ,     m 2 I B ≼ Q 2 ≼ M 2 I B ,</p><p>m 1 &gt; 0 ,   m 2 &gt; 0 ,   M 1 &gt; 0 ,   M 2 &gt; 0,</p><p>with I A and I B the identity operators in L 2 ( Ω , A ) and L 2 ( Ω , B ) respectively. In this case, the co-energy variables are given by:</p><p>e 1 : = δ α 1 H = Q 1 α 1 ,   e 2 : = δ α 2 H = Q 2 α 2 . (15)</p><p>Since Q 1 ,   Q 2 are positive and bounded from below and above, it is possible to invert them to obtain:</p><p>α 1 = Q 1 − 1 e 1 = : M 1 e 1 ,   α 2 = Q 2 − 1 e 2 = : M 2 e 2 , (16)</p><p>giving rise to the co-energy formulation. The Hamiltonian is rewritten as:</p><p>H ( e 1 , e 2 ) = 1 2 〈 e 1 , M 1 e 1 〉 L 2 ( Ω , A ) + 1 2 〈 e 2 , M 2 e 2 〉 L 2 ( Ω , B ) (17)</p><p>and a linear hyperbolic pHs (10) can be expressed as:</p><p>[ M 1 0 0 M 2 ] ( ∂ t e 1 ∂ t e 2 ) = [ 0 − L * L 0 ] ( e 1 e 2 ) ,   ( u ∂ y ∂ ) = [ 0 Γ ⊥ Γ 0 0 ] ( e 1 e 2 ) . (18)</p><p>In this particular case, the constitutive relations needed for system (10) to be well-defined are given by (15), and then directly included in (18). In Sections 3.2 and 3.3, it will be shown that PFEM leads directly to a finite-dimensional pHs of the form (1) with R ( x ) = 0 . This simplification considerably facilitates the solution in time, as (1) is an Ordinary Differential Equation (ODE). Indeed, some dissipation phenomena will induce a differential-algebraic structure on the problem, for example dissipative effects due to an unbounded (e.g. elliptic) operator (see Remark 5).</p><p>Parabolic systems</p><p>In this case, the first flow f 1 still represents a dynamics ∂ t α 1 of the energy variable α 1 . The Hamiltonian then reads H = H ( α 1 ) , and its variational derivative gives the co-energy variable e 1 = δ α 1 H .</p><p>The second flow f 2 represents an extra flow related to the effort variable e 2 appearing in the dynamics of the energy variable α 1 . The relation is given implicitly by a mapping G as G ( f 2 , e 2 ) = 0 . Then, pHs (10) of parabolic type is expressed as:</p><p>( ∂ t α 1 f 2 ) = [ 0 − L * L 0 ] ( δ α 1 H e 2 ) ,   ( u ∂ y ∂ ) = [ 0 Γ ⊥ Γ 0 0 ] ( δ α 1 H e 2 ) ,   G ( f 2 , e 2 ) = 0. (19)</p><p>In Section 3.4, an example of a parabolic-type pHs (11) is studied. It will be shown that the PFEM structure-preserving discretization of such a system naturally leads to a finite-dimensional pHDAE. Again, the power balance is naturally embedded in the Stokes-Dirac structure defined by (10):</p><p>d d t H ( α 1 ) = − 〈 f 2 , e 2 〉 L 2 ( Ω ) + 〈 y ∂ , u ∂ 〉 ∂ Ω . (20)</p><p>In practice, this becomes explicit with the constitutive relation G ( f 2 , e 2 ) = 0 as it will be seen in Section 3.4 (and more generally in [<xref ref-type="bibr" rid="scirp.109919-ref9">9</xref>] [<xref ref-type="bibr" rid="scirp.109919-ref10">10</xref>] ). Note that this latter relation has to be accurately discretized to ensure that the discretized power balance mimics the continuous one.</p><p>Remark 5. By adding resistive port(s), dissipation(s) can easily be taken into account (both internal or at the boundary), as done in the finite-dimensional case via R ( x ) playing the role of a output feedback gain matrix. In this case, the system becomes a parabolic system, the dissipative constitutive relation being represented by G . See [<xref ref-type="bibr" rid="scirp.109919-ref30">30</xref>] [<xref ref-type="bibr" rid="scirp.109919-ref31">31</xref>] for a detailed discussion about structure-preserving discretization of dissipative systems.</p></sec></sec><sec id="s3"><title>3. The Partitioned Finite Element Method (PFEM)</title><p>We are now in a position to introduce a general methodology to discretize infinite-dimensional pHs in a structure-preserving manner. The main contribution in this section is the application of PFEM to a general abstract class of pHs, unifying the previously published results. This generality is notably of particular interest for the development of a well-structured software for the numerical simulations of physics-based models. The power balances (14), (20) are deeply linked to a linear underlying Stokes-Dirac. The main idea of PFEM is to mimic this structure, in order to obtain a discretized copy of these power balances as (2). This systematically translates the Stokes-Dirac structure into a finite-dimensional Dirac structure. The compatible discretization, with respect to this Dirac structure, of the constitutive relations allows to mimic the continuous power-balance. This method goes under the name Partitioned Finite Element Method (PFEM), and was originally presented in [<xref ref-type="bibr" rid="scirp.109919-ref8">8</xref>]. The procedure is a natural extension of MFEM to pHs and boils down to these three simple steps:</p><p>1) System (5) is written in weak form;</p><p>2) The integration by parts (7) is carried out on a partition of the system (5) to make the appropriate boundary control appear;</p><p>3) A Galerkin method is employed to obtain a finite-dimensional system. For the approximation basis, the finite element method is used here but spectral methods can be chosen as well.</p><p>This strategy of structured discretization in order to mimic the continuous power balance at the discrete level has been addressed for closed abstract linear hyperbolic systems in [<xref ref-type="bibr" rid="scirp.109919-ref21">21</xref>]. This pioneering work already proposed the key point of PFEM: the integration by parts on a partition of the weak formulation of the system. The author called the obtained systems primal-dual or dual-primal formulation, depending on which line is integrated by parts. In the port-Hamiltonian formalism, systems are opened with control and observation. It appears that [<xref ref-type="bibr" rid="scirp.109919-ref21">21</xref>] admits PFEM as a generalization for structure-preserving space discretization. The choice of a control in the pHs community is called a causality, and primal-dual or dual-primal correspond in this work to the canonical causalities (10) and (11) respectively.</p><sec id="s3_1"><title>3.1. General Strategy</title><p>Consider smooth test functions v 1 and v 2 and the weak form of (5):</p><p>〈 v 1 , f 1 〉 L 2 ( Ω , A ) = 〈 v 1 , − L * e 2 〉 L 2 ( Ω , A ) , 〈 v 2 , f 2 〉 L 2 ( Ω , B ) = 〈 v 2 , L e 1 〉 L 2 ( Ω , B ) . (21)</p><p>Next the integration by parts is performed either on the first or on the second line (the system is partitioned), depending on the causality.</p><p>Integration by parts of the term 〈 v 1 , − L * e 2 〉 L 2 ( Ω , A )</p><p>In this case case, using (7), it is obtained:</p><p>− 〈 v 1 , L * e 2 〉 L 2 ( Ω , A ) = − 〈 L v 1 , e 2 〉 L 2 ( Ω , B ) + 〈 Γ 0 v 1 , Γ ⊥ e 2 〉 ∂ Ω .</p><p>The boundary variable e ∂ : = Γ ⊥ e 2 in (10) explicitly appears. Then the equation defining the corresponding f ∂ : = Γ 0 e 1 is put into weak form to obtain the final system for all smooth test functions v 1 , v 2 , and v ∂ :</p><p>〈 v 1 , f 1 〉 L 2 ( Ω , A ) = − 〈 L v 1 , e 2 〉 L 2 ( Ω , B ) + 〈 Γ 0 v 1 , e ∂ 〉 ∂ Ω , 〈 v 2 , f 2 〉 L 2 ( Ω , B ) = 〈 v 2 , L e 1 〉 L 2 ( Ω , B ) , 〈 v ∂ , f ∂ 〉 ∂ Ω = − 〈 v ∂ , Γ 0 e 1 〉 ∂ Ω . (22)</p><p>Now, a Galerkin discretization is introduced. Test, energy and co-energy functions with the same subscript are discretized using the same basis, for all t ≥ 0 :</p><p>□ 1 ( t , x ) ≈   □ 1 d ( t , x ) : = ∑ i = 1 N 1   φ 1 i ( x )   □ 1 i ( t ) ,   ∀ x ∈ Ω , □ 2 ( t , x ) ≈   □ 2 d ( t , x ) : = ∑ i = 1 N 2   φ 2 i ( x )   □ 2 i ( t ) ,   ∀ x ∈ Ω , □ ∂ ( t , s ) ≈   □ ∂ d ( t , s ) : = ∑ i = 1 N ∂   ψ ∂ i ( s )   □ ∂ i ( t ) ,   ∀ s ∈ ∂ Ω , (23)</p><p>where □ stands for v, f, and e and φ 1 i ∈ H L , φ 2 i ∈ L 2 ( Ω , B ) , and ψ ∂ i ∈ L 2 ( ∂ Ω , ℝ m ) .</p><p>Remark 6. In general, a discretization in the same basis of either ( f 1 , e 1 ) and ( f 2 , e 2 ) or ( f 1 , f 2 ) and ( e 1 , e 2 ) (as done in [<xref ref-type="bibr" rid="scirp.109919-ref16">16</xref>] ) must be performed. The former is our choice since it directly leads to square mass matrices, while the latter may be more appropriate when dealing for instance with Maxwell’s equations for electromagnetics, see [<xref ref-type="bibr" rid="scirp.109919-ref32">32</xref>] and references therein for details on the difficulties that may then occur.</p><p>Then plugging the approximations into (22), it is computed:</p><p>[ M 1 0 0 0 M 2 0 0 0 M ∂ ] ( f 1 f 2 f ∂ ) = [ 0 − D L Τ B ⊥ D L 0 0 − B ⊥ Τ 0 0 ] ( e 1 e 2 e ∂ ) , (24)</p><p>where vectors f 1 , f 2 , e 1 , e 2 , f ∂ , and e ∂ are given by the column-wise concatenation of the respective degrees of freedom of f 1 d , f 2 d , e 1 d , e 2 d , f ∂ d , and e ∂ d , and where the matrices are defined as follows:</p><p>M 1 i j = 〈 φ 1 i , φ 1 j 〉 L 2 ( Ω , A ) , M 2 m n = 〈 φ 2 m , φ 2 n 〉 L 2 ( Ω , B ) , M ∂ l k = 〈 ψ ∂ l , ψ ∂ k 〉 ∂ Ω ,   D L m i = 〈 φ 2 m , L φ 1 i 〉 L 2 ( Ω , B ) , B ⊥ i k = 〈 Γ 0 φ 1 i , ψ ∂ k 〉 ∂ Ω , (25)</p><p>where 1 ≤ i , j ≤ N 1 , 1 ≤ m , n ≤ N 2 , and 1 ≤ l , k ≤ N ∂ . System (24) is a kernel representation of a Dirac structure as in (3) (see Remark 1).</p><p>Remark 7. Note that matrices D L and B ⊥ are not square.</p><p>The discrete Hamiltonian is naturally defined as the continuous one evaluated in the discrete energy variables. As done in Section 2, it is easier to distinguish the linear hyperbolic from the parabolic case.</p><p>Hyperbolic case</p><p>In this setting, the flows f i , i = 1,2 , are given by the time derivative of the energy variables α i . Hence, the discretization of these energy variables is given by:</p><p>α i d ( t , x ) = α i d ( 0, x ) + ∫ 0 t     f i d ( s , x ) d s ,   i = 1,2.</p><p>The discrete Hamiltonian is then defined by H d ( α _ 1 , α _ 2 ) : = H ( α 1 d , α 2 d ) , where α _ 1 and α _ 2 are the column-wise concatenation of the time varying coefficients of α 1 d and α 2 d in their respective basis.</p><p>Definition 2. The discretization of the constitutive relations is said to be compatible if and only if:</p><p>∇ H d = ( ∇ α _ 1 H d ∇ α _ 2 H d ) = [ M 1 0 0 M 2 ] ( e 1 e 2 ) .</p><p>Proposition 1. If the discretisation of the constitutive relations is compatible, the discrete power balance reads at the discrete level:</p><p>d d t H d = − ( e ∂ ) Τ   M ∂ f ∂ ,</p><p>which perfectly mimics the continuous identity.</p><p>Proof 1. A straightforward computation gives:</p><p>d d t H d = ( ∇ α _ 1 H d ) Τ α ˙ _ 1 + ( ∇ α _ 2 H d ) Τ α ˙ _ 2 = ( M 1 e 1 ) Τ   f 1 + ( M 2 e 2 ) Τ   f 2 = ( e 1 ) Τ   M 1 f 1 + ( e 2 ) Τ   M 2 f 2 = − ( e ∂ ) Τ   M ∂ f ∂ ,</p><p>where the symmetry of the mass matrices and the Dirac structure have been used.</p><p>Remark 8. In the special case of linear hyperbolic systems, it has been seen that the co-energy formulation allows to take the constitutive relations into account directly in the differential equations. Applying PFEM to (18) then leads to an ODE, and the constitutive relations are then automatically discretized in a compatible manner.</p><p>Parabolic case</p><p>In this setting, only the flow f 1 is the time derivative of the energy variable α 1 . This energy variable is discretized as in the hyperbolic case. The discrete Hamiltonian is then defined by H d ( α _ 1 ) : = H ( α 1 d ) .</p><p>Definition 3. The discretization of the constitutive relation is said to be compatible if and only if: ∇ H d = M 1 e 1 .</p><p>Proposition 2. If the discretisation of the constitutive relations is compatible, the discrete power balance reads at the discrete level:</p><p>d d t H d = − e 2 Τ M 2 f 2 − e ∂ Τ M ∂ f ∂ ,</p><p>which perfectly mimics the continuous identity.</p><p>Proof 2. The proof can be derived similarly as in the hyperbolic case.</p><p>Remark 9. Of course, an accurate discretization of the implicit constitutive relation G ( f 2 , e 2 ) = 0 is also required to conclude. This will be illustrated in Section 3.4.</p><p>Integration by parts of the term 〈 v 2 , L e 1 〉 L 2 ( Ω , B )</p><p>Using (7), it comes:</p><p>〈 v 2 , L e 1 〉 L 2 ( Ω , B ) = 〈 L * v 2 , e 1 〉 L 2 ( Ω , A ) + 〈 Γ ⊥ v 2 , Γ 0 e 1 〉 ∂ Ω .</p><p>Now the boundary variable e ∂ : = Γ 0 e 1 explicitly appears, i.e. the causality considered in (11). The weak formulation then reads:</p><p>〈 v 1 , f 1 〉 L 2 ( Ω , A ) = − 〈 v 1 , L * e 2 〉 L 2 ( Ω , A ) , 〈 v 2 , f 2 〉 L 2 ( Ω , B ) = 〈 L * v 2 , e 1 〉 L 2 ( Ω , A ) − 〈 Γ ⊥ v 2 , e ∂ 〉 ∂ Ω , 〈 v ∂ , f ∂ 〉 ∂ Ω = 〈 v ∂ , Γ ⊥ e 2 〉 ∂ Ω . (26)</p><p>Plugging the approximations (23) into (26), this time with φ 1 i ∈ L 2 ( Ω , A ) , φ 2 i ∈ H − L * , and ψ ∂ i ∈ L 2 ( ∂ Ω , ℝ m ) , gives the following kernel representation of a finite-dimensional Dirac structure:</p><p>[ M 1 0 0 0 M 2 0 0 0 M ∂ ] ( f 1 f 2 f ∂ ) = [ 0 D − L * 0 − D − L * Τ 0 B 0 0 − B 0 Τ 0 ] ( e 1 e 2 e ∂ ) , (27)</p><p>where the matrices D − L * and B 0 are defined by:</p><p>D − L * i m = 〈 φ 1 i , − L ∗ φ 2 m 〉 L 2 ( Ω , A ) ,   B 0 m k = 〈 Γ ⊥ φ 2 m , ψ ∂ k 〉 ∂ Ω . (28)</p><p>The power balances proven above still hold true with this causality, where the role played by e ∂ and f ∂ have been switched.</p><p>In the sequel, this methodology is applied to the wave equation, the Mindlin-Reissner plate model and the heat equation. These models have been chosen to demonstrate the versatility of our methodology. The wave equation is the prototype of linear hyperbolic systems, and the first example treated by PFEM [<xref ref-type="bibr" rid="scirp.109919-ref8">8</xref>]. The Mindlin model combines wave dynamics and plane elastodynamics, and requires the introduction of tensor-valued variables. Finally, the heat equation is the prototype of parabolic systems, and leads to a pHs with intrinsic algebraic constraint, namely, to a pHDAE.</p></sec><sec id="s3_2"><title>3.2. The Wave Equation</title><p>The wave equation is a well-known model, used as the first example of linear hyperbolic systems in many lecture notes and books. This work is no exception to the rule. However, to account for more realistic physics, let us consider the heterogeneous and anisotropic multidimensional wave equation. The equation reads (see [<xref ref-type="bibr" rid="scirp.109919-ref33">33</xref>] ):</p><p>ρ ∂ 2 w ∂ t 2 = div ( T   grad ( w ) ) ,   ( x , t ) ∈ Ω &#215; [ 0, t end ] ,   Ω ⊂ ℝ N , (29)</p><p>where ρ is the mass density (bounded from above and below), T is the tensorial Young modulus (symmetric and positive definite) and w is the deflection from the equilibrium.</p><p>Let us denote α p : = ρ ∂ w ∂ t the linear momentum and α q : = grad ( w ) the</p><p>strain, as energy variables. Hence the Hamiltonian is given as the total energy (summing kinetic and potential energies) by:</p><p>H = 1 2 ∫ Ω { α p 2 ρ + α q ⋅ ( T α q ) } d Ω . (30)</p><p>The co-energy variables are by definition the variational derivatives of H with respect to the energy variables, i.e.:</p><p>e p : = δ α p H = α p ρ = w t ,   e q : = δ α q H = T α q = T   grad ( w ) , (31)</p><p>the velocity and stress. With these notations, Equation (29) rewrites:</p><p>∂ ∂ t ( α p α q ) = [ 0 div grad 0 ] ( e p e q ) , (32)</p><p>together with the constitutive relations given in (31).</p><p>Let us denote:</p><p>e 1 : = e p ,     e 2 : = e q ,     M 1 : = ρ ,     M 2 : = T − 1 ,</p><p>L : = grad ,     Γ ⊥ : = γ ⊥ = γ 0 ⋅ n ,     Γ 0 : = γ 0 ,</p><p>where γ 0 is the Dirichlet trace operator. Then the Hamiltonian (30) rewrites as (17). The wave equation (29) with Neumann boundary control u ∂ = γ ⊥ ( e q ) is given by (18).</p><p>The application of PFEM directly gives:</p><p>[ M ρ 0 0 M T − 1 ] d d t ( e 1 e 2 ) = [ 0 − D grad Τ D grad 0 ] ( e 1 e 2 ) + [ B ⊥ 0 ] u ∂ M ∂ y ∂ = [ B ⊥ Τ 0 ] ( e 1 e 2 ) , (33)</p><p>where:</p><p>M ρ i j : = 〈 φ 1 i , ρ   φ 1 j 〉 L 2 ( Ω , ℝ ) ,   M T − 1 k l : = 〈 φ 2 k , T − 1 φ 2 l 〉 L 2 ( Ω , ℝ N ) ,</p><p>are the discretizations of the operators � 1 and � 2 respectively.</p></sec><sec id="s3_3"><title>3.3. The Mindlin Plate Model</title><p>The Mindlin model is a generalization to the 2D case of the Timoshenko beam model and is expressed by a system of two coupled PDEs (see [<xref ref-type="bibr" rid="scirp.109919-ref34">34</xref>] ):</p><p>( ρ b ∂ 2 w ∂ t 2 = div ( q ) + f ,   ( x , t ) ∈ Ω &#215; [ 0, t end ] ,   Ω ⊂ ℝ 2 , ρ b 3 12 ∂ 2 θ ∂ t 2 = q + Div ( M ) + t , (34)</p><p>where ρ is the mass density, b the plate thickness, w the vertical displacement, θ = ( θ x , θ y ) Τ collects the deflection of the cross section along axes x and y respectively. The fields f , τ represent distributed forces and torques. Variables M , q represent the momenta tensor and the shear stress. Hooke’s law relates those to the curvature tensor and shear deformation vector:</p><p>M : = D b K ∈ S , q : = D s γ ,   K : = Grad ( θ ) ∈ S , γ : = grad ( w ) − θ .</p><p>D s : = E Y b K sh 2 ( 1 + ν ) is the shear rigidity coefficient, where E Y is the Young modulus, ν is the Poisson modulus, K sh is the shear correction factor. Tensor D b is the bending stiffness:</p><p>D b ( ⋅ ) = E Y b 3 12 ( 1 − ν 2 ) [ ( 1 − ν ) ( ⋅ ) + ν Tr ( ⋅ ) ] . (35)</p><p>An appropriate selection of the energy variables is the following [<xref ref-type="bibr" rid="scirp.109919-ref7">7</xref>] [<xref ref-type="bibr" rid="scirp.109919-ref35">35</xref>]:</p><p>α w = ρ b ∂ t w ,   α θ : = ρ b 3 12 ∂ t θ ,   A κ : = K ,   α γ : = γ . (36)</p><p>The Hamiltonian H (total energy) is expressed in terms of energy variables as:</p><p>H = 1 2 ∫ Ω { 1 ρ b α w 2 + 12 ρ b 3 ‖ α θ ‖ 2 + A κ : ( D b A κ ) + D s ‖ α γ ‖ 2 } Ω , (37)</p><p>where A : B denotes the tensor contraction. The co-energy variables are defined as follows:</p><p>e w : = δ α w H = ∂ t w ,   e θ : = δ α θ H = ∂ t θ , E κ : = δ A κ H = M ,   e γ : = δ α γ H = q . (38)</p><p>System (34) is then expressed in port-Hamiltonian form as [<xref ref-type="bibr" rid="scirp.109919-ref7">7</xref>] (forces and torques have been omitted for simplicity):</p><p>∂ ∂ t ( α w α θ A κ α γ ) = [ 0 0 0 div 0 0 Div I 2 &#215; 2 0 Grad 0 0 grad − I 2 &#215; 2 0 0 ] ( e w e θ E κ e γ ) . (39)</p><p>By applying the divergence theorem, the energy rate is expressed as the duality product of the boundary variables:</p><p>d H d t = 〈 ∂ t α w , e w 〉 L 2 ( Ω , ℝ ) + 〈 ∂ t α θ , e θ 〉 L 2 ( Ω , ℝ 2 )       + 〈 ∂ t A κ , E κ 〉 L 2 ( Ω , S ) + 〈 ∂ t α γ , e γ 〉 L 2 ( Ω , ℝ 2 ) , = 〈 γ 0 e w , γ ⊥ e γ 〉 ∂ Ω + 〈 γ 0 e θ , γ ⊥ E κ 〉 ∂ Ω = 〈 y ∂ ,1 , u ∂ ,1 〉 ∂ Ω + 〈 y ∂ ,2 , u ∂ ,2 〉 ∂ Ω , (40)</p><p>where:</p><p>u ∂ ,1 = γ ⊥ e γ , u ∂ ,2 = γ ⊥ E κ ,   y ∂ ,1 = γ 0 e w , y ∂ ,2 = γ 0 e θ .</p><p>The traces γ 0 u = u | ∂ Ω ,   γ ⊥ U = U ⋅ n | ∂ Ω correspond to the Dirichlet trace for ℝ d vectors and to the normal trace for ℝ d &#215; d tensors. The mass operators are given by:</p><p>M 1 = [ ρ b 0 0 ρ b 3 12 ] ,   M 2 = [ D b − 1 0 0 D s − 1 ] . (41)</p><p>The L , Γ 0 , and Γ ⊥ operators are:</p><p>L = [ 0 Grad grad − I 2 &#215; 2 ] ,   Γ 0 = [ γ 0 0 0 γ 0 ] ,   Γ ⊥ = [ 0 γ ⊥ γ ⊥ 0 ] . (42)</p><p>Introducing the approximations for the test and co-energy variables:</p><p>Δ w = ∑ i = 1 N w     ϕ w i Δ w i ,   Δ θ = ∑ i = 1 N θ     ϕ θ i Δ θ i , Δ κ = ∑ i = 1 N κ     Φ κ i Δ κ i ,   Δ γ = ∑ i = 1 N γ     ϕ γ i Δ γ i , (43)</p><p>where Δ = { v ,   e } , and for the boundary controls:</p><p>□ ∂ ,1   = ∑ i = 1 N ∂ ,1     ψ ∂ ,1 i □ ∂ ,1 i ,     □ ∂ ,2   = ∑ i = 1 N ∂ ,2     ψ ∂ ,2 i □ ∂ ,2 i , □   = { v , u , y } ,     ψ ∂ ,1 i ∈ ℝ ,     ψ ∂ ,2 i ∈ ℝ 2 , (44)</p><p>PFEM can be applied to obtain:</p><p>Diag [ M ρ h M I θ M D b − 1 M D s − 1 ] ( e ˙ w e ˙ θ e ˙ κ e ˙ γ ) = [ 0 0 0 − D grad Τ 0 0 − D Grad Τ − D 0 Τ 0 D Grad 0 0 D grad D 0 0 0 ] ( e w e θ e κ e γ )                                                       + [ B ⊥ , w 0 0 B ⊥ , θ 0 0 0 0 ] ( u ∂ ,1 u ∂ ,2 ) , Diag [ M ∂ ,1 M ∂ ,2 ] ( y ∂ ,1 y ∂ ,2 ) = [ B ⊥ , w Τ 0 0 0 0 B ⊥ , θ Τ 0 0 ] ( e w e θ e κ e γ ) . (45)</p><p>The notation Diag denotes a block diagonal matrix. The mass matrices M ρ h , M I θ , M C b , M C s are computed as:</p><p>M ρ h i j = 〈 ϕ w i , ρ h ϕ w j 〉 L 2 ( Ω ) , M I θ m n = 〈 ϕ κ m , I θ ϕ κ n 〉 L 2 ( Ω , ℝ 2 ) ,   M D b − 1 p q = 〈 Φ κ p , D b − 1 Φ κ q 〉 L 2 ( Ω , ℝ sym 2 &#215; 2 ) , M D s − 1 r s = 〈 ϕ γ r , D s − 1 ϕ γ s 〉 L 2 ( Ω , ℝ 2 ) , (46)</p><p>where i , j ∈ { 1, N w } ,   m , n ∈ { 1, N θ } ,   p , q ∈ { 1, N κ } ,   r , s ∈ { 1, N γ } . Matrices D grad , D Grad , D 0 assume the form:</p><p>D grad r j = 〈 ϕ γ r , grad ϕ w j 〉 L 2 ( Ω , ℝ 2 ) , D Grad p n = 〈 Φ κ p , Grad ϕ θ n 〉 L 2 ( Ω , ℝ sym 2 &#215; 2 ) ,   D 0 r n = − 〈 ϕ γ r , ϕ θ n 〉 L 2 ( Ω , ℝ 2 ) . (47)</p><p>Matrices B w , B θ , M ∂ ,1 , M ∂ ,2 are computed as:</p><p>B ⊥ , w i g = 〈 γ 0 ϕ w i , ψ ∂ ,1 g 〉 ∂ Ω , B ⊥ , θ m g = 〈 γ 0 ϕ θ m , ψ ∂ ,2 g 〉 ∂ Ω ,   M ∂ ,1 f g = 〈 ψ ∂ ,1 f , ψ ∂ ,1 g 〉 L 2 ( ∂ Ω , ℝ m ) , M ∂ l k = 〈 ψ ∂ ,2 l , ψ ∂ ,2 k 〉 L 2 ( ∂ Ω , ℝ m ) ,   f , g ∈ { 1, N ∂ ,1 } , l , k ∈ { 1, N ∂ ,2 } (48)</p><p>The discrete Hamiltonian is then computed as:</p><p>H d = 1 2 e w Τ M ρ h e w + 1 2 e θ Τ M I θ e θ + 1 2 e κ Τ M D b − 1 e κ + 1 2 e γ Τ M D s − 1 e γ . (49)</p><p>From system (45) the discrete energy rate is readily obtained:</p><p>d H d d t = y ∂ ,1 Τ M ∂ ,1 u ∂ ,1 + y ∂ ,2 Τ M ∂ ,2 u ∂ ,2 . (50)</p><p>The discrete energy rate then mimics its infinite-dimensional counterpart.</p><p>Remark 10. Equivalently a purely mixed formulation can be obtained by integrating by parts the third and fourth lines of (39). In this case, the system of equations gathers together a plane elasticity problem [<xref ref-type="bibr" rid="scirp.109919-ref36">36</xref>] and a wave equation in mixed form. Conforming finite elements for the plane elasticity system on simplicial meshes have been constructed in [<xref ref-type="bibr" rid="scirp.109919-ref37">37</xref>]. The simpler PEERS elements based on a weak symmetry formulation have been proposed in [<xref ref-type="bibr" rid="scirp.109919-ref38">38</xref>]. The PEERS elements have been used in [<xref ref-type="bibr" rid="scirp.109919-ref39">39</xref>] to construct a stable locking-free mixed formulation for the static Mindlin problem.</p></sec><sec id="s3_4"><title>3.4. The Heat Equation</title><p>The heat equation is the simplest example of parabolic system. Instead of rewriting the well-known PDE as a pHs, a direct pHs modelling is presented, as done in [<xref ref-type="bibr" rid="scirp.109919-ref9">9</xref>] [<xref ref-type="bibr" rid="scirp.109919-ref10">10</xref>]. The model is constructed in order to keep apart thermodynamical principles from equations of state. Indeed, the pHs formalism allows to modify the latter, by keeping the structure of the former.</p><p>Let Ω ⊂ ℝ N be a bounded open connected set. Assume that this domain models a rigid body: its volume does not change over time and no chemical reaction is to be found. Let us denote: ρ the mass density, u the internal energy density, J Q the heat flux, T the local temperature, β : = 1 T the reciprocal temperature, s the entropy density, J S : = β J Q the entropy flux, C V : = ( d u d T ) V the isochoric heat capacity.</p><p>The first law of thermodynamic reads:</p><p>ρ ∂ u ∂ t = − div ( J Q ) . (51)</p><p>Under the hypothesis of an inert rigid solid, Gibbs formula reads d u = T d s , giving:</p><p>∂ u ∂ t = T ∂ s ∂ t . (52)</p><p>Defining σ : = grad ( β ) J Q , and seeingu as a function of the entropy density s, Gibbs formula (52) gives:</p><p>ρ ∂ s ∂ t = − div ( J S ) + σ . (53)</p><p>Then σ is the irreversible entropy production.</p><p>In this work, the following constitutive equations of state will be assumed:</p><p>&#183; The rigid body is at room temperature: the Dulong-Petit model is supposed to be satisfied, i.e. u = C V T , with time-invariant C V ;</p><p>&#183; The thermal conduction is given by Fourier’s law, with a symmetric positive tensor λ : J Q = − λ grad ( T ) .</p><p>Thanks to (51) and the equations of state, we easily recover the classical PDE for the temperature T: ρ C V ∂ T ∂ t = div ( λ grad ( T ) ) .</p><p>The “L<sup>2</sup>-energy” ( ∫ Ω     ρ C V T 2 d Ω ) 1 2 is commonly used as Hamiltonian for the heat equation. However, it lacks of a thermodynamical meaning. The internal energy would be more accurate for this physical problem, even though it will rise some difficulties. Nevertheless, the pHs formalism allows dealing with it, and PFEM proves to be powerful enough to discretize the system in a structure-preserving manner even for this choice of Hamiltonian.</p><p>Let the internal energy be seen as a functional of the local entropy as energy variable: α s : = ρ s , then:</p><p>H : = ∫ Ω     ρ u ( α s ) d Ω     .</p><p>The co-energy variable is given by e s : = δ α s H = d ρ u d ρ s = T , the local temperature. Denoting e S : = J S , one can introduce a new flow variable f S such that:</p><p>( ∂ α s ∂ t f S ) = [ 0 − div − grad 0 ] ( e s e S ) + ( σ 0 ) .</p><p>Obviously, f S = − grad ( e s ) . In order to get a formally skew-symmetric operator, let us also introduce an entropy port ( f σ , e σ ) , such that e σ = − σ . Then:</p><p>( ∂ α s ∂ t f S f σ ) = [ 0 − div − 1 − grad 0 0 1 0 0 ] ( e s e S e σ ) . (54)</p><p>Remark 11. As surprising as it can be, in this setting, Fourier’s law appears to be stated in a nonlinear way: e s e S − λ f S = 0 . This comes from the necessity to express the constitutive relations in function of the flows and efforts appearing in the equation defining the Stokes-Dirac structure.</p><p>Remark 12. Two variables have been added to obtain (54), but only one equation naturally appears: f σ = e s . Thus, another equation is needed to close the system: G ( f 2 , e 2 ) = 0 . Here, it is given by the definition of the irreversible entropy production σ : = grad ( β ) J Q , rewritten in the flows and efforts variables. This leads to the nonlinear constitutive relation: f S e S + f σ e σ = 0 .</p><p>Remark 13. Usually the system energy is taken to be ( ∫ Ω     ρ C V T 2 d Ω ) 1 2 , that gives rise to the well-known linear diffusive system. At first glance, our approach may be surprising since it leads to a lossless nonlinear differential-algebraic system. There is indeed a major advantage in doing so, in view of the modelling and discretization of complex systems by interconnection of several pHs. For instance, if one wants to interconnect both thermal and mechanical processes, for the energy exchanges to be consistent, physics must be coherent. When dissipation occurs, through e.g. friction or viscosity, the kinetic energy is converted into internal energy. Hence, for a physically meaningful system, the internal energy is indeed the one to consider.</p><p>Let us define:</p><p>f 1 : = ∂ α s ∂ t ,   f 2 : = ( f S f σ ) ,   e 1 : = e s ,   e 2 : = ( e S e σ ) ,</p><p>and:</p><p>L : = ( − grad 1 ) ,   Γ ⊥ : = ( − γ ⊥ 0 ) ,   Γ 0 : = γ 0 .</p><p>Then, the heat Equation (54) with boundary control e ∂ : = u ∂ = Γ 0 e 1 = γ 0 ( e s ) and boundary observation f ∂ : = − y ∂ = Γ ⊥ e 2 = γ ⊥ ( e S ) rewrites under the form (11). Thus PFEM will be applied with an integration by parts on the second line in this strategy, leading to (27), which rewrites with the current variables:</p><p>Diag [ M s M S M σ M ∂ ] ( d d t α _ s f S f σ − y ∂ ) = [ 0 D − div − M σ 0 − D − div Τ 0 0 B 0 M σ 0 0 0 0 − B 0 Τ 0 0 ] ( e s e S e σ u ∂ ) , (55)</p><p>where:</p><p>M s i j : = 〈 φ 1 i , φ 1 j 〉 L 2 ( ∂ Ω , ℝ ) , M S k l : = 〈 φ S k , φ S l 〉 L 2 ( Ω , ℝ N ) , M σ k ˜ l ˜ : = 〈 φ σ k ˜ , φ σ l ˜ 〉 L 2 ( Ω , ℝ N ) , B 0 k m : = − 〈 Γ ⊥ φ S k , ψ ∂ m 〉 L 2 ( ∂ Ω , ℝ ) ,</p><p>with φ 2 k : = ( φ S k 0 ) if 1 ≤ k ≤ N S , and φ 2 k : = ( 0 φ σ k − N S ) if N S + 1 ≤ k ≤ N S + N σ .</p><p>To be compatible, the discretizations of the constitutive relations are given as follows:</p><p>&#183; Dulong-Petit model reads: M s α _ s = M ρ C V e s , with M ρ C V i j : = 〈 φ 1 i , ρ C V φ 1 j 〉 L 2 ( Ω , ℝ ) ;</p><p>&#183; Following Remark 11, Fourier’s law reads: Λ f S = M e s e S with Λ i j : = 〈 φ S i , λ φ S j 〉 L 2 ( Ω , ℝ N ) and M e s i j : = 〈 φ S i , e s φ S j 〉 L 2 ( Ω , ℝ N ) ;</p><p>&#183; The constitutive law coming from the introduction of the irreversible entropy production, as explained in Remark 12, is taken into account by:</p><p>( e S ) Τ   M S f S + ( e σ ) Τ   M σ f σ = 0. (56)</p><p>Remark 14. In Fourier’s law, the mass matrix M e s depends on the co-energy variable e s . This will rise difficulties for the numerical solution in time.</p><p>To conclude, the structure-preserving property can be appreciated in the following result.</p><p>Proposition 3. Let H d ( α _ s ) : = H ( α s d ) be the discrete Hamiltonian, where α s d is the discretization of the energy variable in the basis φ 1 . It holds:</p><p>d d t H d = u ∂ Τ M ∂ y ∂ ,</p><p>that is the first law of thermodynamics at the discrete level.</p><p>Proof 3. Thanks to the compatible discretization of the Dulong-Petit model, Proposition 2 gives:</p><p>d d t H d = − e 2 Τ M 2 f 2 − e ∂ Τ M ∂ f ∂ .</p><p>By definition of f 2 , e 2 , M 2 , e ∂ , and f ∂ one computes:</p><p>d d t H d = − e 2 Τ M 2 f 2 − e ∂ Τ M ∂ f ∂ , = − ( e S e σ ) Τ [ M S 0 0 M σ ] ( f S f σ ) + u ∂ Τ M ∂ y ∂ , = u ∂ Τ M ∂ y ∂ ,</p><p>thanks to the constitutive relation (56) coming from the irreversible entropy production.</p><p>Remark 15. Fourier’s law does not contribute to the power balance of the internal energy. Nevertheless, such a constitutive relation is needed for the problem to be well-defined.</p><p>Remark 16. The methodology detailed so far is certainly not limited to the previous three examples. Indeed higher-order differential [<xref ref-type="bibr" rid="scirp.109919-ref40">40</xref>], curl operator for Maxwell’s equations [<xref ref-type="bibr" rid="scirp.109919-ref32">32</xref>], nonlinear system [<xref ref-type="bibr" rid="scirp.109919-ref41">41</xref>], and different Hamiltonian choices can be handled as well. For instance, in the case of the heat equation, the entropy or the classical L<sup>2</sup>-norm of the temperature can be alternatively considered as Hamiltonian functional [<xref ref-type="bibr" rid="scirp.109919-ref9">9</xref>] [<xref ref-type="bibr" rid="scirp.109919-ref10">10</xref>] . In addition, mixed boundary conditions can be incorporated either by introducing Lagrange multipliers or by employing a virtual domain decomposition method [<xref ref-type="bibr" rid="scirp.109919-ref42">42</xref>]. As already mentioned, dissipation (both in the domain and on the boundary) can also be considered in this strategy [<xref ref-type="bibr" rid="scirp.109919-ref30">30</xref>] [<xref ref-type="bibr" rid="scirp.109919-ref31">31</xref>]. Hence a very wide class of (nonlinear) multiphysics systems can be discretized in a structure-preserving manner (with well-represented exchanges of energy between the subsystems).</p><p>In the next section we present an ongoing project which has been initiated to prove the efficiency of the PFEM methodology, leveraging well-established and robust software tools for the finite element discretization of partial differential equations and time integration.</p></sec></sec><sec id="s4"><title>4. SCRIMP: Simulation and Control of Interactions in Multi-Physics</title><p>In this section the main features related to the numerical simulation of pHs in the framework of the ongoing project named SCRIMP (Simulation and Control of Interactions in Multi-Physics) are detailed. The aim is to provide a flexible prototype Python code for the numerical simulation of pHs both for research and educational purposes. In addition to numerical experiments proposed later in Section 5, the reader is referred to interactive companion Jupyter notebooks [<xref ref-type="bibr" rid="scirp.109919-ref6">6</xref>] to learn how to numerically solve the model problems introduced in Section 3 with SCRIMP. In the following, the key ideas behind SCRIMP are mentioned and then a specific emphasis on both space and time discretizations is given.</p><sec id="s4_1"><title>4.1. Key Ideas Behind SCRIMP</title><p>In short, the key ideas related to the design of SCRIMP are provided:</p><p>&#183; The Python dynamic programming language has been selected due to its expressiveness and the availability of high-level interfaces to scientific computing software libraries [<xref ref-type="bibr" rid="scirp.109919-ref43">43</xref>];</p><p>&#183; SCRIMP assumes to rely on open-source, external software for the finite-dimensional discretization of partial differential equations;</p><p>&#183; SCRIMP encapsulates the finite-dimensional objects related to the finite element discretization in space (e.g. matrices) to deduce the resulting linear or nonlinear pHs in a generic pHODE/pHDAE form as proposed in [<xref ref-type="bibr" rid="scirp.109919-ref26">26</xref>];</p><p>&#183; For multiphysics problems, this design offers the advantage that discretization in space may be handled by different software components depending on the discipline or on the modelling. The modularity and the object-oriented nature of Python thus offer the flexibility to easily combine the different pHs to deduce the global interconnected system. This is much in line with the mathematical theory of pHs [<xref ref-type="bibr" rid="scirp.109919-ref24">24</xref>]. Furthermore we note that interconnections of different systems (with e.g. the transformer or gyrator transformations [<xref ref-type="bibr" rid="scirp.109919-ref24">24</xref>] ) can be easily incorporated.</p><p>The design of SCRIMP is based on procedural and object-oriented paradigms and thus follows the standard ideas governing most of the numerical PDE software. Whereas a detailed exposition of the design patterns of SCRIMP and its performance will be published elsewhere, concrete illustrations of most of these key ideas can be found in the companion Jupyter notebooks [<xref ref-type="bibr" rid="scirp.109919-ref6">6</xref>]. The description of the current numerical methods related to space and time discretizations available in SCRIMP is given.</p></sec><sec id="s4_2"><title>4.2. Semi-Discretization in Space</title><p>As outlined in Section 3, PFEM relies on an abstract variational formulation written in appropriate finite element spaces.</p><p>To perform the semi-discretization in space, we rely on FEniCS [<xref ref-type="bibr" rid="scirp.109919-ref23">23</xref>], an open-source C++ scientific software library that provides a high-level Python interface. The FEniCS Project is mainly based on a collection of software components targeting the automated solution of partial differential equations via the finite element method. Its core components notably include the Unified Form Language (UFL) [<xref ref-type="bibr" rid="scirp.109919-ref44">44</xref>], the FEniCS Form Compiler (FFC) [<xref ref-type="bibr" rid="scirp.109919-ref45">45</xref>] and the finite element library DOLFIN [<xref ref-type="bibr" rid="scirp.109919-ref46">46</xref>], which contains various types of conforming finite element methods, e.g., nodal Lagrangian finite elements for grad-conforming approximations or non non-nodal finite elements (e.g., Raviart-Thomas spaces for div-conforming approximations) as well. These families of finite elements are notably required to tackle the discretization in space of our core problems.</p><p>A key point to facilitate the generic implementation of PFEM is the use of UFL. UFL is indeed an expressive domain-specific language for abstractly representing (finite element) variational formulations of differential equations. In particular, this language defines a syntax for the integration of variational forms over various domains. This simply leads to an expressive implementation that is close to the abstract mathematical formulations presented in Section 3. The FEniCS Form Compiler FFC then generates specialized C++ code from the symbolic UFL representation of variational forms and finite element spaces. The combination of these core elements makes FEniCS a versatile and efficient software for the finite element approximation of partial differential equations as outlined in [<xref ref-type="bibr" rid="scirp.109919-ref47">47</xref>]. Additionally, FEniCS also provides an interface for state-of-the-art linear solvers and preconditioners from freely available third-party libraries such as PETSc [<xref ref-type="bibr" rid="scirp.109919-ref48">48</xref>]. This last feature may be especially useful to handle the numerical simulation of large-scale pHs.</p></sec><sec id="s4_3"><title>4.3. Time Integration Methods</title><p>As outlined in Section 3, the semi-discretization in space of the resulting pHs leads to systems of either ordinary differential equations (ODE) or differential algebraic equations (DAE). Hence reliable and accurate time integration methods must be provided.</p><p>To offer a large panel of numerical methods, a high-level interface to well-established time integration libraries is provided in SCRIMP. Concerning the numerical solution of ODEs, we provide light interfaces to the Assimulo library [<xref ref-type="bibr" rid="scirp.109919-ref49">49</xref>] and to the SciPy time integration method scipy.integrate.solve_ivp<sup>1</sup> that both include standard multistep and one-step methods for stiff and non-stiff ordinary differential equations given in explicit form y ′ = f ( t , y ) with y ( t 0 ) = y 0 where t 0 and y 0 denote the initial time and initial condition, respectively. This formulation requires the solution of linear systems of equations involving sparse finite element mass matrices. State-of-the-art sparse direct solvers based on Gaussian factorization are used for that purpose. Through Assimulo, the popular CVODE<sup>2</sup> solver from Sundials [<xref ref-type="bibr" rid="scirp.109919-ref50">50</xref>] is also accessible. For nonstiff problems, CVODE relies on the Adams-Moulton formulas, with the order varying between 1 and 12. For stiff problems, CVODE includes schemes based on Backward Differentiation Formulas (BDFs) with order varying between 1 and 5. In addition, we also propose standalone implementations of symplectic time integration methods such as the second order accurate Stormer-Verlet method.</p><p>The interface to Assimulo also allows one to handle the numerical solution of linear DAEs through the use of the Sundials IDA solver<sup>3</sup>. IDA is a package for the solution of differential algebraic equation systems written in the form F ( t , y , y ′ ) = 0 with y ( t 0 ) = y 0 . The integration method in IDA is based on variable-order, variable-coefficient BDF in fixed-leading-coefficient form, where the method order varies between 1 and 5. We note that setting the initial conditions properly is of utmost importance for a DAE solver. To do so, we rely on the IDA_YA_YDP_INIT method to find consistent initial conditions for the time integration. We refer the reader to ( [<xref ref-type="bibr" rid="scirp.109919-ref50">50</xref>], Section 2.3] for additional details on IDA. As standalone methods, we have considered the second-order accurate Stormer-Verlet and fourth-order accurate Runge-Kutta (RK4) methods for the solution of linear DAEs.</p><p>To the best of our knowledge, open-source libraries for the solution of general nonlinear differential algebraic equations with high-level Python interfaces are not yet available. Hence a simple forward in time integration method for the solution of the nonlinear pHDAE related to the energy formulation of the heat equation problem has been provided; see [<xref ref-type="bibr" rid="scirp.109919-ref51">51</xref>] for illustrations and discussion. As a future direction, we plan to investigate the potential of the PETSc’s time stepping library TS [<xref ref-type="bibr" rid="scirp.109919-ref52">52</xref>] to be able to tackle the solution of large-scale pHDAE systems.</p></sec><sec id="s4_4"><title>4.4. Model Reduction of Port-Hamiltonian Systems</title><p>Structure-preserving model reduction is of significant importance for stability analysis, optimization or control of problems related to pHs. Hence structure-preserving model reduction algorithms have been implemented in SCRIMP. In particular, the structure-preserving model reduction algorithm (Algorithm 1) proposed in [<xref ref-type="bibr" rid="scirp.109919-ref53">53</xref>] has been selected in the pHODE case. We refer the reader to [<xref ref-type="bibr" rid="scirp.109919-ref6">6</xref>] for an illustration, where the model reduction of the pHs related to the wave equation problem is considered. While for linear pHDAE systems consolidated methodologies have been proposed (see, e.g., [<xref ref-type="bibr" rid="scirp.109919-ref54">54</xref>] ), structure-preserving model reduction for general nonlinear differential algebraic systems remains to be explored, to the best of our knowledge. This is a significant research direction to be considered within SCRIMP in a near future.</p></sec></sec><sec id="s5"><title>5. Numerical Simulations</title><p>In this section, PFEM is applied to the pHs presented in Section 3. We specifically learn how to define and solve those problems with SCRIMP. These tutorials introduce the methodology step-by-step and are supposed to be self-contained and independent from the others. We refer the reader to the companion Jupyter notebooks [<xref ref-type="bibr" rid="scirp.109919-ref6">6</xref>] for additional information.</p><sec id="s5_1"><title>5.1. Anisotropic Heterogeneous Wave Equation</title><p>We first recall the continuous problem related to the anisotropic heterogeneous wave equation, enriched with internal and boundary damping, and tackle the semi-discretization in space of the port-Hamiltonian system through the PFEM methodology. This discretization leads to a pHODE formulation as explained in Section 3.2. After time discretization, we perform a numerical simulation to obtain an approximation of the space-time solution.</p><sec id="s5_1_1"><title>5.1.1. Problem Statement</title><p>We consider the two-dimensional heterogeneous anisotropic wave equation with impedance boundary condition defined for all ( t ≥ 0 ) as:</p><p>ρ ( x ) ∂ 2 ∂ t 2 w ( t , x ) − div ( T ( x ) ⋅ g r a d   w ( t , x ) ) = − ε ( x ) ∂ t w ( t , x ) ,   x ∈ Ω ,</p><p>Z ( x ) ( T ( x ) ⋅ g r a d   w ( t , x ) ) ⋅ n + ∂ t w ( t , x ) = 0,   x ∈ ∂ Ω ,</p><p>w ( 0, x ) = w 0 ( x ) ,   x ∈ Ω , t = 0</p><p>∂ t w ( 0, x ) = w 1 ( x ) ,   x ∈ Ω , t = 0,</p><p>with Ω ⊂ ℝ 2 an open bounded spatial domain with Lipschitz-continuous boundary ∂ Ω . We consider here a rectangular shaped domain for Ω . w ( t , x ) denotes the deflection from the equilibrium position at point x ∈ Ω and time t. ρ ∈ C ∞ ( Ω ) (positive and bounded from below) denotes the mass density, T ∈ C ∞ ( Ω ) 2 &#215; 2 (symmetric and coercive) the Young’s elasticity modulus, ε a positive viscous damping parameter and Z ( x ) is the positive impedance function defined on ∂ Ω , respectively.</p></sec><sec id="s5_1_2"><title>5.1.2. Setup</title><p>We initialize here the Python object related to the Wave_2D class of SCRIMP. This object will be used throughout this section.</p><disp-formula id="scirp.109919-formula6"><graphic  xlink:href="//html.scirp.org/file/8-1722302x342.png"  xlink:type="simple"/></disp-formula></sec><sec id="s5_1_3"><title>5.1.3. Constants</title><p>We define the constants related to the rectangular domain Ω . The coordinates of the bottom left ( x 0 , y 0 ) and top right ( x L , y L ) corners of the rectangle are required.</p><disp-formula id="scirp.109919-formula7"><graphic  xlink:href="//html.scirp.org/file/8-1722302x346.png"  xlink:type="simple"/></disp-formula><p>We then define the time interval related to the time discretization. t i , t f denote the initial and final time instants respectively.</p><disp-formula id="scirp.109919-formula8"><graphic  xlink:href="//html.scirp.org/file/8-1722302x348.png"  xlink:type="simple"/></disp-formula><p>We specify that we choose the Assimulo external library to be used later for the time integration of the resulting ODE and provide the value of the time step. This should be considered as a reference value since adaptative methods in time can be used later.</p><disp-formula id="scirp.109919-formula9"><graphic  xlink:href="//html.scirp.org/file/8-1722302x349.png"  xlink:type="simple"/></disp-formula></sec><sec id="s5_1_4"><title>5.1.4. FEniCS Expressions Definition</title><p>For the finite element discretization of the pHs, the FEniCS library is used in the Wave_2D class of SCRIMP. Hence to properly use FEniCS expression definition, we provide the definition of the different variables in C++ code given in strings. We first specify the mass density as a function depending on the space coordinates. Hence in this expression, x [ 0 ] corresponds to the first spatial variable and x [ 1 ] to the second one, respectively.</p><disp-formula id="scirp.109919-formula10"><graphic  xlink:href="//html.scirp.org/file/8-1722302x352.png"  xlink:type="simple"/></disp-formula><p>We specify the Young’s elasticity modulus tensor. Three components are only required due to the symmetry property of this tensor.</p><disp-formula id="scirp.109919-formula11"><graphic  xlink:href="//html.scirp.org/file/8-1722302x353.png"  xlink:type="simple"/></disp-formula><p>We finally set the impedance function Z defined on the boundary of the domain. Here a constant value is used on ∂ Ω . We also provide the viscous damping parameter (eps).</p><disp-formula id="scirp.109919-formula12"><graphic  xlink:href="//html.scirp.org/file/8-1722302x355.png"  xlink:type="simple"/></disp-formula><p>Finally we specify the initial conditions of the problem related to the energy variables and to the deflection.</p><disp-formula id="scirp.109919-formula13"><graphic  xlink:href="//html.scirp.org/file/8-1722302x356.png"  xlink:type="simple"/></disp-formula></sec><sec id="s5_1_5"><title>5.1.5. Problem at the Continuous Level</title><p>We are now able to completely define the problem at the continuous level. We start by specifying that the computational domain Ω is of rectangular shape. To do so, we provide the coordinates of the bottom left and top right corners to the Wave_2D object.</p><disp-formula id="scirp.109919-formula14"><graphic  xlink:href="//html.scirp.org/file/8-1722302x358.png"  xlink:type="simple"/></disp-formula><p>Remark 17. General Gmsh meshes can be imported by the user. However, for the time being, the library does not allow the treatment of mixed boundary conditions on generic meshes.</p><p>We provide next the time integration interval.</p><disp-formula id="scirp.109919-formula15"><graphic  xlink:href="//html.scirp.org/file/8-1722302x359.png"  xlink:type="simple"/></disp-formula><p>We then provide the physical parameters related to the wave equation: the mass density, the Young’s elasticity modulus tensor and the impendance function, respectively.</p><disp-formula id="scirp.109919-formula16"><graphic  xlink:href="//html.scirp.org/file/8-1722302x360.png"  xlink:type="simple"/></disp-formula><p>We then specify the complete modelling for the damping and thus provide information related to the impedance function and viscous damping parameter, respectively.</p><disp-formula id="scirp.109919-formula17"><graphic  xlink:href="//html.scirp.org/file/8-1722302x361.png"  xlink:type="simple"/></disp-formula><p>The user has to provide the temporal and spatial parts of the boundary control function (Ub_tm0 and Ub_sp0, respectively).</p><disp-formula id="scirp.109919-formula18"><graphic  xlink:href="//html.scirp.org/file/8-1722302x362.png"  xlink:type="simple"/></disp-formula><p>Finally we provide the initial conditions for the ODE.</p><disp-formula id="scirp.109919-formula19"><graphic  xlink:href="//html.scirp.org/file/8-1722302x363.png"  xlink:type="simple"/></disp-formula></sec><sec id="s5_1_6"><title>5.1.6. Problem at the Discrete Level in Space and Time</title><p>We start by selecting the computational mesh which is generated with Gmsh<sup>4</sup> and saved as a.xml file. Here the parameter rfn_num corresponds to a mesh refinement parameter.</p><disp-formula id="scirp.109919-formula20"><graphic  xlink:href="//html.scirp.org/file/8-1722302x365.png"  xlink:type="simple"/></disp-formula><p>To perform the discretization in space, we must first specify the conforming finite element approximation spaces to be used (see [<xref ref-type="bibr" rid="scirp.109919-ref20">20</xref>] ). Concerning the energy variables associated with the strain, we select the Raviart-Thomas finite element family known as R T k consisting of vector functions with a continuous normal component across the interfaces between the elements of a mesh. For the energy variables associated with the linear momentum and the boundary variables, we choose the classical P k finite element approximation. The given combination of parameters rt_order=0, p_order=1, b_order=1 corresponds to the R T 0 P 1 P 1 family.</p><disp-formula id="scirp.109919-formula21"><graphic  xlink:href="//html.scirp.org/file/8-1722302x369.png"  xlink:type="simple"/></disp-formula><p>We then perform the semi-discretization in space of the weak formulation with PFEM. At the end of this stage, the complete formulation of the pHODE is obtained. The different matrices related to the pHODE system are constructed in the Assembly method of the Wave_2D class of SCRIMP and are directly accessible through the object of the Wave_2D class. The finite element assembly relies on the variational formulation of PFEM and exploits the level of abstraction provided by the UFL used in FEniCS, leading to a code that is close to the mathematical formulation. The divergence based formulation is selected leading to a pHODE system. In other words, the integration by parts will be performed on the second line of (32).</p><disp-formula id="scirp.109919-formula22"><graphic  xlink:href="//html.scirp.org/file/8-1722302x370.png"  xlink:type="simple"/></disp-formula><p>To perform the time integration of the pHODE, we first need to interpolate both the control function on the boundary and the initial data on the appropriate finite element spaces.</p><disp-formula id="scirp.109919-formula23"><graphic  xlink:href="//html.scirp.org/file/8-1722302x371.png"  xlink:type="simple"/></disp-formula><p>Then we specify the parameters related to the time discretization.</p><disp-formula id="scirp.109919-formula24"><graphic  xlink:href="//html.scirp.org/file/8-1722302x372.png"  xlink:type="simple"/></disp-formula></sec><sec id="s5_1_7"><title>5.1.7. Numerical Approximation of the Space-Time Solution</title><p>We are now able to perform the time integration of the resulting pHODE system and deduce the behaviour of both the energy variables and the Hamiltonian with respect to the time and space variables, respectively. Detailed information from the Assimulo library is included after time integration.</p><disp-formula id="scirp.109919-formula25"><graphic  xlink:href="//html.scirp.org/file/8-1722302x373.png"  xlink:type="simple"/></disp-formula><p>5.1.8. Post-ProcessingWe</p><p>represent the two-dimensional mesh with corresponding degrees of freedom for each variable in <xref ref-type="fig" rid="fig1">Figure 1</xref>.</p><disp-formula id="scirp.109919-formula26"><graphic  xlink:href="//html.scirp.org/file/8-1722302x374.png"  xlink:type="simple"/></disp-formula><p>We plot the Hamiltonian function versus time in <xref ref-type="fig" rid="fig2">Figure 2</xref>. Here tspan represents the collection of discrete times due to the possibly adaptative time procedure used in the time integration library.</p><disp-formula id="scirp.109919-formula27"><graphic  xlink:href="//html.scirp.org/file/8-1722302x375.png"  xlink:type="simple"/></disp-formula><p>The behaviour of the deflection is graphically represented at a given time. Here we simply plot the deflection at the final time of the simulation in <xref ref-type="fig" rid="fig3">Figure 3</xref>.</p><disp-formula id="scirp.109919-formula28"><graphic  xlink:href="//html.scirp.org/file/8-1722302x376.png"  xlink:type="simple"/></disp-formula><p>The related Jupyter notebook [<xref ref-type="bibr" rid="scirp.109919-ref6">6</xref>] further illustrates how to obtain a structure-</p><p>preserving reduced model of this port-Hamiltonian system. After application of the model reduction algorithm proposed in [<xref ref-type="bibr" rid="scirp.109919-ref53">53</xref>], a pHODE of reduced size has to be integrated to obtain an approximate solution of the wave propagation problem. This is further illustrated on the simple application detailed in this section. In addition, a supplementary notebook illustrates the numerical simulation of the wave equation problem, when mixed boundary conditions (i.e. Dirichlet and Neumann conditions) on the boundary control function are imposed by Lagrange multipliers [<xref ref-type="bibr" rid="scirp.109919-ref42">42</xref>].</p></sec></sec><sec id="s5_2"><title>5.2. The Mindlin Plate Problem</title><p>We first recall the considered continuous problem related to the Mindlin plate and tackle the semi-discretization in space of the pHs by PFEM. After transformation and time discretization, we perform a numerical simulation to obtain an approximation of the space-time solution. As in Section 5.1, the procedure is described step-by-step and detailed explanations and numerical illustrations are provided.</p><sec id="s5_2_1"><title>5.2.1. Problem Statement</title><p>Consider the Mindlin plate problem defined for all t ≥ 0 as:</p><p>{ ρ b ∂ t t w = div ( q ) ,   x ∈ Ω = { 0, L x } &#215; { 0, L y } , ρ b 3 12 ∂ t t θ = q + Div ( M ) (57)</p><p>with initial conditions:</p><p>w ( 0, x ) = 0, ∂ t w ( 0, x ) = w 1 ( x ) ,   θ ( 0, x ) = 0 , ∂ t θ ( 0, x ) = 0 ,   x ∈ Ω , t = 0, x ∈ Ω , t = 0, (58)</p><p>and boundary conditions:</p><p>w | Γ D = u D ( t ) , q ⋅ n | Γ N = u N ( t ) ,   θ | Γ D = 0 , M ⋅ n | Γ N = 0 ,   Γ D = { x = 0 } , Γ N = { x = L x , y = 0 , y = L y } . (59)</p><p>Mixed boundary conditions are considered in this example. The subsets Γ N ,   Γ D represent the subsets of the boundary where Neumann and Dirichlet conditions hold respectively. The Dirichlet conditions are enforced using Lagrange multipliers. The PFEM discretization then leads to a pHDAE, as explained in [<xref ref-type="bibr" rid="scirp.109919-ref42">42</xref>] for the wave equation. The following expressions have been considered for the initial and boundary conditions:</p><p>w 1 = x y ,   u D = 0.01 ( cos ( 2 π t t f ) − 1 ) , u N = 10 5 sin ( 2 π x L x ) ( 1 − exp − 10 t t f ) . (60)</p></sec><sec id="s5_2_2"><title>5.2.2. Setup</title><p>We initialize here the Python object related to the Mindlin class of SCRIMP. This object will be used throughout this section.</p><disp-formula id="scirp.109919-formula29"><graphic  xlink:href="//html.scirp.org/file/8-1722302x386.png"  xlink:type="simple"/></disp-formula></sec><sec id="s5_2_3"><title>5.2.3. Constants</title><p>We define the constants related to the rectangular domain Ω . The coordinates of the bottom left ( x 0 , y 0 ) = ( 0,0 ) and the top right ( x L , y L ) = ( L x , L y ) corners of the rectangle are required.</p><disp-formula id="scirp.109919-formula30"><graphic  xlink:href="//html.scirp.org/file/8-1722302x390.png"  xlink:type="simple"/></disp-formula><p>As in the previous example, the time interval related to the time discretization is defined as follows:</p><disp-formula id="scirp.109919-formula31"><graphic  xlink:href="//html.scirp.org/file/8-1722302x391.png"  xlink:type="simple"/></disp-formula><p>A Runge-Kutta method for the time integration of the system is prescribed. This method is conditionally stable, so the time-step has to be set accurately to avoid numerical instabilities.</p><disp-formula id="scirp.109919-formula32"><graphic  xlink:href="//html.scirp.org/file/8-1722302x392.png"  xlink:type="simple"/></disp-formula></sec><sec id="s5_2_4"><title>5.2.4. FEniCS Expressions Definition</title><p>The FEniCS library is also used in the Mindlin class of SCRIMP. The coefficients related to the physical parameters of the isotropic plate can be provided as either real numbers or FEniCS expressions.</p><disp-formula id="scirp.109919-formula33"><graphic  xlink:href="//html.scirp.org/file/8-1722302x393.png"  xlink:type="simple"/></disp-formula><p>Similarly the initial vertical condition w 1 can be defined as a string. It represents a C++ code that will be compiled by the Dolfin library of FEniCS.</p><disp-formula id="scirp.109919-formula34"><graphic  xlink:href="//html.scirp.org/file/8-1722302x395.png"  xlink:type="simple"/></disp-formula><p>This means that the initial velocity satisfies w 1 = x y . Note that the initial condition has to be compatible with the boundary conditions. The other initial conditions will be set to zero.</p></sec><sec id="s5_2_5"><title>5.2.5. Problem at the Continuous Level</title><p>We are now able to completely define the problem at the continuous level. We start by specifying that the computational domain Ω is of rectangular shape. To define Ω , we provide the coordinates of the bottom left and top right corners to the Mindlin object.</p><disp-formula id="scirp.109919-formula35"><graphic  xlink:href="//html.scirp.org/file/8-1722302x399.png"  xlink:type="simple"/></disp-formula><p>The time integration interval is then given.</p><disp-formula id="scirp.109919-formula36"><graphic  xlink:href="//html.scirp.org/file/8-1722302x400.png"  xlink:type="simple"/></disp-formula><p>The physical parameters related to the Mindlin plate are set.</p><disp-formula id="scirp.109919-formula37"><graphic  xlink:href="//html.scirp.org/file/8-1722302x401.png"  xlink:type="simple"/></disp-formula><p>Finally the initial conditions in terms of co-energy variables are also set.</p><disp-formula id="scirp.109919-formula38"><graphic  xlink:href="//html.scirp.org/file/8-1722302x402.png"  xlink:type="simple"/></disp-formula></sec><sec id="s5_2_6"><title>5.2.6. Problem at the Discrete Level in Space and Time</title><p>We start by selecting the computational mesh which is generated with FEniCS inner mesh utilities. The first parameter corresponds to a mesh refinement parameter.</p><disp-formula id="scirp.109919-formula39"><graphic  xlink:href="//html.scirp.org/file/8-1722302x403.png"  xlink:type="simple"/></disp-formula><p>To perform the discretization in space, the conforming finite element approximation spaces to be used has to be specified. The finite element for the linear and angular velocity are Lagrange polynomials of order r. The momenta tensor and shear stress are chosen as Discontinuous Galerkin elements of order r − 1 [<xref ref-type="bibr" rid="scirp.109919-ref35">35</xref>]. This choice of finite elements is similar to the one proposed in [<xref ref-type="bibr" rid="scirp.109919-ref55">55</xref>], but a simplicial mesh is used instead of a quadrilateral one. By default, the boundary variables are approximated as Lagrange polynomials of order 1. This can be easily changed through the option family_b for the family, and rb for the degree.</p><disp-formula id="scirp.109919-formula40"><graphic  xlink:href="//html.scirp.org/file/8-1722302x405.png"  xlink:type="simple"/></disp-formula><p>We then perform the semi-discretization in space of the weak formulation with PFEM. At the end of this stage, the complete formulation of the pHDAE is obtained. The different matrices related to the pHDAE system are constructed in the Assembly_Mixed_BC method of the Mindlin class of SCRIMP and are directly accessible through the object of the Mindlin class. The subsets named G1, G2, G3, G4, denote the left, bottom, right and top sides of the rectangle, respectively.</p><p>In SCRIMP the boundary control u ∂ is assumed to take the form:</p><disp-formula id="scirp.109919-formula41"><graphic  xlink:href="//html.scirp.org/file/8-1722302x407.png"  xlink:type="simple"/></disp-formula><p>Its derivative u ˙ ∂ is expressed as:</p><disp-formula id="scirp.109919-formula42"><graphic  xlink:href="//html.scirp.org/file/8-1722302x409.png"  xlink:type="simple"/></disp-formula><p>To integrate in time we need to provide the derivative of the boundary condition. This information is provided by the variables Ub_tm0_dir, Ub_tm1_dir, respectively. This is needed to reduce the resulting DAE of index 2 to index 1.</p><disp-formula id="scirp.109919-formula43"><graphic  xlink:href="//html.scirp.org/file/8-1722302x410.png"  xlink:type="simple"/></disp-formula><p>To perform the time integration of the pHDAE, we first need to interpolate the boundary control function and the initial data on the appropriate finite element spaces.</p><disp-formula id="scirp.109919-formula44"><graphic  xlink:href="//html.scirp.org/file/8-1722302x411.png"  xlink:type="simple"/></disp-formula><p>Finally the specification of the parameters related to the time discretization is made.</p></sec><sec id="s5_2_7"><title>5.2.7. Numerical Approximation of the Space-Time Solution</title><p>For the numerical approximation of the solution of the pHDAE system, the algebraic condition is differentiated. The integrator ‘DAE:RK4_Augmented’ takes as input a pHDAE. Then, it exploits a projection method to express the Lagrange multiplier in terms of the unknown [<xref ref-type="bibr" rid="scirp.109919-ref56">56</xref>], thus reducing the original DAE system into a purely ODE one. This allows employing standard ODE solvers for the time integration, as discussed in Section 5.2.3.</p><disp-formula id="scirp.109919-formula45"><graphic  xlink:href="//html.scirp.org/file/8-1722302x413.png"  xlink:type="simple"/></disp-formula></sec><sec id="s5_2_8"><title>5.2.8. Post-Processing</title><p>Post-processing is performed similarly as in Section 5.1.8. Hence we omit the related Python lines of code for sake of brevity. In <xref ref-type="fig" rid="fig4">Figure 4</xref> the evolution of the Hamiltonian function is shown versus time. We note that the Dirichlet condition causes an increase in energy. In <xref ref-type="fig" rid="fig5">Figure 5</xref> snapshots of the vertical deflection at different instants are shown. We remark that the Neumann boundary condition causes the plate to bend asymmetrically.</p></sec></sec><sec id="s5_3"><title>5.3. Anisotropic Heterogeneous Heat Equation</title><p>This third tutorial aims at illustrating PFEM to discretize the pHs presented in Section 3.4, modelling the heat equation. We specifically learn how to define and solve this problem with SCRIMP. We first define the continuous problem by using a specific class of SCRIMP related to the heat equation in two dimensions. Then we tackle the discretization in space of the pHs through PFEM. The discretization of the energy formulation leads to a nonlinear pHDAE formulation. After time discretization, we perform a numerical simulation to obtain an approximation of the space-time solution. Finally a simple post-processing is provided.</p><sec id="s5_3_1"><title>5.3.1. Problem Statement</title><p>We consider the two-dimensional heterogeneous anisotropic heat equation defined for all t ≥ 0 as</p><p>ρ ( x ) C V ( x ) ∂ ∂ t T ( t , x ) = div ( λ ( x ) ⋅ g r a d   T ( t , x ) ) ,   x ∈ Ω ,</p><p>T ( t , x ) = v ∂ ( t , x ) ,   x ∈ ∂ Ω ,</p><p>T ( 0, x ) = T 0 ( x ) ,   x ∈ Ω , t = 0</p><p>with Ω ⊂ ℝ 2 an open bounded spatial domain with Lipschitz-continuous boundary ∂ Ω . v ∂ ( t , x ) represents the boundary control function on the temperature (the notation u is kept for the internal energy density). T ( t , x ) denotes the temperature at point x ∈ Ω and time t. ρ ∈ C ∞ ( Ω ) (positive and bounded from below) denotes the mass density, λ ∈ C ∞ ( Ω ) 2 &#215; 2 (symmetric and coercive) the thermal conductivity. In the following Ω is assumed to be of rectangular shape.</p></sec><sec id="s5_3_2"><title>5.3.2. Port-Hamiltonian Formulation</title><p>We refer to [<xref ref-type="bibr" rid="scirp.109919-ref9">9</xref>] [<xref ref-type="bibr" rid="scirp.109919-ref10">10</xref>] for the modeling and discretization of various port-Hamiltonian formulations of this problem. The authors consider quadratic Lyapunov functional, entropy or internal energy as Hamiltonian, respectively. We will consider the PFEM discretization of the internal energy functional formulation as proposed in Section 3.4, which will lead to a nonlinear pHDAE. Our goal in this tutorial is to show how a pHDAE system can be formulated and solved with SCRIMP.</p></sec><sec id="s5_3_3"><title>5.3.3. Setup</title><p>We initialize here the Python object related to the energy formulation of the Heat_2D class of SCRIMP, that is assumed to be imported. This object will be used throughout this tutorial.</p><disp-formula id="scirp.109919-formula46"><graphic  xlink:href="//html.scirp.org/file/8-1722302x435.png"  xlink:type="simple"/></disp-formula><p>Energy corresponds to a class inherited from the Heat_2D base class. This base class contains implementations of the Lyapunov and entropy formulations as well.</p></sec><sec id="s5_3_4"><title>5.3.4. Constants</title><p>The same lines of code as for the Wave_2D and Mindlin classes are used to define the constants related to the rectangular mesh.</p><disp-formula id="scirp.109919-formula47"><graphic  xlink:href="//html.scirp.org/file/8-1722302x436.png"  xlink:type="simple"/></disp-formula><p>The time interval related to the time discretization is specified similarly.</p><disp-formula id="scirp.109919-formula48"><graphic  xlink:href="//html.scirp.org/file/8-1722302x437.png"  xlink:type="simple"/></disp-formula><p>We provide the time step for the time discretization of the pHDAE as well.</p><disp-formula id="scirp.109919-formula49"><graphic  xlink:href="//html.scirp.org/file/8-1722302x438.png"  xlink:type="simple"/></disp-formula></sec><sec id="s5_3_5"><title>5.3.5. FEniCS Expressions Definition</title><p>Using FEniCS expressions, the physical parameters related to our model problem are defined.</p><disp-formula id="scirp.109919-formula50"><graphic  xlink:href="//html.scirp.org/file/8-1722302x439.png"  xlink:type="simple"/></disp-formula><p>The initial conditions of the problem related to the temperature and to the flow and effort variables are then given. The temperature follows a Gaussian behaviour for which we specify related parameters.</p><disp-formula id="scirp.109919-formula51"><graphic  xlink:href="//html.scirp.org/file/8-1722302x440.png"  xlink:type="simple"/></disp-formula><p>The spatial part of the boundary control function is defined next.</p><disp-formula id="scirp.109919-formula52"><graphic  xlink:href="//html.scirp.org/file/8-1722302x441.png"  xlink:type="simple"/></disp-formula><p>Finally we define the time-dependent part of the boundary control as a pure Python function. The whole boundary control function is then given as the product of the two quantities (Ub_sp0 and Ub_tm0, respectively).</p><disp-formula id="scirp.109919-formula53"><graphic  xlink:href="//html.scirp.org/file/8-1722302x442.png"  xlink:type="simple"/></disp-formula></sec><sec id="s5_3_6"><title>5.3.6. Problem at the Continuous Level</title><p>We are now able to completely define the problem at the continuous level.</p><disp-formula id="scirp.109919-formula54"><graphic  xlink:href="//html.scirp.org/file/8-1722302x443.png"  xlink:type="simple"/></disp-formula></sec><sec id="s5_3_7"><title>5.3.7. Problem at the Discrete Level in Space and Time</title><p>The structure-preserving discretization of the infinite-dimensional pHs with PFEM is described in detail in [<xref ref-type="bibr" rid="scirp.109919-ref10">10</xref>]. This leads to the pHDAE given in (55). The definition of the system at the discrete level follows the same steps as for the two previous examples.</p><disp-formula id="scirp.109919-formula55"><graphic  xlink:href="//html.scirp.org/file/8-1722302x444.png"  xlink:type="simple"/></disp-formula><p>To perform the time integration of the pHDAE, we first need to set and interpolate the initial data and the boundary control function on the appropriate finite element spaces. Then, the time step is specified.</p><disp-formula id="scirp.109919-formula56"><graphic  xlink:href="//html.scirp.org/file/8-1722302x445.png"  xlink:type="simple"/></disp-formula></sec><sec id="s5_3_8"><title>5.3.8. Numerical Approximation of the Space-Time Solution</title><p>Now we perform the time integration of the resulting pHDAE system and deduce the behaviour of the energy variables, the Hamiltonian with respect to the time and space variables, respectively. For the time discretization, we employ a fully explicit scheme, presented in [<xref ref-type="bibr" rid="scirp.109919-ref51">51</xref>] (Algorithm 2 of Section 4.4) as a first attempt.</p><disp-formula id="scirp.109919-formula57"><graphic  xlink:href="//html.scirp.org/file/8-1722302x446.png"  xlink:type="simple"/></disp-formula></sec><sec id="s5_3_9"><title>5.3.9. Post-Processing</title><p>As an illustration, we plot the Hamiltonian function ( i.e. the internal energy) versus time. The Hamiltonian function is constant after 2 seconds, when the boundary control is switched off, as expected by the first law of thermodynamics.</p></sec></sec></sec><sec id="s6"><title>6. Conclusions and Perspectives</title><p>We have provided a general structure for the theoretical and numerical solution of infinite-dimensional port-Hamiltonian systems. This structure is particularly appealing since PFEM straightforwardly applies. Concerning the numerical solution, PFEM offers the advantage to leverage robust software components for the discretization of boundary controlled PDEs and time integration.</p><p>We have applied this strategy to abstract multidimensional linear hyperbolic and parabolic boundary controlled systems. We have notably shown that model problems based on the wave equation, Mindlin equation and heat equation fit within this unified theoretical framework. Numerical simulations of infinite-dimensional pHs have been performed with the ongoing software project SCRIMP that has been briefly introduced. Finally, we have illustrated how to solve three case studies within this framework by carefully explaining the methodology, and have provided companion interactive Jupyter notebooks.</p><p>Besides the generalization of the classes related to the heat and wave equation to the three-dimensional case, we plan to propose in SCRIMP more advanced model problems based on the two-dimensional Shallow Water Equation (SWE) [<xref ref-type="bibr" rid="scirp.109919-ref57">57</xref>] [<xref ref-type="bibr" rid="scirp.109919-ref41">41</xref>], the Kirchhoff model for thin plates [<xref ref-type="bibr" rid="scirp.109919-ref40">40</xref>] and Maxwell’s equations [<xref ref-type="bibr" rid="scirp.109919-ref32">32</xref>]. Furthermore, we will investigate both time integration methods that allow structure-preserving time discretization [<xref ref-type="bibr" rid="scirp.109919-ref58">58</xref>] of finite-dimensional pHs and more accurate time integrators for nonlinear pHDAE. In addition, we plan to enrich the panel of structure-preserving model reduction algorithms to facilitate the simulation of large-scale port-Hamiltonian systems. This is an essential prerequisite before first attempts related to control design. Further developments foresee the comparisons with well-established algorithms for multi-physics problems leading to coupled systems of PDEs.</p></sec><sec id="s7"><title>Acknowledgements</title><p>This work is supported by the project ANR-16-CE92-0028, entitled Interconnected Infinite-Dimensional systems for Heterogeneous Media, INFIDHEM, financed by the French National Research Agency (ANR) and the Deutsche Forschungsgemeinschaft (DFG). Further information is available at https://websites.isae-supaero.fr/infidhem/the-project.</p><p>Moreover the authors would like to thank Michel Sala&#252;n and Denis Matignon for the fruitful and insightful discussions.</p></sec><sec id="s8"><title>Conflicts of Interest</title><p>The authors declare no conflicts of interest regarding the publication of this paper.</p></sec><sec id="s9"><title>Cite this paper</title><p>Brugnoli, A., Haine, G., Serhani, A. and Vasseur, X. (2021) Numerical Approximation of Port-Hamiltonian Systems for Hyperbolic or Parabolic PDEs with Boundary Control. Journal of Applied Mathematics and Physics, 9, 1278-1321. https://doi.org/10.4236/jamp.2021.96088</p></sec><sec id="s10"><title>NOTES</title></sec></body><back><ref-list><title>References</title><ref id="scirp.109919-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">van der Schaft, A.J. and Maschke, B. (2002) Hamiltonian Formulation of Distributed-Parameter Systems with Boundary Energy Flow. Journal of Geometry and Physics, 42, 166-194. https://doi.org/10.1016/S0393-0440(01)00083-3</mixed-citation></ref><ref id="scirp.109919-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Le Gorrec, Y. and Matignon, D. (2013) Coupling between Hyperbolic and Diffusive Systems: A Port-Hamiltonian Formulation. European Journal of Control, 19, 505-512. https://doi.org/10.1016/j.ejcon.2013.09.003</mixed-citation></ref><ref id="scirp.109919-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">van der Schaft, A.J. and Maschke, B. (2018) Geometry of Thermodynamic Processes. Entropy, 20, 1-23. https://doi.org/10.3390/e20120925</mixed-citation></ref><ref id="scirp.109919-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Vu, N.M.T., Lefèvre, L. and Maschke, B. (2016) A Structured Control Model for the Thermo-Magneto-Hydrodynamics of Plasmas in Tokamaks. Mathematical and Computer Modelling of Dynamical Systems, 3954, 1-26.</mixed-citation></ref><ref id="scirp.109919-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Rashad, R., Califano, F., Van der Schaft, A.J. and Stramigioli, S. (2020) Twenty Years of Distributed Port-Hamiltonian Systems: A Literature Review. IMA Journal of Mathematical Control and Information, 37, 1400-1422. https://doi.org/10.1093/imamci/dnaa018</mixed-citation></ref><ref id="scirp.109919-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Brugnoli, A., Haine, G., Serhani, A. and Vasseur, X. (2020) Supplementary Material for “Numerical Approximation of Port-Hamiltonian Systems for Hyperbolic or Parabolic PDEs with Boundary Control”. Dataset on Zenodo.</mixed-citation></ref><ref id="scirp.109919-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Brugnoli, A., Alazard, D., Pommier-Budinger, V. and Matignon, D. (2019) Port-Hamiltonian Formulation and Symplectic Discretization of Plate Models Part I: Mindlin Model for Thick Plates. Applied Mathematical Modelling, 75, 940-960. https://doi.org/10.1016/j.apm.2019.04.035</mixed-citation></ref><ref id="scirp.109919-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Cardoso-Ribeiro, F.L., Matignon, D. and Lefèvre, L. (2018) A Structure-Preserving Partitioned Finite Element Method for the 2D Wave Equation. IFAC-PapersOnLine, 51, 119-124. https://doi.org/10.1016/j.ifacol.2018.06.033</mixed-citation></ref><ref id="scirp.109919-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Serhani, A., Haine, G. and Matignon, D. (2019) Anisotropic Heterogeneous n-D Heat Equation with Boundary Control and Observation: I. Modeling as Port-Hamiltonian System. IFAC-PapersOnLine, 52, 51-56. https://doi.org/10.1016/j.ifacol.2019.07.009</mixed-citation></ref><ref id="scirp.109919-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Serhani, A., Haine, G. and Matignon, D. (2019) Anisotropic Heterogeneous n-D Heat Equation with Boundary Control and Observation: II. Structure-Preserving Discretization. IFAC-PapersOnLine, 52, 57-62. https://doi.org/10.1016/j.ifacol.2019.07.010</mixed-citation></ref><ref id="scirp.109919-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">Toledo, J., Wu, Y., Ramírez, H. and Le Gorrec, Y. (2020) Observer-Based Boundary Control of Distributed Port-Hamiltonian Systems. Automatica, 120, Article ID: 109130. https://doi.org/10.1016/j.automatica.2020.109130</mixed-citation></ref><ref id="scirp.109919-ref12"><label>12</label><mixed-citation publication-type="other" xlink:type="simple">Krug, R., Mehrmann, V. and Schmidt, M. (2020) Nonlinear Optimization of District Heating Networks. Optimization and Engineering. https://doi.org/10.1007/s11081-020-09549-0</mixed-citation></ref><ref id="scirp.109919-ref13"><label>13</label><mixed-citation publication-type="other" xlink:type="simple">Golo, G., Talasila, V., Van der Schaft, A.J. and Maschke, B. (2004) Hamiltonian Discretization of Boundary Control Systems. Automatica, 40, 757-771. https://doi.org/10.1016/j.automatica.2003.12.017</mixed-citation></ref><ref id="scirp.109919-ref14"><label>14</label><mixed-citation publication-type="other" xlink:type="simple">Moulla, R., Lefèvre, L. and Maschke, B. (2012) Pseudo-Spectral Methods for the Spatial Symplectic Reduction of Open Systems of Conservation Laws. Journal of Computational Physics, 231, 1272-1292. https://doi.org/10.1016/j.jcp.2011.10.008</mixed-citation></ref><ref id="scirp.109919-ref15"><label>15</label><mixed-citation publication-type="other" xlink:type="simple">Trenchant, V., Ramírez, H., Le Gorrec, Y. and Kotyczka, P. (2018) Finite Differences on Staggered Grids Preserving the Port-Hamiltonian Structure with Application to an Acoustic Duct. Journal of Computational Physics, 373, 673-697. https://doi.org/10.1016/j.jcp.2018.06.051</mixed-citation></ref><ref id="scirp.109919-ref16"><label>16</label><mixed-citation publication-type="other" xlink:type="simple">Kotyczka, P., Maschke, B. and Lefèvre, L. (2018) Weak Form of Stokes-Dirac Structures and Geometric Discretization of Port-Hamiltonian Systems. Journal of Computational Physics, 361, 442-476. https://doi.org/10.1016/j.jcp.2018.02.006</mixed-citation></ref><ref id="scirp.109919-ref17"><label>17</label><mixed-citation publication-type="other" xlink:type="simple">Kotyczka, P. (2019) Numerical Methods for Distributed Parameter Port-Hamiltonian Systems. TUM University Press, Munich.</mixed-citation></ref><ref id="scirp.109919-ref18"><label>18</label><mixed-citation publication-type="other" xlink:type="simple">Kirby, R.C. and Kieu, T.T. (2015) Symplectic-Mixed Finite Element Approximation of Linear Acoustic Wave Equations. Numerische Mathematik, 130, 257-291. https://doi.org/10.1007/s00211-014-0667-4</mixed-citation></ref><ref id="scirp.109919-ref19"><label>19</label><mixed-citation publication-type="other" xlink:type="simple">Altmann, R. and Schulze, P. (2017) A Port-Hamiltonian Formulation of the Navier-Stokes Equations for Reactive Flows. Systems &amp; Control Letters, 100, 51-55. https://doi.org/10.1016/j.sysconle.2016.12.005</mixed-citation></ref><ref id="scirp.109919-ref20"><label>20</label><mixed-citation publication-type="other" xlink:type="simple">Haine, G., Matignon, D. and Serhani, A. (2020) Numerical Analysis of a Structure-Preserving Space-Discretization for an Anisotropic and Heterogeneous Boundary Controlled N-Dimensional Wave Equation as Port-Hamiltonian System.</mixed-citation></ref><ref id="scirp.109919-ref21"><label>21</label><mixed-citation publication-type="book" xlink:type="simple">Joly, P. (2003) Variational Methods for Time-Dependent Wave Propagation Problems. In: Ainsworth, M., Davies, P., Duncan, D., Rynne, B. and Martin, P., Eds., Topics in Computational Wave Propagation: Direct and Inverse Problems, Volume 31 of Lecture Notes in Computational Science and Engineering, Springer, Berlin, 201-264.</mixed-citation></ref><ref id="scirp.109919-ref22"><label>22</label><mixed-citation publication-type="other" xlink:type="simple">Boffi, D., Brezzi, F. and Fortin, M. (2013) Mixed Finite Element Methods and Applications. Volume 44 of Springer Series in Computational Mathematics, Springer-Verlag, Berlin. https://doi.org/10.1007/978-3-642-36519-5</mixed-citation></ref><ref id="scirp.109919-ref23"><label>23</label><mixed-citation publication-type="other" xlink:type="simple">Aln&amp;#230;s, M.S., Blechta, J., Hake, J., Johansson, A., Kehlet, B., Logg, A., Richardson, C., Ring, J., Rognes, M.E. and Wells, G.N. (2015) The FEniCS Project Version 1.5. Archive of Numerical Software, 3, 9-23.</mixed-citation></ref><ref id="scirp.109919-ref24"><label>24</label><mixed-citation publication-type="other" xlink:type="simple">Van der Schaft, A. and Jeltsema, D. (2014) Port-Hamiltonian Systems Theory: An Introductory Overview. Foundations and Trends&lt;sup&gt;&amp;#174;&lt;/sup&gt; in Systems and Control, 1, 173-378. https://doi.org/10.1561/2600000002</mixed-citation></ref><ref id="scirp.109919-ref25"><label>25</label><mixed-citation publication-type="other" xlink:type="simple">Courant, T.J. (1990) Dirac Manifolds. Transactions of the American Mathematical Society, 319, 631-661. https://doi.org/10.1090/S0002-9947-1990-0998124-1</mixed-citation></ref><ref id="scirp.109919-ref26"><label>26</label><mixed-citation publication-type="other" xlink:type="simple">Beattie, C., Mehrmann, V., Xu, H. and Zwart, H. (2018) Linear Port-Hamiltonian Descriptor Systems. Mathematics of Control, Signals, and Systems, 30, 17. https://doi.org/10.1007/s00498-018-0223-3</mixed-citation></ref><ref id="scirp.109919-ref27"><label>27</label><mixed-citation publication-type="other" xlink:type="simple">Mehrmann, V. and Morandin, R. (2019) Structure-Preserving Discretization for Port-Hamiltonian Descriptor Systems. 2019 IEEE 58th Conference on Decision and Control (CDC), Nice, 11-13 December 2019, 6863-6868. https://doi.org/10.1109/CDC40024.2019.9030180</mixed-citation></ref><ref id="scirp.109919-ref28"><label>28</label><mixed-citation publication-type="other" xlink:type="simple">Renardy, M. and Rogers, R.C. (2004) An Introduction to Partial Differential Equations. Number 13 in Texts in Applied Mathematics. 2nd Edition, Springer-Verlag, New York.</mixed-citation></ref><ref id="scirp.109919-ref29"><label>29</label><mixed-citation publication-type="other" xlink:type="simple">Tucsnak, M. and Weiss, G. (2009) Observation and Control for Operator Semi-Groups. Birkh&amp;#228;user Advanced Texts: Basler Lehrbücher. Birkh&amp;#228;user Verlag, Basel.</mixed-citation></ref><ref id="scirp.109919-ref30"><label>30</label><mixed-citation publication-type="book" xlink:type="simple">Serhani, A., Matignon, D. and Haine, G. (2019) A Partitioned Finite Element Method for the Structure-Preserving Discretization of Damped Infinite-Dimensional Port-Hamiltonian Systems with Boundary Control. In: Nielsen, F. and Barbaresco, F., Eds., Geometric Science of Information, Volume 11712 of Lecture Notes in Computer Science, Springer, Cham, 549-558. https://doi.org/10.1007/978-3-030-26980-7_57</mixed-citation></ref><ref id="scirp.109919-ref31"><label>31</label><mixed-citation publication-type="other" xlink:type="simple">Serhani, A., Matignon, D. and Haine, G. (2019) Partitioned Finite Element Method for Port-Hamiltonian Systems with Boundary Damping: Anisotropic Heterogeneous 2-D Wave Equations. IFAC-PapersOnLine, 52, 96-101. https://doi.org/10.1016/j.ifacol.2019.08.017</mixed-citation></ref><ref id="scirp.109919-ref32"><label>32</label><mixed-citation publication-type="other" xlink:type="simple">Payen, G., Matignon, D. and Haine, G. (2020) Modelling and Structure-Preserving Discretization of Maxwell’s Equations as Port-Hamiltonian System. Proceedings of the 21st IFAC World Congress, Volume 53, 7671-7676. https://doi.org/10.1016/j.ifacol.2020.12.1355</mixed-citation></ref><ref id="scirp.109919-ref33"><label>33</label><mixed-citation publication-type="other" xlink:type="simple">Kurula, M. and Zwart, H. (2015) Linear Wave Systems on n-D Spatial Domains. International Journal of Control, 88, 1063-1077.</mixed-citation></ref><ref id="scirp.109919-ref34"><label>34</label><mixed-citation publication-type="other" xlink:type="simple">Timoshenko, S. and Woinowsky-Krieger, S. (1959) Theory of Plates and Shells. Engineering Societies Monographs. McGraw-Hill, New York.</mixed-citation></ref><ref id="scirp.109919-ref35"><label>35</label><mixed-citation publication-type="other" xlink:type="simple">Brugnoli, A. (2020) A Port-Hamiltonian Formulation of Flexible Structures. Modelling and Structure-Preserving Finite Element Discretization. PhD Thesis, Université de Toulouse, ISAE-SUPAERO, Toulouse.</mixed-citation></ref><ref id="scirp.109919-ref36"><label>36</label><mixed-citation publication-type="other" xlink:type="simple">Arnold, D. and Lee, J. (2014) Mixed Methods for Elastodynamics with Weak Symmetry. SIAM Journal on Numerical Analysis, 52, 2743-2769. https://doi.org/10.1137/13095032X</mixed-citation></ref><ref id="scirp.109919-ref37"><label>37</label><mixed-citation publication-type="other" xlink:type="simple">Arnold, D. and Winther, R. (2002) Mixed Finite Elements for Elasticity. Numerische Mathematik, 92, 401-419. https://doi.org/10.1007/s002110100348</mixed-citation></ref><ref id="scirp.109919-ref38"><label>38</label><mixed-citation publication-type="other" xlink:type="simple">Arnold, D., Brezzi, F. and Douglas, J. (1984) Peers: A New Mixed Finite Element for Plane Elasticity. Japan Journal of Applied Mathematics, 1, 347. https://doi.org/10.1007/BF03167064</mixed-citation></ref><ref id="scirp.109919-ref39"><label>39</label><mixed-citation publication-type="other" xlink:type="simple">Beir&amp;#227;o da Veiga, L., Mora, D. and Rodríguez, R. (2013) Numerical Analysis of a Locking-Free Mixed Finite Element Method for a Bending Moment Formulation of Reissner-Mindlin Plate Model. Numerical Methods for Partial Differential Equations, 29, 40-63. https://doi.org/10.1002/num.21698</mixed-citation></ref><ref id="scirp.109919-ref40"><label>40</label><mixed-citation publication-type="other" xlink:type="simple">Brugnoli, A., Alazard, D., Pommier-Budinger, V. and Matignon, D. (2019) Port-Hamiltonian Formulation and Symplectic Discretization of Plate Models Part II: Kirchhoff Model for Thin Plates. Applied Mathematical Modelling, 75, 961-981. https://doi.org/10.1016/j.apm.2019.04.036</mixed-citation></ref><ref id="scirp.109919-ref41"><label>41</label><mixed-citation publication-type="other" xlink:type="simple">Cardoso-Ribeiro, F.L., Matignon, D. and Lefèvre, L. (2020) A Partitioned Finite Element Method for Power-Preserving Discretization of Open Systems of Conservation Laws. IMA Journal of Mathematical Control and Information, 1-41.</mixed-citation></ref><ref id="scirp.109919-ref42"><label>42</label><mixed-citation publication-type="other" xlink:type="simple">Brugnoli, A., Cardoso-Ribeiro, F.L., Haine, G. and Kotyczka, P. (2020) Partitioned Finite Element Method for Power-Preserving Structured Discretization with Mixed Boundary Conditions. Proceedings of the 21st IFAC World Congress, Volume 53, 7647-7652. https://doi.org/10.1016/j.ifacol.2020.12.1351</mixed-citation></ref><ref id="scirp.109919-ref43"><label>43</label><mixed-citation publication-type="other" xlink:type="simple">Linge, S. and Langtangen, H.P. (2020) Programming for Computations Python. Springer, Berlin. https://doi.org/10.1007/978-3-030-16877-3</mixed-citation></ref><ref id="scirp.109919-ref44"><label>44</label><mixed-citation publication-type="other" xlink:type="simple">Aln&amp;#230;s, M.S., Logg, A., &amp;#216;lgaard, K.B., Rognes, M.E. and Wells, G.N. (2014) Unified Form Language: A Domain-Specific Language for Weak Formulations of Partial Differential Equations. ACM Transactions on Mathematical Software, 40, Article No. 9. https://doi.org/10.1145/2566630</mixed-citation></ref><ref id="scirp.109919-ref45"><label>45</label><mixed-citation publication-type="other" xlink:type="simple">Kirby, R.C. and Logg, A. (2007) Efficient Compilation of a Class of Variational Forms. ACM Transactions on Mathematical Software, 33, 17-es. https://doi.org/10.1145/1268769.1268771</mixed-citation></ref><ref id="scirp.109919-ref46"><label>46</label><mixed-citation publication-type="other" xlink:type="simple">Logg, A. and Wells, G.N. (2010) DOLFIN: Automated Finite Element Computing. ACM Transactions on Mathematical Software, 37, 20. https://doi.org/10.1145/1731022.1731030</mixed-citation></ref><ref id="scirp.109919-ref47"><label>47</label><mixed-citation publication-type="other" xlink:type="simple">Logg, A., Mardal, K.A., Wells, G.N., et al. (2012) Automated Solution of Differential Equations by the Finite Element Method. Springer, Berlin. https://doi.org/10.1007/978-3-642-23099-8</mixed-citation></ref><ref id="scirp.109919-ref48"><label>48</label><mixed-citation publication-type="other" xlink:type="simple">Balay, S., Abhyankar, S., Adams, M.F., Brown, J., Brune, P., Buschelman, K., Dalcin, L., Dener, A., Eijkhout, V., Gropp, W.D., Karpeyev, D., Kaushik, D., Knepley, M.G., May, D.A., McInnes, L.C., Mills, R.T., Munson, T., Rupp, K., Sanan, P., Smith, B.F., Zampini, S., Zhang, H. and Zhang, H. (2020) PETSc Users Manual. Technical Report ANL-95/11 Revision 3.13, Argonne National Laboratory.</mixed-citation></ref><ref id="scirp.109919-ref49"><label>49</label><mixed-citation publication-type="other" xlink:type="simple">Andersson, C., Führer, C. and &amp;#197;kesson, J. (2015) Assimulo: A Unified Framework for ODE Solvers. Mathematics and Computers in Simulation, 116, 26-43. https://doi.org/10.1016/j.matcom.2015.04.007</mixed-citation></ref><ref id="scirp.109919-ref50"><label>50</label><mixed-citation publication-type="other" xlink:type="simple">Hindmarsh, A.C., Brown, P., Grant, K.E., Lee, S., Serban, R., Shumaker, D. and Woodward, C. (2005) SUNDIALS: Suite of Nonlinear and Differential/Algebraic Equation Solvers. ACM Transactions on Mathematical Software (TOMS), 31, 363-396. https://doi.org/10.1145/1089014.1089020</mixed-citation></ref><ref id="scirp.109919-ref51"><label>51</label><mixed-citation publication-type="other" xlink:type="simple">Serhani, A. (2020) Systèmes couplés d’EDPs, vus comme des systèmes Hamiltoniens à ports avec dissipation: Analyse théorique et simulation numérique. PhD Thesis, Université de Toulouse, ISAE-SUPAERO, Toulouse.</mixed-citation></ref><ref id="scirp.109919-ref52"><label>52</label><mixed-citation publication-type="other" xlink:type="simple">Abhyankar, S., Brown, J., Constantinescu, E., Ghosh, D., Smith, B. and Zhang, H. (2018) PETSc/TS: A Modern Scalable ODE/DAE Solver Library.</mixed-citation></ref><ref id="scirp.109919-ref53"><label>53</label><mixed-citation publication-type="other" xlink:type="simple">Chaturantabut, S., Beattie, C. and Gugercin, S. (2016) Structure-Preserving Model Reduction for Nonlinear Port-Hamiltonian Systems. SIAM Journal on Scientific Computing, 38, B837-B865. https://doi.org/10.1137/15M1055085</mixed-citation></ref><ref id="scirp.109919-ref54"><label>54</label><mixed-citation publication-type="other" xlink:type="simple">Egger, H., Kugler, T., Liljegren-Sailer, B., Marheineke, N. and Mehrmann, V. (2018) On Structure-Preserving Model Reduction for Damped Wave Propagation in Transport Networks. SIAM Journal on Scientific Computing, 40, A331-A365. https://doi.org/10.1137/17M1125303</mixed-citation></ref><ref id="scirp.109919-ref55"><label>55</label><mixed-citation publication-type="other" xlink:type="simple">Cohen, G. and Grob, P. (2007) Mixed Higher Order Spectral Finite Elements for Reissner-Mindlin Equations. SIAM Journal on Scientific Computing, 29, 986-1005. https://doi.org/10.1137/050642332</mixed-citation></ref><ref id="scirp.109919-ref56"><label>56</label><mixed-citation publication-type="other" xlink:type="simple">Benner, P. and Heiland, J. (2015) Time-Dependent Dirichlet Conditions in Finite Element Discretizations. ScienceOpen Research. https://doi.org/10.14293/S2199-1006.1.SOR-MATH.AV2JW3.v1</mixed-citation></ref><ref id="scirp.109919-ref57"><label>57</label><mixed-citation publication-type="other" xlink:type="simple">Cardoso-Ribeiro, F., Brugnoli, A., Matignon, D. and Lefèvre, L. (2019) Port-Hamiltonian Modeling, Discretization and Feedback Control of a Circular Water Tank. 2019 IEEE 58th Conference on Decision and Control (CDC), Nice, 11-13 December 2019, 6881-6886. https://doi.org/10.1109/CDC40024.2019.9030007</mixed-citation></ref><ref id="scirp.109919-ref58"><label>58</label><mixed-citation publication-type="other" xlink:type="simple">Kotyczka, P. and Lefèvre, L. (2018) Discrete-Time Port-Hamiltonian Systems: A Definition Based on Symplectic Integration. Systems and Control Letters, 133, Article ID: 104530. https://doi.org/10.1016/j.sysconle.2019.104530</mixed-citation></ref></ref-list></back></article>