Real-time simulation of parameter-dependent fluid flows through deep learning-based reduced order models

Simulating fluid flows in different virtual scenarios is of key importance in engineering applications. However, high-fidelity, full-order models relying, e.g., on the finite element method, are unaffordable whenever fluid flows must be simulated in almost real-time. Reduced order models (ROMs) relying, e.g., on proper orthogonal decomposition (POD) provide reliable approximations to parameter-dependent fluid dynamics problems in rapid times. However, they might require expensive hyper-reduction strategies for handling parameterized nonlinear terms, and enriched reduced spaces (or Petrov-Galerkin projections) if a mixed velocity-pressure formulation is considered, possibly hampering the evaluation of reliable solutions in real-time. Dealing with fluid-structure interactions entails even higher difficulties. The proposed deep learning (DL)-based ROMs overcome all these limitations by learning in a non-intrusive way both the nonlinear trial manifold and the reduced dynamics. To do so, they rely on deep neural networks, after performing a former dimensionality reduction through POD enhancing their training times substantially. The resulting POD-DL-ROMs are shown to provide accurate results in almost real-time for the flow around a cylinder benchmark, the fluid-structure interaction between an elastic beam attached to a fixed, rigid block and a laminar incompressible flow, and the blood flow in a cerebral aneurysm.


Introduction
Computational fluid dynamics nowadays provide rigorous and reliable tools for the numerical approximation of fluid flows equations, exploited in several fields, from life sciences to aeronautical engineering. High-fidelity techniques such as, e.g., finite elements, finite volumes as well as spectral methods have been extensively applied in the past decades to the simulation of challenging problems in fluid dynamics, providing quantitative indication about the physical behavior of the system, in view of its better understanding, control, and forecasting. Solving these problems entails the numerical approximation of unsteady Navier-Stokes (NS) equations in three-dimensional domains, possibly accounting for fluid-structure interaction (FSI) effects; this requires fine computational meshes in case one aims at simulating complex flow patterns, and ultimately yielding large-scale nonlinear systems of equations to be solved. Simulating fluid flows in complex configurations through high-fidelity, full-order models (FOMs) is computationally infeasible if one aims at solving the problem multiple times, for different virtual scenarios, or in a very small amount of time -at the limit, in real-time. This is the case, for instance, of blood flow simulations, for which outputs of clinical interest shall be evaluated for different flow conditions, and in different geometrical configurations [1]. In this respect, if quantitative outputs are meant to support clinicians' decisions, each new numerical simulation should be carried out very rapidly on deployed platforms, rather than exploiting huge parallel hardware architectures, and thus requiring limited data storage and memory capacity.
1. the extraction of relevant flow features, such as recirculation regions or boundary layers through convolutional neural networks (CNNs) [24]; 2. the construction of inexpensive, non-intrusive approximations for output quantities of interest for fluid flows [25], or to velocity and pressure field, obtained through Reynolds-averaged Navier-Stokes (RANS) equations [26,27,28]; 3. data-driven turbulence models in RANS equations through a physics-informed machine learning approach [29], or data-driven eddy viscosity closure models in Large Eddy Simulations (LES) [30]; 4. the setting of closure models to stabilize a POD-Galerkin ROM [31] by using, e.g., recurrent neural networks (RNNs) to predict the impact of the unresolved scales on the resolved scales [32], or correction models to adapt a ROM to describe scenarios quite far from the ones seen during the training stage [33]; 5. the reconstruction of a high-resolution flow field from limited flow information [34], as well as the assimilation of flow measurements and computational flow dynamics models derived from first physical principles. This task can be cast in the framework of the so-called physics-informed neural networks [35,36], where NNs are trained to solve supervised learning tasks while respecting the fluid dynamics equations, or tackled by means of Bayesian neural networks [37]; 6. the nonintrusive estimation of POD coefficients through, e.g., feedforward NNs [38,39,40] or probabilistic NNs [41].
In this paper we apply the POD-DL-ROM technique we recently proposed [42] to fluid flow problems, in order to build non-intrusive and extremely efficient ROMs for parameter-dependent unsteady problems in computational fluid dynamics by exploiting (i) deep neural networks as main building block, (ii) a set of FOM snapshots, and (iii) dimensionality reduction of FOM snapshots through (randomized) POD. Despite a preliminary example of its application to a benchmark in fluid dynamics has already been considered to assess the capability of POD-DL-ROMs to handle vector nonlinear problems such as the unsteady Navier-Stokes equations, in order to compute the fluid velocity field only, in this paper we deepen our analysis by considering: (a) the computation of both velocity and pressure fields in the case of unsteady Navier-Stokes equations, (b) the extension to a FSI problem, and (c) the application to a real-life application of interest, namely the simulation of blood flows through a cerebral aneurysm.
Compared to other works appeared recently in the literature, our focus is on parameter-dependent fluid dynamics problems, either involving complex three-dimensional geometries, or FSI effects, and on the use of deep learning (DL)-based ROMs for the sake of real-time simulation of fluid flows, thus relying on nonlinear reduction techniques. Motivated by similar goals, non-intrusive ROMs for fluid dynamics equations have been proposed, e.g., in [43,44,45], where POD has been considered to generate low-dimensional (linear) subspaces, also in the case of FSI problems, and POD coefficients at each time-step are either computed through a radial basis function multi-dimensional interpolation, or extrapolated from the POD coefficients at earlier time-steps.
Applications of DL algorithms in conjunction with POD have already been proposed for the sake of long-term predictions in time, however without addressing parameter-dependent problems. For instance, a long-short term memory (LSTM) network was used to learn the underlying physical dynamics in [46], generating a non-intrusive ROM through the solution snapshots acquired over time. Deep feedforward neural networks (DFNNs) have been used for a similar task in [47] and compared with the sparse identification of nonlinear dynamics (SINDy) algorithm [48]. This latter defines a sparse representation through a linear combination of selected functions, and has been used for data-driven forecasting in fluid dynamics [49]. RNNs have been considered in [50,51] to evolve low-dimensional states of unsteady flows, exploiting either POD or a convolutional recurrent autoencoder to extract low-dimensional features from snapshots. DL algorithms have also been used to describe the reduced trial manifold where the approximation is sought, then relying on a minimum residual formulation to derive the ROM -hence, still requiring the assembling and the solution of a ROM as in traditional POD-Galerkin ROMs -in [52].
The structure of the paper is as follows. In section 2 we sketch the basic features of projection-based ROMs for fluid flows, and recall the main ingredients of the POD-DL-ROM technique. In Section 3 we show some numerical results obtained for the flow around a cylinder benchmark, the fluid-structure interaction between an elastic beam attached to a fixed, rigid block and a laminar incompressible flow, and the blood flow in a cerebral aneurysm. Finally, a brief discussion of our results and few comments about future research directions are reported in Section 4.

Methods
In this section we briefly recall the main ingredients of the POD-enhanced DL-based ROMs (briefly, POD-DL-ROMs) that we adapt, in the following, to handle problems in computational fluid dynamics. In particular, we aim at simulating parameter-dependent unsteady fluid flows, relying on a velocity-pressure formulation, in domains that have either (i) rigid walls or (ii) elastic deformable walls.
In the case of rigid walls, for any input parameter vector µ ∈ P ⊂ R nµ , we aim at solving the nonlinear unsteady Navier-Stokes equations in a given, fixed domain Ω F ⊂ R d , d = 2, 3 (see Section 3.1) in the time interval (0, T ), provided that suitable initial (at time t = 0) and boundary conditions (on ∂Ω F , for each t ∈ (0, T )) are assigned. Here t ∈ (0, T ) is the time variable, v h = v h (t; µ) the velocity field, p h = p h (t; µ) the pressure field; these two latter quantities are usually obtained through a FOM built, e.g., through the finite element method. Here h > 0 denotes a discretization parameter, usually related to the mesh size.
In the case of elastic walls, the fluid domain is unknown and its deformation introduces a further geometric nonlinearity; the structure displacement d S h = d S h (t; µ) might also be nonlinear, and must match the one of the fluid domain d G h = d G h (t; µ) at the fluid-structure (FS) interface Σ(t). Here we employ the so-called Arbitrary Lagrangian Eulerian (ALE) approach, in which an extra problem for the fluid domain displacement (usually a harmonic extension of the FS interface datum) is solved, thus providing an updated fluid domain, while the fluid problem is reformulated on a frame of reference that moves with the fluid domain. Thus, for any input parameter vector µ ∈ P, we consider a fluid-structure interaction (FSI) model, which consists of a two-fields problem, coupling the incompressible Navier-Stokes equations written in the ALE form with the (non)linear elastodynamics equation modeling the solid deformation [53]. In particular, we aim at solving the unsteady Navier-Stokes equations in a varying domain Ω F (t) ⊂ R d , the elastodynamics equations in the structural domain Ω S ⊂ R d , and a geometric problem in the fixed fluid domain Ω F ⊂ R d (see Section 3.2), for a time interval (0, T ), provided that suitable initial (at time t = 0) and boundary conditions (on ∂Ω F (t) \ Σ(t) for the fluid subproblem, on ∂Ω S \ Σ for the structural subproblem, on ∂Ω F for the geometric subproblem, for each t ∈ (0, T )), are assigned.

Projection-based ROMs: main features
The spatial discretization of problem (1) or (2) through finite elements yields a nonlinear dynamical system of dimension N h to be solved for each input parameter value; then, a fully discretized problem is obtained relying, e.g., on either semi-implicit or implicit methods introducing a partition of the interval [0, T ] in N t subintervals of equal size ∆t = T /N t , such that t k = k∆t. This results in a sequence of either linear or nonlinear algebraic systems to be solved at each time step t k , k = 1, . . . , N t -which we refer to as the high-fidelity FOM. Note that the dimension N h accounts for the degrees of freedom of either the fluid problem (involving velocity and pressure) or the FSI problem (also including the structural and the geometrical subproblem). Building a projection-based ROM through, e.g., the RB method, then requires to perform this calculation for n s selected parameter values µ 1 , . . . , µ ns , and to perform POD on the solution snapshots (obtained for each µ j , j = 1, . . . , n s , and for each time step t k , k = 1, . . . , N t ). Focusing for the sake of simplicity on the fluid problem (1), the RB approximation of velocity and pressure fields at time t k is expressed as a linear combination of the RB basis functions, where V v ∈ R N h ×Nv and V p ∈ R N h ×Np denote the matrices whose columns form the basis for the velocity and the pressure RB spaces, respectively, and are selected as the first left singular vectors of the (velocity and pressure) snapshots matrices. Note that in this case the RB approximation is sought in a linear trial manifold. A similar approximation also holds for the additional variables appearing in the FSI problem (2). The reduced dynamics is then obtained by solving a low-dimensional dynamical system, obtained by performing a Galerkin projecting of the FOM onto the spaces spanned by the RB spaces; alternatively, a Petrov-Galerkin projection could also be used. Projection-based ROMs for parametrized PDEs thus rely on a suitable offline-online computational splitting: computationally expensive tasks required to build the low-dimensional subspaces, and to assemble the ROM arrays, are performed once for all in the so-called offline (or ROM training) stage. This latter allows us to compute -ideally -in an extremely efficient way the ROM approximation for any new parameter value, during the so-called online (or ROM testing) stage. This splitting, however, might be compromised if (i) the dimension of the linear trial subspace becomes very large (compared to the intrinsic dimension of the solution manifold being approximated), such as in the case of problems featuring coherent structures that propagate over time like transport, wave, or convection-dominated phenomena, or (ii) hyper-reduction techniques, required to approximate µ-dependent nonlinear terms, require linear subspaces whose dimension is also very large. Even more importantly, two additional issues make the construction of ROMs quite critical in the case of fluid dynamics problems; indeed, 1. a Galerkin projection onto the RB space built through the POD procedure above does not ensure the stability of the resulting ROM (in the sense of the fulfillment of an inf-sup condition at the reduced level). Several strategies can be employed to overcome this issue such as, e.g., (a) the augmentation of the velocity space by means of a set of enriching basis functions computed through the so-called pressure supremizing operator, which depends on the divergence term; (b) the use of a Petrov-Galerkin (e.g., least squares, (LS)) RB method, or (c) the use of a stabilized FOM (like, e.g., a P1-P1 Streamline Upwind Petrov-Galerkin (SUPG) finite element method); (d) an independent treatment of the pressure, to be reconstructed from the velocity by solving a Poisson equation, in the case divergence-free velocity basis functions are used -an assumption that might be hard to fulfill; 2. the need of dealing with both a mixed formulation and a coupled FSI problem requires the construction of a reduced space for each variable, no matter if one is interested in the evaluation of output quantities of interest only involving a single variable. For instance, even if one is interested in the evaluation of the fluid velocity in the FSI case, a projection-based ROM must account for all the variables appearing as unknowns in the coupled FSI problem. The same consideration also holds in the case of a fluid problem, where the pressure must be treated as unknown of the ROM problem even if one is not interested in its evaluation.

POD-enhanced DL-ROMs (POD-DL-ROMs)
POD-DL-ROMs are nonintrusive ROMs, which aim at approximating the map (t, µ) → u h (t, µ), for any field variable of interest u h (t, µ), by describing both the trial manifold and the reduced dynamics through deep neural networks. These latter are trained on a set of FOM snapshots computed for different parameter values µ 1 , . . . , µ Ntrain ∈ P, suitably sampled over the parameter space, at different time instants {t 1 , . . . , t Nt } ⊂ [0, T ]. Avoiding the projection stage, POD-DL-ROMs can be cheaply evaluated once trained, only involving those variables one is interested in. In case multiple variables are involved (e.g., both velocity and pressure), the procedure below can be performed simultaneously on each of them.
To reduce the dimensionality of the snapshots and avoid to feed training data of very large dimension N h , we first apply POD -realized through randomized SVD (rSVD) -to the snapshot set S u ; then, a DL-ROM is built to approximate the map between (t, µ) and the POD generalized coordinates. Using rSVD, we build N -dimensional subspace Col(V N ) spanned by the N ≤ N h columns of V N ∈ R N h ×N , the matrix of the first N singular vectors of the snapshot matrix S u . Here N denotes the dimension of the linear manifold, which can be taken (much) larger than the one of the reduced linear trial manifold used in a POD-Galerkin ROM.
Hence, the POD-DL-ROM approximation of the FOM solution u h (t; µ) is that is, it is sought in a linear trial manifold of (potentially large) dimension N , by applying the DL-ROM strategy [54] and is sought in a reduced nonlinear trial manifoldS n N of very small dimension n N ; usually, n ≈ n µ + 1 -here time is considered as an additional parameter. In particular: • to describe the system dynamics on the nonlinear trial manifoldS n N , the intrinsic coordinates of the approximationũ N are defined as consisting of the repeated composition of a nonlinear activation function, applied to a linear transformation of the input, multiple times. Here θ DF denotes the DFNN parameters vector, collecting the weights and biases of each of its layers; • to model the reduced nonlinear trial manifoldS n N , we employ the decoder function of a convolutional autoencoder (CAE), that is, where f D N (·; θ D ) : R n → R N denotes the decoder function of a CAE obtained as the composition of several layers (some of which are convolutional), depending upon a vector θ D collecting all the corresponding weights and biases.
Finally, the encoder function f E n (·; θ E ) : R N → R n -depending upon a vector θ E of parameters -of the CAE can be used to map the intrinsic coordinates V T N u h (t, µ) associated to (t, µ) onto a low-dimensional representationũ . Hence, training a POD-DL-ROM requires to solve the optimization problem where the per-example loss function L(t k , µ i ; θ) is given by the sum of two terms, the former is the reconstruction error between the FOM and the POD-DL-ROM solutions, the latter is the misfit between the intrinsic coordinates and the output of the encoder, Finally, ω h ∈ [0, 1] is a prescribed weighting parameter.
Computing the POD-DL-ROM approximationũ h (t; µ test ) of u h (t; µ test ), for any t ∈ (0, T ) and µ test ∈ P, corresponds to the testing stage of the DFNN and of the decoder function of the CAE, and does not require the evaluation of the encoder function. Finally, the POD-DL-ROM approximation of the FOM solution is recovered asũ Let us remark that the former construction of a POD-DL-ROM can be extended to the case of p > 1 field variables of interest, in a straightforward way. In this case, provided a snapshots set S i , and a corresponding basis V N,i ∈ R N h,i ×N , i = 1, . . . , p, for each of the variables u h,1 , . . . , u h,p , the POD-DL-ROM approximation of the field variable u h,i (t; µ) ∈ R N h,i is given bỹ where a DFNN and a CAE are trained by considering simultaneously all the p field variables. Due to its data-driven nature, each variable can be approximated in an independent way -in other words, there are no physical constraints appearing in the loss function, thus making the p approximated field variables uncoupled, despite they might be originally coupled. For instance, p = d + 1 variables are considered if we aim at approximating both the velocity and the pressure fields in the case of fluid flows.
Another noteworthy aspect deals with the way snapshots are handled when considering convolutional layers in the NNs, in presence of either vector and/or coupled problems. Exploiting the analogy with redgreen-black images in image processing, each snapshot computed for a variable of interest is reshaped in a square matrix of dimension ( the input is zeropadded), and stacked together forming a tensor with p channels. The latter tensor is then provided as input to the POD-DL-ROM neural network architectures when dealing with vector and/or coupled problems; as a result, the output of the network, for each sample (t, µ), takes a form similar to (5), collecting the approximation of all the field variables, We remark that considering vector and/or coupled problems does not entail main changes in the architecture of the POD-DL-ROM, as well as in the total number of parameters of the neural network. Indeed, only the first layer of the encoder function and the last one of the decoder function are responsible for the handling of the different channels of the input/output. This implies that training the neural network by providing data with p channels is remarkably less computationally expensive than training p independent POD-DL-ROMs, each of them responsible for a single component/field variable of the solution.

Results
In this section, we show several numerical results obtained with the POD-DL-ROM technique. In particular, we focus on the solution of three problems: (i ) the unsteady Navier-Stokes equations for a two-dimensional flow around a cylinder, (ii ) a FSI problem for a two-dimensional flow past an elastic beam attached to a fixed, rigid block and (ii ) the unsteady Navier-Stokes equations for the blood flow in a cerebral aneurysm. To evaluate the performance of POD-DL-ROM, we rely on the loss function (8) and on: • the error indicator rel ∈ R given by • the relative error k ∈ R d i=1 N h,i , for k = 1, . . . , N t , defined as Note that (9) is a scalar indicator, while (10) provides a spatially-distributed error field. The configuration of the POD DL-ROM neural network used in our test cases is the one given below. We choose a 12-layer DFNN equipped with 50 neurons per hidden layer and n neurons in the output layer, where n represents the dimension of the (nonlinear) reduced trial manifold. The architectures of the encoder and decoder functions are instead reported in Tables 1 and 2. No activation function is applied at the last convolutional layer of the decoder neural network, as usually done when dealing with AEs.
To solve the optimization problem (7)-(8), we use the ADAM algorithm [55], which is a stochastic gradient descent method computing an adaptive approximation of the first and second momentum of the gradients of the loss function. In particular, it computes exponentially weighted moving averages of the gradients and  of the squared gradients. We set the starting learning rate to η = 10 −4 , and perform cross-validation in order to tune the hyperparameters of the POD-DL-ROM, by splitting the data in training and validation sets with a proportion 8:2. Moreover, we implement an early-stopping regularization technique to reduce overfitting [56], stopping the training if the loss does not decrease over a certain amount of epochs. As nonlinear activation function, we employ the ELU function [57]. The parameters, weights and biases, are initialized through the He uniform initialization [58]. The interested reader can refer to [42] for a more indepth description of these architectures, and for a detailed version of the algorithms used for the training and the testing phases. These latter have been carried out on a Tesla V100 32GB GPU for the cases described in the following subsections. The Matlab library redbKIT [2,59] has been employed to carry out all the FOM simulations.

Test case 1: flow around a cylinder
In this first test case we deal with the unsteady Navier-Stokes equations for incompressible flows in primitive variables (fluid velocity v and pressure p). We consider the flow around a cylinder test case, a well-known benchmark problem for the evaluation of numerical algorithms for incompressible Navier-Stokes equations in the laminar case [60]. The problem reads as follows: The domain consists in a two-dimensional pipe with a circular obstacle, i.e. Ω F = (0, 2.2)×(0, 0.41)\B 0.05 (0.2, 0.2) -here B r (x c ) denotes a ball of radius r > 0 centered at x c , see Figure 1 for a sketch of the geometry. The boundary is given by here ν denotes the dynamic viscosity of the fluid, while (v) is the strain tensor, Here we take ρ = 1 kg/m 3 as fluid density, and assign no-slip boundary conditions on Γ 1 , a parabolic inflow profile on the inlet Γ D2 , and zero-stress Neumann conditions on the outlet Γ N . We consider as parameter (n µ = 1) µ ∈ P = [1, 2] m/s, which reflects on the Reynolds number varying in the range [66,133]. Equations (11) have been discretized in space by means of linear-quadratic (P 2 − P 1 ), inf-sup stable, finite elements, and in time through a backward differentiation formula (BDF) of order 2 with semi-implicit treatment of the convective term (see, e.g., [61]) over the time interval (0, T ), with T = 8 s, and a time-step ∆t = 2 × 10 −3 s. This strategy allows us to mitigate the computational cost associated to the use of a fully implicit BDF scheme, by linearizing the nonlinear convective terms; this latter task is realized by extrapolating the convective velocity through an extrapolation formula of the same order of the BDF introduced. We already analyzed this test case in [42], where we were interested in approximating only the velocity field. Here we aim at assessing the performance of POD-DL-ROM neural network in approximating both the velocity and the pressure fields. In particular, we provide to the network data under the form of a tensor with 3 channels -that is, we set the dimension equal to p = 3. The FOM dimension is equal to N h = [32446, 32446, 8239] (for the two velocity components and the pressure, respectively) and we select N = 256 as dimension of the POD basis for each component of the solution. We choose n = 5 as dimension of the nonlinear trial manifoldS n . We uniformly sample N t = 400 time instances and consider N train = 21 and N test = 20 training-and testing-parameter instances uniformly distributed over P.
In Figure 2 and Figure 3 we compare the FOM and POD-DL-ROM pressure and velocity fields, these latter obtained with n = 5, together with the relative error k in Figure 4, for the testing-parameter instance µ test = 1.975 m/s (Re = 131) at t = 1.062 s and t = 4.842 s. We highlight the ability of the POD-DL-ROM approximation to accurately capture the variability of the solution: indeed, in the case t = 1.062 s (Figure 2) we do not assist to any vortex shedding; this latter is instead present in the case t = 4.842 s (Figure 3), and is correctly reproduced.
To assess the ability of the POD-DL-ROM to provide accurate evaluations of output quantities of interest, we evaluate the drag and lift coefficients, related to the drag and lift forces around the circular obstacle; these are defined, in our case, as  where η = (η 1 , η 2 ) T denotes the (outward directed) normal unit vector to ∂Ω. From (14), the dimensionless drag and lift coefficient can be obtained as where U mean is the parabolic input profile mean velocity. The drag and lift coefficients coefficients computer over time by the FOM and the POD-DL-ROM, for the testing-parameter instances µ test = 1.975 m/s, are reported in Figure 5. The POD-DL-ROM technique is also able to accurately capture the evolution of C D and C L , related to the prescribed µ-dependent input profile in (13), in both cases.
Finally, the testing computational time, i.e. the time needed to compute N t time instances for an unseen testing-parameter instance, of the POD-DL-ROM on a GTX 1070 8GB GPU is given by 0.2 seconds, thus implying a speed-up equal to 1.25 × 10 5 with respect to the time needed for the solution of the FOM 1 .

Test case 2: fluid-structure interaction
We now focus on the case of a two-dimensional flow past an elastic beam attached to a fixed, rigid block [62,63,64] (see Figure 6 for a sketch of the geometry). The FSI model that we consider consists of a two-fields problem, where the incompressible Navier-Stokes equations written in the Arbitrary Lagrangian Eulerian (ALE) form for the fluid are coupled with the nonlinear elastodynamics equation modeling the solid deformation [53]. Because of the ALE approach we employ, a third non-physical geometry (or mesh motion) problem is introduced, which accounts for the fluid domain deformation and in turn defines the so-called ALE map.
Let Ω F and Ω S be the domains occupied by the fluid and the solid, respectively, in their reference configuration. We denote by Σ = ∂Ω F ∩ ∂Ω S the fluid-structure interface on the reference configuration. At any time t, the domain occupied by the fluid Ω F (t) can be retrieved from Ω F by the ALE mapping where d G (X) represents the displacement of the fluid domain. The coupled FSI problem thus consists in the following set of equations: • Navier-Stokes in ALE form governing the fluid problem: • nonlinear elastodynamics equation governing the solid dynamics: • coupling at the FS interface Σ: • linear elasticity equations modeling the mesh motion problem: where σ F (v F , p F ) = −p F I + 2µ F (v F ) is the fluid Cauchy stress tensor, σ S (d S ) = J −1 PF T is the solid Cauchy stress tensor, F = I + ∇d S is the deformation tensor, and is the fluid mesh velocity. See, e.g., [53] for further details about the FSI model. Both fluid and solid equations are complemented by appropriate initial and boundary conditions. In particular, the lateral boundaries are assigned zero normal velocity and zero tangential stress. Zero-traction boundary condition is applied at the outflow. The flow is driven by a uniform inflow velocity of 51.3 cm/s. Zero-initial conditions are assigned both for the fluid and the solid equations. The fluid density and viscosity are 1.18 × 10 −3 g/cm 3 and 1.82 × 10 −4 g/(cm · s) respectively, resulting in a Reynolds number of 100 based on the edge length of the block. The beam is modeled as a solid made of the neo-Hookean material and the density of the beam is 0.1 g/cm 3 .
The field equations are discretized in space and time using: matching spatial discretizations between fluid and structure at the interface; SUPG stabilized linear finite elements ((P 1 − P 1 ) and a BDF of order 2 in time for the fluid subproblem; the same finite element space as for the fluid velocity for both the fluid displacement subproblem and the structural subproblem, and the Newmark scheme in time for this latter. The resulting nonlinear problem is solved through a monolithic geometry-convective explicit (GCE) scheme, obtained by linearizing the fluid convective term (with a BDF extrapolation) and treating the geometry problem explicitly [65,66]. Here n µ = 2 parameters are considered, the Young modulus µ 1 and the Poisson ratio µ 2 , varying in the parameter space P = 10 6 · [2.3, 2.7] g/(cm · s 2 ) × [0.3, 0.4]. We build a FOM considering N h = [16452, 8226, 1974] DOFs for the velocity, the pressure and the displacement fields, respectively, and a time step ∆t = 1.65 × 10 −3 over (0, T ) with T = 3 s.
Regarding the construction of the proposed POD-DL-ROM, for the training of the neural networks, we uniformly sample N t = 606 time instances and N train = 5 × 3 = 15 training-parameter instances, uniformly distributed in each parametric direction. At testing phase, N test = 4 × 2 = 8 testing-parameter instances, different from the training ones, have been considered. The maximum number of epochs is set equal to N epochs = 20000, the batch size is N b = 40 and, regarding the early-stopping criterion, we stop the training if the loss function does not decrease within 500 epochs. We are interested in reconstructing the velocity and the displacement fields, so we set the number of channels to p = 2d = 4 and we recall the ability of the POD-DL-ROM neural network to handle different FOM dimensions N h,i , for i = 1, . . . , p, that is only the POD dimension must be equal among the different fields considered. Moreover, we set N = 256 as dimension of the POD basis, and n = 5 as dimension of the reduced nonlinear trial manifold. The training and testing phases of the POD-DL-ROM neural network have been performed on a Tesla V100 32GB GPU.
We point out that the dependence of the displacement field on the parameters reflects on the velocity field by producing a strong variability over the parameter space, which is accurately captured by the POD-DL-ROM solutions. The FOM and POD-DL-ROM displacement magnitudes, for the testing-parameter instances µ test = [2.3 × 10 6 g/(cm · s 2 ), 0.325] and µ test = [2.7 × 10 6 g/(cm · s 2 ), 0.375] at t = 2.3084 s and t = 2.64 s over the domain, are shown in Figure 8. The comparison between the FOM and POD-DL-ROM displacement magnitudes, for the testing-parameter instance µ test = [2.7 × 10 6 g/(cm · s 2 ), 0.375] at x * = (5.50, 6.07) cm over time, is reported in Figure 8, from which it is clearly visible that the POD-DL-ROM is also able to capture the main features of the elastic beam dynamics.
Finally, in Table 3 we report the POD-DL-ROM GPU training (including validation) time, the testing time, i.e. the time needed to compute N t time instances for a testing-parameter instance, and the time required to compute one time instance at testing time. Indeed, we recall that the DL-ROM solution can be queried at a given time without requiring the solution of a dynamical system to recover the former time instances. We also show the speed-up gained by the POD-DL-ROM with respect to the CPU time needed to solve the FOM 2 .

Test case 3: blood flow in a cerebral aneurysm
In this last test case we consider the fast simulation of blood flows in a cerebral (or intracranial) aneurysm, that is, a localized dilation or ballooning of a blood vessel in the brain, often occurring in the circle of Willis, the vessel network at the base of the brain. Blood velocity and pressure, wall shear stress (WSS), blood flow impingement and particle residence time all play a key role in the growth and rupture of cerebral aneurysms -see e.g. [67,68,69] -which might ultimately yield potentially severe brain damages. For these reasons, computational haemodynamics inside aneurysm models can provide output quantities of interest useful for planning their surgical treatment.  We consider the artery aneurysm shown in Figure 10 (left), and extracted from the Aneurisk dataset repository [70,71,72]. We consider blood as a Newtonian fluid, with constant viscosity, and a rigid arterial wall, so that blood flow dynamics can be described by the following Navier-Stokes equations: where the stress tensor is defined as in (12). On the arterial wall Γ w a no-slip condition on the fluid velocity is imposed, flow resistance at the outlet boundaries Γ N is neglected, while a parabolic profile v in is specified at the lumen inlet, where the parametrization of the inlet flow rate profile Q(t; µ) has been obtained by interpolating with radial basis functions a base profile Q(t) taken from [73], and then treating some of the interpolated values as parameters (see Figure 10, right), see [74] for further details.
In particular, we consider n µ = 2 parameters µ ∈ P ⊂ R 2 such that the flow rate at t = 0.16 s and t = 0.38 s admits variations up to 15% of the reference value. A comparison between some flow rate profiles corresponding to different parameter values is shown in Figure 10, right. The scaling factor k in (19) is such that Γ D kv in · ndσ = 1.
Blood dynamic viscosity ν = 0.035 P and density are set to ρ = 1 g/cm 3 , respectively. Concerning the FOM discretization, we employ a SUPG-BDF semi-implicit time scheme of order 2 with linear finite elements for both velocity and pressure variables. We employ a time-step ∆t = 10 −3 over the interval (0, T ) with T = 0.85 s. We simulate the blood flow starting from an initial condition obtained by solving the steady Stokes problem. We are interested in reconstructing the blood velocity field, so we set the FOM dimensions to N h = [41985, 41985, 41985], and p = 3. The POD dimension is equal to N = 64, for each component of the solution, and the dimension of the reduced nonlinear trial manifold is chosen to be equal to n = 5, very close to the intrinsic dimension of the problem n µ + 1 = 3. We consider N t = 850 time instances, N train = 6, and N test = 3 training-and testing-parameter instances, sampled over P by means of the latin hypercube sampling strategy. In Figure 11 we compare the FOM and POD-DL-ROM velocity field magnitudes, the latter obtained with N = 64 and n = 5, for the testing-parameter instance µ test = (5.9102, 3.1179) at the systolic peak t = 0.18 s, along with the relative error k reported in Figure 12. By looking at the pattern and the magnitude of the vector velocity field in Figure 11, it is evident that the abnormal bulge and the inlet are the portions of the domain where the blood flow velocity is smaller, and we remark the ability of the POD-DL-ROM technique in capturing such dynamics in an extremely detailed manner. In Figure 13 we report the streamlines of the blood velocity field, obtained with the FOM and the POD-DL-ROM, for the testing-parameter instance µ test = (5.9102, 3.1179) at t = 0.5 s. In Figure 14 we report instead a detailed view of the pattern of the fluid velocity field obtained for the testing-parameter instance µ test = (5.9102, 3.1179) at t = 0.18 s, highlighting the recirculation of the flow in the bulge and the blood stasis in this region.
Finally, the testing computational time, i.e. the time needed to compute N t time instances for an unseen testing-parameter instance, of the POD-DL-ROM on a Tesla V100 32GB GPU is given by 0.28 seconds, thus implying a speed-up equal to 3.98 × 10 5 with respect to the time needed for the solution of the FOM 3 , and the possibility to obtain a fully detailed simulation of a complex blood flow in real-time.

Discussion
In this work, we have taken advantage of a recently proposed technique [42] to build non-intrusive lowdimensional ROMs by exploiting DL algorithms to handle fluid dynamics problems. This strategy allows us to overcome some drawbacks of classical projection-based ROM techniques arising when they are applied to incompressible flow simulations.  In particular, POD-DL-ROMs overcome the need of: • treating efficiently nonlinearities and (nonaffine) parameter dependencies, thus avoiding expensive and intrusive hyper-reduction techniques; • approximating both velocity and pressure fields, in those cases where one might be interested only in the visualization of a single field; • imposing physical constraints that couple different submodels, as in the case of fluid-structure interaction (the different field variables are indeed treated as independent by the neural network); • ensuring the ROM stability by enriching the reduced basis spaces; • solving a dynamical system at the reduced level to model the fluid dynamics, however keeping the error propagation in time under control.
We assessed the performance of the POD DL-ROM technique on three test cases, dealing with the flow around a cylinder benchmark, the fluid-structure interaction between an elastic beam attached to a fixed, rigid block and a laminar incompressible flow, and the blood flow in a cerebral aneurysm, by showing its ability in providing accurate and efficient (even on moderately large-scale problems) ROMs, which multiquery and real-time applications may ultimately rely on. In particular, the prior dimensionality reduction performed through POD on the snapshot matrices also enhances the overall efficiency of the technique during the offline training stage.
Therefore, we can conclude that POD-DL-ROMs provide a non-intrusive and general-purpose tool enabling us to perform real-time numerical simulations of fluid flows. Since they return a (FOM-like detailed) computation of the field variables, rather than approximating selected output quantities of interest as in the case of traditional emulators or surrogate models, POD-DL-ROMs are a viable tool for detailed flow analysis, without any requirement in terms of computational resources during the online testing stage.