Abstract
We develop a novel methodology for data-driven simulation of coupled multi-physics systems. The result of the method is a learned numerical integrator of the coupled system dynamics. In order to preserve the fundamental physics of the coupled systems, and thus preserve the geometrical properties of the governing equations—even if they may be completely unknown—we impose a port-metriplectic structure on the system evolution, i.e., a combination of a symplectic evolution for the system energy with a gradient flow for the entropy of each system, which can be exchanged through predefined ports. The resulting method guarantees by construction the satisfaction of the laws of thermodynamics for open systems, leading to accurate predictions of the future states of their dynamics. Examples are given for systems of varying complexity, based on synthetic as well as experimental data.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
The analysis of complex physical systems from experimental data is a highly topical subject with countless practical applications. Among them, we cite the development of digital twins [1, 2] or structural health monitoring [3], to name but a few. Machine learning techniques developed in recent years shed light on the behavior of these systems, particularly when there is no detailed knowledge of the physical laws governing their behavior.
Although great advances have been made in the development of these techniques, there are still certain difficulties that have prevented their widespread use in industry. These include those related to the accuracy and stability of the predictions made, which are often sensitive to variations in the input data.
This has led to interest in the development of techniques that can ensure a certain degree of accuracy, as well as compliance with known physical laws. If these are fully known, in the form of PDEs, the most widespread technique is the use of physics-informed neural networks, PINNs [4]. However, there is often a discrepancy between the predictions made by these physical laws and the actual behavior of the system under analysis [5]. On other occasions, these equations are not known and these types of techniques can help to determine the physical laws governing the phenomenon, giving rise to explainable artificial intelligence techniques [6]. At other times, solutions are restricted to those that comply with more general physical principles, or of a higher epistemic level. Thus, inductive biases are developed to ensure (within the range of accuracy of the technique) compliance with general physical laws such as conservation [7,8,9,10,11,12], etc.
In general, physics-based machine learning aims to incorporate physical knowledge into purely data-driven strategies. The goal is to devise methods capable of learning the dynamics of physical systems from data and making accurate predictions about states not explicitly included in the training data. In the framework of physics-informed methods, prior knowledge about the system is taken into account to improve the accuracy and interpretability of the results. Of particular interest are the so-called structure-preserving methods [13, 14]. In computational mechanics, geometric numerical integration refers to methods that respect the physics of a particular problem, in particular its geometric characteristics [15, 16].
In particular, we are interested in learning strategies that do not take into account the exact equations that model the problem at hand, simply because it is assumed that they are not known. We focus on general formulations that only impose the fulfillment of universal physical laws, such as the laws of thermodynamics [17,18,19,20]. Thus, the data serve to reveal the particular formulation of the problem under experimental conditions. Then, for new, unseen situations, the structure is predicted by appropriate interpolation.
For closed isolated systems, the General Equation for the Non-Equilibrium Reversible-Irreversible Coupling, GENERIC, formulation [21, 22] defines a general structure for the evolution of the system, while ensuring the first and second laws of thermodynamics are satisfied. Numerical learning strategies based on the GENERIC formalism have successfully been developed in previous works, while numerical integrators with guaranteed stability properties also exist [23]. In them, prediction is performed by appropriate interpolation on the manifold of solutions [17, 24, 25] or by training neural networks [26,27,28]. Alternative formalisms with thermodynamical considerations, such as the generalized Onsager formalism [29, 30], also offer a general structure for the evolution of reversible and irreversible processes [12, 31, 32].
Recently, a machine learning strategy for interacting, dissipative open systems was proposed by Hernández et al [33]. It employs, during the training period, an inductive bias that generalizes port-Hamiltonian structures [34,35,36] to dissipative systems. This strategy essentially develops a port-Hamiltonian formulation, in which GENERIC is extended to open systems that communicate and exchange energy through ports.
In this paper, we present a learning strategy which applies piece-wise linear regression to the terms in the port-metriplectic formulation in [33] for interacting open systems governed by different physics. The resulting method ensures the fulfillment of the principles of thermodynamics (conservation of energy at a global scale, but exchange among sub-systems; non-negative entropy production) for the predicted states of the coupled system. The strategy is specially suitable in cases with a low amount of available data. The robustness of the method is tested for pseudo-experimental (synthetic) and experimental data.
The remainder of the paper is structured as follows. First, we briefly overview the generalized Onsager and GENERIC formalisms modeling the dynamics of closed systems in Sect. 2, and the port-metriplectic formulation for open systems in Sect. 3. Section 4 is devoted to the description of the proposed learning algorithm for the dynamics of open systems. In Sect. 5, we assess the performance of the strategy for three different examples. The discussion in Sect. 6 closes the paper.
2 Dynamics of closed systems
The state of a closed (isolated) system at time t is assumed to be fully described by the value of a set of variables \(\varvec{z}= \varvec{z}(t)\). We can learn the evolution of the system by identifying the structure of the dynamical problem
where function f is unknown in general [37, 38]. In the data-driven approach, the closed form of f is not sought. Instead, we look for an approximation of f that enables a robust and efficient integration in time with sufficient accuracy. Given some observations for the evolution of \(\varvec{z}\) at discrete time instants, function f is readily approximated by applying regression techniques, such as classical linear regression [17, 25, 39], support vector machines [40] or neural networks [26, 33], among others. This classical approach to the problem presents, however, severe limitations. Very often, small perturbations in the input data produces large, physically meaningless outputs.
To void these issues, in the last years we have seen a growing interest in the development of physics-based, structure-preserving and related techniques. One particularly appealing approach to this problem assumes a particular form of f, depending on known properties of the system at hand. For instance, if the system is conservative, the Hamiltonian formalism allows us to assume that f takes the form
where the Hamiltonian \(\mathcal {H}\) is the total energy of the system, E, and \(\varvec{L}\) is the Poisson, skew-symmetric matrix. The problem is then reduced to determine the precise forms of \(\varvec{L}\) and E applying regression to data. While this type of techniques have attracted a lot of interest, purely conservative (reversible) systems are scarce in nature, where the norm is the presence of dissipation.
In what follows we briefly review two alternative formulations for the time evolution of closed systems under reversible and irreversible conditions: the generalized Onsager principle, which is a single-generator formalism, and the GENERIC framework, which is a double-generator formalism. These two approaches incorporate dissipative phenomena into the Hamiltonian formulation (2) and lead to equivalent dynamics. See [32, 41, 42] for a detailed discussion in the relation between single and double operator formalisms.
2.1 Generalized Onsager formalism
The generalized Onsager formalism [29,30,31] is a thermodynamically consistent formulation for the evolution of a non-equilibrium system. This is a single-generator formulation, which means that both the reversible and dissipative contributions to the evolution use the same generator, \({\mathcal {F}}\). The generator \({\mathcal {F}}\) is a potential function with a thermodynamic interpretation such as free energy or negated entropy. The evolution of \(\varvec{z}\) is then modeled as
where \(\varvec{L}\) is a skew-symmetric matrix and \(\varvec{M}\) is symmetric and positive semi-definite. Matrix \(\varvec{L}\) models the conservative part of the system, while \(\varvec{M}\) models the dissipative contribution.
2.2 GENERIC formalism
The General Equation for Non-Equilibrium Reversible-Irreversible Coupling (GENERIC) formalism [21, 22] offers a general description for the evolution of a system based on two operators, accounting for conservative and dissipative phenomena, respectively. Within this approach, the free energy is assumed to take the form \({\mathcal {F}}=E+S\). With this additive decomposition, we have
with \(\varvec{L}\) the Poisson skew-symetric matrix, modeling the conservative part of the evolution, and \(\varvec{M}\) a symmetric and semi-positive definite matrix, responsible for the dissipation of the system. E stands for the energy of the system and S, for its entropy. For Eq. (4) to hold, it is necessary that the so-called degeneracy conditions hold, namely,
and
These conditions ensure the fulfillment of the first and second laws of thermodynamics, this is, conservation of energy and non-decrease of entropy. From (5) and (6), it is straightforward to prove that
given the skew-symmetry of \(\varvec{L}\), and
given the positive semi-definiteness of \(\varvec{M}\). Thus, a regression of (1) based on the GENERIC formulation guarantees satisfying the laws of thermodynamics by construction. This approach is often referred to as metriplectic, since it combines a symplectic contribution to enforce energy conservation and a metric one to enforce entropy production [43, 44].
3 Port-metriplectic formalism for open systems
The formalisms in Sect. 2 can be extended to describe the dynamics of open systems, in which the evolution of the state variables \(\varvec{z}\) is affected by external forces. In this framework, we use the term bulk contribution to refer to the conservative and dissipative phenomena that are inherent to the system, and the term port contribution to refer to the external forces.
In this section, we review the port-Hamiltonian extension of the GENERIC formulation to interacting and open systems proposed by Hernández et al [33], called port-metriplectic formalism. The extension of the generalized Onsager formalism to open systems is analogous [31].
The port-metriplectic formulation for the evolution of state variables \(\varvec{z}\) reads
where we use a GENERIC description of the bulk dynamics and \(\varvec{F}\) accounts for the presence of an external force. In this case, satisfying the degeneracy conditions is not required: conservation of energy and increase of entropy cannot be guaranteed due to the presence of an external port.
In the work by Hernández et al [33], the port contribution \(\varvec{F}\) is also decomposed following the GENERIC structure. That is,
with \(\widetilde{\varvec{L}}\) skew-symmetric and \(\widetilde{\varvec{M}}\) symmetric and positive semi-definite. \(\widetilde{E}\) and \(\widetilde{S}\) stand for the contributions to the energy and entropy of the system which are due to the external force, respectively.
Alternatively, we can follow the one-single operator formalism (3) to decompose \(\varvec{F}\),
with \(\widetilde{\varvec{L}}\) skew-symmetric, \(\widetilde{\varvec{M}}\) symmetric and positive semi-definite and \(\mathcal { {\tilde{F}}}\) the port addition to the bulk free energy \({\mathcal {F}}\). The two descriptions of the port contribution \(\varvec{F}\) lead to the same dynamics.
4 Learning algorithm
For a parametric open system, we denote by \(\mathcal {D}= \{ \varvec{z}(t_n;\mu _j); n = 1,\dots ,n_T,\ j = 1,\dots ,n_p \}\) the dataset with observations of its state variables \(\varvec{z}\) at discrete time instants \(t_1,\dots ,t_{n_T}\), for a representative parametric sampling, \(\mu _1, \dots , \mu _{n_p}\). In this section, we present a strategy to approximate \(\varvec{z}(t_n;\mu ^\star )\), \(n = 1,\dots ,n_T\), for a parameter \(\mu ^\star \) which is not included in the original sampling. The strategy is based on interpolating the terms in the port-metriplectic formulation (9) of the problem.
We distinguish two phases in the process: identification and interpolation. The identification phase consists in the computation of all the elements in (9) (matrices and gradients), at every time step and for all the sampled parameters in the data set. Then, in the interpolation phase, the precomputed elements are properly combined to approximate the port-metriplectic structure for the new parameter \(\mu ^\star \). The details of each phase are discussed next.
4.1 Identification (offline computation)
The first step is computing the value of the matrices and gradients appearing in the port-metriplectic structure (9) of the problem for the parameters \(\mu _j\), \(j = 1,\dots ,n_p\), in the data set \(\mathcal {D}\). Note that this is an offline computation, to be performed once at the beginning of the process.
At time step n, the discretization of Eq. (9) leads to
where we use the forward Euler approximation of the derivative. Although more accurate integration schemes can be employed to minimize the loss of accuracy during the integration, the study of the effects of these schemes in the resulting prediction is not the objective of this work. For a detailed analysis on the topic, the interested reader is referred to [23].
Assuming that the energy and the entropy depend quadratically on the state variables, we approximate
where \(\textsf{A}_{n}\) and \(\textsf{B}_{n}\) are assumed to be diagonal matrices. Of course, more general assumptions can be made, as in [17], but for the examples to follow, this mild simplification has rendered excellent results.
In the following, we take a GENERIC decomposition of the port term \(\textsf{F}_{n}\) as in (10), that is, we express
with \(\widetilde{\textsf{A}}_{n}\) and \(\widetilde{\textsf{B}}_{n}\) diagonal matrices. The formulation for the single-generator decomposition of the port (11) is analogous.
The discrete values of the terms in the equation are computed by solving the minimization problem
where we have omitted the dependence on \(\mu _j\) to simplify the notation. Very often, the Poissson and dissipation matrices have a known structure that can be fixed beforehand, and only the gradients (or equivalently, matrices \(\textsf{A}\) and \(\textsf{B}\)) remain as unknowns.
4.2 Staggered approach
In cases in which data of the equivalent closed system (with no external force acting) are available, the minimization problem in (15) can be solved by means of a staggered approach, in order to facilitate its convergence. In particular, the GENERIC formulation (4) of the closed system is used to determine the bulk contribution of the port-metriplectic open-system formulation. Let \(\mathcal {C} = \left\{ \varvec{z}^c(t_n;\mu _j);\ n = 1,\dots ,n_T,\ j = 1,\dots ,n_p \right\} \) denote the dataset containing the observations for the closed system. In the staggered approach, we take the next two steps:
-
1.
Computation of the terms from the bulk contribution, using the closed-system data in \(\mathcal {C}\). The evolution of the closed system is captured by the GENERIC formulation (4) of the problem. The time discretization of (4) leads to the constrained minimization problem
$$\begin{aligned}{} & {} \{ \textsf{L}_{n}, \textsf{M}_{n}, \textsf{A}_{n}, \textsf{B}_{n} \} \nonumber \\{} & {} =\arg \,\min _{\textsf{L},\textsf{M},\textsf{A},\textsf{B}} \left\| \frac{\varvec{z}^c_{n+1} - \varvec{z}^c_n}{\Delta t} - \textsf{L}\textsf{A}\varvec{z}^c_n - \textsf{M}\textsf{B}\varvec{z}^c_n \right\| , \end{aligned}$$(16)subject to
$$\begin{aligned} \textsf{L}\textsf{B}\varvec{z}^c_n&= \varvec{0}, \\ \textsf{M}\textsf{A}\varvec{z}^c_n&= \varvec{0}. \end{aligned}$$ -
2.
Computation of the port contribution, using the open-system data in \(\mathcal {D}\). The discrete terms in the bulk contribution are replaced by the values obtained in (16). Thus, the remaining terms in \(\textsf{F}_{n+1}\) are obtained by solving
$$\begin{aligned} \begin{aligned} \{ \widetilde{\textsf{L}}_{n}&, \widetilde{\textsf{M}}_{n}, \widetilde{\textsf{A}}_{n}, \widetilde{\textsf{B}}_{n} \} = \\&\arg \,\min _{\widetilde{\textsf{L}},\widetilde{\textsf{M}},\widetilde{\textsf{A}},\widetilde{\textsf{B}}} \Big \Vert \frac{\varvec{z}_{n+1} - \varvec{z}_n}{\Delta t} - \textsf{L}_{n} \textsf{A}_{n} \varvec{z}_n - \\ {}&\textsf{M}_{n} \textsf{B}_{n} \varvec{z}_n - \widetilde{\textsf{L}}\widetilde{\textsf{A}}\varvec{z}_{n} - \widetilde{\textsf{M}}\widetilde{\textsf{B}}\varvec{z}_{n} \Big \Vert . \end{aligned} \end{aligned}$$(17)Note that we are extrapolating the bulk open-system gradients \(\textsf{DE}_{n}\) and \(\textsf{DS}_{n}\) from the closed-system gradients, by using the matrices \(\textsf{A}_{n}\) and \(\textsf{B}_{n}\) that are obtained from the data in \(\mathcal {C}\).
4.3 Interpolation (online computation)
For a new parameter \(\mu ^\star \), we approximate the time evolution of the corresponding state variables, \(\varvec{z}(t_n;\mu ^\star )\), using the discrete port-metriplectic formulation (12). That is, given the initial state variables \(\varvec{z}_1\),
for \(n = 1,\dots ,n_T-1\), with the matrices in the expression to be determined.
Here, we propose to approximate the unknown matrices in the formulation by linear interpolation on the manifold of GENERIC terms. Let \(\mathcal {N}\) denote the set of indices of the neighboring parametric solutions in \(\mathcal {D}\), enclosing the value of \(\mu ^\star \) in the parametric space. Recall that the port-metriplectic terms corresponding to time evolution for \(\mu _i\), \(i\in \mathcal {N}\), are precomputed and stored in the identification phase. Then, at time step n, we approximate
for some weights \(w_i\), \(i\in \mathcal {N}\). The approximation for all unknown matrices in (18) in terms of precomputed matrices for neighboring solutions is analogous.
The weights \(w_i\) are here computed from a linear interpolation in the parametric space of \(\mu \), with \(w_i\ge 0\) for all \(i\in \mathcal {N}\) and \(\sum _{i\in \mathcal {N}}w_i = 1\). That is, the regression is performed globally for all parameters.
5 Numerical results
In what follows, we show the performance of the methodology proposed in Sect. 4 in three different examples involving different physics. Recall that we distinguish two phases: identification and interpolation. In the identification phase we approximate the discrete port-metriplectic structure (12) for a given dataset. In the interpolation phase, we use the learned numerical integrator to predict the evolution of the system in unseen scenarios.
5.1 Damped harmonic oscillator
We consider a one-dimensional harmonic oscillator in the presence of friction [45]. The system can be interpreted as an open system, in which a perfect harmonic oscillator (bulk) is damped because of the action of an external force (port).
We take the independent state variables \(\varvec{z}= \left( q, p, S \right) \), with q the position of the particle, p its momentum and S the entropy of a homogeneous medium causing the friction of the particle. The motion is described by
where m is the mass of the particle, T is the temperature, k is the spring constant and \(\gamma \) is the damping coefficient. The initial condition is of the form \((q_0,0,0)\). We set \(m = 1\) kg, \(T = 25\) K and \(k = 2250\) N/m.
The evolution of the state variables can be modelled by a GENERIC structure (4), with known Poisson and dissipative matrices [45]. In particular,
Here, we aim to model the system by the port-metriplectic formulation (9), through its discretized version (12). The Poisson and dissipative matrices from both the bulk and port contributions are predefined as
where we take the Poisson matrix of the GENERIC formulation, and for the dissipative matrix, we only indicate the zero coefficients and let the gradient matrices \(\textsf{B}\) and \(\widetilde{\textsf{B}}\) acquire the constants.
We account for two different datasets, obtained by integrating the equations for (i) 10 different values of the damping coefficient \(\gamma \), uniformly distributed in \(\left[ 0.2, 2 \right] \) Ns/m, and fixed initial position \(q_0 = -0.075\) m, and (ii) 11 different values of the initial position \(q_0 \in \left[ -0.15,-0.075\right] \) m and fixed \(\gamma = 1\) Ns/m. The snapshots in the datasets are depicted in Fig. 1.
The time discretization is uniform in the interval [0, 10] s, with time increment \(\Delta t = 10^{-3}\) s. The evolution of the corresponding closed system (undamped harmonic oscillator) is also integrated for all cases, with \(\gamma = 0\). The terms in the port-metriplectic formulation are then obtained by following the staggered approach described in Sect. 4.1.
To test the learning algorithm, we interpolate the intermediate elements of the datasets using the GENERIC terms arising from two neighboring snapshots. Since the parametric discretizations are uniform, we have \(w_1 = w_2 = 0.5\) in the linear combinations in (19). The obtained errors are summarized in Fig. 2. For the first dataset, with parametrized damping coefficient, we obtain relative L2 errors around \(10^{-2}\). For the second one, with parametrized initial position, errors are of the order of \(10^{-3}\).
5.2 Vertical sloshing tank
In this example, we use experimental data from the SLOWD database [46, 47]. The experimental setup is a liquid-filled tank, which is attached to a spring-damper system. Figure 3 shows an scheme of the setting. This experiment was thought to characterize the effects of the fuel sloshing in airplane tanks. This fuel acts as a dampener for the wing vibration.
The structure is deflected for the tank to start the motion from an initial position \(q_0\). Then, the tank is released and starts oscillating in the vertical direction. The liquid that fills the tank acts as an external force that interacts with the dynamics.
The available data contains measurements of the vertical position and acceleration of the tank and the load cell force for several configurations. As a post-process, we are able to obtain additional variables such as the momentum, the entropy, and the sloshing force. For the specifications on the setup and the measuring system we refer to Martínez-Carrascal and González-Gutiérrez [46].
The chosen state variables to describe the system are \(\varvec{z}= (q,p,S)\), with q the vertical position of the tank, p its momentum and S the entropy.
We test the proposed learning methodology for two different datasets. In the first set, we account for 9 different filling levels of liquid, from 10 to \(90\%\) of the capacity of the tank, starting the motion from the position \(q_0 = -0.075\) m. The time interval is [0, 6.5] s and it is discretized with time increment \(\Delta t = 9.8\cdot 10^{-4}\) s.
In the second set, we consider the observations for 10 different initial positions \(q_0\) distributed in the interval \([-0.055,-0.011]\) m, and a fixed filling level of \(50\%\). The time interval is [0, 4.5] s and it is discretized with time increment \(\Delta t = 9.4\cdot 10^{-4}\) s. The position evolution for the experiments included in the datasets are shown in Fig. 4.
For all considered configurations, measurements for the equivalent experiments with the dry tank are also available. This enables the use of the staggered scheme in the identification phase of our algorithm. Due to the oscillating behavior of the observations, the Poisson and dissipative matrices in the port-metriplectic formulation are predefined as in Eq. (22).
For previously unseen situations (filling level or initial position as parameters), interpolation is performed using the GENERIC constituents coming from two neighboring snapshots. Figures 5 and 6 show the state variables position and entropy for previously unseen situations using the two datasets. Time integration is performed in the whole time intervals, and is zoomed at [1.6, 1.9] s for illustration purposes. The learned solutions are able to capture the oscillating behavior of the system and, as expected, are located somewhere between the neighboring solutions. This motivates the use of enclosing solutions as neighbors. Figure 7 summarizes the L2 relative errors for interpolation of all available experiments. In both cases, the obtained errors are slightly larger than the errors for the synthetic damped harmonic oscillator example in Sect. 5.1. However, the mean of the errors is below \(10\%\) even in the presence of noise in experimental data.
The strategy performs robustly despite the presence of experimental noise in the data. It is worth mentioning that a naive approach based on pure interpolation of the results by taking the amount of filling of the tank as the governing variable does not lead to any meaningful result.
5.3 Fluid-structure interaction in an oscillating tank
In this case we analyze data coming from a fluid-structure interaction problem taken from [48]. In it, see Fig. 8, a cylindrical tank is attached to a cantilevered beam. Both the solid and fluid dynamics in this experiment share similar characteristics, leading to strong couplings. In the experimental setting, two piezoelectric actuators are attached to the beam, near the encastre. These cause the beam to oscillate in torsion. The motion of the set is captured with the help of two accelerometers at the free edge of the beam.
The movement of the tank in the horizontal direction causes the beam to bend along its weak axis of inertia, while the weight of the tank and the liquid make it bend in the vertical direction. Additionally, oscillations of the tank cause torsion in the beam. On top of all these physical phenomena (two bending directions, torsion and sloshing; the tank is assumed to be perfectly rigid), sloshing of the fluid dampers the dynamics of the tank.
The tank is 0.5 m wide, with an internal cavity of 0.470 m and an internal diameter of 0.105 m. It is made of a material with mass density \(1180~\text {kg}/\text {m}^3\) and filled with water. The beam is assumed to be made of aluminum, with Young’s modulus 75 GPa, Poisson’s ratio 0.33 and mass density \(2970~\text {kg}/\text {m}^3\). Its dimensions are \(1.36\times 0.15\times 0.005~\text {m}^3\).
To obtain synthetic data, the same method developed in [48] is employed. It uses a port-Hamiltonian approach and an appropriate discretization for each physics. The interested reader is referred to this article for more details about the particular implementation. In essence, the beam is assumed to follow a classic Euler-Bernoulli-Navier model for the bending phenomenon, the fluid is assumed to follow the shallow-water equations and, finally, torsion is assumed to be of Saint Venant type. The tank moves as a rigid body. Numerical results obtained under these assumptions are assumed to be the ground truth for our method.
Our vector of (synthetic) measurements is composed by \(\varvec{z}=[ {\varvec{x}}_B, {\varvec{x}}_T, {\varvec{x}}_F, {\varvec{x}}_{RB}]^\top \), where
-
\({\varvec{x}}_B \in {\mathbb {R}}^{2N_B}\) represents the degrees of freedom related to beam bending,
-
\({\varvec{x}}_T \in {\mathbb {R}}^{2N_T}\) represents the degrees of freedom related to beam torsion,
-
\({\varvec{x}}_F \in {\mathbb {R}}^{2N_F}\) represents the degrees of freedom on the fluid’s free surface and
-
\({\varvec{x}}_{RB} \in {\mathbb {R}}^{6}\) represents the degrees of freedom of the rigid-body motion of the tank (three displacements, three rotations of the center of mass).
In the simulations taken as ground truth, \(N_B=N_T=N_F=10\).
The system is analyzed for different degrees of filling of the tank, following a staggered approach, as introduced in Sect. 4.2. Two different data sets are considered, one with 40, 50, ..., 80% of filling, and a more detailed one, with 40, 45, 50, ..., 80% of filling. Following the staggered approach, we first determine the time evolution of each sub-system by identifying the elements of their GENERIC description,
and then we identify the contribution of each port, \(\varvec{F}\),
The error in the reconstruction of a previously unseen degree of filling is evaluated as the \(\ell ^2\)-norm error in the fluid surface. Thus, assuming that there are \(n_{\text {nodes}}\) discretizing the fluid surface, this error is computed as
where \( \varvec{z}_{\text {GT} }\) refers to the height at a given nodal position in the ground truth and \(z_{\text {app}}\) its approximated counterpart, provided by our method.
With these settings, we obtained the errors reported in Table 1 for different filling levels. The reader can notice the excellent degree of accuracy obtained for both datasets. In practice, it seems that the refined dataset does not always provide a substantial increase in accuracy.
In order to ascertain if a more elaborated interpolation scheme could provide with more accurate results, we have also tested a quadratic scheme, that employs three neighboring snapshots to determine the GENERIC structure of the problem. As an example, the 61% filling provides 0.487036% error for the coarse dataset and 0.411062% for the detailed dataset.
The evolution in time of the error is depicted in Fig. 9 for the 47% of filling example.
Finally, for a qualitative evaluation of the error, some snapshots are provided in Fig. 10.
6 Conclusions
We developed a method able to provide with accurate estimates of the dynamics of coupled, multi-physics and parametric systems from data. The method is based first on the regression from experimental or synthetic data of the terms of an assumed port-metriplectic structure for the problem at hand. This ensures that the learnt evolution of the system will satisfy by construction the first and second principles of thermodynamics, even for dissipative, open systems. Then, in a second step, for previously unseen situations, the method interpolates each term of the metriplectic description from neighboring parametric data.
Unlike previous approaches, the just developed method does not employ neural networks, that have demonstrated to be a powerful tool, but classical constrained regression techniques. It nevertheless offers competitive results. The method is robust for synthetic as well as experimental (noisy) datasets, and is able to provide with complete rollouts of the evolution of the different systems tested until stop by dissipation.
It remains as a topic for future analysis wether the employ of existing neural network architectures could offer competitive advantages over the just presented constrained regression approach. In any case, the assumed port-metriplectic structure of the evolution of the different considered systems has shown to be a powerful inductive bias for learning complex, multi-physics systems from data.
References
Sancarlos A, Cameron M, Abel A, Cueto E, Duval J-L, Chinesta F (2021) From rom of electrochemistry to ai-based battery digital and hybrid twin. Arch Computat Methods Eng 28(3):979–1015
Chinesta F, Cueto E, Abisset-Chavanne E, Duval JL, Khaldi FE (2020) Virtual, digital and hybrid twins: a new paradigm in data-based engineering and engineered data. Arch Computat Methods Eng 27(1):105–134
Kamariotis A, Tatsis K, Chatzi E, Goebel K, Straub D (2023) A metric for assessing and optimizing data-driven prognostic algorithms for predictive maintenance. arXiv preprint arXiv:2306.03759
Raissi M, Perdikaris P, Karniadakis GE (2019) Physics-informed neural networks: a deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. J Computat Phys 378:686–707
Ibáñez R, Abisset-Chavanne E, González D, Duval J-L, Cueto E, Chinesta F (2019) Hybrid constitutive modeling: data-driven learning of corrections to plasticity models. Int J Mater Form 12(4):717–725
Brunton SL, Proctor JL, Kutz JN (2016) Discovering governing equations from data by sparse identification of nonlinear dynamical systems. Proc National Acad Sci. https://doi.org/10.1073/pnas.1517384113
Bhattoo R, Ranu S, Krishnan N (2021) Lagrangian neural network with differentiable symmetries and relational inductive bias. arXiv preprint arXiv:2110.03266
Allen-Blanchette C, Veer S, Majumdar A, Leonard NE (2020) Lagnetvip: a lagrangian neural network for video prediction. arXiv preprint arXiv:2010.12932
Roehrl MA, Runkler TA, Brandtstetter V, Tokic M, Obermayer S (2020) Modeling system dynamics with physics-informed neural networks based on lagrangian mechanics. IFAC-PapersOnLine 53(2):9195–9200
Chen Z, Feng M, Yan J, Zha H (2022) Learning neural hamiltonian dynamics: a methodological overview. arXiv preprint arXiv:2203.00128
Bertalan T, Dietrich F, Mezić I, Kevrekidis IG (2019) On learning hamiltonian systems from data. Chaos Interdiscipl J Nonlinear Sci 29(12):121107
Huang S, He Z, Reina C (2022) Variational onsager neural networks (vonns): a thermodynamics-based variational learning strategy for non-equilibrium pdes. J Mechan Phys Solids 163:104856
Jin P, Zhang Z, Zhu A, Tang Y, Karniadakis GE (2020) Sympnets: intrinsic structure-preserving symplectic networks for identifying hamiltonian systems. Neural Netw 132:166–179
Lee K, Trask N, Stinis P (2021) Machine learning structure preserving brackets for forecasting irreversible processes. Adv Neural Inform Process Syst 34:5696–5707
van Gastelen T, Edeling W, Sanderse B (2023) Energy-conserving neural network for turbulence closure modeling. arXiv preprint arXiv:2301.13770
Klein RB, Sanderse B (2023) Structure-preserving hyper-reduction and temporal localization for reduced order models of incompressible flows. arXiv preprint arXiv:2304.09229
González D, Chinesta F, Cueto E (2019) Thermodynamically consistent data-driven computational mechanics. Contin Mechan Thermodyn 31(1):239–253
Masi F, Stefanou I, Vannucci P, Maffi-Berthier V (2021) Thermodynamics-based artificial neural networks for constitutive modeling. J Mechan Phys Solids 147:104277
Trask N, Huang A, Hu X (2022) Enforcing exact physics in scientific machine learning: a data-driven exterior calculus on graphs. J Computat Phys 456:110969
Patel RG, Manickam I, Trask NA, Wood MA, Lee M, Tomas I, Cyr EC (2022) Thermodynamically consistent physics-informed neural networks for hyperbolic systems. J Computat Phys 449:110754
Grmela M, Öttinger HC (1997) Dynamics and thermodynamics of complex fluids. i. development of a general formalism. Phys Rev E 56(6):6620
Öttinger HC (2005) Beyond equilibrium thermodynamics. Wiley, New York. https://doi.org/10.1002/0471727903
Romero I (2009) Thermodynamically consistent time-stepping algorithms for non-linear thermomechanical systems. Int J Numer Methods Eng 79(6):706–732
González D, Chinesta F, Cueto E (2021) Learning non-markovian physics from data. J Computat Phys 428:109982
Moya B, González D, Alfaro I, Chinesta F, Cueto E (2019) Learning slosh dynamics by means of data. Computat Mechan 64(2):511–523
Hernández Q, Badías A, González D, Chinesta F, Cueto E (2021) Structure-preserving neural networks. J Computat Phys 426:109950
Hernandez Q, Badias A, Gonzalez D, Chinesta F, Cueto E (2021) Deep learning of thermodynamics-aware reduced-order models from data. Comput Methods Appl Mechan Eng 379:113763
Hernández Q, Badías A, Chinesta F, Cueto E (2022) Thermodynamics-informed graph neural networks. IEEE Trans Artif Intell. https://doi.org/10.1109/TAI.2022.3179681
Onsager L (1931) Reciprocal relations in irreversible processes. i. Phys Rev J Arch 37:405–426. https://doi.org/10.1103/PhysRev.37.405
Onsager L (1931) Reciprocal relations in irreversible processes. ii. Phys Rev J Arch 38:2265–2279. https://doi.org/10.1103/PhysRev.38.2265
Yu H, Tian X, We E, Li Q (2021) Onsagernet: learning stable and interpretable dynamics using a generalized onsager principle. Phys Rev Fluids 6:114402. https://doi.org/10.1103/PhysRevFluids.6.114402
Eldred C, Gay-Balmaz F (2020) Single and Double generator bracket formulations of geophysical fluids with irreversible processes. J Phys A Math Theoret 53(39):395701. https://doi.org/10.1088/1751-8121/ab91d3
Hernández Q, Badías A, Chinesta F, Cueto E (2023) Port-metriplectic neural networks: thermodynamics-informed machine learning of complex physical systems. Computat Mechan 72:553–561
Poli M, Massaroli S, Yamashita A, Asama H, Park J (2020) Port-hamiltonian gradient flows. In: ICLR 2020 workshop on integration of deep neural models and differential equations
Eidnes S, Stasik AJ, Sterud C, Bøhn E, Riemer-Sørensen S (2022) Port-hamiltonian neural networks with state dependent ports. arXiv preprint arXiv:2206.02660
Furieri L, Galimberti CL, Zakwan M, Ferrari-Trecate G (2022) Distributed neural network control with dependability guarantees: a compositional port-hamiltonian approach. In: learning for dynamics and control conference, pp. 571–583. PMLR
We E (2017) A proposal on machine learning via dynamical systems. Commun Math Statist 5(1):1–11. https://doi.org/10.1007/s40304-017-0103-z
Cueto E, Chinesta F (2023) Thermodynamics of learning physical phenomena. Arch Computat Methods Eng 30(8):4653-4666
González D, Chinesta F, Cueto E (2019) Learning corrections for hyperelastic models from data. Front Mater 6:14. https://doi.org/10.3389/fmats.2019.00014
Hearst MA, Dumais ST, Osuna E, Platt J, Scholkopf B (1998) Support vector machines. IEEE Intell Syst Appl 13(4):18–28
Edwards BJ (1998) An analysis of single and double generator thermodynamic formalisms for the macroscopic description of complex fluids. J Non-Equilib Thermodyn 23(4):301–333. https://doi.org/10.1515/jnet.1998.23.4.301
Edwards BJ, Beris AN, Öttinger HC (1998) An analysis of single and double generator thermodynamic formalisms for complex fluids. ii. the microscopic description. J Non-Equilibr Thermodyn 23(4):334–350. https://doi.org/10.1515/jnet.1998.23.4.334
Morrison PJ (1986) A paradigm for joined hamiltonian and dissipative systems. Phys D Nonlinear Phenom 18(1–3):410–419
Morrison PJ (1984) Bracket formulation for irreversible classical fields. Phys Lett A 100(8):423–427
Öttinger HC (2018) Generic integrators: structure preserving time integration for thermodynamic systems. J Non-Equilibr Thermodyn 43(2):89–100. https://doi.org/10.1515/jnet-2017-0034
Martinez-Carrascal J, González-Gutiérrez LM (2021) Experimental study of the liquid damping effects on a sdof vertical sloshing tank. J Fluids Struct 100:103172. https://doi.org/10.1016/j.jfluidstructs.2020.103172
Martinez-Carrascal J, González-Gutiérrez LM. SOWD experimental database. http://canal.etsin.upm.es/ftp/SLOWD_DATABASE/. Accessed: 2023-09-30
Cardoso-Ribeiro FL, Matignon D, Pommier-Budinger V (2017) A port-hamiltonian model of liquid sloshing in moving containers and application to a fluid-structure system. J Fluids Struct 69:402–427. https://doi.org/10.1016/j.jfluidstructs.2016.12.007
Acknowledgements
This work was supported by the Spanish Ministry of Science and Innovation, AEI/10.13039/501100011033, through Grant numbers PID2020-113463RB-C31, PID2020-113463RB-C33 and by the Ministry for Digital Transformation and the Civil Service, through the ENIA 2022 Chairs for the creation of university-industry chairs in AI, through Grant TSI-100930-2023-1. A.M. also acknowledges the support of the Spanish Ministry of Universities through the Margarita Salas fellowship (European Union - NextGenerationEU). This material is also based upon work supported in part by the Army Research Laboratory and the Army Research Office under contract/grant number W911NF2210271. This research is part of the DesCartes programme and is supported by the National Research Foundation, Prime Minister Office, Singapore under its Campus for Research Excellence and Technological Enterprise (CREATE) programme. The authors also acknowledge the support of ESI Group through the chairs at the University of Zaragoza and at ENSAM Institute of Technology. Finally, the authors wish to express their gratitude to profs. Leo Gonzalez and Jon Martinez, from the Polytechnic University of Madrid, for providing the data in the SLOWD database and for the fruitful discussions.
Funding
Open Access funding provided thanks to the CRUE-CSIC agreement with Springer Nature.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Muixí, A., González, D., Chinesta, F. et al. Structure-preserving formulations for data-driven analysis of coupled multi-physics systems. Comput Mech (2024). https://doi.org/10.1007/s00466-024-02508-x
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s00466-024-02508-x