You are on page 1of 19

Tutorial:

Introduction

Gerotor Pump Modeling using FLUENT

To perform a CFD simulation for a Gerotor inside Fluent, the d e f o r m i n g fluid volume is identified as the region sandwiched between the Gerotor gears. This fluid region is known as Gerotor core in this tutorial and entire fluid volume is decomposed into moving and deforming volumes. For the 2.5D approach, the Gerotor core region needs to be meshed with wedge elements, while for the pure hex mesh approach the Gerotor core region needs to be meshed with structured hex mesh with certain requirements. The requirements will be discussed in more details later on. While the wedge elements for the 2.5D approach can be generated easily, the structured hex mesh, on the other hand, can be tedious to generate manually because of the requirements that it needs to satisfy. A Structured Hexahedral mesh is generated by decomposing the Gerotor core in Design Modeler and then meshing in ANSYS Mesher. This will be done in Workbench. For the mesh motion later on in Fluent, a UDF is used for the pure hex mesh approach. In order for the UDF to move the mesh properly, the gerotor has to be oriented in certain ways. To be more specific, the inner gear has to be rotating about z axis, and the origin of the rotors has to be on the z coordinate. It is generally easy to satisfy this orientation by rotating and translating the model. In this tutorial, the geometry satisfies this condition and no rotation and translation is needed. In this tutorial you will learn how to: Decomposition of Gerotor core geometry in Design Modeler. Generating a Structured Mesh for the Gerotor core as required by the UDF for mesh motion. Generating a Tetrahedral Mesh in ANSYS Meshing for the Gerotor ports. Setup the case in Fluent using the UDF.

Prerequisites
This application document assumes that you are familiar with the menu structure in FLUENT, and that you have worked on some introductory tutorials. Some of the basic steps in the setup and solution procedures will not be shown explicitly. You should be familiar with the basic knowledge of dynamic mesh model and UDFs. This tutorial also assumes some familiarity with Design Modeler and ANSYS Meshing Platform. Place the files in working directory (gerotor-tutorial-core.stp, gerotor-tutorial-ports.stp, input.txt, inner_gear.txt, outer_gear.txt, gerotor.c, gerotor_vane_smoothing.c )

Preprocessing
1. Decomposition/meshing procedure for the Gerotor core: a. Launch WB and add FLUENT Analysis System.

b. Double click Geometry Cell. Select units as m.

c. Geometry Decomposition: i. Import the Geometry - gerotor-tutorial-core.stp -> Generate ( add frozen ) ii. On z-x Plane Draw a Rectangular sketch covering extents of core section iii. On z-x Plane Draw another sketch. A line of arbitrary length aligned with z-axis. iv. Revolve about z-axis by 2 degrees, Add Frozen. v. Create a pattern with 90 bodies about z-axis

d. Create Boolean to intersect the Core and the Pattern Solids.

e. Rename all new Solid to Core. Suppress all the bodies outside the core volume that were created by the boolean operation and add them to a new part. Rename all other bodies to Core. This is required to have common Fluid Zone in FLUENT for the entire Core. Select all Core named bodies and create New Part. Use Ctrl or Shift for multiple selection, RMB and Form New Part. f. Merge multiple faces on each block.

This is required in order to generate a Mapped face mesh. Select the two surfaces and Tools -> Merge , Say yes for Merge Boundary edges.

Create Named Selection for Top and Bottom face as these will form an interface in FLUENT with the Port mesh. g. Meshing: i. Refresh the Mesh Cell. ii. Right click and Edit Mesh Cell. This will open ANSYS Meshing Platform. It is assumed here that user is familiar with using ANSYS Mesher. iii. Right Click Mesh and Show -> Sweepable Bodies. All Bodies should get highlighted in Green color indicating that Surface and Geometry clean up is done correctly. If any of the bodies is not seen sweepable, go back to Design modeler and check if any split faces are left unmerged on Inner Gear and Outer Gear surfaces. iv. Right Click Geometry and Insert Virtual Topology. This will repair the remaining surfaces and edges that were left splitted in Design Modeler. v. Once all bodies are seen to be mappable, Right click Mesh and preview Surface mesh. vi. Insert Edge sizings on the Inner Gear, Outer Gear Edges, The Core Thickness i.e. z- direction and the Core Gap. This will help in controlling the mesh size, quality and refinement required.

Inner and Outer Gear Edges:

Core Gap:

Core Thickness:

vii. viii.

Select all Surfaces and Insert Mapped Face Mesh in the Mesh. Generate Mesh and Export as gerotor-tutorial-core.msh.gz.

Note that the radial mesh lines for the gerotor core go through exactly the z axis due to the way the core is decomposed. This is the requirement for the structured hex mesh. If the radial mesh lines do not go through the z axis, the mesh will get skewed after rotation inside Fluent.

2. Meshing procedure for the Gerotor ports: a. In Design Modeler, Import the geometry file gerotor-tutorial-ports.stp Select Add Frozen Operation.

b. Merge Faces on the port walls and create Named Selection for top and bottom Interfaces. Generate the mesh with default method ( Tetrahedral Patch Dependent )

c. Suppress the Gerotor Core and Generate mesh for the Port volume. d. Export the mesh as gerotor-tutorial-port.msh.gz

Setup and Solution ( Done in Standalone FLUENT session )


1. Start 3ddp version of Fluent

2. Load the Gerotor core mesh: gerotor-tutorial-core.msh.gz (Exported from AMP)

3. Scale the mesh to mm by visiting Scale Mesh panel under Mesh -> ScaleAlso change the length unit by clicking Change Length Units

4. Go to Grid -> Separate -> Faces... to separate the wall into four face zones, intf- topcore, intf-bottom-core, inner-gear, and outer-gear using the Angle option and use an angle of 88 degrees. Intf-top-core is the gerotor core top face zone, i.e. with larger z coordinate. Intf-bottom-core is the gerotor core bottom face zone. It is also good to do Named selection of the geometry in DM and these boundaries will get reflected in the mesh. But in present case we have imported mesh directly so this step of separating faces is done.

5. Change the face zone type from wall to interface for intf-top-core and intf- bottom-core using the Boundary Conditions panel. 6. Change the fluid zone name to fuid-gear-core. 7. Modify the input.txt file, which contains the inputs to the udf. Seven parameters are needed. The description of the inputs are explained below: 9 (number of gears on inner gear) 2000 (RPM) -3.267519e-3 -0.285871e-3 (offset for outer gear in meters) 10 (number of layers across the gap, used for a tolerance calculation, no need to be accurate) 6 (top face zone ID, required only if you ask fluent to create the profile needed to define the shape of the gerotor for the udf) 3 (outer gear face zone ID, required only if you ask fluent to create the profile needed to define the shape of the gerotor for the udf) 4 (inner gear face zone ID, required only if you ask fluent to create the profile needed to define the shape of the gerotor for the udf)

8. Build the udf library from the two udfs, gerotor_vane_smoothing.c and gerotor.c by visiting Define -> User Defined -> Functions -> Compiled... panel 9. Load the library. Note that the udf will automatically create two profiles for you, one for the inner gear and one for the outer gear. The profiles will be used later on for mesh motion.

10. Turn on transient solver in the General -> Time panel

11. Turn on dynamic mesh, but turn off all options including Smoothing, Layering , and Remeshing. A UDF will be used to control and mesh motion instead of Fluents schemes.

12. Set up dynamic zones. Go to Define -> Dynamic Mesh -> Zones. Pick up fluid-gearcore under Zone Names, and choose User-Defined under Type. Hook the gear_core::libudf under Mesh Motion UDF and hit the Create button.

13. Go to Solve -> Run Calculation -> Preview Mesh Motion panel and use a Time Step Size of 8.3333e-5 sec. Hit the Apply button. (Do not hit the preview button yet!)

14. Save the case as gerotor-tutorial-core.cas.gz 15. Go to grid display and display intf-top-core 16. Do a mesh motion preview for100 time steps. You will see how the gears move and also how the mesh moves. 17. Exit Fluent and start a new session of Fluent. 18. Read the port mesh file, gerotor-tutorial-ports.msh.gz. 19. Scale the grid to mm

20. Save the case, gerotor-tutorial-ports.cas.gz 21. Read the case file, gerotor-tutorial-core.cas.gz 22. Go to Mesh -> Zone ->Append Case File and read gerotor-tutorial-ports.cas.gz. This allows one to combine the core with the ports.

23. Display the grid and verify that the two cases are combined. 24. Define the two grid interfaces as shown in figure below.

25. Turn on the Standard k-epsilon model by visiting the Viscous Model panel under Define -> Models -> Viscous

26. Add water-liquid to the material list from the Fluent Database in the Materials panel.

27. Under Cell Zone condition panel, choose water-liquid for the two fluid zones.

28. Delete air under material list. This will verify if all fluid zones are using water. 29. Specify inlet as pressure inlet. Use a pressure value of 0. As for turbulence, use 10% and 18mm hydraulic diameter.

30. Specify outlet as pressure outlet. Use a pressure value of 1bar. As for turbulence, use 10% and 25mm hydraulic diameter.

31. Use PISO for Pressure-Velocity coupling and reduce Skewness Correction from 1 to 0. 32. Use PRESTO! for pressure.

33. Reduce URFs for k and e from 0.8 to 0.4. 34. Increase convergence criteria for continuity from 0.001 to 0.1, and increase the same for epsilon from 0.001 to 0.003. 35. Set up a monitor for mass flow rate at inlet.

36. Set up auto-save with a frequency of 45 for the case and data files by visiting File -> Write -> Autosave panel.

37. Reorder the domain using Mesh -> Reorder -> Domain 38. Initialize the case. 39. Save the case and data file as gerotor-tutorial-0000.cas/dat.gz 40. Create an Animation sequence for Static Pressure. a. Calculation Activities -> Solution Animation

b. Increment number of Animation Sequences to 1 c. Select Every 1 amd Time Step and Click Define.

d. Select Contours > Edit

41. Run the solution for 360 time steps. It takes a few hours to finish 360 time steps Post-processing 1. Display pressure contour on all the wall surfaces and also on inlet and outlet surfaces. Turn ON the Light On and the Head Light On in the Display -> Lights..

Turn OFF Global Range in the Contours panel while displaying the contours. 2. Create a iso-surface of constant z coordinate ( z = 5.5 mm) using the Surface -> Isosurfaces.. panel.

3. Display contours of static pressure and velocity magnitude on the iso-surface. Turn OFF the lights while displaying the contours on the iso-surface.

4. Display the vectors colored by velocity magnitude on the iso-surface. Make sure to check Fixed Length and In Plane options ON in the Vectors Options panel within the Vectors panel. Set Scale as 0.001.

5. Go to Report -> Surface Integrals panel to check the mass flow rate through the Gerotor.

6. Go to Reports -> Forces to visit the Force Reports panel. Select Inner-gear and Outer-gear under Wall-Zones, Moment Center as the axis of the Gerotor which is (0,0,0), and Moments under Options. Click on Print and Fluent will report the pressure, viscous and total moment (along with coefficients) about the X, Y and Z direction. Use this value to calculate the net torque acting on the Gerotor gears. This is shown in figure below.

7. Create Animation: a. Go to Graphs and Animations -> Solution Animation Playback. b. Select Sequence-1 and Press Play to preview animation. c. Select MPEG in write options and Press Play to save a .mpeg file.

Summary
This tutorial demonstrated the application of Dynamic mesh method using UDF to solve for a Gerotor Pump. The problem involved the decomposition of geometry in Design modeler to create a structured hexahedral mesh required by the UDF and setting up the case in FLUENT. For additional details about Dynamic mesh, see chapter 11 in the separate User Guide and Chapter 3 of Theory Guide.

Further Improvements
This tutorial guides you through the steps to reach an initial solution. You may be able to obtain a more accurate solution by using an appropriate higher-order discretization scheme and by refining the mesh.

APPENDIX INPUT FILE: