$\displaystyle=\mathbf{V}_{\uprho}^{\dagger}\bm{\varepsilon}$
$\displaystyle\mathbf{V}_{\mathrm{x}}^{\dagger}$
$\displaystyle=(\mathbf{V}_{\mathrm{x}}^{T}\mathbf{M}_{\mathrm{x}}\mathbf{V}_{\mathrm{x}})^{-1}\mathbf{V}_{\mathrm{x}}^{T}\mathbf{M}_{\mathrm{x}},$

with $\mathrm{x}\in\\{\uprho,\mathrm{e}\\}$ and the Hamiltonian is given as
$\mathcal{H}_{\mathrm{ROM}}(\mathbf{z}_{\mathrm{r}})=\frac{1}{2}\mathbf{m}_{\mathrm{r}}^{T}\mathbf{M}^{\mathrm{r}}_{\mathrm{m},\mathrm{m}}\mathbf{m}_{\mathrm{r}}+\mathbf{1}^{T}\mathbf{M}_{\mathrm{e}}\mathbf{V}_{\mathrm{e}}\mathbf{e}_{\mathrm{r}}.$

By construction the symmetric positive definiteness of
$\mathbf{R}_{\mathrm{e},\mathrm{e}}^{r}=(\mathbf{R}_{\mathrm{e},\mathrm{e}}^{r})^{T}\geq
0$ are preserved. Furthermore, condition 1 is fulfilled, such that the reduced
order model is still port-Hamiltonian, see [Hau24] for the proof.

###  A.3. Complexity Reduced Coordinate Representation

######  Coordinate Representation 34.

The complexity reduced system can be deduced from Coordinate Representation
33,

$\displaystyle\mathbf{M}_{\uprho}^{\mathrm{r}}\dot{\bm{\rho}}_{\mathrm{r}}$
$\displaystyle=\mathbf{J}^{\mathrm{r}}_{\uprho,\mathrm{m}}\mathbf{m}_{\mathrm{r}},$
$\displaystyle\mathbf{M}^{\mathrm{c}}_{\mathrm{m},\uprho}\dot{\bm{\rho}}_{\mathrm{r}}+\mathbf{M}^{\mathrm{c}}_{\mathrm{m},\mathrm{m}}\dot{\mathbf{m}}_{\mathrm{r}}$
$\displaystyle=\mathbf{J}^{\mathrm{r}}_{\mathrm{m},\uprho}\bm{\varepsilon}_{\mathrm{c}}+(\mathbf{J}^{\mathrm{c}}_{\mathrm{m},\mathrm{e}}+\tilde{\mathbf{J}}^{\mathrm{c}}_{\mathrm{m},\mathrm{e}})\mathbf{1}_{\mathrm{r}}+\mathbf{T}^{\mathrm{r}}_{m}\bm{\lambda}_{\mathrm{m}},$
$\displaystyle\mathbf{M}_{\mathrm{e}}^{\mathrm{r}}\dot{\mathbf{e}}_{\mathrm{r}}$
$\displaystyle=(\mathbf{J}^{\mathrm{c}}_{\mathrm{e},\mathrm{m}}+\tilde{\mathbf{J}}_{\mathrm{e},\mathrm{m}}^{\mathrm{c}})\mathbf{m}_{\mathrm{r}}-\mathbf{R}^{\mathrm{c}}_{\mathrm{e},\mathrm{e}}\mathbf{1}_{\mathrm{r}}+\mathbf{b}^{\mathrm{r}}u+\mathbf{t}^{\mathrm{r}}_{\mathrm{e}}(\mathbf{V}_{\mathrm{e}}\mathbf{e}_{\mathrm{r}})\lambda_{\mathrm{e}}+\mathbf{b}^{\mathrm{r}}_{\mathrm{e}}(\mathbf{V}_{\uprho}\bm{\rho}_{\mathrm{r}},\mathbf{V}_{\mathrm{e}}\mathbf{e}_{\mathrm{r}})f_{\mathrm{B}}|_{L},$
$\displaystyle\mathbf{0}$
$\displaystyle=-(\mathbf{T}^{\mathrm{r}}_{\mathrm{m}})^{T}\mathbf{m}_{\mathrm{r}}+\mathbf{f_{\mathrm{B}}},$
$\displaystyle 0$
$\displaystyle=-(\mathbf{t}^{\mathrm{r}}_{\mathrm{e}}(\mathbf{V}_{\mathrm{e}}\mathbf{e}_{\mathrm{r}}))^{T}\mathbf{1}_{\mathrm{r}}+\frac{e|_{0}}{f_{\mathrm{B}}|_{0}}f_{\mathrm{B}}|_{0},$

with complexity reduced matrices

$\displaystyle\mathbf{M}^{\mathrm{c}}_{\mathrm{m},\uprho}$
$\displaystyle=[-(\frac{m_{\mathrm{h}}}{\rho_{\mathrm{h}}^{2}}\psi_{j},\varphi_{i})_{\mathrm{c}}]_{\begin{subarray}{c}i=1\dots
n_{2},\\\ j=1\dots n_{1}\end{subarray}},$
$\displaystyle\mathbf{M}_{\mathrm{m},\mathrm{m}}^{\mathrm{c}}$
$\displaystyle=[(\frac{1}{\rho_{\mathrm{h}}}\varphi_{\iota},\varphi_{i})_{\mathrm{c}}]_{i,\iota=1\dots
n_{2}},$ $\displaystyle\mathbf{J}_{\mathrm{m},\mathrm{e}}^{\mathrm{c}}$
$\displaystyle=[(\frac{-e_{\mathrm{h}}\partial_{x}\phi_{\iota}-\partial_{x}(p_{\mathrm{h}}\phi_{\iota})_{\mathrm{c}}}{\rho_{\mathrm{h}}},\varphi_{i})]_{\begin{subarray}{c}i=1\dots
n_{2},\\\ \iota=1\dots n_{3}\end{subarray}},$
$\displaystyle\tilde{\mathbf{J}}_{\mathrm{m},\mathrm{e}}^{\mathrm{c}}$
$\displaystyle=[-(\frac{\lambda}{2d}\frac{m_{\mathrm{h}}|m_{\mathrm{h}}|}{\rho_{\mathrm{h}}^{2}}\phi_{\iota},\varphi_{i})_{\mathrm{c}}]_{\begin{subarray}{c}i=1\dots
n_{2},\\\ \iota=1\dots n_{3}\end{subarray}},$
$\displaystyle\mathbf{R}_{\mathrm{e},\mathrm{e}}^{\mathrm{c}}$
$\displaystyle=[(\frac{k_{\omega}}{d}T_{\mathrm{h}}\phi_{i},\phi_{\iota})_{\mathrm{c}}]_{i,\iota=1\dots
n_{3}},$

the other matrices are given as Coordinate Representation 33. The complexity
reduced Hamiltonian is given by
$\mathcal{H}_{\mathrm{Quad}}(\mathbf{z}_{\mathrm{r}})=\frac{1}{2}\mathbf{m}_{\mathrm{r}}^{T}\mathbf{M}^{\mathrm{c}}_{\mathrm{m},\mathrm{m}}\mathbf{m}_{\mathrm{r}}+\mathbf{1}^{T}\mathbf{M}_{\mathrm{e}}\mathbf{V}_{\mathrm{e}}\mathbf{e}_{\mathrm{r}}.$

###  A.4. Coordinate Formulation on Network

To set up the coordinate representation of the network system we use the
structure-preserving space discretization on each pipe introduced in Chapter
3.1and introduce the coupling matrix $\mathbf{C}$. Without loss of generality
we assume that the interior nodes are numbered starting with $l=1$, such that
$\mathcal{N}_{0}=\\{\nu_{1},\dots,\nu_{j}\\}$. Furthermore, let the pipes
adjacent to inner node $\nu\in\mathcal{N}_{0}$ be numbered in the following
way $\mathcal{E}(\nu)=\\{\omega_{1},\dots,\omega_{k_{\nu}}\\}$ with
$k_{\nu}=|\mathcal{E}(\nu)|$.

######  Definition 35.

Let $\mathbf{u}_{0}=[f_{\mathrm{B}}^{\omega_{1}}|_{\nu_{1}}\quad\dots
f_{\mathrm{B}}^{\omega_{k_{\nu_{1}}}}|_{\nu_{1}}\quad\dots\quad
f_{\mathrm{B}}^{\omega_{1}}|_{\nu_{j}}\quad\dots\quad
f_{\mathrm{B}}^{\omega_{k_{\nu_{j}}}}|_{\nu_{j}}]^{T}$, i.e., the boundary
flows at all coupling nodes. Then the coupling matrix
$\mathbf{C}\in\mathbb{R}^{|\mathcal{N}_{0}|\times|\mathbf{u}_{0}|}$ is defined
by

$\displaystyle\mathbf{C}_{ik}=\begin{cases}1\text{ if
}[\mathbf{u}_{0}]_{k}\text{ is defined on }\omega\in\mathcal{E}(\nu_{i})\\\
0\text{ otherwise}\end{cases},$

with $\nu_{i}\in\mathcal{N}_{0}$.

######  Coordinate Representation 36.

The finite dimensional port-Hamiltonian system for a coupled network of pipes
for
$\mathbf{z}^{\mathcal{E}}=[(\bm{\rho}^{\mathcal{E}})^{T}\quad(\mathbf{m}^{\mathcal{E}})^{T}\quad(\mathbf{e}^{\mathcal{E}})^{T}\quad(\bm{\lambda}_{\mathrm{m}}^{\mathcal{E}})^{T}\quad(\bm{\lambda}_{\mathrm{e}}^{\mathcal{E}})^{T}]^{T}$
is given by

$\displaystyle\begin{bmatrix}\mathbf{E}^{\mathcal{E}}(\mathbf{z}^{\mathcal{E}})&\mathbf{O}&\mathbf{O}\\\
\mathbf{O}&\mathbf{O}&\mathbf{O}\\\
\mathbf{O}&\mathbf{O}&\mathbf{O}\end{bmatrix}\begin{bmatrix}\dot{\mathbf{z}}^{\mathcal{E}}\\\
\dot{\mathbf{u}}_{0}\\\ \dot{\bm{\lambda}}_{\mathrm{H}}\end{bmatrix}$
$\displaystyle=\begin{bmatrix}\mathbf{J}^{\mathcal{E}}(\mathbf{z}^{\mathcal{E}})-\mathbf{R}(\mathbf{z}^{\mathcal{E}})&\mathbf{B}_{0}(\mathbf{z}^{\mathcal{E}})&\mathbf{O}\\\
-\mathbf{B}_{0}^{T}(\mathbf{z}^{\mathcal{E}})&\mathbf{O}&\mathbf{C}^{T}\\\
\mathbf{O}&-\mathbf{C}&\mathbf{O}\end{bmatrix}\begin{bmatrix}\mathbf{\tilde{e}}^{\mathcal{E}}(\mathbf{z}^{\mathcal{E}})\\\
\mathbf{u}_{0}\\\
\bm{\lambda}_{\mathrm{H}}\end{bmatrix}+\begin{bmatrix}\mathbf{B}_{T_{\infty}}&\mathbf{B}_{\partial}(\mathbf{z}^{\mathcal{E}})\\\
\mathbf{0}&\mathbf{0}\\\
\mathbf{0}&\mathbf{0}\end{bmatrix}\begin{bmatrix}\mathbf{u}_{T_{\infty}}\\\
\mathbf{u}_{\partial}\end{bmatrix},$
$\displaystyle\begin{bmatrix}\mathbf{y}_{T_{\infty}}\\\
\mathbf{y}_{\partial}\end{bmatrix}$
$\displaystyle=\begin{bmatrix}\mathbf{B}_{T_{\infty}}&\mathbf{B}_{\partial}(\mathbf{z}^{\mathcal{E}})\\\
\mathbf{0}&\mathbf{0}\\\
\mathbf{0}&\mathbf{0}\end{bmatrix}^{T}\begin{bmatrix}\mathbf{\tilde{e}}^{\mathcal{E}}(\mathbf{z}^{\mathcal{E}})\\\
\mathbf{u}_{0}\\\ \bm{\lambda}_{\mathrm{H}}\end{bmatrix}.$

Given a graph $\mathcal{G}=(\mathcal{N},\mathcal{E},L)$ with
$\mathcal{N}=\\{\nu_{1},\dots,\nu_{l}\\}$, $l\in\mathbb{N}$,
$\mathcal{E}=\\{\omega_{1},\dots,\omega_{k}\\}\subset\mathcal{N}\times\mathcal{N}$
and $L=\\{L^{\omega_{1}},\dots,L^{\omega_{k}}\\}$, the model on each pipe
$\omega_{i}=(\nu,\bar{\nu})$, $i=1,\cdots,k$, $\nu,\bar{\nu}\in\mathcal{N}$,
takes the following form,

$\displaystyle\begin{split}\mathbf{E}^{\omega_{i}}(\mathbf{z}^{\omega_{i}})\dot{\mathbf{z}}^{\omega_{i}}&=((\mathbf{J}^{\omega_{i}}-\mathbf{R}^{\omega_{i}})(\mathbf{z}^{\omega_{i}}))\mathbf{\tilde{e}}^{\omega_{i}}(\mathbf{z}^{\omega_{i}})+\mathbf{B}^{\omega_{i}}(\mathbf{z}^{\omega_{i}},\mathbf{f_{\mathrm{B}}}^{\omega_{i}})\mathbf{u}^{\omega_{i}},\\\
\mathbf{y}^{\omega_{i}}&=\mathbf{B}^{\omega_{i}}(\mathbf{z}^{\omega_{i}},\mathbf{f_{\mathrm{B}}}^{\omega_{i}})^{T}\mathbf{\tilde{e}}^{\omega_{i}}(\mathbf{z}^{\omega_{i}}),\end{split}$
18

with

$\displaystyle\mathbf{z}^{\omega_{i}}\coloneqq\begin{bmatrix}\bm{\rho}^{\omega_{i}}\\\
\mathbf{m}^{\omega_{i}}\\\ \mathbf{e}^{\omega_{i}}\\\
\bm{\lambda}_{\mathrm{m}}^{\omega_{i}}\\\
\lambda_{\mathrm{e}}^{\omega_{i}}\end{bmatrix},\mathbf{\tilde{e}}^{\omega_{i}}(\mathbf{z}^{\omega_{i}})\coloneqq\begin{bmatrix}\bm{\varepsilon}^{\omega_{i}}\\\
\mathbf{m}^{\omega_{i}}\\\ \mathbf{e}^{\omega_{i}}\\\
\bm{\lambda}_{\mathrm{m}}^{\omega_{i}}\\\
\lambda_{\mathrm{e}}^{\omega_{i}}\end{bmatrix},\mathbf{u}^{\omega_{i}}\coloneqq\begin{bmatrix}T_{\infty}^{\omega_{i}}\\\
f_{\mathrm{B}}^{\omega_{i}}|_{\bar{\nu}}\\\
f_{\mathrm{B}}^{\omega_{i}}|_{\nu}\end{bmatrix},\mathbf{E}^{\omega_{i}}(\mathbf{z}^{\omega_{i}})\coloneqq\begin{bmatrix}\mathbf{M}^{\omega_{i}}_{\uprho}&\mathbf{O}&\mathbf{O}&\mathbf{O}&\mathbf{0}\\\
\mathbf{M}^{\omega_{i}}_{\mathrm{m},\uprho}&\mathbf{M}_{\mathrm{m},\mathrm{m}}^{\omega_{i}}&\mathbf{O}&\mathbf{O}&\mathbf{0}\\\
\mathbf{O}&\mathbf{O}&\mathbf{M}_{\mathrm{e}}^{\omega_{i}}&\mathbf{O}&\mathbf{0}\\\
\mathbf{O}&\mathbf{O}&\mathbf{O}&\mathbf{O}&\mathbf{0}\\\
\mathbf{0}&\mathbf{0}&\mathbf{0}&\mathbf{0}&0\end{bmatrix},$ 19
$\displaystyle(\mathbf{J}^{\omega_{i}}-\mathbf{R}^{\omega_{i}})(\mathbf{z}^{\omega_{i}})\coloneqq\begin{bmatrix}\mathbf{O}&\mathbf{J}^{\omega_{i}}_{\uprho,\mathrm{m}}&\mathbf{O}&\mathbf{O}&\mathbf{0}\\\
\mathbf{J}^{\omega_{i}}_{\mathrm{m},\uprho}&\mathbf{O}&\mathbf{J}^{\omega_{i}}_{\mathrm{m},\mathrm{e}}+\tilde{\mathbf{J}}^{\omega_{i}}_{\mathrm{m},\mathrm{e}}&\mathbf{T}^{\omega_{i}}_{\mathrm{m}}&\mathbf{0}\\\
\mathbf{O}&\mathbf{J}^{\omega_{i}}_{\mathrm{e},\mathrm{m}}+\tilde{\mathbf{J}}^{\omega_{i}}_{\mathrm{e},\mathrm{m}}&-\mathbf{R}^{\omega_{i}}_{\mathrm{e},\mathrm{e}}&\mathbf{O}&\mathbf{t}^{\omega_{i}}_{\mathrm{e}}\\\
\mathbf{O}&-(\mathbf{T}^{\omega_{i}}_{\mathrm{m}})^{T}&\mathbf{O}&\mathbf{O}&\mathbf{0}\\\
\mathbf{0}&\mathbf{0}&-(\mathbf{t}_{\mathrm{e}}^{\omega_{i}})^{T}&\mathbf{0}&0\end{bmatrix},\mathbf{B}^{\omega_{i}}(\mathbf{z}^{\omega_{i}},\mathbf{f_{\mathrm{B}}}^{\omega_{i}})\coloneqq\begin{bmatrix}\mathbf{0}&\mathbf{0}&\mathbf{0}\\\
\mathbf{0}&\mathbf{0}&\mathbf{0}\\\
\mathbf{b}^{\omega_{i}}&\mathbf{0}&\mathbf{b}^{\omega_{i}}_{\mathrm{e}}\\\
0&1&0\\\ 0&0&1\\\
0&0&\frac{e^{\omega_{i}}|_{\nu}}{f_{\mathrm{B}}^{\omega_{i}}|_{\nu}}\end{bmatrix},$

The state-dependent matrices, boundary-operators and
$\bm{\varepsilon}^{\omega_{i}}$ are given as in 32. The following coupling
procedure is inspired by ideas from [DHL+21]. With respect to the
$\mathcal{L}^{2}(\mathcal{E})$ inner-product, the matrices and tensors of the
same kind are collected in a block-diagonal manner. Therefore, we have for
example,

$\displaystyle\mathbf{M}_{\uprho}^{\mathcal{E}}=\begin{bmatrix}\mathbf{M}_{\uprho}^{\omega_{1}}&\mathbf{O}&\cdots&\mathbf{O}\\\
\mathbf{O}&\mathbf{M}_{\uprho}^{\omega_{2}}&\mathbf{O}&\vdots\\\
\vdots&&\ddots&\mathbf{O}\\\
\mathbf{O}&\cdots&\mathbf{O}&\mathbf{M}_{\uprho}^{\omega_{k}}\end{bmatrix}.$

Thus, the state and effort vectors are created by stacking the respective
pipe-vectors on top of each other. Doing this leads to a big system of the
form of 18 with 19, where the superscript $\omega_{i}$ is exchanged for
$\mathcal{E}$. However, the created system still lacks the coupling
conditions, which need to be incorporated next. As $(\mathrm{S}_{out})$ can be
transformed into a condition for $e^{\omega_{i}}|_{\nu}$,
$\nu\in\leavevmode\nobreak\ \mathcal{N}_{0}$, if $\omega_{i}=(\nu,\bar{\nu})$,
it is simply plugged into
$\mathbf{B}^{\omega_{i}}(\mathbf{z}^{\omega_{i}},\mathbf{f_{\mathrm{B}}}^{\omega_{i}})$.
For implementing $(\mathrm{M})$ and $(\mathrm{H})$, i.e., 13a and 13b, we
rearrange the network input $\mathbf{u}^{\mathcal{E}}$, such that we have
$\mathbf{u}^{\mathcal{E}}=[\mathbf{u}_{T_{\infty}}^{T}\quad\mathbf{u}_{0}^{T}\quad\mathbf{u}_{\partial}^{T}]^{T}$.
Here, $\mathbf{u}_{T_{\infty}}$ collects the ambient temperatures of each
pipe, $\mathbf{u}_{0}$ the boundary flow variables at all coupling nodes
$\nu_{0}\in\mathcal{N}_{0}$ and $\mathbf{u}_{\partial}$ the boundary flow
variables at all boundary nodes $\nu_{\partial}\in\mathcal{N}_{\partial}$.
Accordingly, we rearrange $\mathbf{B}^{\mathcal{E}}$ into
$\mathbf{B}^{\mathcal{E}}=[\mathbf{B}_{T_{\infty}}\quad\mathbf{B}_{0}\quad\mathbf{B}_{\partial}]$.
We can then express the mass conservation with the help of Definition 35 as
$\mathbf{C}\mathbf{u}_{0}=\mathbf{0}$, as the multiplication of each row of
$\mathbf{C}$ with $\mathbf{u}_{0}$, i.e., $\mathbf{C}_{i,:}\mathbf{u}_{0}$,
sums up the boundary flow variables at the coupling node $\nu_{i}$,
$i=1,\dots,|\mathcal{N}_{0}|$. For $(\mathrm{H})$, i.e., the enthalpy equality
at the coupling nodes, we need to make use of the boundary effort variables at
the interior nodes, as shown in 13b. From Section 2.1.1 we know that these are
given by the output equation. For the network output we have,

$\displaystyle\mathbf{y}^{\mathcal{E}}=\begin{bmatrix}\mathbf{y}_{T_{\infty}}^{T}&\mathbf{y}^{T}_{0}&\mathbf{y}^{T}_{\partial}\end{bmatrix}^{T}=\begin{bmatrix}\mathbf{B}_{T_{\infty}}&\mathbf{B}_{0}&\mathbf{B}_{\partial}\end{bmatrix}^{T}\mathbf{\tilde{e}}^{\mathcal{E}}(\mathbf{z}^{\mathcal{E}}).$

Extracting the output equation for the interior nodes yields
$\mathbf{y}_{0}=\mathbf{B}_{0}^{T}\mathbf{\tilde{e}}^{\mathcal{E}}(\mathbf{z}^{\mathcal{E}})$,
which gives us the enthalpy at each interior node $\nu\in\mathcal{N}_{0}$. We
collect the Lagrange multipliers from 13b into a vector
$\bm{\lambda}_{\mathrm{H}}\in\mathbb{R}^{|\mathcal{N}_{0}|}$. To make sure
that we have enthalpy equality at every coupling node, we set
$\mathbf{y}_{0}=\mathbf{C}^{T}\bm{\lambda}_{\mathrm{H}}$, i.e., we have that
$\mathbf{C}^{T}\bm{\lambda}_{\mathrm{H}}=\mathbf{B}_{0}^{T}\mathbf{\tilde{e}}^{\mathcal{E}}(\mathbf{z}^{\mathcal{E}})$.
So, mass conservation and enthalpy equality on the interior nodes are given by

$\displaystyle\mathbf{C}\mathbf{u}_{0}=\mathbf{0},\quad\text{and}\quad\mathbf{C}^{T}\bm{\lambda}_{\mathrm{H}}-\mathbf{B}_{0}^{T}\mathbf{\tilde{e}}^{\mathcal{E}}(\mathbf{z}^{\mathcal{E}})=\mathbf{0}.$

Adding these equations to the block-diagonally ordered system, yields the
coordinate system for the coupled network system. By construction, the system
is still port-Hamiltonian. The system matrix on the right side is skew-
symmetric disregarding the symmetric positive semi-definite matrix
$\mathbf{R}(\mathbf{z}^{\mathcal{E}})$. Furthermore, the condition
$(\mathbf{E}^{\mathcal{E}}(\mathbf{z}^{\mathcal{E}}))^{T}\mathbf{\tilde{e}}^{\mathcal{E}}(\mathbf{z}^{\mathcal{E}})=\nabla_{\mathbf{z}^{\mathcal{E}}}\mathcal{H}^{\mathcal{E}}(\mathbf{z}^{\mathcal{E}})$
is fulfilled, see [Hau24]. The Coordinate Representation 36 is a port-
Hamiltonian differential-algebraic equation of differentiation index 2, see
[Hau24] for the proof.

##  Appendix B Derivations and Proofs

###  B.1. Derivation of Boundary Port Variables 7

For the port-Hamiltonian formulation of System $E^{v}_{pH}$ the boundary
effort and flow variables can be stated in the following way

$\displaystyle\mathbf{f_{\mathrm{B}}}=[f_{\mathrm{B}}|_{L}\quad
f_{\mathrm{B}}|_{0}]^{T},\quad\mathbf{e_{\mathrm{B}}}=[e_{\mathrm{B}}|_{L}\quad
e_{\mathrm{B}}|_{0}]^{T}$

with

$\displaystyle\begin{bmatrix}f_{\mathrm{B}}|_{L}\\\
e_{\mathrm{B}}|_{L}\end{bmatrix}=\begin{bmatrix}0&-1&0\\\
1&0&\frac{e+p}{\rho}|_{L}\end{bmatrix}\left.\begin{bmatrix}\frac{v^{2}}{2}\\\
\rho v\\\ 1\end{bmatrix}\right|_{L},\quad\begin{bmatrix}f_{\mathrm{B}}|_{0}\\\
e_{\mathrm{B}}|_{0}\end{bmatrix}=\begin{bmatrix}0&1&0\\\
1&0&\frac{e+p}{\rho}|_{0}\end{bmatrix}\left.\begin{bmatrix}\frac{v^{2}}{2}\\\
\rho v\\\ 1\end{bmatrix}\right|_{0}.$

The papers [LGZM05] and [Vil07] deduce the boundary port variables elegantly
from the skew-adjoint operator $J$ by building a matrix $Q$ from which they
derive different parametrizations of $\mathbf{e_{\mathrm{B}}}$ and
$\mathbf{f_{\mathrm{B}}}$. The first paper only considers non-singular state-
independent $Q$ matrices, but [Vil07] expands this approach to singular
systems, which are still state-independent. We adapt the ansatz from [Vil07]
and, as our systems are highly state-dependent, we tackle this difficulty. In
the following, we focus on the operator $J(z)$, defined in System
$E^{v}_{pH}$, as this operator contains the differential terms, which are
responsible for the boundary terms. Let
$\mathbf{e}_{1},\mathbf{e}_{2}\in\mathcal{H}^{1}(\omega)^{3}$. Imitating the
steps in [Vil07], we get that,

$\displaystyle(\mathbf{e}_{1},J(z)\mathbf{e}_{2})+(J(z)\mathbf{e}_{1},\mathbf{e}_{2})$
$\displaystyle=\left.\left[\mathbf{e}_{1}^{T}\underbrace{\begin{bmatrix}0&-1&0\\\
-1&0&-\frac{e+p}{\rho}\\\
0&-\frac{e+p}{\rho}&0\end{bmatrix}}_{Q(z)}\mathbf{e}_{2}\right]\right|_{0}^{L}=\begin{bmatrix}\mathbf{e}_{1}|_{L}\\\
\mathbf{e}_{1}|_{0}\end{bmatrix}^{T}\begin{bmatrix}Q(z)|_{L}&0\\\
0&-Q(z)|_{0}\end{bmatrix}\begin{bmatrix}\mathbf{e}_{2}|_{L}\\\
\mathbf{e}_{2}|_{0}\end{bmatrix}=(*).$

The aim of [Vil07] is to find a splitting, such that the bilinear form above
is no longer dependent on the state in the boundary terms, i.e., the state-
dependency is shifted into the boundary flow and effort variables, and can be
written as,

$\displaystyle(*)$ $\displaystyle=\left(\begin{bmatrix}M_{Q}|_{L}&0\\\
0&M_{Q}|_{0}\end{bmatrix}\begin{bmatrix}\mathbf{e}_{1}|_{L}\\\
\mathbf{e}_{1}|_{0}\end{bmatrix}\right)^{T}\begin{bmatrix}\tilde{Q}(z)|_{L}&0\\\
0&-\tilde{Q}(z)|_{0}\end{bmatrix}\begin{bmatrix}M_{Q}|_{L}&0\\\
0&M_{Q}|_{0}\end{bmatrix}\begin{bmatrix}\mathbf{e}_{2}|_{L}\\\
\mathbf{e}_{2}|_{0}\end{bmatrix}\stackrel{{\scriptstyle!}}{{=}}\begin{bmatrix}f_{\partial,\mathbf{e}_{1}}\\\
e_{\partial,\mathbf{e}_{1}}\end{bmatrix}^{T}\bm{\Sigma}\begin{bmatrix}f_{\partial,\mathbf{e}_{2}}\\\
e_{\partial,\mathbf{e}_{2}}\end{bmatrix}.$

with $\bm{\Sigma}=\begin{bmatrix}\mathbf{O}&\mathbf{I}\\\
\mathbf{I}&\mathbf{O}\end{bmatrix}$. Here, $\mathbf{I}$ denotes the identity
matrix and $\mathbf{O}$ the zero matrix of suitable dimension. The matrices
$M_{Q}$ and $\tilde{Q}$ need to be deduced from $Q(z)$, i.e.,

$\displaystyle Q(z)=\begin{bmatrix}0&-1&0\\\ -1&0&-\frac{e+p}{\rho}\\\
0&-\frac{e+p}{\rho}&0\end{bmatrix}$

and the boundary flow and efforts are defined as, see [Vil07],

$\displaystyle\begin{bmatrix}f_{\partial,\mathbf{e}}\\\
e_{\partial,\mathbf{e}}\end{bmatrix}=R_{ext}\begin{bmatrix}M_{Q}|_{L}&0\\\
0&M_{Q}|_{0}\end{bmatrix}\begin{bmatrix}e_{\mathrm{S}}|_{L}\\\
e_{\mathrm{S}}|_{0}\end{bmatrix},$

i.e., they are deduced from the storage effort variables evaluated at the
boundary. $R_{ext}$ has to fulfill,

$\displaystyle
R_{ext}^{T}\bm{\Sigma}R_{ext}=\begin{bmatrix}\tilde{Q}(z)|_{L}&0\\\
0&-\tilde{Q}(z)|_{0}\end{bmatrix}.$

To compute the matrix $M_{Q}$, we need to choose a basis for
$\operatorname{image}(Q(z))$, e.g,

$\operatorname{image}(Q(z))=\mathrm{span}\left\\{\begin{bmatrix}0\\\ 1\\\
0\end{bmatrix},\begin{bmatrix}1\\\ 0\\\
\frac{e+p}{\rho}\end{bmatrix}\right\\}.$

This yields the matrices $M$, $\tilde{Q}$ and $M_{Q}$,

$\displaystyle M$ $\displaystyle=\begin{bmatrix}0&1\\\ 1&0\\\
0&\frac{e+p}{\rho}\end{bmatrix},\quad\tilde{Q}=M^{T}QM=\begin{bmatrix}0&-\frac{\rho^{2}+(e+p)^{2}}{\rho^{2}}\\\
-\frac{\rho^{2}+(e+p)^{2}}{\rho^{2}}&0\end{bmatrix},$ $\displaystyle M_{Q}$
$\displaystyle=(M^{T}M)^{-1}M^{T}=\begin{bmatrix}0&1&0\\\
\frac{\rho^{2}}{\rho^{2}+(e+p)^{2}}&0&\frac{(e+p)\rho}{\rho^{2}+(e+p)^{2}}\end{bmatrix}.$

Of course, these matrices are all state-dependent, but in favor of a shorter
notation we suppress the dependency on $z$. We want to create the boundary
port variables 4. For this we need that

$\displaystyle\begin{bmatrix}f_{\partial,\mathbf{e}}\\\
e_{\partial,\mathbf{e}}\end{bmatrix}\stackrel{{\scriptstyle!}}{{=}}\begin{bmatrix}f_{\mathrm{B}}|_{L}\\\
f_{\mathrm{B}}|_{0}\\\ e_{\mathrm{B}}|_{L}\\\
e_{\mathrm{B}}|_{0}\end{bmatrix}=\underbrace{\begin{bmatrix}0&-1&0&0&0&0\\\
0&0&0&0&1&0\\\ 1&0&\left.\frac{e+p}{\rho}\right|_{L}&0&0&0\\\
0&0&0&1&0&\left.\frac{e+p}{\rho}\right|_{0}\end{bmatrix}}_{=R_{ext}\begin{bmatrix}M_{Q}|_{L}&0\\\
0&M_{Q}|_{0}\end{bmatrix}}\begin{bmatrix}e_{\mathrm{S}_{1}}|_{L}\\\
e_{\mathrm{S}_{2}}|_{L}\\\ e_{\mathrm{S}_{3}}|_{L}\\\
e_{\mathrm{S}_{1}}|_{0}\\\ e_{\mathrm{S}_{2}}|_{0}\\\
e_{\mathrm{S}_{3}}|_{0}\end{bmatrix},$

Thus, the matrix $R_{ext}$ is given as,

$\displaystyle R_{ext}=\begin{bmatrix}-1&0&0&0\\\ 0&0&1&0\\\
0&\left.\frac{\rho^{2}+(e+p)^{2}}{\rho^{2}}\right|_{L}&0&0\\\
0&0&0&\left.\frac{\rho^{2}+(e+p)^{2}}{\rho^{2}}\right|_{0}\end{bmatrix}.$

This matrix also fulfills

$\displaystyle R_{ext}^{T}\bm{\Sigma}R_{ext}$
$\displaystyle=\begin{bmatrix}-1&0&0&0\\\
0&0&\left.\frac{\rho^{2}+(e+p)^{2}}{\rho^{2}}\right|_{L}&0\\\ 0&1&0&0\\\
0&0&0&\left.\frac{\rho^{2}+(e+p)^{2}}{\rho^{2}}\right|_{0}\end{bmatrix}\begin{bmatrix}0&0&1&0\\\
0&0&0&1\\\ 1&0&0&0\\\ 0&1&0&0\end{bmatrix}\begin{bmatrix}-1&0&0&0\\\
0&0&1&0\\\ 0&\left.\frac{\rho^{2}+(e+p)^{2}}{\rho^{2}}\right|_{L}&0&0\\\
0&0&0&\left.\frac{\rho^{2}+(e+p)^{2}}{\rho^{2}}\right|_{0}\end{bmatrix}$
$\displaystyle=\begin{bmatrix}0&-\left.\frac{\rho^{2}+(e+p)^{2}}{\rho^{2}}\right|_{L}&0&0\\\
-\left.\frac{\rho^{2}+(e+p)^{2}}{\rho^{2}}\right|_{L}&0&0&0\\\
0&0&0&\left.\frac{\rho^{2}+(e+p)^{2}}{\rho^{2}}\right|_{0}\\\
0&0&\left.\frac{\rho^{2}+(e+p)^{2}}{\rho^{2}}\right|_{0}&0\end{bmatrix}=\begin{bmatrix}\tilde{Q}(z)|_{L}&0\\\
0&-\tilde{Q}(z)|_{0}\end{bmatrix}.$

Thus, the boundary ports 4 are in line with [LGZM05] and [Vil07], considering
the additional state-dependency.

###  B.2. Proof of Theorem 7

Let
$\mathcal{F}=\mathcal{H}^{1}(\omega)^{3}\times\mathcal{L}^{2}(\omega)^{3}\times\mathcal{L}^{2}(\omega)\times\mathbb{R}^{2}$
and
$\mathcal{E}=\mathcal{H}^{1}(\omega)^{3}\times\mathcal{L}^{2}(\omega)^{3}\times\mathcal{L}^{2}(\omega)\times\mathbb{R}^{2}$.
Then the underlying Stokes-Dirac structure is given by the linear subset
$\mathcal{D}\subset\mathcal{F}\times\mathcal{E}$,

$\displaystyle\begin{split}\mathcal{D}=&\Bigl{\\{}[[f_{\omega},\mathbf{f_{\mathrm{B}}}],[e_{\omega},\mathbf{e_{\mathrm{B}}}]]\in\mathcal{F}\times\mathcal{E}|\,[pe_{\mathrm{S}_{3}},\,\frac{e}{\rho}e_{\mathrm{S}_{2}},\,\frac{1}{\rho}e_{\mathrm{S}_{2}}]\in\mathcal{H}^{1}(\omega)^{3}\\\
&\quad\begin{bmatrix}f_{\mathrm{S}}\\\ f_{\mathrm{R}}\\\
f_{\mathrm{P}}\end{bmatrix}+\begin{bmatrix}J(z)&\mathbf{I}&B\\\
-\mathbf{I}&\mathbf{O}&\mathbf{0}\\\
-B^{T}&\mathbf{0}&0\end{bmatrix}\begin{bmatrix}e_{\mathrm{S}}\\\
e_{\mathrm{R}}\\\ e_{\mathrm{P}}\end{bmatrix}=\begin{bmatrix}\mathbf{0}\\\
\mathbf{0}\\\ 0\end{bmatrix},\\\ &\quad\begin{bmatrix}f_{\mathrm{B}}|_{L}\\\
e_{\mathrm{B}}|_{L}\end{bmatrix}=\begin{bmatrix}0&-1&0\\\
1&0&\frac{e+p}{\rho}|_{L}\end{bmatrix}e_{\mathrm{S}}|_{L},\quad\begin{bmatrix}f_{\mathrm{B}}|_{0}\\\
e_{\mathrm{B}}|_{0}\end{bmatrix}=\begin{bmatrix}0&1&0\\\
1&0&\frac{e+p}{\rho}|_{0}\end{bmatrix}e_{\mathrm{S}}|_{0}\Bigr{\\}}.\end{split}$

Furthermore, the system of equations

$\displaystyle\begin{split}f_{\mathrm{S}}&=-E(z)\partial_{t}z,\quad
e_{\mathrm{S}}=\frac{\delta\mathcal{H}}{\delta z}(z),\quad
e_{\mathrm{R}}=-R(z)f_{\mathrm{R}},\quad e_{\mathrm{P}}=T_{\infty},\\\
&\quad[[f_{\omega},\mathbf{f_{\mathrm{B}}}],[e_{\omega},\mathbf{e_{\mathrm{B}}}]]\in\mathcal{D},\end{split}$

is equivalent to the original System $E^{v}_{pH}$, and
$\langle[f_{\omega},\mathbf{f_{\mathrm{B}}}],[e_{\omega},\mathbf{e_{\mathrm{B}}}]\rangle=0$
represents the power-balance equation.

###### Proof.

To prove that 5 is a Stokes-Dirac structure as defined in Definition 5, we
have to show that $\mathcal{D}=\mathcal{D}^{\perp}$. We do this analogously to
[BSA+21, BZI+21], by showing that (i) $\mathcal{D}\subset\mathcal{D}^{\perp}$
and (ii) $\mathcal{D}^{\perp}\subset\mathcal{D}$ using the bilinear form 2.
For part (i) of the proof, we begin with considering two pairs of flow and
effort variables belonging to the Dirac structure, i.e.,
$[[f_{\omega},\mathbf{f_{\mathrm{B}}}],[e_{\omega},\mathbf{e_{\mathrm{B}}}]]\in\mathcal{D}$
and
$[[\tilde{f}_{\omega},\mathbf{\tilde{f}_{\mathrm{B}}}],[\tilde{e}_{\omega},\mathbf{\tilde{e}_{\mathrm{B}}}]]\in\mathcal{D}$.
Using 3 the bilinear form 2 yields,

$\displaystyle\langle\langle[f_{\omega},\mathbf{f_{\mathrm{B}}},e_{\omega},\mathbf{e_{\mathrm{B}}}],[\tilde{f}_{\omega},\mathbf{\tilde{f}_{\mathrm{B}}},\tilde{e}_{\omega},\mathbf{\tilde{e}_{\mathrm{B}}}]\rangle\rangle=\langle[f_{\omega},\mathbf{f_{\mathrm{B}}}],[\tilde{e}_{\omega},\mathbf{\tilde{e}_{\mathrm{B}}}]\rangle+\langle[e_{\omega},\mathbf{e_{\mathrm{B}}}],[\tilde{f}_{\omega},\mathbf{\tilde{f}_{\mathrm{B}}}]\rangle$
$\displaystyle\quad=\int_{\omega}f_{\mathrm{S}}\cdot\tilde{e}_{\mathrm{S}}+f_{\mathrm{R}}\cdot\tilde{e}_{\mathrm{R}}+f_{\mathrm{P}}\cdot\tilde{e}_{\mathrm{P}}dx+\mathbf{f_{\mathrm{B}}}\cdot\mathbf{\tilde{e}_{\mathrm{B}}}+\int_{\omega}e_{\mathrm{S}}\cdot\tilde{f}_{\mathrm{S}}+e_{\mathrm{R}}\cdot\tilde{f}_{\mathrm{R}}+e_{\mathrm{P}}\cdot\tilde{f}_{\mathrm{P}}dx+\mathbf{e_{\mathrm{B}}}\cdot\mathbf{\tilde{f}_{\mathrm{B}}}=(*).$

Using 5, we get

$\displaystyle(*)=$
$\displaystyle\int_{\omega}-(J(z)e_{\mathrm{S}})^{T}\tilde{e}_{\mathrm{S}}-(Be_{\mathrm{P}})^{T}\tilde{e}_{\mathrm{S}}-(\mathbf{I}e_{\mathrm{R}})^{T}\tilde{e}_{\mathrm{S}}+(\mathbf{I}e_{\mathrm{S}})^{T}\tilde{e}_{\mathrm{R}}+(B^{T}e_{\mathrm{S}})^{T}\tilde{e}_{\mathrm{P}}dx+\mathbf{f_{\mathrm{B}}}\cdot\mathbf{\tilde{e}_{\mathrm{B}}}$
$\displaystyle\quad+\int_{\omega}-e_{\mathrm{S}}^{T}J(z)\tilde{e}_{\mathrm{S}}-e_{\mathrm{S}}^{T}B\tilde{e}_{\mathrm{P}}-e_{\mathrm{S}}^{T}\mathbf{I}\tilde{e}_{\mathrm{R}}+e_{\mathrm{R}}^{T}\mathbf{I}\tilde{e}_{\mathrm{S}}+e_{\mathrm{P}}^{T}B^{T}\tilde{e}_{\mathrm{S}}dx+\mathbf{e_{\mathrm{B}}}\cdot\mathbf{\tilde{f}_{\mathrm{B}}}$
$\displaystyle=\int_{\omega}-e_{\mathrm{S}}^{T}J(z)^{T}\tilde{e}_{\mathrm{S}}dx+\mathbf{f_{\mathrm{B}}}\cdot\mathbf{\tilde{e}_{\mathrm{B}}}+\int_{\omega}-e_{\mathrm{S}}^{T}J(z)\tilde{e}_{\mathrm{S}}dx+\mathbf{e_{\mathrm{B}}}\cdot\mathbf{\tilde{f}_{\mathrm{B}}}.$

Be aware that to show that the above is equal to zero, Corollary 4 cannot be
applied, since the boundary terms do not vanish here. Thus, plugging in the
definition of the system operator $J(z)$ from System $E^{v}_{pH}$ and
performing integration by parts in some terms shows that

$\displaystyle\langle\langle[f_{\omega},\mathbf{f_{\mathrm{B}}},e_{\omega},\mathbf{e_{\mathrm{B}}}],[\tilde{f}_{\omega},\mathbf{\tilde{f}_{\mathrm{B}}},\tilde{e}_{\omega},\mathbf{\tilde{e}_{\mathrm{B}}}]\rangle\rangle=0,$

i.e., we utilize the skew-adjointness of $J(z)$ in the $\mathcal{L}^{2}$
inner-product with respect to the boundary terms, and hence we have that
$\mathcal{D}\subset\mathcal{D}^{\perp}$, which concludes part (i) of the
proof.
For the second part (ii) of the proof, we choose
$[[\tilde{f}_{\omega},\mathbf{\tilde{f}_{\mathrm{B}}}],[\tilde{e}_{\omega},\mathbf{\tilde{e}_{\mathrm{B}}}]]\in\mathcal{D}^{\perp}$
arbitrarily, such that

$\displaystyle\langle\langle[f_{\omega},\mathbf{f_{\mathrm{B}}},e_{\omega},\mathbf{e_{\mathrm{B}}}],[\tilde{f}_{\omega},\mathbf{\tilde{f}_{\mathrm{B}}},\tilde{e}_{\omega},\mathbf{\tilde{e}_{\mathrm{B}}}]\rangle\rangle=0,$
20

for all
$[[f_{\omega},\mathbf{f_{\mathrm{B}}}],[e_{\omega},\mathbf{e_{\mathrm{B}}}]]\in\mathcal{D}$.
We show that
$[[\tilde{f}_{\omega},\mathbf{\tilde{f}_{\mathrm{B}}}],[\tilde{e}_{\omega},\mathbf{\tilde{e}_{\mathrm{B}}}]]\in\mathcal{D}^{\perp}$
fulfills the definitions of the flow and effort variables in 5 and thus,
$[[\tilde{f}_{\omega},\mathbf{\tilde{f}_{\mathrm{B}}}],[\tilde{e}_{\omega},\mathbf{\tilde{e}_{\mathrm{B}}}]]\in\mathcal{D}$.
For this, we take the freedom to choose the effort variables $e_{\omega}$ for
$[[f_{\omega},\mathbf{f_{\mathrm{B}}}],[e_{\omega},\mathbf{e_{\mathrm{B}}}]]\in\mathcal{D}$.
Since for an arbitrary choice of
$[[\tilde{f}_{\omega},\mathbf{\tilde{f}_{\mathrm{B}}}],[\tilde{e}_{\omega},\mathbf{\tilde{e}_{\mathrm{B}}}]]\in\mathcal{D}^{\perp}$,
20 is fulfilled for all
$[[f_{\omega},\mathbf{f_{\mathrm{B}}}],[e_{\omega},\mathbf{e_{\mathrm{B}}}]]\in\mathcal{D}$,
we can make a certain choice for
$[[f_{\omega},\mathbf{f_{\mathrm{B}}}],[e_{\omega},\mathbf{e_{\mathrm{B}}}]]\in\mathcal{D}$
and 20 is still fulfilled. As
$[[f_{\omega},\mathbf{f_{\mathrm{B}}}],[e_{\omega},\mathbf{e_{\mathrm{B}}}]]\in\mathcal{D}$
the flow variable $f_{\omega}$ and the boundary flow and effort variables
$\mathbf{f_{\mathrm{B}}}$ and $\mathbf{e_{\mathrm{B}}}$ are defined through 5
and can be inserted into the bilinear form, i.e.,

$\displaystyle(*)$
$\displaystyle=\int_{\omega}-(J(z)e_{\mathrm{S}})^{T}\tilde{e}_{\mathrm{S}}-(Be_{\mathrm{P}})^{T}\tilde{e}_{\mathrm{S}}-(\mathbf{I}e_{\mathrm{R}})^{T}\tilde{e}_{\mathrm{S}}+(\mathbf{I}e_{\mathrm{S}})^{T}\tilde{e}_{\mathrm{R}}+(B^{T}e_{\mathrm{S}})^{T}\tilde{e}_{\mathrm{P}}dx+\mathbf{f_{\mathrm{B}}}\cdot\mathbf{\tilde{e}_{\mathrm{B}}}$
$\displaystyle\quad+\int_{\omega}e_{\mathrm{S}}\cdot\tilde{f}_{\mathrm{S}}+e_{\mathrm{R}}\cdot\tilde{f}_{\mathrm{R}}+e_{\mathrm{P}}\cdot\tilde{f}_{\mathrm{P}}dx+\mathbf{e_{\mathrm{B}}}\cdot\mathbf{\tilde{f}_{\mathrm{B}}}.$

In the following we use that $e_{\mathrm{S}}=[e_{\mathrm{S}_{1}}\quad
e_{\mathrm{S}_{2}}\quad e_{\mathrm{S}_{3}}]^{T}$. This splitting can be
analogously done for the $\tilde{}$ and all other three dimensional
quantities. Using the definition of the $J(z)$ and $B$ operators from System
$E^{v}_{pH}$ in the above equation we get,

$\displaystyle(*)$
$\displaystyle=\int_{\omega}\tilde{e}_{\mathrm{S}_{2}}\partial_{x}e_{\mathrm{S}_{1}}+\tilde{e}_{\mathrm{S}_{1}}\partial_{x}e_{\mathrm{S}_{2}}+\tilde{e}_{\mathrm{S}_{3}}\left(-\frac{\lambda}{2d}v|v|e_{\mathrm{S}_{2}}+\partial_{x}(\frac{e}{\rho}e_{\mathrm{S}_{2}})+p\partial_{x}(\frac{1}{\rho}e_{\mathrm{S}_{2}})\right)$
$\displaystyle\quad+\tilde{e}_{\mathrm{S}_{2}}\left(\frac{\lambda}{2d}v|v|e_{\mathrm{S}_{3}}+\frac{e}{\rho}\partial_{x}e_{\mathrm{S}_{3}}+\frac{1}{\rho}\partial_{x}(pe_{\mathrm{S}_{3}})\right)-\frac{k_{\omega}}{d}e_{\mathrm{P}}\tilde{e}_{\mathrm{S}_{3}}-(\mathbf{I}_{l}e_{\mathrm{R}})^{T}\tilde{e}_{\mathrm{S}}$
$\displaystyle\quad+(\mathbf{I}_{l}e_{\mathrm{S}})^{T}\tilde{e}_{\mathrm{R}}+\frac{k_{\omega}}{d}e_{\mathrm{S}_{3}}\tilde{e}_{\mathrm{P}}dx+\mathbf{f_{\mathrm{B}}}\cdot\mathbf{\tilde{e}_{\mathrm{B}}}+\int_{\omega}e_{\mathrm{S}}\cdot\tilde{f}_{\mathrm{S}}+e_{\mathrm{R}}\cdot\tilde{f}_{\mathrm{R}}+e_{\mathrm{P}}\cdot\tilde{f}_{\mathrm{P}}dx+\mathbf{e_{\mathrm{B}}}\cdot\mathbf{\tilde{f}_{\mathrm{B}}}.$

The proof now consists of the following nine similar steps and uses partial
integration.

  1. (1)

Let
$[[f_{\omega},\mathbf{f_{\mathrm{B}}}],[e_{\omega},\mathbf{e_{\mathrm{B}}}]]\in\mathcal{D}$
with $e_{\mathrm{S}_{2}}=e_{\mathrm{S}_{3}}=e_{\mathrm{P}}=0$,
$e_{\mathrm{R}}=\mathbf{0}$ and
$e_{\mathrm{S}_{1}}|_{0}=e_{\mathrm{S}_{1}}|_{L}=0$. Plugging this into the
bilinear form, we are left with

$\displaystyle
0=\int_{\omega}\tilde{e}_{\mathrm{S}_{2}}\partial_{x}e_{\mathrm{S}_{1}}+e_{\mathrm{S}_{1}}\tilde{e}_{\mathrm{R}_{1}}dx+\int_{\omega}e_{\mathrm{S}_{1}}\tilde{f}_{\mathrm{S}_{1}}dx=\int_{\omega}-e_{\mathrm{S}_{1}}\partial_{x}\tilde{e}_{\mathrm{S}_{2}}+e_{\mathrm{S}_{1}}\tilde{e}_{\mathrm{R}_{1}}dx+\int_{\omega}e_{\mathrm{S}_{1}}\tilde{f}_{\mathrm{S}_{1}}dx$

and thus, by using partial integration in the first term we have that
$\tilde{f}_{\mathrm{S}_{1}}=\partial_{x}\tilde{e}_{\mathrm{S}_{2}}-\leavevmode\nobreak\
\tilde{e}_{\mathrm{R}_{1}}$ with
$\tilde{e}_{\mathrm{S}_{2}}\in\mathcal{H}^{1}(\omega)$.

  2. (2)

Let
$[[f_{\omega},\mathbf{f_{\mathrm{B}}}],[e_{\omega},\mathbf{e_{\mathrm{B}}}]]\in\mathcal{D}$
with $e_{\mathrm{S}_{1}}=e_{\mathrm{S}_{3}}=e_{\mathrm{P}}=0$,
$e_{\mathrm{R}}=\mathbf{0}$ and
$e_{\mathrm{S}_{2}}|_{0}=e_{\mathrm{S}_{2}}|_{L}=0$. Plugging this into the
bilinear form we are left with

$\displaystyle 0$
$\displaystyle=\int_{\omega}\tilde{e}_{\mathrm{S}_{1}}\partial_{x}e_{\mathrm{S}_{2}}+\tilde{e}_{\mathrm{S}_{3}}(-\frac{\lambda}{2d}v|v|e_{\mathrm{S}_{2}}+\partial_{x}(\frac{e}{\rho}e_{\mathrm{S}_{2}})+p\partial_{x}(\frac{1}{\rho}e_{\mathrm{S}_{2}}))+e_{\mathrm{S}_{2}}\tilde{e}_{\mathrm{R}_{2}}dx+\int_{\omega}e_{\mathrm{S}_{2}}\tilde{f}_{\mathrm{S}_{2}}dx.$

By using partial integration in the terms where $e_{\mathrm{S}_{2}}$ is in a
partial derivative we get that
$\tilde{f}_{\mathrm{S}_{2}}=\partial_{x}\tilde{e}_{\mathrm{S}_{1}}+\frac{\lambda}{2d}v|v|\tilde{e}_{\mathrm{S}_{3}}+\frac{e}{\rho}\partial_{x}\tilde{e}_{\mathrm{S}_{3}}+\frac{1}{\rho}\partial_{x}(p\tilde{e}_{\mathrm{S}_{3}})-\tilde{e}_{\mathrm{R}_{2}}$
with
$\tilde{e}_{\mathrm{S}_{1}},\,\tilde{e}_{\mathrm{S}_{3}},\,p\tilde{e}_{\mathrm{S}_{3}}\in\mathcal{H}^{1}(\omega)$.

  3. (3)

Let
$[[f_{\omega},\mathbf{f_{\mathrm{B}}}],[e_{\omega},\mathbf{e_{\mathrm{B}}}]]\in\mathcal{D}$
with $e_{\mathrm{S}_{1}}=e_{\mathrm{S}_{2}}=e_{\mathrm{P}}=0$,
$e_{\mathrm{R}}=\mathbf{0}$ and
$e_{\mathrm{S}_{3}}|_{0}=e_{\mathrm{S}_{3}}|_{L}=0$. Plugging this into the
bilinear form we are left with

$\displaystyle 0$
$\displaystyle=\int_{\omega}\tilde{e}_{\mathrm{S}_{2}}(\frac{\lambda}{2d}v|v|e_{\mathrm{S}_{3}}+\frac{e}{\rho}\partial_{x}e_{\mathrm{S}_{3}}+\frac{1}{\rho}\partial_{x}(pe_{\mathrm{S}_{3}}))+e_{\mathrm{S}_{3}}\tilde{e}_{\mathrm{R}_{3}}+e_{\mathrm{S}_{3}}\frac{k_{\omega}}{d}\tilde{e}_{\mathrm{P}}dx+\int_{\omega}e_{\mathrm{S}_{3}}\tilde{f}_{\mathrm{S}_{3}}dx.$

By using partial integration in the terms where $e_{\mathrm{S}_{3}}$ is in a
partial derivative we get that
$\tilde{f}_{\mathrm{S}_{3}}=-\frac{\lambda}{2d}v|v|\tilde{e}_{\mathrm{S}_{2}}+\partial_{x}(\frac{e}{\rho}\tilde{e}_{\mathrm{S}_{2}})+p\partial_{x}(\frac{1}{\rho}\tilde{e}_{\mathrm{S}_{2}})-\tilde{e}_{\mathrm{R}_{3}}-\frac{k_{\omega}}{d}\tilde{e}_{\mathrm{P}}$
with
$\frac{e}{\rho}\tilde{e}_{\mathrm{S}_{2}},\,\frac{1}{\rho}\tilde{e}_{\mathrm{S}_{2}}\in\mathcal{H}^{1}(\omega)$.

  4. (4)

Let
$[[f_{\omega},\mathbf{f_{\mathrm{B}}}],[e_{\omega},\mathbf{e_{\mathrm{B}}}]]\in\mathcal{D}$
with $e_{\mathrm{S}}=\mathbf{0}$, $e_{\mathrm{P}}=0$. Plugging this into the
bilinear form we are left with

$\displaystyle 0$
$\displaystyle=\int_{\omega}e_{\mathrm{R}}\cdot\tilde{f}_{\mathrm{R}}dx+\int_{\omega}-(\mathbf{I}e_{\mathrm{R}})^{T}\tilde{e}_{\mathrm{S}}dx,$

i.e., we get $\tilde{f}_{\mathrm{R}}=\mathbf{I}\tilde{e}_{\mathrm{S}}$.

  5. (5)

Let
$[[f_{\omega},\mathbf{f_{\mathrm{B}}}],[e_{\omega},\mathbf{e_{\mathrm{B}}}]]\in\mathcal{D}$
with $e_{\mathrm{S}}=e_{\mathrm{R}}=\mathbf{0}$. Plugging this into the
bilinear form we are left with

$\displaystyle
0=\int_{\omega}e_{\mathrm{P}}\cdot\tilde{f}_{\mathrm{P}}dx+\int_{\omega}-\frac{k_{\omega}}{d}e_{\mathrm{P}}\tilde{e}_{\mathrm{S}_{3}}dx$

and therefore, it is
$\tilde{f}_{\mathrm{P}}=\frac{k_{\omega}}{d}\tilde{e}_{\mathrm{S}_{3}}=B^{T}\tilde{e}_{\mathrm{S}}$.

  6. (6)

Let
$[[f_{\omega},\mathbf{f_{\mathrm{B}}}],[e_{\omega},\mathbf{e_{\mathrm{B}}}]]\in\mathcal{D}$
with $e_{\mathrm{S}_{2}}=e_{\mathrm{S}_{3}}=e_{\mathrm{P}}=0$,
$e_{\mathrm{R}}=\mathbf{0}$ and $e_{\mathrm{S}_{1}}|_{0}=0$. Plugging this
into the bilinear form and using step 1. we are left with

$\displaystyle 0$
$\displaystyle=\int_{\omega}\tilde{e}_{\mathrm{S}_{2}}\partial_{x}e_{\mathrm{S}_{1}}dx+\int_{\omega}e_{\mathrm{S}_{1}}\partial_{x}\tilde{e}_{\mathrm{S}_{2}}dx+\tilde{f}_{\mathrm{B}}|_{L}e_{\mathrm{S}_{1}}|_{L}=\tilde{f}_{\mathrm{B}}|_{L}e_{\mathrm{S}_{1}}|_{L}+\tilde{e}_{\mathrm{S}_{2}}|_{L}e_{\mathrm{S}_{1}}|_{L},$

and from this it follows that
$\tilde{f}_{\mathrm{B}}|_{L}=-\tilde{e}_{\mathrm{S}_{2}}|_{L}$.

  7. (7)

Let
$[[f_{\omega},\mathbf{f_{\mathrm{B}}}],[e_{\omega},\mathbf{e_{\mathrm{B}}}]]\in\mathcal{D}$
with $e_{\mathrm{S}_{2}}=e_{\mathrm{S}_{3}}=e_{\mathrm{P}}=0$,
$e_{\mathrm{R}}=\mathbf{0}$ and $e_{\mathrm{S}_{1}}|_{L}=0$. Plugging this
into the bilinear form and using step 1. we are left with

$\displaystyle 0$
$\displaystyle=\int_{\omega}\tilde{e}_{\mathrm{S}_{2}}\partial_{x}e_{\mathrm{S}_{1}}dx+\int_{\omega}e_{\mathrm{S}_{1}}\partial_{x}\tilde{e}_{\mathrm{S}_{2}}dx+\tilde{f}_{\mathrm{B}}|_{0}e_{\mathrm{S}_{1}}|_{0}=-\tilde{f}_{\mathrm{B}}|_{0}e_{\mathrm{S}_{1}}|_{0}+\tilde{e}_{\mathrm{S}_{2}}|_{0}e_{\mathrm{S}_{1}}|_{0},$

and from this it follows that
$\tilde{f}_{\mathrm{B}}|_{0}=\tilde{e}_{\mathrm{S}_{2}}|_{0}$.

  8. (8)

Let
$[[f_{\omega},\mathbf{f_{\mathrm{B}}}],[e_{\omega},\mathbf{e_{\mathrm{B}}}]]\in\mathcal{D}$
with $e_{\mathrm{S}_{2}}=e_{\mathrm{S}_{3}}=e_{\mathrm{P}}=0$,
$e_{\mathrm{R}}=\mathbf{0}$ and $e_{\mathrm{S}_{1}}|_{L}=0$. Plugging this
into the bilinear form and using step 2. we are left with

$\displaystyle 0$
$\displaystyle=\int_{\omega}\tilde{e}_{\mathrm{S}_{1}}\partial_{x}e_{\mathrm{S}_{2}}+\tilde{e}_{\mathrm{S}_{3}}(-\frac{\lambda}{2d}v|v|e_{\mathrm{S}_{2}}+\partial_{x}(\frac{e}{\rho}e_{\mathrm{S}_{2}})+p\partial_{x}(\frac{1}{\rho}e_{\mathrm{S}_{2}}))$
$\displaystyle\quad+e_{\mathrm{S}_{2}}(\partial_{x}\tilde{e}_{\mathrm{S}_{1}}+\frac{\lambda}{2d}v|v|\tilde{e}_{\mathrm{S}_{3}}+\frac{e}{\rho}\partial_{x}\tilde{e}_{\mathrm{S}_{3}}+\frac{1}{\rho}\partial_{x}(p\tilde{e}_{\mathrm{S}_{3}}))dx+f_{\mathrm{B}}|_{0}\tilde{e}_{\mathrm{B}}|_{0}$
$\displaystyle=-e_{\mathrm{S}_{2}}|_{0}(\tilde{e}_{\mathrm{S}_{1}}+\frac{e+p}{\rho}\tilde{e}_{\mathrm{S}_{3}})|_{0}+e_{\mathrm{S}_{2}}|_{0}\tilde{e}_{\mathrm{B}}|_{0},$

i.e.,
$\tilde{e}_{\mathrm{B}}|_{0}=\tilde{e}_{\mathrm{S}_{1}}|_{0}+\frac{e+p}{\rho}|_{0}\tilde{e}_{\mathrm{S}_{3}}|_{0}$.

  9. (9)

Let
$[[f_{\omega},\mathbf{f_{\mathrm{B}}}],[e_{\omega},\mathbf{e_{\mathrm{B}}}]]\in\mathcal{D}$
with $e_{\mathrm{S}_{2}}=e_{\mathrm{S}_{3}}=e_{\mathrm{P}}=0$,
$e_{\mathrm{R}}=\mathbf{0}$ and $e_{\mathrm{S}_{1}}|_{0}=0$. Plugging this
into the bilinear form and using step 2. we are left with

$\displaystyle 0$
$\displaystyle=\int_{\omega}\tilde{e}_{\mathrm{S}_{1}}\partial_{x}e_{\mathrm{S}_{2}}+\tilde{e}_{\mathrm{S}_{3}}(-\frac{\lambda}{2d}v|v|e_{\mathrm{S}_{2}}+\partial_{x}(\frac{e}{\rho}e_{\mathrm{S}_{2}})+p\partial_{x}(\frac{1}{\rho}e_{\mathrm{S}_{2}}))$
$\displaystyle\quad+e_{\mathrm{S}_{2}}(\partial_{x}\tilde{e}_{\mathrm{S}_{1}}+\frac{\lambda}{2d}v|v|\tilde{e}_{\mathrm{S}_{3}}+\frac{e}{\rho}\partial_{x}\tilde{e}_{\mathrm{S}_{3}}+\frac{1}{\rho}\partial_{x}(p\tilde{e}_{\mathrm{S}_{3}}))dx+f_{\mathrm{B}}|_{L}\tilde{e}_{\mathrm{B}}|_{L}$
$\displaystyle=e_{\mathrm{S}_{2}}|_{L}(\tilde{e}_{\mathrm{S}_{1}}+\frac{e+p}{\rho}\tilde{e}_{\mathrm{S}_{3}})|_{L}-e_{\mathrm{S}_{2}}|_{L}\tilde{e}_{\mathrm{B}}|_{L},$

i.e.,
$\tilde{e}_{\mathrm{B}}|_{L}=\tilde{e}_{\mathrm{S}_{1}}|_{L}+\frac{e+p}{\rho}|_{L}\tilde{e}_{\mathrm{S}_{3}}|_{L}$.

This shows that
$[[\tilde{f}_{\omega},\mathbf{\tilde{f}_{\mathrm{B}}}],[\tilde{e}_{\omega},\mathbf{\tilde{e}_{\mathrm{B}}}]]\in\mathcal{D}$
if
$[[\tilde{f}_{\omega},\mathbf{\tilde{f}_{\mathrm{B}}}],[\tilde{e}_{\omega},\mathbf{\tilde{e}_{\mathrm{B}}}]]\in\mathcal{D}^{\perp}$
and therefore, $\mathcal{D}^{\perp}\subset\mathcal{D}$. This finally proves
that the set $\mathcal{D}$ in 5 describes a Stokes-Dirac structure as defined
in Definition 5.
To end the proof of Theorem 7 we need to show that 5 together with 6 is
equivalent to the original system $E^{v}_{pH}$. For this, we need to plug 6
into

$\displaystyle\begin{bmatrix}f_{\mathrm{S}}\\\ f_{\mathrm{R}}\\\
f_{\mathrm{P}}\end{bmatrix}+\begin{bmatrix}J(z)&\mathbf{I}&B\\\
-\mathbf{I}&\mathbf{O}&\mathbf{0}\\\
-B^{T}&\mathbf{0}&0\end{bmatrix}\begin{bmatrix}e_{\mathrm{S}}\\\
e_{\mathrm{R}}\\\ e_{\mathrm{P}}\end{bmatrix}=\begin{bmatrix}\mathbf{0}\\\
\mathbf{0}\\\ 0\end{bmatrix}$

and rearrange the equations, i.e.,

$\displaystyle-E(z)\partial_{t}z$
$\displaystyle=-J(z)\frac{\delta\mathcal{H}}{\delta
z}(z)-BT_{\infty}+R(z)f_{\mathrm{R}},$ $\displaystyle f_{\mathrm{R}}$
$\displaystyle=\frac{\delta\mathcal{H}}{\delta z}(z),$ $\displaystyle
f_{\mathrm{P}}$ $\displaystyle=B^{T}\frac{\delta\mathcal{H}}{\delta z}(z).$

Multiplying the first equation by $-1$ and inserting $f_{\mathrm{R}}$ yields,

$\displaystyle E(z)\partial_{t}z$
$\displaystyle=(J(z)-R(z))\frac{\delta\mathcal{H}}{\delta z}(z)+BT_{\infty},$
$\displaystyle f_{\mathrm{P}}$
$\displaystyle=B^{T}\frac{\delta\mathcal{H}}{\delta z}(z),$

which is equivalent to System $E^{v}_{pH}$ with $f_{\mathrm{P}}=y$, which acts
as an output in the port-Hamiltonian framework. ∎

## Statements and Declarations

### Competing interests

The authors have no competing interests to declare that are relevant to the
content of this article.

### Data availability statement

Data sets generated during the current study are available from the
corresponding author on reasonable request.

## References

  * [AH16] B. Afkham and J. Hesthaven.  Structure preserving model reduction of parametric hamiltonian systems.  SIAM J. Sci. Comput., 39(6):A2616–A2644, 2016.
  * [AH19] B. Afkham and J. Hesthaven.  Structure-preserving model-reduction of dissipative hamiltonian systems.  J. Sci. Comput., 81:2–21, 2019.
  * [AMU21] R. Altmann, V. Mehrmann, and B. Unger.  Port-hamiltonian formulations of poroelastic network models.  Math. Comput. Model. Dyn. Syst., 27(1):429–452, 2021.
  * [AS17] R. Altmann and P. Schulze.  A port-hamiltonian formulation of the navier–stokes equations for reactive flows.  Syst. Control Lett., 100:51–55, 2017.
  * [BGM22] C. Beattie, S. Gugercin, and V. Mehrmann.  Structure-Preserving Interpolatory Model Reduction for Port-Hamiltonian Differential-Algebraic Systems, pages 235–254.  Springer International Publishing, Cham, 2022.
  * [BK+] B. Bader, T. Kolda, et al.  Tensor toolbox for matlab, version 3.6.
  * [BLVC16] A. Bermúdez, X. López, and E. Vázquez-Cendón.  Numerical solution of non-isothermal non-adiabatic flow of real gases in pipelines.  J. Comput. Phys., 323:126–148, 2016.
  * [BMBM18] A. Moses Badlyan, B. Maschke, C. Beattie, and V. Mehrmann.  Open physical systems: From GENERIC to port-Hamiltonian systems.  In Proceedings of the 23rd International Symposium on Mathematical Theory of Systems and Networks, pages 204–211, 2018.
  * [BMXZ18] C. Beattie, V. Mehrmann, H. Xu, and H. Zwart.  Linear port-Hamiltonian descriptor systems.  Math. Control. Signals Syst., 30:17, 2018.
  * [BPBM21] A. Brugnoli, V. Pommier-Budinger, and D. Matignon.  Port-hamiltonian flexible multibody dynamics.  Multibody Syst. Dyn., 51, 2021.
  * [BS21] T. Breiten and P. Schulze.  Structure-preserving linear quadratic gaussian balanced truncation for port-hamiltonian descriptor systems, 2021.
  * [BSA+21] H. Bansal, P. Schulze, M. Abbasi, H. Zwart, L. Iapichino, W. Schilders, and N. van de Wouw.  Port-hamiltonian formulation of two-phase flow models.  Syst. Control Lett., 149:104881, 2021.
  * [BU22] T. Breiten and B. Unger.  Passivity preserving model reduction via spectral factorization.  Automatica, 142:110368, 2022.
  * [BWI+20] H. Bansal, S. Weiland, L. Iapichino, W. Schilders, and N. van de Wouw.  Structure-preserving spatial discretization of a two-fluid model.  In 2020 59th IEEE Conference on Decision and Control, pages 5062–5067, 2020.
  * [BZ18] A. Moses Badlyan and C. Zimmer.  Operator-generic formulation of thermodynamics of irreversible processes, 2018.
  * [BZI+21] H. Bansal, H. Zwart, L. Iapichino, W. Schilders, and N. van de Wouw.  Port-hamiltonian modelling of fluid dynamics models with variable cross-section.  IFAC-PapersOnLine, 54(9):365–372, 2021.
  * [CBG16] S. Chaturantabut, C. Beattie, and S. Gugercin.  Structure-preserving model reduction for nonlinear port-hamiltonian systems.  SIAM J. Sci. Comput., 38(5):B837–B865, 2016.
  * [Cle22] T. Clees.  Contingency analysis for gas transport networks with hydrogen injection.  Math. Meth. Oper. Res., 95:533–563, 2022.
  * [CRML18] F. Cardoso-Ribeiro, D. Matignon, and L. Lefèvre.  A structure-preserving partitioned finite element method for the 2d wave equation.  IFAC-PapersOnLine, 51(3):119–124, 2018.
  * [CS12] S. Chaturantabut and D. Sorensen.  A state space error estimate for pod-deim nonlinear model reduction.  SIAM J. Numer. Anal., 50(1):46–63, 2012.
  * [DHL+21] P. Domschke, B. Hiller, J. Lang, V. Mehrmann, R. Morandin, and C. Tischendorf.  Gas network modeling: An overview.  2021\.
  * [Dob10] M. Dobrowolski.  Angewandte Funktionalanalysis: Funktionalanalysis, Sobolev-Räume und elliptische Differentialgleichungen.  Springer Berlin Heidelberg, 2010.
  * [Egg16] H. Egger.  A mixed variational discretization for non-isothermal compressible flow in pipelines, 2016.
  * [EK18] H. Egger and T. Kugler.  Damped wave systems on networks: Exponential stability and uniform approximations.  Numer. Math., 138(4):839–867, 2018.
  * [EKL+18] H. Egger, T. Kugler, B. Liljegren-Sailer, N. Marheineke, and V. Mehrmann.  On structure-preserving model reduction for damped wave propagation in transport networks.  SIAM J. Sci. Comput., 40(1):A331–A365, 2018.
  * [FACC14] C. Farhat, P. Avery, T. Chapman, and J. Cortial.  Dimensional reduction of nonlinear finite element dynamic models with finite rotations and energy-based mesh sampling and weighting for computational efficiency.  Int. J. Numer. Methods Eng., 98(9):625–662, 2014.
  * [FGLSM23] A. Frommer, M. Günther, B. Liljegren-Sailer, and N. Marheineke.  Operator splitting for port-hamiltonian systems, 2023.  To appear in: Progress in Industrial Mathematics at ECMI 2023.
  * [GHV21] C. Gräßle, M. Hinze, and S. Volkwein.  2 Model Order Reduction by Proper Orthogonal Decomposition, pages 47–96.  De Gruyter, Berlin, Boston, 2021.
  * [GO97] M. Grmela and H. Öttinger.  Dynamics and thermodynamics of complex fluids. i. development of a general formalism.  Phys. Rev. E, 56:6620–6632, 1997.
  * [GPBvdS12] S. Gugercin, R. Polyuga, C. Beattie, and A. van der Schaft.  Structure-preserving tangential interpolation for model reduction of port-hamiltonian systems.  Automatica, 48(9):1963–1974, 2012.
  * [Hau24] S.-A. Hauschild.  Structure-Preserving Numerical Approximations for a Port-Hamiltonian Formulation of the Non-Isothermal Euler Equations.  PhD thesis, Universität Trier, 2024.
  * [HCF17] J. Hernández, M. Caicedo, and A. Ferrer.  Dimensional hyper-reduction of nonlinear finite element models via empirical cubature.  Comput. Methods Appl. Mech. Eng., 313:687–722, 2017.
  * [Her08] M. Herty.  Coupling conditions for networked systems of euler equations.  SIAM J. Sci.Comput., 30(3):1596–1612, 2008.
  * [HMM19] S.-A. Hauschild, N. Marheineke, and V. Mehrmann.  Model reduction techniques for linear constant coefficient port-hamiltonian differential-algebraic systems.  Control Cyber., 48(1), 2019.
  * [HMM+20] S.-A. Hauschild, N. Marheineke, V. Mehrmann, J. Mohring, A. Moses Badlyan, M. Rein, and M. Schmidt.  Port-hamiltonian modeling of district heating networks.  In T. Reis, S. Grundel, and S. Schöps, editors, Progress in Differential-Algebraic Equations II, pages 333–355, Cham, 2020. Springer International Publishing.
  * [HP20] J. Hesthaven and C. Pagliantini.  Structure-preserving reduced basis methods for hamiltonian systems with a state-dependent poisson structure.  Math. Comput., 90:1, 2020.
  * [IA13] T. Ionescu and A. Astolfi.  Moment matching for nonlinear port-hamiltonian and gradient systems.  IFAC Proceedings Volumes, 46(23):395–399, 2013.
  * [IW13] T. Iliescu and Z. Wang.  Are the snapshot difference quotients needed in the proper orthogonal decomposition?  SIAM J. Sci. Comput., 36:A1221–A1250, 2013.
  * [JEGJ22] J. Jäschke, M. Ehrhardt, M. Günther, and B. Jacob.  A port-hamiltonian formulation of coupled heat transfer.  Math. Comput. Model. Dyn. Syst., 28(1):78–94, 2022.
  * [JZ12] B. Jacob and H. Zwart.  Linear Port-Hamiltonian Systems on Infinite-Dimensional Spaces.  Operator Theory: Advances and Applications. Springer Basel, 2012.
  * [KH17] M. Kraus and E. Hirvijoki.  Metriplectic integrators for the landau collision operator.  Phys. Plasmas, 24, 2017.
  * [KKMS17] M. Kraus, K. Kormann, P. Morrison, and E. Sonnendrücker.  Gempic: Geometric electromagnetic particle-in-cell methods.  J. Plasma Phys., 83(4):905830401, 2017.
  * [KL18] P. Kotyczka and L. Lefèvre.  Discrete-time port-hamiltonian systems based on gauss-legendre collocation.  IFAC-PapersOnLine, 51(3):125–130, 2018.
  * [KML18] P. Kotyczka, B. Maschke, and L. Lefèvre.  Weak form of stokes–dirac structures and geometric discretization of port-hamiltonian systems.  J. Comput. Phys., 361:442–476, 2018.
  * [Kot16] P. Kotyczka.  Finite volume structure-preserving discretization of 1d distributed-parameter port-hamiltonian systems.  IFAC-PapersOnLine, 49(8):298–303, 2016.
  * [KU18] B. Karasözen and M. Uzunca.  Energy preserving model order reduction of the nonlinear schrödinger equation.  Adv. Comput. Math., 44:1769–1796, 12 2018.
  * [KV01] K. Kunisch and S. Volkwein.  Galerkin proper orthogonal decomposition methods for parabolic problems.  Numer. Math., 90:117–148, 2001.
  * [KV02] K. Kunisch and S. Volkwein.  Galerkin proper orthogonal decomposition methods for a general equation in fluid dynamics.  SIAM J. Numer. Anal., 40:492–515, 2002.
  * [KYU21] B. Karasözen, S. Yıldız, and M. Uzunca.  Structure preserving model order reduction of shallow water equations.  Math. Methods Appl. Sci., 44(1):476–492, 2021.
  * [LeV92] R. LeVeque.  Numerical Methods for Conservation Laws.  Lectures in Mathematics ETH Zürich. Birkhäuser Verlag, Basel, second edition, 1992.
  * [LGZM05] Y. Le Gorrec, H. Zwart, and B. Maschke.  Dirac structures and boundary control systems associated with skew-symmetric differential operators.  SIAM J. Control Optim., 44(5):1864–1892, 2005.
  * [LKL21] M. Lohmayer, P. Kotyczka, and S. Leyendecker.  Exergetic port-hamiltonian systems: Modelling basics.  Math. Comput. Modell. Dyn. Syst., 27(1):489–521, 2021.
  * [LM17] L. Lefevre and S. Medianu.  Symplectic discretization of port controlled hamiltonian systems.  IFAC-PapersOnLine, 50(1):3629–3634, 2017.
  * [LM18] J. Lang and P. Mindt.  Entropy-preserving coupling conditions for one-dimensional euler systems at junctions.  Netw. Heterog. Media, 13(1):177–190, 2018.
  * [LSM22a] B. Liljegren-Sailer and N. Marheineke.  On port-hamiltonian approximation of a nonlinear flow problem on networks.  SIAM J. Sci. Comput., 44(3):B834–B859, 2022.
  * [LSM22b] B. Liljegren-Sailer and N. Marheineke.  On snapshot-based model reduction under compatibility conditions for a nonlinear flow problem on networks.  J. Sci. Comput., 92, 2022.
  * [MM19] V. Mehrmann and R. Morandin.  Structure-preserving discretization for port-hamiltonian descriptor systems.  In 58th IEEE Conference on Decision and Control, 2019, Nice, France, December 11-13, 2019, pages 6863–6868. IEEE, 2019.
  * [MSMV22] T. Moser, P. Schwerdtner, V. Mehrmann, and M. Voigt.  Structure-preserving model order reduction for index two port-hamiltonian descriptor systems, 2022.
  * [MU23] V. Mehrmann and B. Unger.  Control of port-hamiltonian differential-algebraic systems and applications.  Acta Numer., 32:395–515, 2023.
  * [OG97] H. Öttinger and M. Grmela.  Dynamics and thermodynamics of complex fluids. ii. illustrations of a general formalism.  Phys. Rev. E, 56(6):6633–6655, 1997.
  * [PM16] L. Peng and K. Mohseni.  Symplectic model reduction of hamiltonian systems.  SIAM J. Sci. Comput., 38(1):A1–A27, 2016.
  * [PRS23] F. Philipp, T. Reis, and M. Schaller.  Infinite-dimensional port-hamiltonian systems – a system node approach, 2023.
  * [PvdS10] R. Polyuga and A. van der Schaft.  Model reduction of port-hamiltonian systems as structured systems.  In Proceedings of the 19th International Symposium on Mathematical Theory of Networks and Systems (MTNS 2010, Budapest, Hungary, July 5-9, 2010), pages 1509–1513, 2010.
  * [PvdS11] R. Polyuga and A. van der Schaft.  Structure preserving moment matching for port-hamiltonian systems: Arnoldi and lanczos.  IEEE Trans. on Automat. Contr., 56(6):1458–1462, 2011.
  * [PvdS12] R. Polyuga and A. van der Schaft.  Effort- and flow-constraint reduction methods for structure preserving model reduction of port-hamiltonian systems.  Syst. Control Lett., 61(3):412–421, 2012.
  * [Sch23] P. Schulze.  Structure-preserving model reduction for port-hamiltonian systems based on separable nonlinear approximation ansatzes.  Front. Appl. Math. Stat., 9, 2023.
  * [SHM19] A. Serhani, G. Haine, and D. Matignon.  Anisotropic heterogeneous n-d heat equation with boundary control and observation: I. modeling as port-hamiltonian system.  IFAC-PapersOnLine, 52(7):51–56, 2019.
  * [SMH18] A. Serhani, D. Matignon, and G. Haine.  Structure-preserving finite volume method for 2d linear and non-linear port-hamiltonian systems.  IFAC-PapersOnLine, 51(3):131–136, 2018.
  * [SMH19] A. Serhani, D. Matignon, and G. Haine.  Partitioned finite element method for port-hamiltonian systems with boundary damping: Anisotropic heterogeneous 2d wave equations.  IFAC-Papers-OnLine, 52(2):96–101, 2019.
  * [SMMV22] P. Schwerdtner, T. Moser, V. Mehrmann, and M. Voigt.  Structure-preserving model order reduction for index one port-hamiltonian descriptor systems, 2022.
  * [SSvdS14] M. Seslija, J. Scherpen, and A. van der Schaft.  Explicit simplicial discretization of distributed-parameter port-hamiltonian systems.  Automatica, 50(2):369–377, 2014.
  * [TGvdS02] V. Talasila, G. Golo, and A. van der Schaft.  The wave equation as a port-hamiltonian system, and a finite-dimensional approximation.  In D. Gilliam and J. Rosenthal, editors, Proceedings of the 15th International Symposium on Mathematical Theory of Networks and Systems, United States, 2002. University of Notre Dame.
  * [TK22] T. Thoma and P. Kotyczka.  Explicit port-hamiltonian fem-models for linear mechanical systems with non-uniform boundary conditions.  IFAC-PapersOnLine, 55(20):499–504, 2022.
  * [vdSJ14] A. van der Schaft and D. Jeltsema.  Port-Hamiltonian systems theory: An introductory overview.  Found. Trends Syst. Control, 1(2-3):173–378, 2014.
  * [vdSM02] A. van der Schaft and B. Maschke.  Hamiltonian formulation of distributed-parameter systems with boundary energy flow.  J. Geom. Phys., 42(1-2):166–194, 2002.
  * [vdSM23] A. van der Schaft and V. Mehrmann.  Linear port-hamiltonian dae systems revisited.  Syst. Control Lett., 177:105564, 2023.
  * [Vil07] J. Villegas.  A Port-Hamiltonian Approach to Distributed Parameter Systems.  PhD thesis, University of Twente, Netherlands, 2007.
  * [WLEK10] T. Wolf, B. Lohmann, R. Eid, and P. Kotyczka.  Passivity and structure preserving order reduction of linear port-hamiltonian systems using krylov subspaces.  Eur. J. Control, 16(4):401–406, 2010.