33
© ANSYS, Inc. January 25, 2011 1 Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing Introduction The purpose of this tutorial is to demonstrate how to simulate a gear pump using the dynamic mesh model in Fluent. A prescribed rotation rate is applied to the two gears using a UDF macro. There is significant displacement of the valve and hence re-meshing approach is used in conjunction with smoothing. The mesh in the zone where the gears are located is a 2D triangular mesh which is expanded, or extruded, along the normal axis of the dynamic zone. The triangular surface mesh is re-meshed and smoothed on one side, and the changes are then extruded to the opposite side. The opposite side of the triangular mesh is assigned to be a deforming zone with only smoothing enabled. This tutorial uses the workbench workflow for solving the problem. This tutorial demonstrates how to do the following: Set up a problem using the 2.5D dynamic re-meshing model. Specify dynamic mesh modeling parameters. Specify a rigid body motion zone. Specify a deforming zone. Use prescribed motion UDF macro. Perform the calculation with residual plotting. Post process using CFD-Post Parametrization is demonstrated in the Appendix 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

FLUENT MDM Tut 04 Gear Pump

Embed Size (px)

DESCRIPTION

fluent gear pump

Citation preview

Page 1: FLUENT MDM Tut 04 Gear Pump

© ANSYS, Inc. January 25, 2011 1

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

Introduction

The purpose of this tutorial is to demonstrate how to simulate a gear pump using the dynamic mesh model

in Fluent. A prescribed rotation rate is applied to the two gears using a UDF macro. There is significant

displacement of the valve and hence re-meshing approach is used in conjunction with smoothing. The

mesh in the zone where the gears are located is a 2D triangular mesh which is expanded, or extruded,

along the normal axis of the dynamic zone. The triangular surface mesh is re-meshed and smoothed on

one side, and the changes are then extruded to the opposite side. The opposite side of the triangular mesh

is assigned to be a deforming zone with only smoothing enabled. This tutorial uses the workbench

workflow for solving the problem.

This tutorial demonstrates how to do the following:

Set up a problem using the 2.5D dynamic re-meshing model.

Specify dynamic mesh modeling parameters.

Specify a rigid body motion zone.

Specify a deforming zone.

Use prescribed motion UDF macro.

Perform the calculation with residual plotting.

Post process using CFD-Post

Parametrization is demonstrated in the Appendix

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

Page 2: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 2

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.

Problem Description

The problem considered is shown schematically in Figure 1. A gear pump uses the meshing of gears to

pump fluid by displacement. They are one of the most common types of pumps for hydraulic fluid power

applications. The current setup is an external gear pump which uses two external spur gears. As the gears

rotate they separate on the intake side of the pump, creating a void and suction which is filled by fluid.

The fluid is carried by the gears to the discharge side of the pump, where the meshing of the gears

displaces the fluid.

The gears in this tutorial are made to rotate at a constant rate of 100 rad/s. The fluid being pumped in oil

with a density of 844 kg/m3 and viscosity of 0.02549 kg/m-s. Fluid is sucked in from the inlet side and

pumped out though the outlet side by rotation of the gears. The mass flow rate of fluid in and out of the

pump is of interest.

Figure 1: Problem schematic

Page 3: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 3

Preparation

1. Open Workbench 13.0

2. Unzip the project gear_pump.wbpz by File -> Restore Archive

3. Double click on the Fluent Setup Cell

Figure 2: Workbench project page

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.

Page 4: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 4

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

"gear_pump_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.

5. 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

Page 5: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 5

1. Enable time-dependent calculations.

(a) Select Transient from the Time list.

Figure 4: General settings

Step 3: Models

Problem Setup -> Models -> Viscous

1. Enable the Realizable k-epsilon model with standard wall functions. For classes of problems that

involve rotation, boundary layers under strong adverse pressure gradients, separation, and

recirculation, this model shows superior performance over the standard k-epsilon model.

Page 6: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 6

Figure 5: Viscous models window

Step 4: Materials

Problem Setup -> Materials

1. Create/Edit

(a) Type in material name as "oil"

(b) Enter density to be 844 kg/m3

(c) Enter viscosity to be 0.02549 kg/m-s

(d) Change/Create

(e) Create mixture and overwrite air? Click on "Yes"

2. Close the Materials panel.

Page 7: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 7

Figure 6: Materials panel

Step 5: Cell Zone Conditions

Problem Setup -> Cell Zone Conditions

1. Pick each cell zone listed and click Create/Edit

2. In the pop up window, make sure each cell zone is of Type Fluid and that the material selected is

oil.

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.

Page 8: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 8

(a) Pick the boundary named as "inlet" and switch the Type to pressure-inlet

(b) Maintain defaults and click OK to close the panel

2. Similarly pick the outlet zone and click Edit

(a) Set the outlet Gauge pressure to be 101325 Pa (~ 1atm)

(b) Maintain defaults for everything else and click OK to close the panel

3. Close the Boundary Conditions panel.

Note: Many inputs to the Fluent model can be parametrized for what if studies or DOE studies (See

Appendix for steps).

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 re-

compiled.

The gears are set to rotate in opposite directions at a constant rotation rate of 100 rad/s in the UDF macro.

A UDF is used in this example. The DEFINE_CG_MOTION macro is used to define the rotation on each

gear. 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

gearpump.c and click OK to close the Select File dialog.

4. Click Build to build the library.

5. FLUENT will set up the directory structure and compile the code. The compilation will be

displayed in the console.

Page 9: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 9

6. Click Load to load the library.

7. Close the Compiled UDFs panel.

Figure 7: Compiled UDF panel

Step 8: Mesh Motion Setup

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 and Remeshing in the Mesh Methods group box.

(d) Click on Mesh Method Settings to open the Mesh Method Settings panel and turn on the

2.5D remeshing method in the Remeshing tab.

(e) Click on "Use Defaults" to set the minimum and maximum length scales

(f) Set Size Remeshing Interval to 1.

Page 10: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 10

Figure 8: Dynamic mesh settings

2. Specify the motion of the gearl

Page 11: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 11

(a) Click on Create/Edit in the Dynamic Mesh Panel.

(b) Select gear1 from the Zone Names drop-down list.

(c) Retain the selection of Rigid Body in the Type list.

(d) Select gear1::libudf from the Motion UDF/Profile drop down list.

(e) Enter Center of Gravity location of the gear as (X, Y, Z) = (0.0, 0.085, 5.0e-3) m

(f) Click Create.

Figure 9: Settings for 6DOF ball valve

(g) FLUENT will create the dynamic zone gear1 which will be available in the Dynamic

Zones list.

3. Do the same for gear2 with gear2"libudf hooked to the Motion UDF panel and (0.0,-0.085,5.0e-3)

as center of gravity.

4. Specify the motion of the symmetry1-gear_fluid.

Page 12: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 12

Figure 10: Geometry definition for symmetry1-gear_fluid

(a) Select symmetry1-gear_fluid from the Zone Names drop-down list.

(b) Select Deforming from the Type list.

(c) In the Geometry definition tab, turn Definition to plane, specify point on the plane as

(0.0,0.0,0.01) m and the plane normal as (0,0,1). This ensures that re-meshing does not

cause the mesh to move out of the specified plane.

(d) Click the Meshing Options tab and set the following parameters:

(e) Enable Smoothing and Remeshing in the Methods group box.

(f) Specify Minimum and Maximum length scales as 0.0005 and 0.002 respectively. The

"Zone Scale Info" button gives information on the minimum and maximum length scales

in the domain and can be used as a guide to set the above values.

(g) The Maximum skewness is set to 0.8.

(h) Click Create.

Page 13: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 13

(i) FLUENT will create the dynamic zone symmetry1-gear_fluid which will be available in

the Dynamic Zones list.

5. Do the same for symmetry2-gear_fluid

(a) For the zone, in the Meshing Options tab be sure to turn off Remeshing and enable only

Smoothing.

(b) In Geometry Definition tab, the point on the plane is (0,0,0) with plane normal (0,0,1).

6. Close the Dynamic Mesh Zones panel.

7. Save the project.

Figure 11: Meshing Options for symmetry2-gear_fluid

Page 14: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 14

8. Displaying the Zone Motion

(a) Click on Display Zone Motion button in the Dynamic Mesh Panel

(b) Enter time step size to be 5e-6

(c) Number of steps is 1000

(d) Integrate

(e) In Preview Controls, again set time step to 5e-6

(f) Number of steps to 1000

(g) Preview

(h) This shows the rotation of the zone as a preview. This helps to make sure that the UDF is

specifying the motion of the zone correctly.

9. Similarly, the mesh motion can be displayed

(a) Click on Preview Mesh Motion

(b) Display the mesh on the geometry by going to Graphics and Anomations -> Mesh->

Setup

(c) Enter time step size to be 5e-6

(d) Number of time steps 50

(e) Preview

(f) This shows the gears motion and remeshing for the specified number of time steps.

(g) The mesh is now in a deformed state. Before starting calculation, close Fluent and re-

open by clicking on the setup cell again. This ensures that the mesh is re-read as it was

written out from the meshing application.

Figure 12: Previewing the mesh motion

Page 15: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 15

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 500 time steps.

(a) Solution -> Calculation Activities -> Autosave

(b) Enter 500 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.

2. Write out CFD-Post compatible files for transient data post processing in the interests of

minimizing hard disk space,

(a) Calculation Activities > Automatic Export > Create > Solution Data Export.

(b) Choose file type to be CFD-Post compatible.

(c) Select Frequency to be 100

(d) Give a file name ./gearpump. Adding ./ at the beginning of the file name ensures that it is

written out in the current working directory.

(e) Select (Statis Pressure, Velocity Magnitude, X Velocity, Y Velocity, Z Velocity, X-

Coordinate, Y-Coordinate, Z-Coordinate and Density as variables to post process)

(f) OK

3. Solution -> Solution Methods

(a) Retain defaults

4. Solution -> Solution Controls

(a) Change Under-Relaxation factors of Pressure to 0.4, Momentum to 0.5, Turbulent

Kinetic Energy to 0.7, Turbulent Dissipation Rate to 0.7 and Turbulent Viscosity to 0.75.

Page 16: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 16

(b) This is done because when running the solution it was found that the solution process is

more stable with these URFs.

5. 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.

6. Setup a Surface Monitor to track the mass flow rate at the outlet of the pump

(a) Monitors -> Surface Monitors -> Create

(b) Select Report Type to be Mass Flow Rate

(c) Select Surface to be outlet

(d) Enable Plot and Write Options

Figure 13: Setting Surface Monitors

(e) Select X-Axis to be Flow Time

Page 17: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 17

(f) Get Data Every 1 Time Step

(g) Name the surface monitor as outletmassflow

(h) This now appears in the Surface Monitors Panel in the main Fluent Window

7. Initialize the flow field

(a) Solution-> Solution Initialization -> Initialize

(b) Set TKE value to 0.1 and Gauge Pressure to be 101325 Pa.

(c) Click Initialize and close the Solution Initialization panel.

8. 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.

9. Run the calculation for 150 time steps.

(a) Solution -> Run Calculation

(b) Enter 5e-6 s for Time Step Size.

(c) Enter 3000 for Number of Time Steps.

(d) Set Max Iterations/Time Step to 40.

(e) Click Calculate

Figure 14: Residual plot

Page 18: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 18

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.

2. Since we want to work with the CFD-Post compatible lightweight files that were written out, first

load that sequence of files

(a) File -> Load Results

(b) Browse to gear_pump_files\dp0\FFF\Fluent

(c) Load the last .cas or .cdat file in the sequence (gearpump-3000.cdat)

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

(a) If the 3D viewer is displaying two or more windows click on the window icon to display

just one window. Also, make sure View 1 is set to gearpump-3000 at 0.02 s.

Page 19: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 19

Figure 15: Displaying CFD-Post Compatible files in View 1

4. Click on the clock icon on the menu. This will show the transient sequence of files that

has been loaded.

(a) Look for the gearpump-3000 sequence and not the FFF sequence.

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

Page 20: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 20

Figure 16: 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 gear_fluid and symmetry1 inlet_fluid and

symmetry1 outlet_fluid.

4. Select variable to be velocity

5. Click apply. This displays the velocity contours in the display window.

6. Displays in the 3D viewer can be exported in many standard formats by File -> Save Picture

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

Page 21: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 21

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 17: Velocity contours at 0.02 s of flow time

Page 22: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 22

Figure 18: Pressure Contours at 0.02 s

Step 3: CFD-Viewer

1. Creating pictures that can be dynamically rotated in Internet Explorer

(a) Install ANSYS_CFD-Viewer_130_Setup.exe located at C:\Program Files\Ansys

Inc\v130\CFD-Post\viewer.

(b) Save the picture in the 3D viewer by File -> Save Picture

(c) Choose the format to be CFD Viewer State (3D) from the drop down list

(d) This picture can now be opened in Internet explorer

(e) To rotate the picture dynamically, use the left mouse button

Page 23: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 23

2. Embedding the dynamic picture in power point

(a) First, enable the Developer tab in PowerPoint:

(b) Click the “Office Button” in the top-left corner of the PowerPoint window.

(c) Select PowerPoint Options.

(d) In the PowerPoint Options dialog box, enable Show Developer tab in the Ribbon.

(e) Click OK.

(f) To insert a cvf file into a presentation:

(g) Copy the cvf file to the folder where your presentation is.

(h) Open the presentation.

(i) In the Developer tab > click More Controls.

(j) Select "cfxViewer class" and click OK.

(k) Draw a box in the slide where you would like the viewer window to appear.

(l) Right-click in the viewer window and select Properties.

(m) In cvfFile field, type the name of the cvf file and press Enter.

(n) Close the Properties dialog.

(o) The slide shows a static image of the cvf file. However, when in Presentation mode, it

becomes an active 3D viewer.

(p) Important: When copying the presentation to another directory or another computer,

make sure to include all embedded cvf files and place them in the same directory as the

presentation.

Step 4: Creating keyframe animations

1. We will animate the mesh deformation using keyframes. For this, first uncheck the contours

created in previous step.

2. Display the mesh on symmetry1 on all the zones.

(a) Insert -> Location -> Surface Group.

(b) In details, switch Domains to "All gearpump 3000 domains"

(c) Select symmetry1 gear_fluid and symmetry1 inlet_fluid and symmetry1 outlet_fluid in

Locations

(d) In the Render tab, check Show Mesh Lines

Page 24: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 24

(e) Apply

(f) Zoom in on the area where the gears interlock

3. Using time step selector , double click on Step 100 (the first loaded file) in the gearpump

3000 tab.

(a) This shows the mesh at time step 100.

4. Click on the animation icon. This brings up the animation panel.

5. Select Keyframe Animation

(a) Choose New button on the right to add the first Keyframe

(b) Increase # of Frames to 30

(c) Using time step selector, double click on time step 3000

(d) This displays mesh at time step 3000

(e) Again click on the New button on the right in the Animation window

(f) Zoom out to display the full mesh in the viewer

(g) Again click on New button in the Animation window

(h) Turn off the Surface Group Display by unchecking the box next to it and enable the

Contour display in the tree on the left by checking the box

(i) Click on New button in the Animation window

(j) Now we have 4 key frames set up

(k) Check the box next to Save Movie and give a file name

(l) Now click on the play button

(m) This creates a transient Key Frame animation of the mesh and then zooms the model out.

Page 25: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 25

Figure 19: Animation panel in CFD-Post

6. Dynamic movies of model rotation, contours, iso-surfaces, streamlines etc. can be animated in

similar fashion.

Step 5: Expressions

CFD-Post allows creation of expressions to evaluate quantitative data from flow results. The expressions

can also be used to create XY plots and creating tables.

Page 26: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 26

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

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.

Page 27: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 27

Figure 21: Writing CEL expressions

Step 6: Creating transient XY plots

1. From the Insert menu, select Insert -> Chart.

2. In the details of the chart, set type to be "XY-Transient or sequence" . Enter a title for the chart.

3. Go to the "Data Series" tab. Under Data Source, pick Expressions and select outletmassflow from

the drop down list for expressions.

4. Click Apply

Page 28: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 28

5. The expression is calculated on each of the available transient files and the time variation of mass

flow rate at the outlet is plotted in the chart window.

Figure 22: Tracking the mass flow rate at the outlet

Step 7: 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.

3. Click on the Report viewer tab on the bottom to access the automatically generated report.

Page 29: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 29

Summary

In this tutorial, you used the 2.5D remeshing scheme to simulate flow through a gear pump. The gears are

made to rotate at a constant rpm. The gear rotation pulls in fluid from the inlet and pumps it to the outlet.

Post processing is shown using CFD-Post to detail some of the features of the post processing tool. Using

CFD-Viewer and keyframe animation feature in CFD-Post is highlighted.

Appendix: Parametrization in Fluent and CFD-Post

Geometry and meshing input can be parametrized in Design Modeler and Meshing respectively. This

Appendix shows parametrization of Fluent inputs and solution outputs.

Step 1: Creating input parameter in Fluent

1. Launch Fluent from the Setup Cell

2. Problem Setup -> Boundary Conditions -> outlet -> Edit

(a) This was made a pressure outlet with a Gauge Pressure of 101325 Pa in previous setup

(b) Click on the drop down list next to Guage pressure input box and select "New Input

Parameter" instead on constant.

(c) This brings up a window where you can name the parameter as "outpressure" and assign

a current value of 101325 Pa.

Note: Many Fluent inputs have the drop down list to assign it to be an Input parameter. Some panels may

have a "P" symbol next to it. Clicking on the "P" also creates input parameters. Parameters are also

useful if the same input needs to be applied at multiple boundaries.

Page 30: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 30

Figure 23: Creating an Input Parameter from Boundary Conditions

Step 2: Creating Output Parameters in Fluent

1. Problem Setup -> Boundary Conditions -> Parameters

(a) Create -> Fluxes

(b) In Options choose Mass Flow Rate

(c) Select outlet in the Boundaries list

(d) Save Output Parameter

(e) Type in name to be outmassflow

(f) Ok

Page 31: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 31

Page 32: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 32

Figure 24: Creating output parameter in Fluent

Step 3: Creating input/output parameters in CFD-Post

1. Any expression that was created in CFD-Post can be made an Input or Output Parameter

2. Right click on the expression

3. Click on "Use as Workbench Output Parameter"

Page 33: FLUENT MDM Tut 04 Gear Pump

Tutorial: Simulating a Gear Pump Using Dynamic Mesh with 2.5D Re-meshing

© ANSYS, Inc. January 25, 2011 33

Figure 25: Creating Workbench parameter in CFD-Post

Step 4: Parametric table in Workbench

1. Go back to the Workbench Project page

2. Double click on the Parameter Set bar

3. This brings up the Parametric table with the input and output parameters that were created

4. You can add additional values on input parameters in the table and create a run table

5. Click on "Update All Design Points" to update the table and generate the output parameters for

the table of runs.

Figure 26: Table of design Points

Note: If there are multiple input parameters that are related to each other, it is possible to enter

equations that relate the parameters to each other in the parameters view. Click on Return to Project to

return to project page. To save the case/data files and project for each design point check the box that

says "Exported" for each entry in the table.