SCORG TM Setup for CFD Simulation of Twin Screw Machines with STAR-CCM+

Size: px
Start display at page:

Download "SCORG TM Setup for CFD Simulation of Twin Screw Machines with STAR-CCM+"

Transcription

1 SCORG V5.4, 2016 SCORG Setup for CFD Simulation of Twin Screw Machines with STAR-CCM+ SCORG is the CFD grid generation tool for rotary twin screw machines. The tool includes additional modules for designing and editing rotor profiles, executing a thermodynamic calculation based on quasi 1D chamber models and generating the deforming working chamber grids for selected commercial CFD solvers. For more information on the product please visit the website: or refer to documentation help. This guide lists the steps for setting up a CFD simulation for Twin Screw Compressor with SCORG and STAR-CCM+ Solver. The user is expected to be familiar with screw machines, CFD and STAR-CCM+ in order to be able to use these procedures. It is highly recommended that books on that topic are studied 12 The setup steps here are demonstrated for Windows 7, x64 bit OS. Refer SCORG Installation Guide V5.4 for system and hardware requirements. Table of Contents 1 Introduction SCORG Project SCORG Mesh Generation Compile User defined Library [ One time procedure ] STAR-CCM+ case setup STAR-CCM+ Solver Calculation Summary Bibliography N. Stosic, I.K. Smith, A. Kovacevic Screw Compressor Mathematical Modelling and Performance Calculation, Springer, UK 2005, ISBN A. Kovacevic. N. Stosic, I.K. Smith, Screw Compressor Three Dimensional Computational Fluid Dynamics and Fluid Solid Interaction, Springer, 2006, ISBN PDM Analysis Ltd, 2016 Page 1

2 SCORG V5.4, Introduction Screw Compressors are rotary positive displacement machines. Although the working principle of these machines is simple, the geometry of rotors which are in the form of multi -lobe helical screws meshing with each other, is making analysis by use of Computational Fluid Dynamics (CFD) challenging. The process starts when the lobes are engaged at one end, which creates continuous increase of the volume between the rotors and the casing which reduces pressure in the suction domain and draws the working fluid in. Further rotation of the rotors makes this volume between the rotors and the casing enclosed when the compression of fluid begins. This increases the pressure within the chamber. Further rotation exposes the pressurized fluid to the outlet port and the fluid is delivered (Stosic, et al., 2005). Similar process is occurring in other helical screw machines such as pumps, vacuum pumps, gear pumps, expanders, extruders and motors. The CFD is equally challenging in such machines due to sliding and stretching The main objectives of CFD simulations of a screw compressor are to: a. Obtain the pressure field inside the rotor chamber and in the suction and discharge domains. Example shown in Figure 1-1. b. Obtain the velocity fields in critical regions of the computational domain. c. Obtain temperature fields in critical regions of the computational domain. d. Obtain integral parameters of the machine such as power, mass flow rate, discharge temperature, torques on the rotor shafts, etc. e. Obtain the loads and temperatures on boundaries with solid parts of the machine for further structural and thermal analysis. Figure 1-1 Pressure Variation diagram of a Twin Screw Compressor (Kovacevic, et al., 2007) PDM Analysis Ltd, 2016 Page 2

3 SCORG V5.4, 2016 This Tutorial will provide a step by step guide for the procedure to setup and execute a typical twin screw compressor, pump or motor simulation. An example of a dry air compressor with 3/5 lobe combination, L/D ratio of 1.6 and wrap angle 285 deg has been considered. Rotor Domain Discharge Port Suction Port CFD model of the compressor with the different regions and boundaries 2 SCORG Project Launch SCORG on the Desktop. Select File New PDM Analysis Ltd, 2016 Page 3

4 SCORG V5.4, 2016 Select N35_Template.spt Open Save the project in a new folder named TwinScrewCCMSetup SCORG_Grid_Tutorial.spf PDM Analysis Ltd, 2016 Page 4

5 SCORG V5.4, 2016 The GUI of SCORG in the figure bellow shows the mains items of the front panel. In Units Tab, Select Length units as m. This selection has to be the same as the units in which input profile coordinates are available. PDM Analysis Ltd, 2016 Page 5

6 SCORG V5.4, 2016 Go to Help Tutorials Folder opens Copy the compressor rotor profile files [ 35MaleProfile_P1.dat and 35FemaleProfile_P2.dat ] Copy the compressor suction and discharge port grids [ SCORG_Tutorial_Ports_.sim ] Paste these files in the working directory TwinScrewCCMSetup PDM Analysis Ltd, 2016 Page 6

7 SCORG V5.4, 2016 Go to User Profile Browse and Select the Male Rotor Profile from working directory. 35MaleProfile_P1.dat Click Yes to overwrite P1.dat. Similarly Select the Female Rotor Profile. PDM Analysis Ltd, 2016 Page 7

8 SCORG V5.4, FemaleProfile_P2.dat Click Write To Default. Click Refresh to view new profiles. Inspect the Rotor Profile in the GUI for gaps in the tips, starting points of the profile indicated by the small yellow circles. Below is the required orientation. PDM Analysis Ltd, 2016 Page 8

9 SCORG V5.4, 2016 Set Project Units to SI Set the following Profile Parameters to get desired clearance size: GAPI = 0.06mm GAPR = 0.06mm GAPA = 0.05mm *Setting GAPI = 0.06 sets the minimum interlobe clearance as the GAPI. Go to Geometry Set the following parameters: PDM Analysis Ltd, 2016 Page 9

10 SCORG V5.4, 2016 Save the Project. 3 SCORG Mesh Generation SCORG is stand-alone numerical CAD-CFD interface used to generate a numerical mesh of rotating parts of a screw machine and to transfer it to a general finite volume numerical solver. The program generates a block structured hexahedral numerical grid for rotor flow domains. Inputs Required In this step the rotor domain mesh is generated in SCORG. The inputs required for this mesh generation are: (Kovacevic, et al., 2007). Control Parameters: Type of the machine. Number of mesh divisions along the lobe in circumferential direction. Number of mesh divisions in radial direction. Number of Angular divisions of the rotation. PDM Analysis Ltd, 2016 Page 10

11 SCORG V5.4, 2016 Control Switches: These Inputs are used to specify the method used for Rotor Profile Input and the required mesh calculation options. Click Grid Module in the project tree In Rotor Mesh Size set: o Circumferential = 60 o Radial = 8 o Angular = 50 o Interlobe Divisions = 80 Distribution Parameters: These inputs are used for adaptation and distribution of the grid points on the boundaries of the domain and for smoothing of rack (Rack is the curve representing a rotor with infinite radius which uniquely separates the flow domains of the male and female rotors). o Type of Distribution Casing to Rotor Conformal (Rane, 2015) Meshing Parameters: Meshing parameters provide control over the distribution of the internal mesh points in each cross section of the rotors. o both the distribution and meshing parameters can be changed later PDM Analysis Ltd, 2016 Page 11

12 SCORG V5.4, 2016 Start Grid Generation through a three step process as below. Select Rack Refinement Points = 500 Click Numerical Rack Generation This operation produces the rack curve between the two profiles. It is required to be executed only once in the grid generation process. PDM Analysis Ltd, 2016 Page 12

13 SCORG V5.4, 2016 Click Boundary Distribution Generation Information about the progress of the selected activities in the meshing procedure is displayed in the output window. Any warning or error and their locations are indicated. If errors occur, it is important to manually tune the input parameters which will produce a mesh without errors. Graphically the mesh distribution in each section can be visualized and checked for any deviation from requirements. The detailed description of methods used for distribution, adaptation and generation of numerical mesh is available through the Help in the drop down menu. Inspect report and check that there are no distribution warnings listed PDM Analysis Ltd, 2016 Page 13

14 SCORG V5.4, 2016 Click Distribution Mesh to visually inspect the distribution in each cross section In the Distribution Display Select Quality Criteria = Error Cell PDM Analysis Ltd, 2016 Page 14

15 SCORG V5.4, 2016 Inspect all the distribution positions and ensure that 0 error are reported in each position. Click Rotor Grid Generation Inspect report and check that there are no grid errors listed Click Distribution Mesh to visually inspect the grid in each cross section PDM Analysis Ltd, 2016 Page 15

16 SCORG V5.4, 2016 Click Rotor Grid 2D Mesh to visually inspect the grid in each cross section Click Quality Critera Error Cell and Inspect. Click Quality Critera Orthogonality and Inspect. PDM Analysis Ltd, 2016 Page 16

17 SCORG V5.4, 2016 Inspect the 3D mesh In Control Switches Preprocessor Input File select STAR-CCM+ Set Vertex Files Start = 1 Set Vertex Files End = 50 [ = Number of Angular Divisions for Casing to Rotor type of distribution] PDM Analysis Ltd, 2016 Page 17

18 SCORG V5.4, 2016 Calculate Preprocessor Files Generation With this the SCORG Project is complete and the CCM+ setup can be started. In the directory structure of SCORG Project Grid Output with consist of STAR-CCM+ and grids folder. Copy these two folders in the project working directory TwinScrewCCMSetup The STARCCM+ folder consists of o Rotor_screw.msh o library_ccmv10.dll o files.csv o UsrLibCode.zip PDM Analysis Ltd, 2016 Page 18

19 SCORG V5.4, 2016 UsrLibCode.zip folder consists of the user routines that need to be compiled to generate an external library that will be linked to the CCM+ solver during executions in order to be able to read the set of grids generated by SCORG The grids folder consists of all time step mesh files named as rotor.1, rotor.2,,,etc PDM Analysis Ltd, 2016 Page 19

20 SCORG V5.4, 2016 Copy all the files rotor.1, rotor.2,,, to the STARCCM+ Folder STARCCM+ folder will be the working directory for simulation setup and solver calculations. In case you are working with the STAR-CCM+ installed on some other computer or some other OS like Linux then you need to move the whole folder to the target computer. PDM Analysis Ltd, 2016 Page 20

21 SCORG V5.4, Compile User defined Library [ One time procedure ] C++ Compiler is required to build the user library required for the setup. It is not required to repeat this step for every CCM+ case setup. For Windows OS, Install Microsoft Visual Studio 2015 or any later version with C++ x64 bit libraries. Below are some links that provide these installers, but if you have other C++ compiler then it can be used. You can then access the compiler command prompt as shown below. Try to run cl command to check if it is recognized and properly works. PDM Analysis Ltd, 2016 Page 21

22 SCORG V5.4, 2016 The source code and compilation command used for building the library is available in the [ \\ TwinScrewCCMSetup\SCORG_Grid_Tutorial\Grid\Output\STARCCM+\UsrLibCode. zip ] folder. Unzip UsrLibCode.zip In order to create the library and link the object files compiled by C++ compiler launch Visual Studio x64 native tools Command prompt. Change directory [\\TwinScrewCCMSetup\SCORG_Grid_Tutorial\Grid\Output\STARCCM+\UsrLibCode] Edit the Command.bat file and provide appropriate path to UserFunctions.lib Issue the command mentioned in compile.bat file. PDM Analysis Ltd, 2016 Page 22

23 SCORG V5.4, 2016 A successful compilation will read as below and produce libuser.dll file which can be copied to the working directory for further use PDM Analysis Ltd, 2016 Page 23

24 SCORG V5.4, 2016 It is not required to repeat this step for every case setup and the libuser.dll can be just copied and used again in another case. But this library is specific to a given operating system and a given STAR-CCM+ version. So in case you are running on a 32 bit OS or any other OS (linux) etc. you need to execute this step and provide the library so created to the STAR-CCM+ solver. The library is common for Serial and Parallel Simulations. For Linux OS, Use the g++ command provided in compile.sh file and use the created libuser.so for the STAR-CCM+ solver 5 STAR-CCM+ case setup Copy libuser.dll to working folder [ \\TwinScrewCCMSetup\SCORG_Grid_Tutorial\Grid\Output\STARCCM+ ] Launch STAR-CCM+ - R8 from this folder through the command prompt PDM Analysis Ltd, 2016 Page 24

25 SCORG V5.4, 2016 Select New Serial PDM Analysis Ltd, 2016 Page 25

26 SCORG V5.4, 2016 Save the simulation as SCORG_Test1.sim Import the rotor mesh generated by SCORG PDM Analysis Ltd, 2016 Page 26

27 SCORG V5.4, 2016 Check that the mesh validity is passed PDM Analysis Ltd, 2016 Page 27

28 SCORG V5.4, 2016 Fuse the interface boundary between the male and female rotors PDM Analysis Ltd, 2016 Page 28

29 SCORG V5.4, 2016 Combine the Axial faces between the male and female rotors at the suction and discharge ends of the rotor Save the case Import the libuser.dll in Tools User Code New Library PDM Analysis Ltd, 2016 Page 29

30 SCORG V5.4, 2016 Apply the models as listed below Time Implicit Unsteady Material Gas Ideal Gas Energy Segregated Fluid Enthalpy Viscous Regime Turbulent k-omega Turbulence PDM Analysis Ltd, 2016 Page 30

31 SCORG V5.4, 2016 Save the case PDM Analysis Ltd, 2016 Page 31

32 SCORG V5.4, 2016 In Tools select Motion New User Defined Vertex Set the Rotor_Fluid as below PDM Analysis Ltd, 2016 Page 32

33 SCORG V5.4, 2016 Set the Male_Rotor as below PDM Analysis Ltd, 2016 Page 33

34 SCORG V5.4, 2016 Set the Female_Rotor as below Save the case PDM Analysis Ltd, 2016 Page 34

35 SCORG V5.4, 2016 Copy the Port mesh from Tutorials folder to the working directory Import the Port Mesh PDM Analysis Ltd, 2016 Page 35

36 SCORG V5.4, 2016 Below is the full list of the boundaries available in the regions now PDM Analysis Ltd, 2016 Page 36

37 SCORG V5.4, 2016 In the case setup there are four non-conformal grid interfaces Interface 1 is between the Suction Port and the Axial Face of rotors. PDM Analysis Ltd, 2016 Page 37

38 SCORG V5.4, 2016 Interface 2 is between the Discharge Port and the Axial Face of rotors. PDM Analysis Ltd, 2016 Page 38

39 SCORG V5.4, 2016 Interface 3 is between the Radial Face of the main rotor and with the Discharge Port Interface 4 is between the two Radial Face of the gate rotor and with the Discharge Port PDM Analysis Ltd, 2016 Page 39

40 SCORG V5.4, 2016 Set the Boundary condition at In PDM Analysis Ltd, 2016 Page 40

41 SCORG V5.4, 2016 Set the Boundary condition at Out PDM Analysis Ltd, 2016 Page 41

42 SCORG V5.4, 2016 Go to Solvers Implicit Unsteady Set Time Step Size The calculation is dependent on the setting used for mesh generation o Number of divisions in Angular = 50 o Number of Lobes on Male Rotor = 3 o rpm of Male rotor = 8000 Time Step Size = = 5.0e-5 sec Go to Working Folder Edit the file files.csv o Set Time Step Size PDM Analysis Ltd, 2016 Page 42

43 SCORG V5.4, 2016 o Set Cycle Time = Time Step Size * Number of Angular Divisions o Set File Names to rotor.50 (This corresponds to the Angular Divisions) o Save and close files.csv PDM Analysis Ltd, 2016 Page 43

44 SCORG V5.4, STAR-CCM+ Solver Calculation Create new Scalar Scene In Parts select the Male and Female Rotors PDM Analysis Ltd, 2016 Page 44

45 SCORG V5.4, 2016 Click Initialise Set the stopping criteria PDM Analysis Ltd, 2016 Page 45

46 SCORG V5.4, 2016 Set the relaxation factor for Velocity and Pressure Set the relaxation factor for Energy PDM Analysis Ltd, 2016 Page 46

47 SCORG V5.4, 2016 Set the relaxation factor for k-omega Turbulence Set the relaxation factor for k-omega Turbulent Viscosity and its upper limit Save Case Start Run PDM Analysis Ltd, 2016 Page 47

48 SCORG V5.4, 2016 In the Time stepping Information, mesh map generation and replacement with consecutive meshes should be reported The convergence will be plotted in Residuals. Since the initialization is with poor values, the residuals tend to be very high in the beginning of the solution. PDM Analysis Ltd, 2016 Page 48

49 SCORG V5.4, 2016 In the Scalar plot, the pressure will be updated as the calculations progress. Add 3 to 4 monitor points along the length of the rotor and create plots for Pressure on these points. The trace of the chamber pressure rise can be seen. PDM Analysis Ltd, 2016 Page 49

50 SCORG V5.4, 2016 Create Surface reports for the mass flow rate through the In and Out boundaries and plot the monitors for these surface reports. The trace of mass flow can be seen Add Scalar Plot Temperature Add Vector Plot Temperature distribution in screw compressor Velocity vectors PDM Analysis Ltd, 2016 Page 50

51 SCORG V5.4, Summary This document describes the steps to setup a STAR-CCM+ model for Screw compressor CFD analysis using grids generated by SCORG Meshing tool. More detailed information on using SCORG and Screw compressor mesh generation can be found in user guide (SCORG, 2016). The set of mesh files generated for a complete cycle are reused cyclically when the simulation is run for more than one cycle. Thus it is possible to continuously run the simulation until repeatable results in the monitors and good convergence is obtained. It is also possible to stop and restart the simulation in between, change certain Boundary conditions, Solver control parameters or save the intermediate results. More detailed information on using STAR-CCM+, Transient simulations and Post-Processing can be found in user guide (CD Adapco, 2016). 8 Bibliography CD Adapco, S.-C. V., User Guide, London: CD Adapco. DISCO, DISCO, User Help Manual, London: City University. Kovacevic, A., Stosic, N. & Smith, I. K., Screw compressors - Three dimensional computational fluid dynamics and solid fluid interaction, ISBN ed. New York: Springer-Verlag Berlin Heidelberg. Rane, S., Grid Generation and CFD analysis of Variable Geometry Screw Machines, London: City University London. SCORG, SCORG, User Help Manual, London: City University. Stosic, N., Smith, I. K. & Kovacevic, A., Screw compressors: Mathematical modeling and performance calculation, ISBN ed. London: Springer. End of Document PDM Analysis Ltd 8 Eccleston Close, Barnet, EN4 9EZ, United Kingdom ; SCORG@PDMAnalysis.co.uk PDM Analysis Ltd, 2016 Page 51