Dm Check Valve

download Dm Check Valve

of 17

Transcript of Dm Check Valve

  • 7/31/2019 Dm Check Valve

    1/17

    Tutorial: Simulating a 2D Check Valve usingFLUENTs

    Dynamic Mesh Model and Spring Smoothing

    Introduction

    The purpose of this tutorial is to demonstrate how to simulate a check valve with smalldisplacement using the dynamic mesh model in FLUENT. As the displacement of the checkvalve ball in this case is small, the spring smoothing approach is suitable for this problem.

    A pure hex mesh is used for this case since only smoothing is used. Two dynamic meshUDFs are used, one for the valve motion specification and one for the axis deformation

    specification.

    This tutorial demonstrates how to do the following:

    Set up a problem using the dynamic mesh model.

    Specify dynamic mesh modeling parameters.

    Specify a rigid body motion zone.

    Specify a deforming zone.

    Preview the dynamic mesh before starting the calculation.

    Set up an animation for the stream function.

    Perform the calculation with residual plotting.

    Examine the pressure and velocity fields using graphics.

    Prerequisites

    This tutorial assumes that you are familiar with the FLUENT interface and have completedTutorial 1 from the FLUENT 6.3 Tutorial Guide. You should also be familiar with the

    dynamic mesh model. Refer to Section 11.7: Steps in Using Dynamic Meshes in the FLUENT6.3 Users Guide for more information on the use of the dynamic mesh model.

    Problem Description

    The problem considered is shown schematically in Figure 1. A 2D axisymmetric check valvegeometry is used. A velocity inlet and pressure outlet are used. The valve is not driven bythe flow in this case. Instead, a prescribed motion is used.

    c Fluent Inc. July 21, 2006 1

  • 7/31/2019 Dm Check Valve

    2/17

    Simulating a 2D Check Valve using FLUENTs Dynamic Mesh Model and Spring Smoothing

    The motion of the check valve ball is limited to a small distance and hence, the springsmoothing approach is suitable. The motion of the ball is prescribed by a user-definedfunction (UDF). The mesh axis is set to deforming to prevent formation of skewed cells atthe intersection of the check valve ball and the axis.

    Inlet

    Outlet

    Ball

    Deforming Axis

    Figure 1: Problem Schematic

    Preparation

    1. Copy the files, check-valve-2d.msh and check-valve-2d.c to your working folder.

    2. Start the 2D (2d) version of FLUENT.

    Setup and Solution

    Step 1: Grid

    1. Read the mesh file check-valve-2d.msh.

    2. Check the grid.

    FLUENT will perform various checks on the mesh and report the progress in the con-sole. Make sure that the minimum volume reported is a positive number.

    3. Display the grid (Figure 2).

    (a) Retain the default settings.

    (b) Click Display and close the Grid Display panel.

    2 c Fluent Inc. July 21, 2006

  • 7/31/2019 Dm Check Valve

    3/17

    Simulating a 2D Check Valve using FLUENTs Dynamic Mesh Model and Spring Smoothing

    GridFLUENT 6.3 (2d, pbns, lam)

    Figure 2: Grid Display

    Step 2: Models

    1. Enable axisymmetric, time-dependent calculations.

    Define Models Solver...

    (a) Select Axisymmetric from the Space list.

    (b) Select Unsteady from the Time list.

    (c) Retain the default Unsteady Formulation of 1st-Order Implicit.

    Dynamic mesh simulations currently work only with first-order time advance-

    ment.

    (d) Click OK to close the Solver panel.

    2. Enable the standard k-epsilon model with standard wall functions.

    Define Models Viscous...

    Step 3: Materials

    Define Materials...

    1. Retain the default properties of air.

    2. Close the Materials panel.

    c Fluent Inc. July 21, 2006 3

  • 7/31/2019 Dm Check Valve

    4/17

    Simulating a 2D Check Valve using FLUENTs Dynamic Mesh Model and Spring Smoothing

    Step 4: Operating Conditions

    Define Operating Conditions...

    1. Retain the default settings for all the parameters.

    2. Close the Operating Conditions panel.

    Step 5: Boundary Conditions

    In this step, you will set the inlet conditions and change some wall zones to axis zones.

    Define Boundary Conditions...

    1. Define boundary conditions for the inlet zone.

    (a) Enter 2 m/s for the Velocity Magnitude.

    (b) Retain the selection ofMagnitude, Normal to Boundary in the Velocity SpecificationMethod drop-down list.

    (c) Select Intensity and Viscosity Ratio from the Specification Method drop-down listin the Turbulence group box.

    (d) Retain the default settings for Turbulent Intensity and Turbulent Viscosity Ratio.

    (e) Click OK to close the Velocity Inlet panel.

    2. Change the wall left zone to an axis zone.

    (a) Select wall left from the Zone list and axis from the Type list.

    A Question dialog box will open, asking if you want to change wall lefts type to

    axis.

    (b) Click Yes to close the Question dialog box.

    The Axis panel will open, giving the default name for the axis zone.

    i. Enter axis1 for Zone Name.

    ii. Click OK to close the Axis panel.

    3. Similarly, change the wall right zone to an axis zone named axis2.

    4. Close the Boundary Conditions panel.

    4 c Fluent Inc. July 21, 2006

  • 7/31/2019 Dm Check Valve

    5/17

    Simulating a 2D Check Valve using FLUENTs Dynamic Mesh Model and Spring Smoothing

    Step 6: Compile the UDF

    Two UDFs are used in this example. The DEFINE CG MOTION UDF is used to prescribe the

    velocity of the valve. The DEFINE GEOM UDF is used for the axis. Without this UDF, the

    nodes on the axis wil l be stationary and will cause skewed elements. To al low for smoothing,

    you will define a deforming zone. The DEFINE GEOM UDF used for the deforming zonedefines the projection of the nodes on the deforming zones back to the axis.

    Define User-Defined Functions Compiled...

    1. Click the Add... button in the Source Files group box.

    The Select File dialog will open.

    2. Select the file check-valve-2d.c and click OK to close the Select File dialog.

    3. Click Build to build the library.

    A Warning dialog box will open, warning you to make sure that the UDF source filesare in the directory that contains the case and data files.

    4. Click OK to close the Warning dialog box.

    FLUENT will set up the directory structure and compile the code. The compilationwill be displayed in the console.

    5. Click Load to load the library.

    6. Close the Compiled UDFs panel.

    c Fluent Inc. July 21, 2006 5

  • 7/31/2019 Dm Check Valve

    6/17

    Simulating a 2D Check Valve using FLUENTs Dynamic Mesh Model and Spring Smoothing

    Step 7: Mesh Motion Setup

    1. Enable dynamic mesh motion and specify the associated parameters.

    Define Dynamic Mesh Parameters...

    (a) Enable Dynamic Mesh in the Models group box.

    The Dynamic Mesh Parameters panel will expand to show additional inputs.

    (b) Enable Smoothing in the Mesh Methods group box.

    Make sure that the Layering and Remeshing options are disabled.

    (c) Enter 0.1 for the Spring Constant Factor.

    (d) Enter 50 for Number of Iterations.

    (e) Click OK to close the Dynamic Mesh Parameters panel.

    6 c Fluent Inc. July 21, 2006

  • 7/31/2019 Dm Check Valve

    7/17

    Simulating a 2D Check Valve using FLUENTs Dynamic Mesh Model and Spring Smoothing

    2. Specify the motion of the check valve ball and the deforming axis.

    Define Dynamic Mesh Zones...

    (a) Specify the motion of the check valve ball.

    i. Select valve from the Zone Names drop-down list.

    ii. Retain the selection of Rigid Body in the Type list.

    iii. Select valve::libudf from the Motion UDF/Profile drop-down list.

    iv. Retain the default value of 0 m for Cell Height in the Meshing Options tab.

    v. Click Create.

    FLUENT will create the dynamic zone valve which will be available in theDynamic Zones list.

    c Fluent Inc. July 21, 2006 7

  • 7/31/2019 Dm Check Valve

    8/17

    Simulating a 2D Check Valve using FLUENTs Dynamic Mesh Model and Spring Smoothing

    (b) Specify the motion of the deforming axis.

    i. Select axis1 from the Zone Names drop-down list.ii. Select Deforming from the Type list.

    iii. Click the Geometry Definition tab and set the following parameters:

    A. Select user-defined from the Definition drop-down list.

    B. Select axis1::libudf from the Geometry UDF drop-down list.

    8 c Fluent Inc. July 21, 2006

  • 7/31/2019 Dm Check Valve

    9/17

    Simulating a 2D Check Valve using FLUENTs Dynamic Mesh Model and Spring Smoothing

    iv. Click the Meshing Options tab and set the following parameters:

    A. Enable Smoothing and disable Remeshing in the Methods group box.

    B. Retain the default settings for the remaining parameters.

    v. Click Create.

    FLUENT will create the dynamic zone axis1 which will be available in theDynamic Zones list.

    vi. Select axis2 from the Zone Names drop-down list.

    vii. Retain the selection of Deforming in the Type list.

    viii. Click the Geometry Definition tab and set the following parameters:

    A. Select user-defined from the Definition drop-down list.

    B. Select axis2::libudf from the Geometry UDF drop-down list.ix. Click the Meshing Options tab and set the following parameters:

    A. Enable Smoothing and disable Remeshing in the Methods group box.

    B. Retain the default settings for the remaining parameters.

    x. Click Create.

    FLUENT will create the dynamic zone axis2 which will be available in theDynamic Zones list.

    c Fluent Inc. July 21, 2006 9

  • 7/31/2019 Dm Check Valve

    10/17

    Simulating a 2D Check Valve using FLUENTs Dynamic Mesh Model and Spring Smoothing

    (c) Close the Dynamic Mesh Zones panel.

    3. Enable hex-mesh smoothing using the TUI commands shown in boxes.

    You may need to press the key to get the > prompt.

    > define/models/dynamic-mesh-controls

    define/models/dynamic-mesh-controls > sp

    define/models/dynamic-mesh-controls/smoothing-parameter > soas

    spring-based smoothing for all cell types [no] yes

    4. Preview the mesh motion.

    (a) Save the case file (check-valve-2d.cas.gz).

    (b) Display the grid.i. Select all the surfaces and click Display.

    ii. Zoom in to the area of interest.

    iii. Close the Grid Display panel.

    (c) Preview the mesh motion.

    Solve Mesh Motion...

    i. Enter 0.02 s for Time Step Size.

    ii. Enter 200 for Number of Time Steps.

    iii. Click Preview.

    Make sure that the grid does not get too skewed.

    iv. Close the Mesh Motion panel.

    10 c Fluent Inc. July 21, 2006

  • 7/31/2019 Dm Check Valve

    11/17

    Simulating a 2D Check Valve using FLUENTs Dynamic Mesh Model and Spring Smoothing

    Step 8: Solution

    1. Read the case file check-valve-2d.cas.gz.

    2. Request saving of case and data files every 50 time steps.

    File Write Autosave...

    (a) Enter 50 for both Autosave Case File Frequency and Autosave Data File Frequency.

    (b) Enter check-valve-2d for File Name.

    (c) Click OK to close the Autosave Case/Data panel.

    3. Retain the default solution control parameters.

    Solve Controls Solution...

    4. Enable the plotting of residuals during the calculation.

    Solve Monitors Residual...

    (a) Enable Plot in the Options group box.

    (b) Click OK to close the Residual Monitors panel.

    5. Initialize the flow field using the boundary conditions set at the inlet.

    Solve Initialize Initialize...

    (a) Select inlet from the Compute From drop-down list.

    (b) Click Init and close the Solution Initialization panel.

    6. Create an animation sequence to view the stream function during the motion of thecheck valve ball.

    Solve Animate Define...

    (a) Set Animation Sequences to 1.

    (b) Set Every to 5 and select Time Step from the When drop-down list for sequence-1.

    c Fluent Inc. July 21, 2006 11

  • 7/31/2019 Dm Check Valve

    12/17

    Simulating a 2D Check Valve using FLUENTs Dynamic Mesh Model and Spring Smoothing

    (c) Click the Define... button to open the Animation Sequence panel.

    i. Set Window to 1 and click Set.

    ii. Select Contours from the Display Type list.

    The Contours panel will open.

    A. Retain the default settings in the Options group box.

    B. Select Velocity... and Stream Function from the Contours of drop-downlists.

    C. Click Display and close the Contours panel.

    12 c Fluent Inc. July 21, 2006

  • 7/31/2019 Dm Check Valve

    13/17

    Simulating a 2D Check Valve using FLUENTs Dynamic Mesh Model and Spring Smoothing

    iii. Click OK to close the Animation Sequence panel.

    The Active checkbox for sequence-1 will be enabled in the Solution Animationpanel.

    (d) Click OK to close the Solution Animation panel.

    7. Save the case file (check-valve-2d.cas.gz).

    8. Start the calculation for 200 time steps.

    Solve Iterate...

    (a) Enter 0.02 s for Time Step Size.

    (b) Enter 200 for Number of Time Steps.

    (c) Click Iterate.

    (d) Close the Iterate panel.

    Step 9: Postprocessing

    1. Play back the animation.

    Solve Animate Playback...

    (a) Set the Replay Speed slider to Fast.

    (b) Click the button.

    As the animation starts playing, you can see the movement of the check valve

    ball. You may enable Double Buffering in the Display Options panel to improvethe visualization.

    c Fluent Inc. July 21, 2006 13

  • 7/31/2019 Dm Check Valve

    14/17

    Simulating a 2D Check Valve using FLUENTs Dynamic Mesh Model and Spring Smoothing

    (c) Save the animation in MPEG movie format.

    i. Select MPEG from the Write/Record Format drop-down list.

    ii. Click Write.

    (d) Close the Playback panel.

    2. Inspect the solution.

    (a) Display filled contours of velocity magnitude (Figure 3).

    Display Contours...

    i. Select Velocity... and Velocity Magnitude from the Contours of drop-downlists.

    ii. Enable Filled in the Options group box.

    iii. Click Display.

    Figure 3: Contours of Velocity Magnitude

    14 c Fluent Inc. July 21, 2006

  • 7/31/2019 Dm Check Valve

    15/17

    Simulating a 2D Check Valve using FLUENTs Dynamic Mesh Model and Spring Smoothing

    (b) Display filled contours of static pressure (Figure 4).

    i. Select Pressure... and Static Pressure from the Contours of drop-down lists.

    ii. Display the mirrored view.

    Display

    Views...

    A. Select axis-1 and axis-2 from the Mirror Planes selection list.

    B. Click Apply and close the Views panel.

    iii. Click Display and close the Contours panel.

    Contours of Static Pressure (pascal) (Time=4.0000e+00)FLUENT 6.3 (axi, pbns, dynamesh, ske, unsteady)

    6.03e+01

    5.46e+014.89e+01

    4.32e+01

    3.75e+01

    3.18e+01

    2.61e+01

    2.04e+01

    1.47e+01

    9.01e+00

    3.32e+00

    -2.38e+00

    -8.07e+00

    -1.38e+01

    -1.95e+01

    -2.52e+01

    -3.08e+01

    -3.65e+01

    -4.22e+01

    -4.79e+01

    -5.36e+01

    Figure 4: Contours of Static Pressure

    c Fluent Inc. July 21, 2006 15

  • 7/31/2019 Dm Check Valve

    16/17

    Simulating a 2D Check Valve using FLUENTs Dynamic Mesh Model and Spring Smoothing

    (c) Display velocity vectors (Figure 5).

    Display Vectors...

    i. Set Scale to 5.

    ii. Increase Skip to 1.

    iii. Select Velocity... and Stream Function from the Color by drop-down lists.

    iv. Click Display and close the Vectors panel.

    16 c Fluent Inc. July 21, 2006

  • 7/31/2019 Dm Check Valve

    17/17

    Simulating a 2D Check Valve using FLUENTs Dynamic Mesh Model and Spring Smoothing

    Velocity Vectors Colored By Stream Function (kg/s) (Time=4.0000e+00)FLUENT 6.3 (axi, pbns, dynamesh, ske, unsteady)

    1.86e+00

    1.76e+00

    1.67e+00

    1.58e+00

    1.49e+00

    1.39e+00

    1.30e+001.21e+00

    1.11e+00

    1.02e+00

    9.29e-01

    8.36e-01

    7.43e-01

    6.51e-01

    5.58e-01

    4.65e-01

    3.72e-01

    2.79e-01

    1.86e-01

    9.35e-02

    6.44e-04

    Figure 5: Velocity Vectors

    Summary

    In this tutorial, you used the spring smoothing option for the dynamic mesh feature inFLUENT. The motion was limited to small distances. The spring smoothing option wasactivated using the TUI since the grid used is a pure hex mesh. The motion was prescribedby a user-defined function (UDF) which was compiled and loaded into FLUENT. The axis

    was also set to deforming to prevent formation of skewed cells at the intersection of thecheck valve ball and the axis.

    17