• Nenhum resultado encontrado

Reduction of Benchmarks

3.2 Advection - dynamical

The problem chosen is described in [61] and whose matrices are available in [62]. We have chosen the 2D problem, which is a 2D thermal diffusion problem where a convective flow is applied to the domain (see figure 3.1a for a representation):

ρc(∂T

∂t +~v· ∇T) +∇ ·(−k∇T) = ˙q (3.2) Whereρis the density,T the temperature,tthe time,~vthe advection/convection speed,kthe thermal diffusivity andq˙the heat input. The transport speed profile is constant and the transport speed amplitude can be varied. We have chosen the version of the problem where the speed amplitude is 0.5 m/s. The discretized problem is given by:

CT˙ +KT =b, T(t= 0) =T0 (3.3) T being the state variable,Ca mass matrix,Kthe matrix accounting for diffusion and advection,bthe load vector . The full order model response given by the authors can be seen in figure 3.1b.

3.2.1 Methods Applied

We will solve the ODE by using a first order implicit method for the discretization in time. In other words, we transform equation 3.3 into:

CTi+1−Ti

∆t +KTi+1=b, T0=T0 (3.4)

The reason for the implicit method is its unconditional stability: this allows us to immediately check if a model is unstable or not. We can later vary the time step ∆t so as to get a correct solution. We will use the Galerkin Projection with standard POD for the basis. We will be checking if the following relationships are verified:

||ecollinear||2≤ ||eorthogonal||2 (3.5)

||eorthogonal||2/||x||2= sPr

i=k+1λ2i Pr

i=1λ2i (3.6)

We will be also using the Galerkin Projection with the Goal Oriented POD, for the output of interest.

Snapshots of the HDM will be taken each∆S ∈Ntime steps. We will verify the errors for different∆S and differentk(model order), so as to understand the influence of the amount of samples and model order on the errors. We will also be testing the effect of the integration method used for calculating the POD. Since for time varying data the POD requires the numerical integration of this data, we will be testing the effect on the several errors of using the rectangle rule (0th order method), trapeze rule (1st order method) and Simpson rule (2nd order method). We will apply the composite versions of these rules, as they are presented in [63] and [64]. For all models we have chosen a time step∆tto be equal to 0.015 s,as the solution of the HDM seems to not vary significantly if we decrease the time step any further, and the models will be solved for the time interval [0,1.5] s. All computations were done on a laptop with an Intel Core i7-420HQ CPU, 7.89 GB of usable RAM and running Windows 10.

3.2.2 Results and Discussion

The full order model time response computed by us can be seen in figure 3.2, and it seems to match the curve given by the authors in [61] (see figure 3.1b). Its time response is quite similar to a simple exponential response of the type1−exp(−t/τ), so we expect that with only a few modes we will be able to capture the original time response quite well.

For the Galerkin Projection 2 studies were done : one where the POD of all timesteps (∆S = 1) was done; another where only 20 uniformly spaced timesteps (∆S = 5) were evaluated. We expect that equations 3.5 and 3.6 be verified by the former and equation 3.5 be verified by the latter. The several error measures for∆S = 1and∆S= 5can be found in figures 3.4 and 3.5 respectively. As predicted, the output error falls sharply, being largely inferior to any of the state error measures. For∆S = 1we find that nor equation 3.6 or 3.5 are strictly verified. For the latter we suppose that the magnitude of the errors might come into play : the total, orthogonal and collinear errors are quite close initially, but for k= 10and after, the magnitude is of10−8and equation 3.5 is clearly not verified. However, the behavior

0 0.5 1 1.5 0

20 40 60 80 100

Time (s)

TemperatureK

HDM

ROM of order 5 and∆S5

Figure 3.2: Response of the full order model and a selected ROM for the Dynamic Advec- tion problem.

0 5 10 15 20

10−13 10−9 10−5 10−1 103

i

Magnitude

POD ordered EigenValues

∆S= 1

∆S= 5

Figure 3.3: Ordered Eigenvalues of the POD of the Dynamic Advection problem.

of the Orthogonal error is mimicked by the collinear and total errors, so one can safely assume that by reducing the former we are also reducing the latter. The violation of equation 3.6 is existent, but the relative orthogonal error and predicted orthogonal error are close enough for us to consider equation 3.6 valid. For the case of∆S= 5we can see that equation 3.5 is also violated, in a much similar fashion to∆S = 1. More interesting is the behavior of thea priori indicator : afterk= 5it fails to properly follow the variation of the orthogonal error. Knowing thatr= 20in this case, we assume that this behavior is due to the fact that the modes afterk= 5do not properly capture the dynamics of the HDM, and more snapshots are required. Further evidence can be found in figure 3.3, where the eigenvalues between the PODs of∆S = 1and∆S = 5start to differ dramatically after i= 5. This phenomena is accompanied by an increase in collinear and total state error. It is thus advisable to have far more snapshots than modes, so as to ensure the quality of the latter. As it can be seen in table 3.2, the integration rule has little effect on the several error measures for the Galerkin ROM. It can have, however, a slight effect in its performance : for regularly spaced intervals, the rectangle rule is applied by multiplying all entries by a constant, a task which can be easily made in parallel. The remaining methods require the prior calculation of the coefficients for each time step. For very big snapshot matrices this might cause a slight performance loss. Currently we see no tangible gain in using higher-order integration methods.

But in the case the HDM has uneven timesteps, one should at least use the trapeze method since the rectangle rule does not converge for uneven timesteps.

For the Goal/Output Oriented ROM the errors are available in figure 3.6 for∆S = 5. It is clear that the errors, both for the output and the state are unacceptable. Curiously, equation 3.5 is verified by this ROM.

Wall Clock Time is given in table 3.3. The POD took 13.7 seconds to compute for the case of∆S= 1 and 2.9 seconds for the case of∆S= 5. Thus here POD computation times are far more important than

Table 3.1: Relative errors for ROM of order 5 for different POD methods and different∆Sfor the Dynamic Advection problem.

k=5 ∆S=1 ∆S=5 ∆S=5 (Output Oriented)

Total error 3.29E-03 % 7.38E-02 % 100 % Ortho error 2.59E-03 % 4.93E-02 % 99 % Predicted Orthogonal 1.45E-02 % 7.08E-04 % N/A Colin error 2.03E-03 % 5.49E-02 % 5 % Output error 2.91E-9 % 2.14E-05 % 98 %

Table 3.2: Effect of the order of the integration method on the error for ROM of order 5,∆S=5 for the Dynamic Advection problem. We give the difference relative to the case of rectangle integration, in other words, we present ei−ee 0

0 , whereiis the order of the integration method.

Time integration order 0 1 2

Output err (rel) 0 -1.97E-02% 7.98E-02%

Total err 0 1.64E-01% 3.20E-01%

Ortho err 0 9.22E-04% 5.52E-02%

Predic orth 0 7.62% 4.21%

Colin err 0 2.96E-01% 5.34E-01%

the computation of the ROM itself. The total speed up of the model is 15 ×for ∆S = 1and 70×for

∆S = 5all while ensuring an output error below 1% whenkbigger than 5 is used, as it can be seen from table 3.1.