CFX-Intro_14.5_WS03_Mixing-Tube.pdf

  • Upload
    paulhnv

  • View
    212

  • Download
    0

Embed Size (px)

Citation preview

  • 8/11/2019 CFX-Intro_14.5_WS03_Mixing-Tube.pdf

    1/25

    2012 ANSYS, Inc. December 17, 2012 1 Release 14.5

    14.5 Release

    Workshop 03

    Mixing Tube

    Introduction to ANSYS CFX

  • 8/11/2019 CFX-Intro_14.5_WS03_Mixing-Tube.pdf

    2/25

    2012 ANSYS, Inc. December 17, 2012 2 Release 14.5

    Overview

    This workshop simulates an inlinestatic mixing device. Two side inlets

    inject hot fluid into the main flow

    just before a restriction in the pipe,designed to enhance mixing

    A Profile Boundary Condition is used

    for the velocity main inlet, for whichthe temperature is set at 298 [K]

    Fluid enters the side inlets at 325 [K]

    and 5 [m/s]

    The fluid viscosity is set as a function

    of temperature using CEL

    Symmetry planes divide the model

    into of its initial size

  • 8/11/2019 CFX-Intro_14.5_WS03_Mixing-Tube.pdf

    3/25

    2012 ANSYS, Inc. December 17, 2012 3 Release 14.5

    Mesh CheckingBefore setting up the simulation you will

    check the mesh quality in CFD-Post. It is

    good practice to check the quality of yourmesh.

    1. Start ANSYS Workbench and savethe project to your working directory

    (File> Save As)

    2. Drag and drop a Resultscomponentsystem into the Project Schematic. Open

    CFD-Postby double clicking on the

    Resultscell or right clicking to select Edit

    3. In CFD-Postselect File> Load Results

    and browse to the directory containingthe mesh file Inline_Mixer_Mesh.gtm

    (workshop_input_files\WS_03_MixingTube). Make sure Files of type is set to

    All Readable Files or CFXso that you can

    select the file. Then click on Open

  • 8/11/2019 CFX-Intro_14.5_WS03_Mixing-Tube.pdf

    4/25

    2012 ANSYS, Inc. December 17, 2012 4 Release 14.5

    3. Click on the Calculatorstab and highlight Mesh Calculator

    4. Examine the results for each of the functions. Guidelines from the

    Help documentation (search for Mesh Visualization Advice) have

    been copied below

    Mesh Checking

  • 8/11/2019 CFX-Intro_14.5_WS03_Mixing-Tube.pdf

    5/25

    2012 ANSYS, Inc. December 17, 2012 5 Release 14.5

    Two metrics fall outside the recommended values:

    Minimum Face Angle 30

    Now create some plots to view these mesh regions:

    Create a Volumeobject (Location > Volume)

    There are very few elements of this quality

    Create a second Volume object using the IsovolumeMethod with the variable Element Volume Ratio above aValue of 30. Check theInclusive box to include elementsat that value so that the isovolume is visible. On theColourtab change the Colour to something that willstand out

    There are few elements with high Element VolumeRatios

    They overlap the elements with poor face angles

    Mesh Checking

    Method = Isovolume

    Variable = Minimum Face Angle

    Mode = Below Value

    Value = 15 [degree]

  • 8/11/2019 CFX-Intro_14.5_WS03_Mixing-Tube.pdf

    6/25

    2012 ANSYS, Inc. December 17, 2012 6 Release 14.5

    5. Edit the object Default 2D Region(under the Mesh Regions branch in the

    Outline tree)

    Mesh Checking

    6. View the mesh on this

    object by editing its Render

    properties to Show Mesh

    LinesA finer mesh in the area of

    the isovolumes would

    improve the mesh quality. A

    coarse mesh was used to

    minimise solution times7. Close CFD-Post(File> Close

    CFD-Post)

  • 8/11/2019 CFX-Intro_14.5_WS03_Mixing-Tube.pdf

    7/25 2012 ANSYS, Inc. December 17, 2012 7 Release 14.5

    1. Drag and drop a CFX Component System into the Project Schematic

    and edit the Setupcell to open CFX-Pre2. Right click on Meshin the Outlinetree and select Import Mesh >

    CFX Mesh. You can then browse to the directory containing

    Inline_Mixer_Mesh.gtm and select it

    The mesh represents one quarter of the full geometry

    3. Click on Opento import the mesh

    Starting the Simulation

  • 8/11/2019 CFX-Intro_14.5_WS03_Mixing-Tube.pdf

    8/25 2012 ANSYS, Inc. December 17, 2012 8 Release 14.5

    The next step is to prepare the profile boundary data so that they can beused to define the velocity components on the main inlet. The data are

    contained in a file called Inline_Mixer_BC_Profile.csv. Files such as thiscan be created by exporting solution data from CFD-Post.

    Starting the Simulation

    4. Select Tools > Initialise Profile Data

    5. Select the Data Fileas

    Inline_Mixer_BC_Profile.csv

    The profiles for the velocitycomponents are listed

    6. Click OK. The User Function,MainInlet,is added to the Outlinetree

  • 8/11/2019 CFX-Intro_14.5_WS03_Mixing-Tube.pdf

    9/25 2012 ANSYS, Inc. December 17, 2012 9 Release 14.5

    For this workshop the default viscosity of water will be

    replaced with a temperature-dependent expression

    1. Right-click on Expressions in the Outline tree and

    insert a new expression called Tlower. Enter a value of275.0 [K] in the Definition box of the Expression editor

    2. Right-click on the Expressions object in the editor toinsert the following expressions:

    Expressions for Viscosity

    Tupper = 325.0 [K]

    VisAtTupper = 5.45E-4 [N s m^-2]

    VisAtTlower= 1.8E-3 [N s m^-2]

    VisT = VisAtTlower + (VisAtTupper -VisAtTlower)*(T-Tlower)/(Tupper-

    Tlower)

    Expressions are case sensitive. To ensure that syntax is correct, you can use

    drop-down menus by right-clicking in the Definitionbox

  • 8/11/2019 CFX-Intro_14.5_WS03_Mixing-Tube.pdf

    10/25 2012 ANSYS, Inc. December 17, 2012 10 Release 14.5

    4. Double-click the VisTexpression and then select the Plot

    5. To view how VisT varies with temperature, turn on the Ttoggle and enter

    a Start of Range of 275 [K] and an End of Range of 325 [K]

    6. Click Plot Expression

    The expression produces sensible values of viscosity over the given range of

    temperatures. To confirm that the expression would be invalid at larger valuesof T,click Define Plotand enter higher End of Range temperatures.

    Checking the Viscosity

    To protect against invalid values,

    you could use an expression that

    clips viscosity, for example:

    max(VisAtTupper,VisT)

  • 8/11/2019 CFX-Intro_14.5_WS03_Mixing-Tube.pdf

    11/25

    2012 ANSYS, Inc. December 17, 2012 11 Release 14.5

    Now modify the properties of

    Water :

    1. Expand Materials in the

    Outline tree and double-click on Water

    2. Click the MaterialProperties tab and expand

    the Transport Properties

    section.

    3. Click on the expression

    icon.4. Right click in the Dynamic

    Viscositybox and select

    the expression VisT

    5. Click OK

    Applying Viscosity Expression

  • 8/11/2019 CFX-Intro_14.5_WS03_Mixing-Tube.pdf

    12/25

    2012 ANSYS, Inc. December 17, 2012 12 Release 14.5

    Next create the fluid domain:

    1. Right-click on Default Domainin the Outlineand

    rename it InlineMixer

    2. Double-click on InlineMixerto edit it and set thefollowing on the Basic Settings:

    Material =Water

    Reference Pressure= 1 [ atm ]

    3. Set the following on the Fluid Modelstab:

    Heat Transfer Model= Thermal Energy

    Turbulence Model= k-Epsilon

    4. Click OKto complete the domain specification

    Creating the Domain

  • 8/11/2019 CFX-Intro_14.5_WS03_Mixing-Tube.pdf

    13/25

    2012 ANSYS, Inc. December 17, 2012 13 Release 14.5

    1. Insert a new boundary by right-clicking

    on the domain InlineMixerin the Outlinetree

    2. Set the Name to Main Inlet and click OK

    3. On the Basic Settingstab, set Boundary

    Type to Inlet, and Location to Main Inlet

    4. Turn on the Use Profile Data toggle

    The previously initialised profileMainInletis displayed

    5. Click Generate Valuesand switch to the

    Boundary Detailstab

    Generate Valuesautomatically enters

    appropriate expressions that refer to theselected profile.

    Inlet Boundary Conditions

  • 8/11/2019 CFX-Intro_14.5_WS03_Mixing-Tube.pdf

    14/25

    2012 ANSYS, Inc. December 17, 2012 14 Release 14.5

    6. On the Boundary Detailstab set the Static

    Temperatureto 298 [K]

    7. Change the option for Mass and Momentum toCart Vel Components. TheUser Function,

    MainInlet , is automatically used

    8. ClickApply,not OK

    9. Select the Plot Optionstab and enable theBoundary Contourtoggle

    10. Set the Profile Variableto Wand clickApply

    The profile is a 1/7

    thpower law profile, which iscommonly used to describe the boundary layer

    11. Turn off the Boundary Contour toggle and click OK

    Inlet Boundary Conditions

  • 8/11/2019 CFX-Intro_14.5_WS03_Mixing-Tube.pdf

    15/25

    2012 ANSYS, Inc. December 17, 2012 15 Release 14.5

    Now create the side inlet boundary condition:

    1. Insert a new boundary named Side Inlet

    2. On the Basic Settingstab, set Boundary Type to Inlet, and Location to

    Side Inlet

    3. On the Boundary Detailstab set the Mass and Momentum Option toNormal Speedwith a value of 5 [m s^-1]

    4. Set Static Temperatureto 325 [K]and click OK

    Inlet Boundary Conditions

  • 8/11/2019 CFX-Intro_14.5_WS03_Mixing-Tube.pdf

    16/25

  • 8/11/2019 CFX-Intro_14.5_WS03_Mixing-Tube.pdf

    17/25

    2012 ANSYS, Inc. December 17, 2012 17 Release 14.5

    Lastly create the symmetry boundary conditions:

    1. Insert a new boundary named Sym 1

    2. On the Basic Settings tab set Boundary Typeto Symmetryand Location

    to Sym1

    3. Click OK

    4. Insert a new boundary named Sym 2

    5. On the Basic Settingstab, set Boundary Type to Symmetryand Location

    to Sym2

    6. Click OK

    Symmetry Boundary Conditions

  • 8/11/2019 CFX-Intro_14.5_WS03_Mixing-Tube.pdf

    18/25

  • 8/11/2019 CFX-Intro_14.5_WS03_Mixing-Tube.pdf

    19/25

    2012 ANSYS, Inc. December 17, 2012 19 Release 14.5

    1. Save the settings by selecting File >Save Projectand then close CFX-Pre(File> Close CFX-Pre)

    2. To write the definition file, the input file for the CFX-Solver, and startup the CFX Solver Manager, double-click on the Solutioncell in the

    CFX component system in the Project Schematic

    3. When the CFX-Solver Manageropens, click Start Run

    4. The run should finish after about 40 iterations. When it does so,

    close the CFX-Solver Manager (File> Close CFX-Solver Manager)

    5. In theProject Schematic double-click on the Results cell of the CFXcomponent system to open CFD-Post

    Running the Solver

  • 8/11/2019 CFX-Intro_14.5_WS03_Mixing-Tube.pdf

    20/25

    2012 ANSYS, Inc. December 17, 2012 20 Release 14.5

    One of the variables written to the results file is Yplus. This variable

    gives the dimensionless distance between a wall and the first node from

    the wall. This is an important quantity for turbulence models since theturbulent wall functions are valid only below certain Yplus values. For

    the k-epsilon model Yplusshould be < 100. Note that you can only plot

    Ypluson walls.

    Colour the InlineMixer Defaultboundary using Yplus(to select Yplus usethe button)

    Yplus is > 100 over most of the walls

    The thickness of the first inflation layer from the wall should be reduced

    to obtain more accurate results. To maintain good mesh quality when

    reducing the first layer thickness, you will often have to include moreinflation layer and/or use a finer mesh

    For turbulent flows you should alwayscheck the Yplusvalues in your results

    Post-processing

  • 8/11/2019 CFX-Intro_14.5_WS03_Mixing-Tube.pdf

    21/25

    2012 ANSYS, Inc. December 17, 2012 21 Release 14.5

    The mixing of the fluid from the different inlets will

    be visualised with a plot of temperature distribution

    1. Double-click on Sym 1in the Outlinetree to edit

    2. Set the following on the Colourtab:

    Modeto Variable

    Variableto Temperature

    Rangeto User Specified

    Minto 298 [ K ]

    Maxto 302.5 [ K ]

    The temperature profile appears well mixed within 3

    pipe diameters downstream of the flow restriction

    Post-processing

  • 8/11/2019 CFX-Intro_14.5_WS03_Mixing-Tube.pdf

    22/25

    2012 ANSYS, Inc. December 17, 2012 22 Release 14.5

    The flow is viewed by means of a vector plot

    4. Turn off visibility for Sym 1

    5. Create a Vector plot on the location Sym 1

    Mixing is enhanced by the large recirculation zone downstream

    of the restriction

    Post-processing

  • 8/11/2019 CFX-Intro_14.5_WS03_Mixing-Tube.pdf

    23/25

    2012 ANSYS, Inc. December 17, 2012 23 Release 14.5

    The full geometry can be displayed by

    means of an instance transform

    1. Turn off visibility of all plots

    2. Colour the InlineMixer Default

    boundary with Temperature, using a

    Local Range

    3. In the Outlinetree edit the User

    Locations and Plots > Default

    Transformobject

    4. Turn off Instancing Info From Domain,

    change Number of Graphical Instancesto 2 and then turn onApply Rotation

    5. Change theAngle From setting toValue,enter anAngle of 180 [degree]

    Post processing

  • 8/11/2019 CFX-Intro_14.5_WS03_Mixing-Tube.pdf

    24/25

    2012 ANSYS, Inc. December 17, 2012 24 Release 14.5

    6. Turn onApply Reflection and set the

    Method to ZX Plane with a Yvalue of0 [ m ]

    7. ClickApply

    Two transforms are performed: a

    rotation of 180 degrees about the Z-

    axis and then a reflection in the ZXplane. This results in four copies of

    the original geometry

    8. Turn off visbililty of the Wireframe

    9. Turn off visibility of InlineMixerDefault

    Post-processing

    The Default Transform applies to all existing and new objects by default. You

    can create new transforms and apply them to selected objects as necessary.

  • 8/11/2019 CFX-Intro_14.5_WS03_Mixing-Tube.pdf

    25/25

    2012 ANSYS Inc December 17 2012 25 Release 14 5

    Now create an IsosurfaceofTemperature:

    1. Select Location > Isosurface

    2. Accept the default name by

    clicking OK

    3. Set Variableto Temperature

    4. Set Valueto 301.5 [K], a little

    above the mass-flow averaged

    temperature on the outlet. Use

    the Function Calculatortoevaluate this.

    Post-processing

    The isosurface is reasonably axisymmetric 1.5 - 2 pipe diametersdownstream of the restriction, where the flow has started to recover.