  We investigate linear dynamical systems of second order. Uncertainty
quantification is applied, where physical parameters are substituted by random
variables. A stochastic Galerkin method yields a linear dynamical system of
second order with high dimensionality. A structure-preserv\-ing model order
reduction (MOR) produces a small linear dynamical system of second order again.
We arrange an associated port-Hamiltonian (pH) formulation of first order for
the second-order systems. Each pH system implies a Hamiltonian function
describing an internal energy. We examine the properties of the Hamiltonian
function for the stochastic Galerkin systems. We show numerical results using a
test example, where both the stochastic Galerkin method and
structure-preserving MOR are applied.
