Sie sind auf Seite 1von 28

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

Introduction
The purpose of this tutorial is to demonstrate how to simulate a ball check valve with small displacement using the dynamic mesh and 6DOF model in FLUENT. A pressure is applied at the valve inlet that pushes the valve and causes it to move due to the fluid forces applied on the valve. This tutorial uses the workbench workflow for solving the problem. As the displacement of the check valve ball in this case is small, a smoothing approach is suitable for this problem. In this tutorial, the diffusion smoothing algorithm is used. A pure hex mesh is used for this case since only smoothing is used. A dynamic mesh UDF is used to specify the mass properties of the valve for the 6DOF model. 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. Use the 6DOF model. Perform the calculation with residual plotting. Post process using CFD-Post

Prerequisites
This tutorial assumes that you are familiar with the FLUENT interface and have completed Tutorial 1 from the FLUENT 13.0 Tutorial Guide. You should also be familiar with the dynamic mesh model. Refer to Section 11.7: Steps in Using Dynamic Meshes in the FLUENT 13.0 User's Guide for more information on the use of the dynamic mesh model.
ANSYS, Inc. January 15, 2011

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

Problem Description
The problem considered is shown schematically in Figure 1. Check valves are commonly used to enforce unidirectional flow of liquids and act as pressure-relieving devices. The check valve for this tutorial contains a ball connected to a spring with a stiffness constant of 300 N/m. The ball is made of steel with a density of 7800 kg/m3 and is represented as a cavity region in the mesh with a diameter of 4 mm. Initially the center of mass of the ball is located at the coordinate point (0, 0.0023, 5e-05); this point is the spring origin, and all forces that interact with the ball are assumed to pass through this point. The tank region, located below the valve housing, is filled with Methanol (CH4O) at 25C. High pressure from the liquid at the tank opening (2 atm) causes the ball to move up, thus allowing the fluid to escape through the valve to the atmosphere at an absolute pressure of 1 atm. The forces on the ball are: the force due to the spring (not shown in the figure) and the force due to fluid flow. Gravity is neglected here for simplicity.

Figure 1:

Problem schematic

ANSYS, Inc. January 15, 2011

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

The spring pushes the ball downward to oppose the force of the pressure when the ball is raised above its initial position. The pressure variation causes the ball to oscillate along the Y-axis as a result of a dynamic imbalance in the forces. The ball eventually stops oscillating when the forces acting on it are in equilibrium. In this tutorial the deformation of the ball itself is not modeled; mesh deformation is employed to modify the mesh as the ball moves. A rigid body simulation is used to predict the motion of the ball, and will be based on the forces that act on it (6DOF).

Preparation
1. Open Workbench 13.0 2. Unzip the project check_valve_diffusion_3d.wbpz by File -> Restore Archive 3. Double click on the Fluent Setup Cell

Figure 2:

Workbench project page

ANSYS, Inc. January 15, 2011

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

4. From the FLUENT launcher, start FLUENT.

Setup and Solution


Step 1: Mesh 1. The mesh is automatically read into Fluent and displayed in the graphics window. 2. Note that if you are using standalone Fluent, you can read in the mesh from the File menu: File -> Read -> Mesh. The mesh file for this project can be accessed by navigating the project files to "check_valve_diffusion_3d_files\dp0\FFF\MECH". The mesh file is named FFF.msh.

Figure 3:

Fluent window and mesh display

3. Check the mesh by clicking on Mesh -> Check 4. FLUENT will perform various checks on the mesh and report the progress in the console. Make sure that the minimum volume reported is a positive number.

ANSYS, Inc. January 15, 2011

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

5. Change the pressure units to atm from Pa (a) Define -> Units (b) Pick pressure in the "Quantities" window (c) Pick atm as the unit (d) Close 6. Note that Most of the Fluent settings can be accessed by navigating the setup tree on the left in the Fluent Window Step 2: General Settings Problem Setup -> General Settings 1. Enable time-dependent calculations. (e) Select Transient from the Time list.

ANSYS, Inc. January 15, 2011

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

Figure 4:

General settings

Step 3: Models Problem Setup -> Models -> Viscous 1. Enable the standard k-epsilon model with standard wall functions.

Figure 5:

Models options

ANSYS, Inc. January 15, 2011

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

Figure 6:

Viscous models window

Step 4: Materials Problem Setup -> Materials 1. Create/Edit -> Fluent Data Base (a) Pick methyl-alcohol-liquid (b) Copy, Close 2. Close the Materials panel.

ANSYS, Inc. January 15, 2011

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

Figure 7: Step 5: Cell Zone Conditions Problem Setup -> Cell Zone Conditions 1. Pick each cell zone listed and click Create/Edit 2.

Materials panel

In the pop up window, make sure that the material selected is methyl-alcohol-liquid and not air

Step 6: Boundary Conditions Problem Setup -> Boundary Conditions In this step, you will set the inlet and outlet conditions. 1. Define boundary conditions for the inlet zone.

ANSYS, Inc. January 15, 2011

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

(a) Pick the boundary named as "inlet" and switch the Type to pressure-inlet (b) Enter 2(atm) to be the Gauge total pressure (c) Switch the direction specification method to be Normal to Boundary (d) Select Intensity and Viscosity Ratio from the Specification Method drop-down list (e) In the Turbulence group box, set Turbulent Intensity to 5% and Turbulent Viscosity Ratio to 10%. (f) Click OK to close the Velocity Inlet panel. 2. Similarly pick the outlet zone and click Edit (a) Select Intensity and Viscosity Ratio from the Specification Method drop-down list (b) In the Turbulence group box, set Turbulent Intensity to 5% and Turbulent Viscosity Ratio to 10%. (c) Click OK to close the pressure outlet panel. 3. Close the Boundary Conditions panel.

Figure 8:

Inlet boundary conditions panel 9

ANSYS, Inc. January 15, 2011

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

Step 7: Compile the UDF Note that the tutorial project has the UDF libraries included. The UDF has been compiled in serial on Windows 64 bit machine. To run the tutorial on any other hardware specification, it needs to be recompiled. A 6DOF UDF is used in this example. The DEFINE_SDOF_PROPERTIES macro is used to assign the mechanical properties of the check valve. The motion of the valve is automatically calculated by Fluent from the forces acting on the valve. You will need a c-compiler installed on your machine to be able to compile UDFs. Define -> User Defined -> Functions -> Compiled 1. Click the Add... button in the Source Files group box. 2. The Select File dialog will open. 3. Browse to the folder "check_valve_diffusion_3d_files\dp0\FFF\Fluent". Select the file check_valve_motion.c and click OK to close the Select File dialog. 4. 5. Click Build to build the library. FLUENT will set up the directory structure and compile the code. The compilation will be displayed in the console. 6. Click Load to load the library.

7. Close the Compiled UDFs panel.

ANSYS, Inc. January 15, 2011

10

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

Figure 9: Step 8: Mesh Motion Setup

Compiled UDF panel

1. Enable dynamic mesh motion and specify the associated parameters. (a) Problem Setup -> Dynamic Mesh (b) Enable Dynamic Mesh in the Models group box. (c) Enable Smoothing in the Mesh Methods group box and Six DOF in the Options. (d) Make sure that the Layering and Remeshing options are disabled. (e) Click on Mesh Method Settings to open the Mesh Method Settings panel. Switch method to Diffusion in the Smoothing tab. (f) Click OK to close the Dynamic Mesh Parameters panel.

ANSYS, Inc. January 15, 2011

11

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

Figure 10: Dynamic mesh settings 2. Specify the motion of the check valve ball

ANSYS, Inc. January 15, 2011

12

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

(a) Click on Create/Edit in the Dynamic Mesh Panel. (b) Select ball from the Zone Names drop-down list. (c) Retain the selection of Rigid Body in the Type list. (d) Select spring_check_valve::libudf from the Six DOF UDF drop-down list. (e) Enter Center of Gravity location of the ball as (X, Y, Z) = (0.0, 0.0023, 5.0e-5) m (f) Make sure the Six DOF Options is turned to On (g) Click Create.

Figure 11: Settings for 6DOF ball valve


ANSYS, Inc. January 15, 2011

13

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

(h) FLUENT will create the dynamic zone valve which will be available in the Dynamic Zones list. 3. Specify the motion of the symmetry 1. (a) Select symmetry1 from the Zone Names drop-down list. (b) Select Deforming from the Type list. (c) Click the Meshing Options tab and set the following parameters: (d) Enable Smoothing and disable remeshing in the Methods group box. (e) Retain the default settings for the remaining parameters. (f) Click Create. (g) FLUENT will create the dynamic zone axis1 which will be available in the Dynamic Zones list. 4. Do the same for symmetry2Select axis2 from the Zone Names drop-down list. 5. Close the Dynamic Mesh Zones panel. 6. Save the project. Step 9: Solution In a dynamic mesh simulation, the mesh changes are saved in the case files. At any point in the solution, to revert the mesh back to original settings and to start calculation from beginning, close Fluent and click on the Settings cell again in the project page. This will re-launch Fluent with the original mesh but with all the saved settings. To re-start a calculation, always launch Fluent from the Solution cell. This reads in the latest Fluent case and data file. 1. Request saving of case and data files every 25 time steps. (a) Solution -> Calculation Activities -> Autosave (b) Enter 25 for both Autosave Case File Frequency and Autosave Data File Frequency. Clicking on Edit makes more options available. (c) Click OK to close the Autosave panel.

ANSYS, Inc. January 15, 2011

14

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

Note: Fluent case and data files can also be read by CFD-Post for post processing but in the interests of minimizing hard disk space , you have the option to write out light weight files of only the variables that you are interested in for Post processing by following these steps:Calculation Activities > Automatic Export > Create > Solution Data Export. Choose file type to be CFD-Post compatible. Select Frequency, give a file name, select variables to post process 2. Solution -> Solution Methods (a) Switch P-V Coupling Scheme to Coupled (b) Switch Spatial Discretization Scheme for Pressure to PRESTO! 3. Retain the default solution control parameters at Solution -> Solution Controls 4. Enable the plotting of residuals during the calculation. (a) Solution -> Monitors -> Residual (b) Enable Plot in the Options group box. (c) Click OK to close the Residual Monitors panel. 5. Initialize the flow field (a) Solution-> Solution Initialization -> Initialize (b) Set TKE value to 0.1. (c) Click Initialize and close the Solution Initialization panel. 6. Save the project. Saving the project after initialization saves the settings file and the first case file. Any subsequent changes to the settings during the run will write out case files appended with an integer number corresponding to the change in settings you make. Resetting any cell in the Workbench project will clear all the corresponding files from the directory. 7. Run the calculation for 150 time steps. (a) Solution -> Run Calculation -> Iterate (b) Enter 5e-5 s for Time Step Size. (c) Enter 150 for Number of Time Steps. (d) Click Iterate.
ANSYS, Inc. January 15, 2011

15

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

(e) Close the Iterate panel.

Figure 12: Residual plot

Postprocessing
You have two options for post processing. One is to use the Fluent post processor Results -> Graphics and Animations/ Plots/ Reports. The other is to use CFD-Post. When you are dealing with transient data and wish to create animations/ plots, CFD-Post offers features that may not be available in Fluent Post. So long as you have written out data files at a frequency, CFD-Post can read in those files and create animations, transient monitors without pre-setting these at the beginning of your simulation. For details on using Fluent Post, please refer tutorial X. Step 1: Launch CFD-Post 1. Close Fluent and double click on the Results cell in workbench. This launches CFD-Post with the last .cas and .dat file read in automatically.

ANSYS, Inc. January 15, 2011

16

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

1. Click on "z-axis" in the display window to see front view of geometry.

2. Click on the clock icon has been loaded.

on the menu. This will show the transient sequence of files that

(a) Double click on any Step to display results at that time step.

Figure 13: Time step selector to display results at any saved simulation time Step 2: Display velocity contours: 1. Insert Contour from the menu. Insert -> Contour 2. Give a name to the contour 3. In the contour details, select location to be symmetry1 tank and symmetry1 valve. 4. Select variable to be velocity

ANSYS, Inc. January 15, 2011

17

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

5. Click apply. This displays the velocity contours in the display window. Note: Other variable contours (e.g Static Pressure etc.) can be set up in similar fashion. As further practice, please try setting up velocity vectors by Insert -> Vector. The Insert menu has also different options such as inserting text, legends and so on. New planes or surfaces for display of data can be created by Insert -> Location. Any feature (contours, vectors, particle tracks) that have been inserted can be turned on or off in the display by clicking on the check box next to the feature.

Figure 14: Velocity contours at 1s of flow time Step 3: Creating animations 6. We will animate the mesh deformation. For this, first uncheck the contours created in previous step.

ANSYS, Inc. January 15, 2011

18

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

7. Display the mesh on symmetry1 tank and symmetry1 valve. For this, check the box next to the required locations in the loaded data file boundaries displayed in the tree view on the left. 8. Double click on symmetry1 tank. This brings up the details panel on the left bottom corner of CFD-Post. 9. In the "Render" tab check the box next to "Show Mesh Lines". This displays the mesh in symmetry 1 tank. 10. Do the same for symmetry1 valve.

ANSYS, Inc. January 15, 2011

19

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

Figure 15: Displaying mesh on symmetry planes

11. Click on the animation

icon. This brings up the animation panel.

12. Select Time steps as the object to animate. 13. You can adjust the slider to make the animation fast or slow. 14. Clicking on the downfacing arrow brings up a few more details. 15. Check the box next to "Save Movie". 16. Browse to the required folder and give a name. 17. Then click on the play button. 18. This animates the mesh motion and save it into a wmv file. The animation file format is flexible and many options are available.

ANSYS, Inc. January 15, 2011

20

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

Figure 16: Animation panel in CFD-Post 19. Contours, iso-surfaces, streamlines etc. can be animated in similar fashion. Step 4: Creating transient XY plots 1. Create a point on a node attached to the check valve 2. Insert -> Location -> Point 3. Check the box adjacent to the boundary called "ball" in the tree view of the loaded data file on the left

Figure 17: Displaying the ball valve and creating a point

ANSYS, Inc. January 15, 2011

21

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

4. In the point details window, set method to be "XYZ" and click on the co-ordinates window 5. You can now pick your XYZ location with your mouse pointer on the 3D viewer. Select a point on the Valve close to the top 6. Clicking "Apply" in the point details displays the nearest node location to the selected XYZ location 7. Switch Domains to "valve" 8. Now, switch the method to Node Number and enter the node number obtained from previous step. This will ensure that the point is hooked to the mesh node. If the node is displaced by mesh motion, the point is displaced as well. Click "Apply"

Figure 18: Point details menu 9. From the Insert menu, select Insert -> Chart. 10. In the details of the chart, set type to be "XY-Transient or sequence" . Enter a title for the chart. 11. Go to the "Data Series" tab. Under Data Source, pick Point 1 as the location.
ANSYS, Inc. January 15, 2011

22

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

12. Under "Y Axis" tab, pick X as the plot variable and click apply 13. The transient variation of the node location defined by Point 1 is plotted on a chart in the chart window.

Figure 19: Tracking the motion of the valve (point attachhed to node on valve) in xdirection Note: Instead of a point, create a line location. XY solution data can be plotted on the line to analyze your result. Step 5: Automatic Reports 1. Right click on the 3D viewer and select "Copy to New Figure". The figure is automatically inserted into the automatically generated report. 2. Any charts that were created are also inserted automatically into the report.

ANSYS, Inc. January 15, 2011

23

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

3. Click on the Report viewer tab on the bottom to access the automatically generated report. Step 6: Expressions CFD-Post allows creation of expressions to evaluate quantitative data from flow results. The expressions can also be used to create XY plot and creating tables. 1. Select the Expression tab on the top left. 2. Right click on Expressions and click on "New"

Figure 20: Creating expressions 3. Enter a name for the Expression 4. Right click on the blank details panel that opens up 5. This opens up the CEL expressions drop down list. All the accessible functions, expressions, variables, boundary locations and constants are listed 6. Choose functions -> CFD-Post -> massFlow 7. The CEL syntax for massFlow is inserted as massFlow()@ 8. With the mouse pointer resting after the @ symbol, Choose Locations -> outlet 9. The entire syntax for calculation mass flow at the boundary named as the outlet is massFlow()@outlet
ANSYS, Inc. January 15, 2011

24

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

10. Click Apply to see the calculated value in the box 11. Expressions can be used in XY plots, tables and in creating custom variables.

Figure 21: Writing CEL expressions Step 7: Custom Variables 1. Create another expression for velocity magnitude as sqrt(Velocity u^2+Velocity v^2+Velocity w^2). 2. This can be done as in previous step by right click on the details window and selecting from the menu that opens up. Flow variable names are listed under "Variables".

ANSYS, Inc. January 15, 2011

25

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

3. Go to the Variable tab 4. Right click in the window, click on New 5. Enter a name for the custom variable (e.g VelMag) > ok 6. In the details window, under Expressions select the expression for velocity magnitude that you created 7. Apply 8. This creates a new flow variable called VelMag that can be used in contour plots and so on just like any other flow variables. Step 8: Creating Tables 1. Insert -> Table 2. This opens the table viewer 3. Click on any cell in the table. Entries in the table (text etc.) can be typed in the entry box that appears. 4. Functions, expressions etc. can be inserted in the table by selecting relevant data from the drop down lists that appear at the top.

Figure 22: Using the table viewer

ANSYS, Inc. January 15, 2011

26

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

Figure 23: Case comparison Step 9: Case Comparison (a) Go back to the 3D viewer and display the velocity contours. (b) You may have to turn on the contour you inserted in Step 2. (c) Now load one of the data files in the sequence again by File -> Load Results and navigating to check_valve_diffusion_3d_file\dp0\FFF\Fluent and picking FFF-1000150.dat.gz (d) Now you will see the two Cases listed in the tree view on the left as Case 1 and Case 2 (e) Double click on Case Comparison, which is the first item in the tree.

ANSYS, Inc. January 15, 2011

27

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

(f) In the Details menu that appears, you can now pick Case 1 and Case 2 as required. The entire time history is available to pick. (g) Double click on Step 150 for Case 1 and Step 50 for Case 2. (h) Apply. (i) This shows the contours plotted on Case 1, Case 2 and the difference between the two in the viewer on the right.

Summary
In this tutorial, you used the diffusion smoothing option for the dynamic mesh feature in FLUENT. The motion was limited to small distances. 6DOF model was used to calculate valve motion under the action of fluid forces. Post processing is shown using CFD-Post to detail some of the features of the post processing tool.

ANSYS, Inc. January 15, 2011

28

Das könnte Ihnen auch gefallen