Ass3 FEF Natalia V

download Ass3 FEF Natalia V

of 13

Transcript of Ass3 FEF Natalia V

  • 8/6/2019 Ass3 FEF Natalia V

    1/13

    Viscous IncompressibleViscous IncompressibleViscous IncompressibleViscous Incompressible

    FlowsFlowsFlowsFlows

    Barcelona, 10 de Junio 2011Barcelona, 10 de Junio 2011Barcelona, 10 de Junio 2011Barcelona, 10 de Junio 2011

    Natalia Valencia ArangoNatalia Valencia ArangoNatalia Valencia ArangoNatalia Valencia Arango

    Profesor Ramn CodinaProfesor Ramn CodinaProfesor Ramn CodinaProfesor Ramn Codina

    FEFFEFFEFFEF ASSIGNMENT 3

    FINIT ELEMENTS IN

    FLUIDS

  • 8/6/2019 Ass3 FEF Natalia V

    2/13

    EXERCISE 1:

    Use the function Stokes.m to compute the solution of the Stokes problem considering:

    First a structured, uniform mesh for Q2Q1 elements with 25 nodes on eachside, Then a structured mesh for Q2Q1 elements, refined near the walls with 25nodes on each side.

    Comment on the results. Describe the main properties of the velocity and pressurefields. Are there any differences between the solutions obtained with the two meshes?Which one do you think is the best? Why?

    The element that we are going to use (Q2Q1) is multiquadratic velocity andmultilinear pressure (Taylor-Hood).

    In the figure 1 we can see the difference between the uniform mesh and

    the other one, in both cases the red dots correspond to the mesh of the pressure fieldand the blue ones for the velocity field. In the uniform mesh all the nodes have thesame distance in both directions, but in the other mesh we have a refined mesh (smalldistance) near the walls.

    Illustration 1 Mesh Q2Q1 Uniform - Refined near walls

    In the figure 2 and 3 we can see the behavior of the velocity field and the pressure fieldfor both type of mesh. We can say that we have a good solution with both type of meshbut the mesh refined near the walls has a better approximation of the behavior near thewalls. In this way we can know better the behavior and the information of the velocityand the pressure field.

    We cant say if one mesh is better than the other because it depends of the type ofproblem and the results that you want to analyze, we can say that if you want to knowor to have better approximations near the walls you have to use the refined mesh.

  • 8/6/2019 Ass3 FEF Natalia V

    3/13

    Illustration 2 Uniform Mesh

    Illustration 3 Mesh refined near the walls

  • 8/6/2019 Ass3 FEF Natalia V

    4/13

    Compute the solution for the Stokes problem using Q1P0, P+1 P1 (mini) and P2P2elements. Comment on the results. Do the numerical results agree with the theoreticalanalysis for these elements?

    With the use of different type of elements we are expected to have different results, insome cases we are going to have discontinuities in the pressure field and in othercases it is going to be continuous.

    Q1/P0: Multilinear velocity, piecewise constant pressure. Normally thiselement satisfies the inf-sup condition and gives good results except for thepossible appearance of a spurious pressure mode which can be filtered out.

    In figure 4 we can see the mesh for this element and the streamlines that give us anidea of the spin sense of the fluid.

    Illustration 4 Q1/P0 Uniform Mesh

    In figure 5 we have the velocity and pressure fields, for the velocity we have in generala good result maybe with a lack of information near the walls. But for the pressure wedont have a good result, we can see that this solution is not continuous as expected inthe theory.

    Illustration 5 Q1/P0 Uniform Mesh (VF - PF)

    Now we have the same element but we used a mesh refined near the walls, in figure 6we can see the new mesh and the streamlines (the behavior is almost the same for thisstreamlines)

    Illustration 6 Q1/P0 Refined Mesh near the Wall

  • 8/6/2019 Ass3 FEF Natalia V

    5/13

    Figure 7 show us that with the refined mesh near the wall we have a better solution, inthe velocity field we have more information near the walls, but in the center theinformation is more spaced. In the pressure field we have a better approximation whenthe values are cero, but when the values are different to cero we still have somediscontinuities as expected in the theory.

    Illustration 7 Refined Mesh NW (VF - PF)

    P1+/P1: Linear velocity enriched with an internal bubble, linear pressure(minielement). This type of element below to the admissible pair II:Continuous pressure.

    In figure 8 we can see the mesh for this element and the streamlines that give us anidea of the spin sense of the fluid. In this mesh the element is triangular and in eachcorner the triangle is invert to avoid gaps of information.

    Illustration 8 P1+/P1 Uniform Mesh

    In figure 9 we have the velocity and pressure fields, for the velocity we have in generala good result maybe with a lack of information near the walls. In this case for thepressure we have a good result; we can see that this solution is continuous asexpected in the theory, but with a lack of information near the walls because thesolution is not very smooth for the values different to cero.

    Illustration 9 P1+/P1 Uniform mesh (VF - PF)

  • 8/6/2019 Ass3 FEF Natalia V

    6/13

    Now we have the same element but we used a mesh refined near the walls, in figure10 we can see the new mesh and the streamlines (the behavior is almost the same forthis streamlines)

    Illustration 10 P1+/P1 Refined Mesh near the wall

    Figure 11 show us that with the refined mesh near the wall we have a better solution, inthe velocity field we have more information near the walls, but in the center theinformation is more spaced. In the pressure field we have a better approximation whenthe values different to cero, the solution is more refined and smoother, the solution isstill continuous as expected in the theory.

    Illustration 11 P1+/P1 Refined mesh (VF - PF)

    P2/P2: quadratic velocity/quadratic pressure, this kind of element is not allowedbecause if we have a quadratic pressure in a triangular element the system will beunstable.

    In figure 12 we can see the mesh for this element and the streamlines that give us anidea of the spin sense of the fluid. In this mesh the element is triangular and in eachcorner the triangle is invert to avoid gaps of information. And for the streamlines wecan see that for the quadratic velocity it show a turbulence (Vortex) in the left corner.

    Ilustracin 12 P2/P2 Uniform Mesh

  • 8/6/2019 Ass3 FEF Natalia V

    7/13

    In figure 13 we have the velocity and pressure fields, for the velocity we have ingeneral a good result maybe with a lack of information near the walls and as we saidbefore a vortex in the left corner. But for the pressure we dont have a good result, wecan see that this solution is not continuous and is unstable as expected in the theory.

    Illustration 13 P2/P2 Uniform mesh (VF - PF)

    Now we have the same element but we used a mesh refined near the walls, in figure14 we can see the new mesh and the streamlines, in this case we dont have thevortex in the left corner, that is because of the refiner mesh near the walls (we have abetter approximation).

    Illustration 14 P2/P2 Refined Mesh near the Walls

    Figure 15 show us that with the refined mesh near the wall we have a better solution, inthe velocity field we have more information near the walls and we dont have the vortexin the left corner. In the pressure field we have a better approximation, but the solutionis still unstable and discontinuous as expected in the theory.

    Illustration 15 P2/P2 Refined mesh (VF - PF)

  • 8/6/2019 Ass3 FEF Natalia V

    8/13

    Use the function NavierStokes.m to compute the solution of the Navier-Stokesequations using a structured mesh for Q2Q1 elements with 25 nodes per side.Consider the Reynolds numbers Re = 100, 400, 1000, 2000 and comment on theresults.

    For these calculations we are going to use the uniform mesh and the initial condition isset up for no returning as a default and the pressure in the left corner is set up to zero.In the next table we can see the different numbers of iterations needed to achieveconvergence for each Reynolds number.

    RE NUMBER ITERATIONS

    100 7

    400 14

    1000 95

    2000 >99

    If we have a bigger Reynolds number we need more iteration to achieve convergenceas expected in theory. That is because we have more frequencies living together.

    In the next figures we are going to see the position and strength of the main vortex ofthe velocity, and the evolution of the pressure field.

    Illustration 16 RE Number 100

    Illustration 17 RE Number 400

  • 8/6/2019 Ass3 FEF Natalia V

    9/13

    Illustration 18 RE Number 1000

    Illustration 19 RE Number 2000

    We can see that there is a main vortex in the superior-right corner, when we increasethe Reynolds number; this vortex start to go toward the center and its shape is morecircular and bigger. We can see too that when we have a bigger Reynolds number startto appear other vortexes in the inferior corners, that happens because each time with abigger Reynolds number we have more frequencies that exist, that are alive and weare going to the chaos.

    If we analyze the pressure field evolution we can see that if we increase the Reynoldsnumber we have some oscillations in the walls (bigger instability in the system), that

    happens because with the apparition of vortex the flux in not laminar.

    Compare results with the literature: we studied some example in the literature and wecan say that the results are similar, when we increase the Reynolds number the mainvortex goes to the center and is bigger; and it start to appear some vortex in the inferiorcorners.

    Ilustracin 20 Re 100 y Re 1000

  • 8/6/2019 Ass3 FEF Natalia V

    10/13

    EXERCISE 2:

    We consider the incompressible Navier-Stokes equations: find the velocity u and thepressure p such that:

    To carry out the numerical approximation, we propose two possible strategies: A endB.

    Discuss the expected temporal accuracy and possible problems that can be

    encountered when advancing in time.

    First able we are going to compare the both techniques used for the temporaldiscretization and then both methods used for linearization of the convective term:

    Strategy A: Crank-Nicolson scheme for the viscous term and second order explicitapproximation for the convective term.

    Those two methods correspond to One step approximation to the time derivative, inorder to solve this problem we start with the know variable and we find the variables

    y such that:

    / /

    0

    The Crank-Nicolson method is implicit and unconditionally stable, with the equation:

    / /

    The second order explicit method could be the Adams-Bashforth/Crank-Nicolsonmethod; this method is conditionally stable with the equation:

    12 3

    Strategy B: Second order Gear Scheme (BDF2).

    This method corresponds to the Two step approximation to the time derivative, isunconditionally stable and in order to solve this problem we start with the know variable

    and we find the variables y such that:

    12 3 4

    0

  • 8/6/2019 Ass3 FEF Natalia V

    11/13

    In both cases we have a second order scheme, but in the strategy A we have one ofthe methods that are conditionally stable, so we have to use a delta t small enough inorder to have a stable solution.

    In the other side the methods for the Strategy A are only in one step and the methodfor the strategy B is in two steps.

    In the Strategy B for the first term (that one with delta t) apart of the term n we areusing a step after and a step before in order to do the calculations; but in Strategy A weare using only the term n.

    For all these reasons I think that the method used in strategy B is more accurate thanthe method used in strategy B.

    For the case of the linearization of the convective term we can consider thelinearization problem: find y such that:

    , , , , , 0

    Strategy A: Not applicable.

    If we dont linearize the convective term we probably dont have a good or sablesolution; if we have a convergence it will be very slow and for small Reynolds numbers.

    Strategy B: Newton-Raphsons method. In this case we consider the problem:

    , , , , , , , ,

    And we applied the theorem: assumed that 1and that:

    1 , 21

    With 1. For each I there exists a unique solution to the linearized problem withsome conditions, and therefore convergence is quadratic.

    After those explanations we can say that the method for the strategy B is more

    accurate and the time of calculation is smaller; but maybe it will increment a Little bitthe calculation cost.

  • 8/6/2019 Ass3 FEF Natalia V

    12/13

    Indicate possible spatial discretizations and comment on their advantages anddisadvantages.

    The only way to control the pressure is to satisfy the inf-sup condition in order to havegood convergence rates. The existence of a stable finite element approximate solution

    , to the steady stock problems depends on choosing a pair of spaces , such that the following inf-sup condition holds:

    The problem said that we are using finite elements method for space discretization, sowe have to choose the type of element (velocity-pressure pair); in both strategies wesee that they are using a stabilization technique for the convective term. According tothat we have to choose an element that does not satisfies the inf-sup condition. Forexample the Q1/Q1 (multilinear velocity, multilinear pressure) or Q1/Q0 (multilinear

    velocity, constant pressure) and we are going to compare the advantages anddisadvantages of the 2 stabilization techniques:

    Strategy A: SUPG method.

    This method is a remedy to avoid the instabilities of the Galerking method, introducinga numerical dissipation in the original equation. The idea of the SUPG method is tointroduce numerical dissipation only along the streamlines. It is seen that only thediffusion in the - direction has to be balanced with convection. This added term affectall the inside elements in the domain

    Strategy B: Algebraic Subgrid Scale Stabilization.

    In this method we have to introduce a new function of subscales that have a differentspace; the main problem in this method is how to choose this new space and how tosolve the new system of functions (subscales).

    In order to solve these problems we have to make some assumptions and introduce agreen function for the problem and do some algebraic approximations with constant.

    With the main description for the two methods I think that the second one is moreexpensive in terms of computational cost, because you have to work with more spacesand do more calculations.

  • 8/6/2019 Ass3 FEF Natalia V

    13/13

    Write the linearized and fully discrete equations of the algorithm, as well as schematicflow diagram for the computer implementation. If a certain step may be implemented inseveral ways, choose one of them and justify your choice.