scieee AI-readable full text Open interactive document viewer

Fluid structure interaction using reduced order modeling: a first approach

Tello Guerra, Alexis

Full text

MASTER THESIS FLUID STRUCTURE INTERACTION USING REDUCED ORDER MODELS - A FIRST APPROACH ALEXIS TELLO GUERRA ADVISORS: RAMON CODINA JOAN BAIGES ESCOLA TÈCNICA SUPERIOR D‘ENGINYERS DE CAMINS,CANALS I PORTS DE BARCELONA UNIVERSITAT POLITÈCNICA DE CALATUNYA CONTENTS CONTENTS i LIST OF FIGURES iii ACKNOWLEDGMENTS vi 1INTRODUCTION 1 2LINEAR ELASTICITY 4 2.1Benchmarking 8 2.1.1Stationary problem - Plain strain cook’s membrane 8 2.1.2Dynamic problem - Oscillating bar 11 3INCOMPRESSIBLE NAVIER-STOKES EQUATIONS 16 4FLUID STRUCTURE INTERACTION 21 4.1The heterogeneous problem [1]21 4.2Discrete problem [1]23 4.3Benchmarking 23 5REDUCED ORDER MODELS 34 5.1Some ROM theory 35 5.2A review of POD 36 5.3Numerical examples 38 5.3.1Solid - Rom 39 5.3.2Fluid - Rom 43 5.3.3FSI - Rom 51 6THE CODE 64 i Contents BIBLIOGRAPHY 67 ii LIST OF FIGURES 1.1Tacoma bridge oscillating before its collapse 1 2.1Diagram of Cook’s problem [11]9 2.2Example of 5elements per side 9 2.3Displacement for triangles and quadrilaterals 10 2.4Convergence for triangles and quadrilaterals 11 2.5Example of 2X20 mesh 12 2.6dFt of a case run 14 2.7Convergence for triangles and quadrilaterals 15 4.1Partitioned domain, taken from [1]21 4.2Description of the case, taken from [9]24 4.3Geometry of the case 25 4.4Mesh of fraction of domain 27 4.5Mesh of the sphere 28 4.6Mesh of tip of cantiliver beam 29 4.7x velocity component, figure 4.7ashedding upper vortex, figure 4.7bshedding lower vortex 30 4.8y velocity component, figure 4.8ashedding upper vortex, figure 4.8bshedding lower vortex 31 4.9Pressure contours, figure 4.9ashedding upper vortex, figure 4.9bshedding lower vortex 31 4.10 figure 4.10aY velocity for fluid at point 8.3,2), figure 4.10b displacement for point (7.99,2)32 iii List of Figures 5.1Meshed beam,# elements = 100 40 5.2Full order model 40 5.3ROM, # modes = 141 5.4ROM, # modes = 242 5.5ROM, # modes = 342 5.6Geometry of test case 44 5.7Mesh of test case 45 5.8Mesh around the cylinder 46 5.9velocity X for FOM 47 5.10 velocity X for ROM, 3basis vectors used 47 5.11 velocity Y for FOM 48 5.12 velocity Y for ROM, 3basis vectors used 48 5.13 Pressure for FOM 49 5.14 Pressure for ROM, 3basis vectors used 49 5.15 Velocity in Y for point (1.3,0)50 5.16 FFT of displacement Y at (7.99,2)52 5.17 FFT of velocity Y at (8.3,2)53 5.18 Comparison between FOM and ROM using 10 modes for displacement Y at (7.99,2)54 5.19 Comparison between FOM and ROM using 15 modes for displacement Y at (7.99,2)55 5.20 Comparison between FOM and ROM using 20 modes for displacement Y at (7.99,2)56 5.21 Comparison between FOM and ROM using 10 modes for velocity Y at (8.3,2)57 5.22 Comparison between FOM and ROM using 15 modes for velocity Y at (8.3,2)58 iv List of Figures 5.23 Comparison between FOM and ROM using 20 modes for velocity Y at (8.3,2)59 5.24 Velocity magnitude for FOM 60 5.25 Velocity magnitude for ROM using 10 modes 60 5.26 Velocity magnitude for ROM using 20 modes 60 5.27 Velocity magnitude for FOM 60 5.28 Pressure for ROM using 10 modes 61 5.29 Pressure for ROM using 20 modes 61 6.1Container scheme 65 6.2Communicator scheme of each container 66 v ACKNOWLEDGMENTS This is just the beginning of the journey towards what I hope to be perfect understanding of many, many things. Or in other words my PH.D, acknowledgments will be longer in that moment. I would like to thank my advisors, Ramon Codina and Joan Baiges, for their patience until now, and for sharing their knowledge with me. To Ernesto Castillo, because thanks to his advise many of the results here shown were possible. To Ricardo Reyes with whom apparently anything can be programmed. To Judyta, the reason everything makes sense. vi 1INTRODUCTION Since the moment humans started to manipulate their surroundings to acommodate to their daily lives engineering became part of it as well. Humanity has come a long way since then, and now priority has shifted from the ’what to build’ to ’how to build it’ with the evolution of engineering and optimization driving every day life. A change that has not been driven by anything else than the need to reduce costs and understand mistakes. And what would be of a decent fluid structure interaction themed project with out mention of the Tacoma bridge, the cornerstone of modern era design failure. Figure 1.1: Tacoma bridge oscillating before its collapse In figure 1.1the Tacoma bridge can be seen oscillating seconds before its collapse into the river. At the moment not much was understood about what caused its demise but surprisingly this proved to change the way dynamic processes were 1 INTRODUCTION seen and a new field of engineering was created, one in which the interaction between fluid and solid were centerline. On the other hand this change of paradigm into and optimization driven one was further promoted with the advent of computation and cost reduction of material processes. From the possibility to solve linear systems progressively faster, reduced order modeling is born out of a necessity and a desire to save that which humans are always running out of, time. The underlying idea idea in ROM is to further increase the abstraction of any kind of numerical system and treat it as any kind of data. This will be decomposed into the most energetic modes and then use this as a way to recreate the same, or similar processes. Much like a Fourier transform does to a dynamic process. This project investigates in a more experimental fashion the collision between the two areas, Fluid Structe Interaction and Reduced Order Modeling and is developed in a progessive manner, first benchmarking each particular physics and then attempting to replicate the obtained results by use of ROM. In this order of ideas firstly a review of the theory behind solid elasticity and navierstokes equations is made with the respective benchmarking of the code. Then a review of the fluid structure interaction problem from the mathematical point of view is made to be able to finally study FSI with a common test case. Finally a quick view of the theory behind reduced order models is done to conclude with applications to solid dynamics, fluid flow and finally FSI. It is the hope of the author that with this project a methodology can be understood as to how to study FSI and then make progress into ROM analysis. This project is the initial part of what will become a doctoral thesis in the same frame of research. During the development of this master thesis project several tasks have been undergone, from coding a linear solid elasticity module in the code used by the 2 2.1 BENCHMARKING Figure 2.1: Diagram of Cook’s problem [11] Mesh, Numerical and Physical parameters Figure 2.2shows an example of the meshes used. In this case bi-linear quadrilaterals and linear triangles are compared for increasing elements on the geometry’s side. (a) Triangular (b) Quadrilaterals Figure 2.2: Example of 5elements per side 9 2.1 BENCHMARKING All cases were run for the following physical properties and numerical parameters: Young’s modulus 1 Poisson’s modulus 1 3 Shear force 1 Results Results shown in figure 2.3show a slightly improved convergence for triangular elements compared to quadrilaterals for displacement of point C under the mentioned load. Beyond the 30 element limit convergence for both elements is almost identical. Figure 2.3: Displacement for triangles and quadrilaterals A convergence plot is shown in 2.4 10 2.1 BENCHMARKING Figure 2.4: Convergence for triangles and quadrilaterals Obtained results are in agreement with the behavior seen in [3], although the case was run with different parameters, and are almost identical to the results shown in [11] in which the same case was run. A Poisson of 0.5the produces element locking in which non feasible results are obtained, this is expected near the incompressible limit for the used elements. 2.1.2 Dynamic problem - Oscillating bar The validation of the dynamic problem is of critical importance on the solution of fluid structure interaction problems. The methodology consisted on reproducing a problem that could be solved by both analytical and numerical ways. The oscillation of a bar with various boundary conditions has been extensively studied and its development can be found in most structural dynamic or vibration textbooks 11 2.1 BENCHMARKING like [10]. For the present case the the configuration of a clamped-free end bar was selected. Its analytical solution can be found by the following equation: ωn=αEI ρL41 2 (2–14) Where αis equal to 3.52 for the first mode of vibration and to 22 for the second one. From this the theoretical first and second modes of vibration for the present problem are found to be: ω140.815 Hz ω2259.731 Hz Mesh, Numerical and Physical parameters Figure 2.5shows an example of the meshes used, as in the previous benchmark, linear triangles and bi-linear quadrilaterals were used for all cases. (a) Triangles (b) Quadrilaterals Figure 2.5: Example of 2X20 mesh The following table shows the numerical and physical parameters used for all cases run. 12 2.1 BENCHMARKING Young’s modulus 200e9 Poisson’s modulus 1 3 Density 7810 time step 1e−5 total time 1 Time integration and Fourier transform The time integration was done by means of the Newmark constant acceleration method, other time integration schemes like the BDF1and BDF2produced too much numerical damping. Point tracking was used in the middle section of the free end. After solution a discrete Fourier transform was done to the obtained data. A sample of the obtained spectrum is shown in figure 2.6showing the first and second harmonics of the geometry where both the first and second harmonics can be seen to be quite close to their theoretical value. 13 2.1 BENCHMARKING Figure 2.6: dFt of a case run Convergence for various test cases is shown in the following section. Results Figure 2.7shows the convergence for linear triangles and bi-linear quadrilaterals for incremental number of elements for the first harmonic or natural mode of vibration of the bar. The theoretical value is shown as a red continous line. 14 2.1 BENCHMARKING Figure 2.7: Convergence for triangles and quadrilaterals As it can be seen, for a low number of elements the frequency is found to be much higher than its expected value converging in a rapid manner as the number of elements is increased. In this case quadrilaterals exhibit an improved convergence when compared to triangles. Results are close to the theoretical value, the difference is atributed to the bending of the perpendicular planes along the beam’s geometry as the theory does not take this into account, coming from the Euler-Bernoulli approximation. Results were found to be the same for any number of elements on the beam thickness. One factor that was found to improve convergence in quadrilaterals to the theoretical value was reducing the poisson modulus to zero, on the other hand this did not help for linear triangles. 15 3INCOMPRESSIBLE NAVIER-STOKES EQUATIONS Once linear elasticity has been reviewed the last step before dealing with FSI problems is dealing with fluid dynamics. In this section a short review of the necessary theory and some test cases are explained. For a certain domain Ωwith boundary ∂Ω and ]0,T[the interval of analysis the Navier-Stokes problem consists in finding a velocity uand pressure p such that: ∂tu−ν4u+u· ∇u+∇p=fin Ω,t∈]0,t[ ∇ · u=0in Ω,t∈]0,t[ (3–1) Where νis the kinematic viscosity and fis the force vector. Using the notation defined in chapter 2, the velocity and pressure finite element spaces are V0:= H1 0(Ω),Q:= L2(Ω)/R,X0:= V0×Q0. Now if we define a a bilinear form Band a linear form Las, B=ν(∇u,∇v) + (u· ∇u,v) − (p,∇ · v) + (q,∇ · u)(3–2) and, L=hf,vi(3–3) 16 INCOMPRESSIBLE NAVIER-STOKES EQUATIONS The variational form of the Navier-Stokes equations can be written as, Find [u,p]∈L2(0,T;V0)×L1(0,T;Q0(Γ)) such that ∂tu+B(U,V) = L(V),∀V∈X0(3–4) For U≡[u,p]∈X0and V≡[v,q]∈X0. Where initial and boundary conditions should hold. A feasible solution for this problem will be found depending on the Babuska- Brezzi, defined in equation 3–5, condition which basically states that a suitable interpolating space for velocity and pressure must be found. From this it can be understood that the choice of elements cannot be random and why it is not possible to use the same kind of element for both variables. inf sup qh,∇ · vh kqhkkvhk1 ⩾β>0, (3–5) for constant βindependent of h. SPATIAL DISCRETIZATION For the spatial discretization the standard Galerkin finite elements approximation can be defined as follows. Let Phdenote a finite element partition of the domain Ω. The diamater of an element domain K∈Pis denoted by hkand the diameter of the finite element partition by h=max{hk|K∈P}. We can now construct conforming finite element spaces Vh⊂V,Qh⊂Qand Xh=Vh×Qhas well as the corresponding subspaces Vh,0,Qh,0and Xh=Vh,0×Qh,0. Then the problem can be written as, 17 INCOMPRESSIBLE NAVIER-STOKES EQUATIONS Find Uh∈Xh,0 ∂tu+B(Uh,Vh) = L(Vh),∀Vh∈Xh,0(3–6) TIME DISCRETIZATION For the temporal discretization the usual finite differences scheme is adopted. In particular the Backward Euler (BE) or Backward Differences schemes, in particular BDF1and BDF2that are of the form: ∂uj+1 h ∂t =uj+1−uj ∆t +O(∆t)(3–7) ∂uj+1 h ∂t =3uj+1−4uj+uj−1 ∆t +O(∆t2)(3–8) After initial trial runs BDF1was found to be too dissipative and BDF2became the default time integration algorithm for all fluid flow cases. SUBGRID SCALES To deal with the stability issues associated to the different spaces to where velocity and pressure belong, stabilized versions of equation 3–6have been developed in which the bilinear form Bis replaced with a mesh dependent version Bh. On the other hand, when the problem is convection dominated spurius oscillations may appear that propagate and possibly explode accross the time advance. To handle this situations stabilized upwind schemes have been developed where 18 4.3 BENCHMARKING Cylinder diameter d=1 Center of cylinder Xc=Yc=2.0 Channel length L=25.0 Thickness of undeformed beam Hflag =0.2 Right end of undeformed beam xtip =6.0 Density of fluid 1 Viscosity of fluid 0.0025 Beam Young modulus 200e7 Beam density 7850 Beam Poisson 0.3 Table 4.1: Material properties and parameter of case Figure 4.3shows the actual geometry that was used. As the domain is large this inevitably means that the mesh for the fluid domain will be composed by a large number of elements, specially where the interface between solid and fluid exists. Figure 4.3: Geometry of the case Table 4.2shows the boundary conditions for the case. 25 4.3 BENCHMARKING Domain Fluid Solid x=0 velx=1,vely=0.0 x=25 velx=vely=Free y=0=4 velx=free,vely=0 cylinder surface velx=vely=0 beam surface velx=vely=0 tf=ts cylinder beam union dispx=dispy=0 Table 4.2: Mesh properties for both domains Mesh Important sections of the mesh are shown in the following figures. Figure 4.4 shows the mesh over the cylinder and part of the beam. For a correct solution of the tractions over the beam it is necessary to correctly approximate the boundary layer that the fluid forms over it, which required mesh refinement over the elements in the interface. 26 4.3 BENCHMARKING Figure 4.4: Mesh of fraction of domain Figure 4.5shows a close up of the mesh over the cylinder and a fraction of the beam. It is clear by now that the mesh of the cylinder and that of the fluid are non matching and most importantly, composed by different kind of elements. The fluid domain is composed by linear triangles while the beam is composed by bilinear quadrilaterals. This was chosen in this way for the fluid because triangles allow more versatility in terms of geometry reproduction and refinement over boundary layers. For the solid, as the physics are much simpler, a coarser mesh could be used that could be solved quickly and correctly. Moreover the fact that it is symmetric structured made the meshing process straightforward and produces more precise results, as was seen from the solid dynamic benchmarking process. 27 4.3 BENCHMARKING Figure 4.5: Mesh of the sphere Finally figure 4.6shows a close up of the mesh over the tip of the beam. Its worth noting, once again, that the mesh of the boundary layer is much denser that that of the beam. The issue of non conforming meshes could and was solved by used of a mesh to mesh interpolator that was introduced into the code just in time to make part of this project, see chapter 6for more details. 28 4.3 BENCHMARKING Figure 4.6: Mesh of tip of cantiliver beam Table 4.3shows important mesh parameters. Domain Fluid Solid Element Linear Tri Bilinear Quad # Elements 65906 2760 # Nodes 33952 9134 Table 4.3: Mesh properties for both domains Results It was seen that for this particular problem the solution (velocity and pressure) had a period of oscillation of around 20 seconds so it was decided to run the case for 60 seconds with a time step of 0.05 seconds to be able to analyze at least three full periods of the solution, this is also important in next sections when ROM is 29 4.3 BENCHMARKING analyzed to be able to capture the lower modes of the fluids solution. Results are displayed fro the fluid as contour plots for velocity and pressure and for the solid as point tracking for the tip of the beam attached to the cylinder. The motion of the tip is compared to the velocity of the fluid near it. (a) (b) Figure 4.7: x velocity component, figure 4.7ashedding upper vortex, figure 4.7bshedding lower vortex 30 4.3 BENCHMARKING (a) (b) Figure 4.8: y velocity component, figure 4.8ashedding upper vortex, figure 4.8bshedding lower vortex (a) (b) Figure 4.9: Pressure contours, figure 4.9ashedding upper vortex, figure 4.9bshedding lower vortex It is intended to appreciate the oscillating nature of the solved quantities which has an evident effect on the solid beam response as shown in figure 4.10. 31 4.3 BENCHMARKING (a) (b) Figure 4.10: figure 4.10aY velocity for fluid at point 8.3,2), figure 4.10bdisplacement for point (7.99,2) It can be seen that the displacement of the beam follows the same shape as the Y velocity although out of phase. This is expected as the same point can not be plotted both for fluid and solid and the solution takes more time to get to the fluid sampling point than to the solid tip. On the other hand it can be seen that the velocity undergoes larger changes across time hinting that higher frequency modes are present, modes that the beam, with a higher mass and inertia, cannot 32 4.3 BENCHMARKING reproduce. Results are not compared with the ones obtained in [7] as non linear elasticity is not reproduced in this project, this is left as a short term objective from the finalization of this work. 33 5REDUCED ORDER MODELS Proper Orthogonal Decomposition (POD) Reduced Order Models (ROM) consist on projecting a full order solution (FOM) into low dimensional spaces of solutions. The underlying idea is actually simple; it relies on the decomposition of the FOM into its most important or representative components. It can be thought of as obtaining the main frequencies of a signal and then through these reproducing either the same initial signal or similar ones with certain precision. As a developing subject of research there are still problems to solve. When the solution is projected into the reduced dimensional space the components that are not projected will not be taken into account when solving the reduced model. With some degree of abstraction it can be seen that this is precisely the same problem faced with the Navier-Stokes equations with highly convective flows that was mentioned earlier. When the element used cannot reproduce on its enterity the whole behaviour of the solution stabilization is needed. In other words the element doesn’t capture the high frequency component of the solution so additional input from the subgrid scale is added. In fact in [2] a novel approach is discussed where the non present component of the FOM is added through the subgrid scales after the decomposition has been made. 34 5.3 NUMERICAL EXAMPLES Figure 5.3shows the case where from the calculated base from the FOM case only the main eigenvalue and its corresponding base was used to reproduce the case. As it can be seen the result can reproduce exactly the main frequency, which is the one with highest energy, but the other harmonics do not appear on the solution, as it is expected as there is no information to be able to produce this data. Figure 5.3: ROM, # modes = 1 In figure 5.4one more eigenvalue and base were added, it can be seen that around 110 Hz a second harmonic starts to appear. While the frequency of the harmonic is the correct one the energy associated to it is lower that in the FOM result. 41 5.3 NUMERICAL EXAMPLES Figure 5.4: ROM, # modes = 2 Finally, on figure 5.5, all three calculated eigenvalues and basis vectors are used to calculate the solution. As it can be seen the solution was reproduced exactly. Figure 5.5: ROM, # modes = 3 42 5.3 NUMERICAL EXAMPLES Table 5.3shows the time and computational cost comparison for the FOM and ROM cases. Solution times FOM ROM ROM ROM Size of basis 123 solution time (s) 5.03 1.67 1.665 1.54 solution time speed up (%) - 66.8 66.89 69.38 Table 5.3: Comparison of FOM - ROM solution times As it can be seen the speed up for the linear elastic case is in the worst case 66.8% which is a considerable time save as the case is extremely simple and FOM solution itself took only 5seconds to calculate. 5.3.2 Fluid - Rom While the linear solid elastic case was reproduced with no problem and exactly with no difficulty sadly the case for the fluid proves to be quite different as the physics associated to the flow is much more complex and non linear. To be able to run a case succesfully with the ROM the initial transitory part of the evolution of the flow had to be ignored from the sampling. It is possible that the evolution of the flow during this period carries many frequencies that will dissapear over time or that will be dampened once the flow becomes developed and statistically stationary. When ROM was attempted during this stage the base recovered from the eigensolver could not reproduce the FOM succesfully. 43 5.3 NUMERICAL EXAMPLES Once this difficulty was overcome the flow around a cylinder was used to study ROM on fluids. Physical properties and parameters are shown in table 5.4. Cylinder diameter d=0.4 Center of cylinder Xc=0.8,Yc=1.2 Channel length L=7.0 Density of fluid 1 Viscosity of fluid 1e −4 Table 5.4: Material properties and parameter of case The geometry of the case is shown in figure 5.6. Figure 5.6: Geometry of test case Boundary conditions for the domain are shown in table 5.5. Domain Fluid x=0 velx=1,vely=0.0 x=7 velx=vely=Free y=0=2.4 velx=free,vely=0 cylinder surface velx=vely=0 Table 5.5: Boundary conditions 44 5.3 NUMERICAL EXAMPLES Parameters for the ROM run during offline phase are shown in table 5.6 # of snapshots 100 size of calculated base 10 Table 5.6: Important ROM parameters Mesh Figure 5.7shows the mesh used to run all cases, notice the refinement made surrounding the cylinder to be able to capture the boundary layer of the flow correctly. Figure 5.7: Mesh of test case The properties of the mesh are shown in table 5.7. Domain Fluid Element Linear Tri # Elements 36186 # Nodes 18487 Table 5.7: Mesh properties 45 5.3 NUMERICAL EXAMPLES Figure 5.8: Mesh around the cylinder Results Results will be analyzed for velocity and pressure for the FOM and for a ROM approximation using 3basis vectors. From the POD decompositon a base of 10 eigenvalues was obtained where the first three were the ones with the highest energy. The rest decreased rapidly and therefore could, for experimental purposes, be discarded. It was found that by using the first seven basis vectors the solution had little difference from the FOM, so to be able to appreciate some difference, and from this, the full power of ROMs it seemed like a proper choice to compare against 3basis vectors. 46 5.3 NUMERICAL EXAMPLES Figure 5.9: velocity X for FOM Figure 5.10: velocity X for ROM, 3basis vectors used It can be seen from figures 5.9and 5.10 that by using the first three modes the solution appears to be very similar to the FOM but with some degree of added diffusion in the solution for the xcomponent of the velocity. This can further be seen by the decreased magnitude of the results. 47 5.3 NUMERICAL EXAMPLES Figure 5.11: velocity Y for FOM Figure 5.12: velocity Y for ROM, 3basis vectors used Unlike the previous case, figures 5.11 and 5.12 show an amplified solution and a higher intensity of the vortex that the cylinder sheds through time. Also the ’bubbles’ appear to be more symmetrical in ROM than in the FOM counterpart. Probably the lower modes decrease the symmetry of the solution. 48 5.3 NUMERICAL EXAMPLES Figure 5.13: Pressure for FOM Figure 5.14: Pressure for ROM, 3basis vectors used The results shown in figures 5.13 and 5.14 are quite interesting as they are similar in magnitude but differ in the numerical phenomena that carries the solution through time. While in the ROM case the cylinder sheds pressure bubbles, accounting for the vortex shedding of the previous cases, in the ROM case the pressure is dissipated continously in a oscillatory manner. Finally, in figure 5.15, the yvelocity was plotted for point (1.3,0) just behind the cylinders geometry. It can be seen how each added mode interacts in such a way to approximate in a better manner the solution until when it is barely noticeable the difference between ROM and FOM. 49 5.3 NUMERICAL EXAMPLES Figure 5.15: Velocity in Y for point (1.3,0) Solution times FOM ROM ROM ROM Size of basis 3 5 10 solution time (s) 687.843 20.049 18.25 18.18 solution time speed up (%) - 90.28 97.34 97.35 Table 5.8: Comparison of FOM - ROM solution times It is interesting to see how the speed up of the solution is much higher than the previous solid elastic case. This is expected though as the phenomena is much 50 5.3 NUMERICAL EXAMPLES Figure 5.21: Comparison between FOM and ROM using 10 modes for velocity Y at (8.3,2) Figures 5.21 and 5.22 present, once again similar behavior. It appears that by adding 5more modes the solution is better approximated for the first 30 seconds. Afterwards the solution becomes polluted and spurious oscillations appear. 57 5.3 NUMERICAL EXAMPLES Figure 5.22: Comparison between FOM and ROM using 15 modes for velocity Y at (8.3,2) Similarly to the associated solid case figure 5.23 presents a much better approximation of the solution even though some amplifications and phase issues still persist. 58 5.3 NUMERICAL EXAMPLES Figure 5.23: Comparison between FOM and ROM using 20 modes for velocity Y at (8.3,2) It can be seen that neither solid or fluid converged as closely as in the previous cases to the FOM solution. In the following sections this will be discussed. Velocity contours In the following figures the contour plots of velocities and pressure are shown to better exemplify what the previous plots show. It is interesting to see that adding more modes removes spurious oscillations and in turn converges more closely to the FOM solution. 59 5.3 NUMERICAL EXAMPLES Figure 5.24: Velocity magnitude for FOM Figure 5.25: Velocity magnitude for ROM using 10 modes Figure 5.26: Velocity magnitude for ROM using 20 modes Pressure contours Figure 5.27: Velocity magnitude for FOM 60 5.3 NUMERICAL EXAMPLES Figure 5.28: Pressure for ROM using 10 modes Figure 5.29: Pressure for ROM using 20 modes Solution times FOM ROM ROM ROM Size of basis 10 15 20 solution time (s) 7,838.9 6,541.8 7,000.0 7,689.9 solution time speed up (%) - 16.54 10.70 1.90 Table 5.10: Comparison of FOM - ROM solution times It is clear from table 5.10 that for a much more complex problem were a great number of degrees of freedom are involved the speed up is not that dramatic as was seen in sections 5.3.1and 5.3.2. As it will be pointed out in the next section this decrease in speed up can be due to a great variety of reasons, but as a first approach with the simplest of iterative by sub domain couplings this is considered quite a success. 61 5.3 NUMERICAL EXAMPLES General discussion The effect of using varying amount of modes was seen in the previous sections and it is worth noting that even though the solution for 10 modes presents oscillations, amplifications and phase disorders. It can actually approximate the first 30 seconds quite similarly to the other case which used more modes and took longer solve time. This issue remains to be solved as it can be due to various factors which by time reasons were not explored like, taking more snapshots during the build phase of the ROM module, increasing convergence of the linear solver of the ROM module, changing time step size. Due to time constraints only the mentioned Galerkin proyection of the system was explored. It is a possibility that by using a Petrov-Galerkin approach the calculated ROM solution would fall within an expected converged tolerance. This is left as a short term objective. The flow present in this case is quite complicated and the fact that the bar appears to be rigid to the fluid creates complicated flow patterns that exhibit symmetry over large periods of time, which for the present case is around 20 seconds. This coupled with the fast energetic modes makes the associated base calculated by the SVD quite large. A good approximation was obtained for up to 20 modes with lower solution time compared to the FOM problem. After this time started to be similar and, if the whole base was used, the solution took longer than the FOM, which made the analysis, aside from purely didactic, useless. 62 5.3 NUMERICAL EXAMPLES Most of the computational time during the ROM run was used to project the reduced solution back to the full order space, U=ΦUΦ(5–13) It is worth noting that if the problem is large the dimension of the base can get quite large as well and the solution time of equation 5–13, even though it is just a mulitplication, can be actually costly in terms of computational time, specially if the code is not fully optimized, this is, using fully vectorized operations and reduced cycle control like if and switch statements. 63 6THE CODE All cases were run using FEMUSS, Finite Element Methods Using Subgrid Scale, a code developed currently at CIMNE. FEMUSS, running on FORTRAN is conceived as modular code adapted to run different kinds of physical problems. Currently FEMUSS can solve fluid flow problems of low viscosity turbulent flows, highly viscous fluids, highly compressible flows, near Mach number flows as well as acoustic and wave propagation scenarios and as of this project solid elastodynamics and the corresponding coupling between Fluid and Solid modules to achieve FSI with ROM. As any conventional numerical simulation code FEMUSS relies upon a master driver to control program execution, from initializations, module iteration, convergence calculation to program termination. For the development of this project the added input into the code was the addition of the Solids module which up to this point only solves linear elasticity but it expected to expand to non linear in the short term. As it was seen, the coupling between domains can be relatively straightforward, for the simplest of cases, but in reality its implementation poses some problems. The first of which is how to achieve proper information transfer between physics or, in this case physical problem modules, specially, as it was the case, when one of the domains requires much less degrees of freedom than the other one and uses non conforming meshes. To solve this complication an abstraction of the master driver was done as well 64 THE CODE as design of a container class which enables the code to instance dynamically each module and most importantly each case to be solved. The idea was to treat each module as a separate case which by use of a communicator class that can send data, and if necessary, interpolate it to deal with possible non conforming meshes. The following diagram exemplifies the mentioned concepts with hope that it will break down a little bit the abstraction. Channel Container FEMUSS Case Container Domain Variables Run variables Module Driver Physical Problem Communicator Container Module Container Figure 6.1: Container scheme As it can be seen from figure 6.1each case is composed of a series of container objects and some local case variables that control the run. The most important aspect of this implementation is the new capabilites between modules to share information and if necessary to process it. This can be better understood from figure 6.2 where a hypothetical case is run. In this problem a fluid-temperature structure interaction problem is going to be solved. For this case a series of communicators are set up as shown. 65 THE CODE In Out In In In Out Out Out FSI Heat FSI Heat Traction Velocity Temperature Displacement Traction Velocity Temperature Displacement NavierStokes Temperature Solid Communicator ChannelModule Interpolator Figure 6.2: Communicator scheme of each container The idea is that while the NavierStokes and Temperature module run in the same mesh, the Solid module runs with another one, note that it has be assumed that the Solid is not affected by thermal effects, just the fluid. This makes it necessary to interpolate the information when transfering data. With the mentioned implementation, using communicators and channels, this is readily done as the output is interpolated before reaching its destination. From the programming point of view, each of this containers is a linked list that can be iterated in any direction. The core of this link list is an unlimited polymorphism pointer that allows storage of any kind of data. With this the linked list, termed as container, can store any collection of data and iterate through it. It is the same concept of template in C+ +. 66