cfd report ali

Upload: alijazizaib

Post on 02-Jun-2018

238 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 CFD Report Ali

    1/26

    The Hong Kong Polytechnic University

    ME4414 Fluids Engineering

    Computational Fluid Dynamics (CFD) Tutorial Report

    By Ali Jahan Zaib (12063189D)

    27thOctober 27, 2014

  • 8/10/2019 CFD Report Ali

    2/26

    1

    Contents1. Objective: .............................................................................................................................................. 2

    2. Problem Definition: ............................................................................................................................... 3

    3. Methodology: ........................................................................................................................................ 4

    3.1 Mesh Generation: ............................................................................................................................... 4

    3.2 Solver Setup: ....................................................................................................................................... 7

    4. Results and Discussion: ....................................................................................................................... 14

    For Re=1 .................................................................................................................................................. 15

    For Re=10 ................................................................................................................................................ 17

    For Re=100 .............................................................................................................................................. 20

    5. Conclusion: .......................................................................................................................................... 24

    References and Appendix: .......................................................................................................................... 25

  • 8/10/2019 CFD Report Ali

    3/26

    2

    1.Objective:

    The aim of this CFD tutorial is to familiarize with the mainstream CFD software

    ANSYS. The software used is ANSYS ICEM and FLUENT. Through solving a sample

    problem by CFD software, we will achieve the following objectives:

    1.

    To be able to create a 2-D mesh

    2.

    To be able to troubleshoot basic meshing problems

    3.

    To be able to solve a sample problem via CFD

    4. To be able to change parameters to obtain different results

    5.

    To be able to run a simulation and generate meaningful reports

    6.

    To apple knowledge learnt to future fluid mechanics problems

  • 8/10/2019 CFD Report Ali

    4/26

    3

    2.Problem Definition:

    In this CFD tutorial, a sample problem has been provided which will be solved

    using CFD software. Let us define the problem.

    Air flows across a cylinder with a uniform velocity of 0.1 m/s in a wind tunnel.The length of the wind tunnel (i.e. Fluid Domain) is 2.5m long and 1m in height. The

    diameter of the cylinder is 0.1m. Below is the diagram of the model:

    We have to make a few assumptions. We assume that the fluid isincompressible and that the problem is two dimensional. We also assume the

    cylinder to be a smooth cylinder.

  • 8/10/2019 CFD Report Ali

    5/26

    4

    3.Methodology:

    For the CFD, we will first require to make a mesh in ANSYS ICEM for the

    problem and then transport the mesh into ANSYS FLUENT to conduct the

    simulation.

    It is important to note that we need to carry out more than one simulation

    to obtain different results to ensure that the data obtained is reliable and match it

    with existing data available.

    The boundaries given by the tutorial sheet may or may not be enough to

    obtain correct results thus we have the following values we can adjust to obtain

    different sets of results.

    Test set up for Reynolds number Re= 1, 10 and 100

    These different inputs will help us learn more about the CFD software as well

    as how the inputs affect the model at hand. By manipulating the inputs, we can

    have a better understanding of the fluid flows and become more confident in

    analyzing fluid simulations and making good judgment of fluid problems.

    In the following sections, we will discuss more about the usage of ANSYS

    ICEM for mesh generation and ANSYS FLUENT for the solver setup.

    3.1 Mesh Generation:

    The idea behind mesh generation is that CFD software utilize numerical

    methods to solve for complex fluid mechanics equations through an iterative

    process. This is a method that develops approximations of the governing equations

    of fluid mechanics and thus applies them onto the mesh which is essentially a grid

    that may be 2-dimensional or 3-dimensional. As system of equations are solved,

    the solutions correspond to a specific cell on the grid and after the simulation has

    ended, the whole mesh contains the various values. The data is post-processed to

    extract important information such as drag, lift or pressure.

    The mesh has various properties that can be adjusted to obtain varying

    degrees of accurate results and the mesh also needs to be altered based on the

    complexity of the model system. Parameters such as grid type (Hex or Quad),

    resolution of the grid, how many cells required or even if enough memory is

  • 8/10/2019 CFD Report Ali

    6/26

    5

    present all affect the accuracy of the results but also the time required to obtain

    the results. A higher resolution mesh may give a more accurate result but it is not

    always the case as there may be other limiting factors or one may have simply

    obtained an accurate result and further increasing the mesh resolution would be a

    waste of resources.

    For example problem at hand, we have the following mesh properties:

    Mesh Part Nodes

    Cylinder 100

    Inlet 100

    Outlet 100

    SideA 250

    SideB 250

    Diagonal edge near cylinder 10 per edgeTable 1 - Mesh Parameters

    The nodes are basically points on the mesh which are used as points for the

    finite element analysis used by the solver to solve the under lying fluid mechanics

    equations. The more the number of modes, the higher the resolution of the mesh

    but this also requires a longer processing time to calculate the results. Thus, the

    above values represent the number of node an edge is divided into. Through ICEM,

    it is possible to add extra nodes to specific parts of the model to enhance the results

    obtained from those parts which are more essential such as areas near the cylinder.

    On the next page are images showing part of the setting in ICEM during meshing

    process.

  • 8/10/2019 CFD Report Ali

    7/26

    6

    Figure 2-Mesh setup showing cylinder as example

    Figure 1 - Mesh parameters of Diagonal Edge

  • 8/10/2019 CFD Report Ali

    8/26

    7

    Figure 3 - Finished Mesh

    3.2 Solver Setup:

    For any given problem, when we move to the simulation phase, we have to

    set up our numerical model. This is very important as if our input is faulty, our

    results will be faulty thus we will not be able to solve the problem.

    We have to select appropriate physical models and then set the proper

    parameters for the turbulence and other factors. We have to define the material

    properties such as the density, flow rate, temperature etc. Then prescribe theoperating conditions and boundary conditions at all boundary zones. We may need

    to provide an initial solution and then set up the solver controls and finally the

    convergence controls.

    It is important to set up a properly defined convergence monitor as

    sometimes we may not need to do 100 iterations to obtain accurate results. Thus

    we need to set up a proper monitor so that we can save time and resources.

    For example problem at hand, we have followed the FLUENT tutorial notes

    and the provided values from the problem to define all the parameters before

    starting the calculation. On the next few pages, the details of the Solver setup are

    discussed.

  • 8/10/2019 CFD Report Ali

    9/26

    8

    The list of parameters used are shown in the table below:

    Parameters Values

    Area (m2) 0.1

    Density (kg/m3) 1.225001

    Depth (m) 1

    Enthalpy (j/kg) 0

    Length (m) 1

    Pressure (Pascal) 0

    Operating Pressure (Pascal) 101325

    Temperature (K) 288.16

    Velocity (m/s) 0.000146073

    Viscosity (kg/m-s) 1.7894e-05

    Ratio of Specific Heats 1.4Table 2 - Solver Parameters

    Figure 4 - Solver Parameters

  • 8/10/2019 CFD Report Ali

    10/26

    9

    One thing to note for the values shown on the previous page is that they are

    the values for the condition of Re=1which is based on the following equation for

    Reynolds Number calculation:

    () =

    where is Density of fluid, V is free stream velocity, D is characteristic length

    of particle/object and is viscosity of fluid.

    Setting the Re=1 and finding the corresponding velocity that is required,

    =

    1 = (1.225)(0.1)(1.7894 0.5)

    = 0.000146073 /

    Therefore, the velocity is out controlled parameter that we adjust to obtain

    the results for the simulation at Re=1, Re=10 and Re=100. Rest of the values are

    kept constant.

    Reynolds Number Velocity (m/s)

    1 0.00014607310 0.00146073

    100 0.0146073Table 3 - Reynolds number and corresponding Velocities

    We set the solver to consider transient analysis as the patterns generated

    are changing with time and we want to be able to see the distinct patterns at a

    specific time.

    Figure 5 - General Solver Settings

  • 8/10/2019 CFD Report Ali

    11/26

    10

    Then, the model chosen for this analysis is selected. We have selected

    Viscous Laminar flow situation which is suitable for this analysis.

    We are using Air as the fluid in this analysis and we take the default values

    for the density and viscosity as provided by FLUENT which have been shown in Fig.

    4.

    Figure 6 - Model

  • 8/10/2019 CFD Report Ali

    12/26

    11

    We then select the Solution methods in which we select PISO method.The

    Transient formulation method employs Second Order Implicit finite element

    analysis model. This ensures accuracy for the results and required initial values to

    be provided. Thus the step after requires initialization of the values into the solver

    as shown in the figures below.

    Figure 8 - Solution InitializationFigure 7 - Solution methods

  • 8/10/2019 CFD Report Ali

    13/26

    12

    Next step involves setting the Monitors, also known as congerence monitors

    that alow the user to see if the soution has converged or not and it can also allow

    the user to monitor various other parameters such as the Drag and Lift coefficients.

    We have set our slver to monitor the Drag and Lift coeffitients at specific

    parameters such as every 5 time steps.

    An optional set is to include the recorder for the animation sequence. This is

    a feature that will allow us to generate an animation of the flow after the simulation

    has ended. This can be especially useful to visualize the flow and see how the flow

    acts around the object. We have set our solver to record the frames of the flow

    every 5 time steps that will allow us to generate an animation at the end.

    Figure 10 - Solver Monitors

    Figure 9 - Animation Recorder

  • 8/10/2019 CFD Report Ali

    14/26

    13

    The final step is to run the calculation which is shown in the next page.

    This is the final and an important part of the simulation which determines

    how accurate and how long will the simulation run for. For all of our Re values, we

    have set the following values:

    Parameters Values

    Time Step (s) 0.5Number of Time Steps 5000

    Max iterations per Time Step 20Table 4 - Time Step Parameters

    Finally, the solver it set to calculate and the results are generated. Time taken

    varies based on the complexity of the calculation.

    Figure 11 - Running the Calculation

  • 8/10/2019 CFD Report Ali

    15/26

    14

    4.Results and Discussion:

    After running all the simulations for the 3 Re values, the following results are

    obtained. The results have been divided by the Re values and they contain

    information for the Pressure Coefficients, Velocity Magnitudes and Path lines. They

    are also compared to the existing literature values and diagrams for accuracy of

    results.

    Results are shown starting next page for better visualization in landscape.

  • 8/10/2019 CFD Report Ali

    16/26

    15

    For Re=1,

    Figure 13 - Re=1, Pressure Coefficient Contour

    Figure 12 - Re=1, Velocity Contour

  • 8/10/2019 CFD Report Ali

    17/26

    16

    Figure 14 - Re=1, Pathlines

    Figure 15 - Reference Diagram for Re

  • 8/10/2019 CFD Report Ali

    18/26

    17

    For the results at Re=1, we can see that the Pressure contour reveals that the pressure is the highest at the

    front of the cylinder and that behind it is relatively low pressure. For the velocity contour, we can see a similar case

    that the velocity is actually the lowest in the front of the cylinder. Furthermore, seeing the Pathlines, we can see

    that the pattern is very similar to the reference diagram for the flow over a cylinder at low Re values such as around

    1 or lower. This thus confirms that the results obtained are quite accurate and we have had a successful simulation

    for Re=1.

    Next we take a look at Re=10 with the velocity increased by a factor of 10.

    For Re=10,

    Figure 16 - Re=10, Pressure Coefficient Contour

  • 8/10/2019 CFD Report Ali

    19/26

    18

    Figure 18 - Re=10, Velocity Contour

    Figure 17 Re=10, Pathlines

  • 8/10/2019 CFD Report Ali

    20/26

    19

    We can see above that the results at Re=10 are much more different as we can start to see a laminar wake

    region form behind the cylinder. The results are further confirmed when matched with the reference diagram for

    the flow at Re=10 over a cylinder. Thus simulation has been successful. Finally, we look at the Re=100 in the next

    part.

    Figure 19 - Re=10, Pathlines Close-up

    Figure 20 - Reference Diagram for Re=10

  • 8/10/2019 CFD Report Ali

    21/26

    20

    For Re=100,

    Figure 22 - Re=100, Pressure Coefficient Contour

    Figure 21 - Velocity Contour

  • 8/10/2019 CFD Report Ali

    22/26

    21

    Figure 24 - Re=100, Pathlines

    Figure 23 - Re=100, Pathlines Close-up

  • 8/10/2019 CFD Report Ali

    23/26

    22

    Observing the results, we can see how the Karman Vortices have formed behind the cylinder at Re=100. This

    has caused a vibration in the object which is further revealed by the relation of the Drag and Lift coefficients. We

    can also see that the Pathlines closely adhere to the reference diagram for Re=100. Lets take a look at the Drag

    and Life coefficient chart.

    Figure 25 - Reference Diagram for Re=100

    Figure 27 - FLUENT Cd and Cl relation w.r.t TimeFigure 26 - Reference Chart of Cd and Cl w.r.t Time

  • 8/10/2019 CFD Report Ali

    24/26

    23

    The above charts comparison shows that the results of the variation of the Cd and Cl with respect to time

    are close to the reference values from the notes chart, thus overall the simulation has been accurate for Re=100.

    There may be errors in the chart or slight variances in the simulation results. This is normal as the simulation

    will calculate new each run and thus is bound to have some variances over time. These errors are negligible in this

    research as the results highly resemble the reference values and diagrams thus we can say that the simulation

    overall was very accurate.

  • 8/10/2019 CFD Report Ali

    25/26

    24

    5.Conclusion:

    To conclude, through this tutorial analysis on the flow over a cylinder at

    different Re values, we have managed to learn the basics of the CFD software. WE

    have learnt how to generate mesh with different parameters as well as how to

    adjust the solver to meet our needs and then calculate the results. We also found

    that the results highly depend on the input parameters and may show a significant

    change when varying different parameters.

    We were able to generate useful and accurate reports and charts which

    helped us analyze the problem more efficiently and we have been able to

    troubleshoot the simulation with the help of the lab staff and the professors

    guidance.

    We can now apply this knowledge learnt in future fluid mechanics problemsto help us nurture our engineering sense by being able to visualize the fluid

    mechanics problems through the use of CFD software.

    For further research, we can adjust the domain size to see how it influences

    the results and also adjust the mesh configuration from QUAD to HEX and observe

    how the accuracy changes.

  • 8/10/2019 CFD Report Ali

    26/26

    References and Appendix:

    CFD notes

    ANSYS ICEM tutorial notes

    ANSYS FLUENT tutorial notes