You are on page 1of 20

STAR-CCM+ User Guide

3987

Multi-Phase Flow Tutorials

The tutorials in this set illustrate various STAR-CCM+ facilities for simulating multi-phase fluid flow problems. These comprise: A gravity-driven free-surface flow. A forced free-surface flow with capillary effects. A forced free-surface flow with cavitation effects. A particle-laden flow. A solid particle erosion analysis. An Eulerian multiphase flow. The starting point for the first three tutorials is a mesh consisting of a single layer of polygonal prisms. This is suitable for performing a planar, two-dimensional analysis and is shown below.

Version 4.04.011

STAR-CCM+ User Guide

3989

Gravity-Driven Flow Tutorial


The tutorial simulates two-dimensional gravity-driven compressible flow through a channel connecting two chambers, as shown below. Initially, the chamber on the left is filled with water; the one on the right and the connecting channel with air. All boundaries are solid walls except for the horizontal top left surface where a constant (atmospheric) static pressure is applied.

Under the action of gravity, water flows into the right chamber under assumed turbulent conditions. At the same time, water also flows in through the top left boundary so as to maintain a constant fluid level. The pressure in the right chamber increases due to the air compression, resulting in a reduction of the flow rate thorough the pressure boundary. After some time all fluid elements are at rest and in a hydro-static equilibrium.

Importing the Mesh and Naming the Simulation


Start up STAR-CCM+ in a manner that is appropriate to your working environment and select the New Simulation option from the menu bar. Continue by importing the mesh and naming the simulation. A one-cell-thick, three-dimensional, polyhedral cell mesh has been prepared for this analysis. Select File > Import... from the menus In the Open dialog, navigate to the doc/tutorials/multiphase subdirectory of your STAR-CCM+ installation directory and select file

Version 4.04.011

STAR-CCM+ User Guide

Gravity-Driven Flow Tutorial 3991

The grid must be aligned with the X-Y plane. The grid must have a boundary plane at the Z = 0 location. The mesh imported for this tutorial was built with these requirements in mind. Were the grid not to conform to the above conditions, it would have been necessary to realign the region using the transformation and rotation facilities in STAR-CCM+. Select Mesh > Convert to 2D... In the Convert Regions to 2D dialog that appears, make sure the checkbox of the Delete 3D regions after conversion option is ticked, and click OK.

Once you click OK, the mesh conversion will take place and the new two-dimensional mesh will be shown, viewed from the z-direction, in the Geometry Scene 1 display. The mouse rotation option is suppressed for two-dimensional scenes. Right-click the Physics 1 continuum node and select Delete. Click Yes in the confirmation dialog.

Visualizing the Mesh Interior


In the simulation tree, select the Scenes > Geometry Scene 1 > Displayers

Version 4.04.011

STAR-CCM+ User Guide

Gravity-Driven Flow Tutorial 3993

Setting up the Models


Models define the primary variables of the simulation, including pressure, temperature, velocity, and what mathematical formulation will be used to generate the solution. In this example, the flow is turbulent. The default K-Epsilon turbulence model will be used and a gravitational force applied in the -y direction. As the problem also involves multi-phase flow, two fluids (air and water) are required for the analysis. However, since these occupy the same domain, only one continuum and one mesh region are required to set up the simulation. By default, a continuum called Physics 1 2D is created when the mesh is converted to two-dimensional. To use a more appropriate name for it, right-click on the Physics 1 2D node and select Rename...

The Rename dialog will appear.

Change the name to Chambers. Click OK.

Version 4.04.011

STAR-CCM+ User Guide

Gravity-Driven Flow Tutorial 3995

The Physics Model Selection dialog should look like this when you are done.

Click Close. Save the simulation by clicking the (Save) button.

Setting Material Properties


In the freeSurface window, open the Continua node. The color of the Chambers node has turned from gray to blue to indicate that models have been activated. Open the Chambers > Models node. The selected models now appear

Version 4.04.011

STAR-CCM+ User Guide

Gravity-Driven Flow Tutorial 3999

Setting Initial Conditions and Reference Values


The direction and magnitude of the gravity vector are set via the Reference Values node. In this case, a gravity force needs to be applied in the negative y-direction. Select the Chambers > Reference Values > Gravity node.

In the Properties window, set the Value to 0,-9.81.

To initialize the turbulence parameters: Select the Chambers > Initial Conditions > Turbulence Intensity > Constant

Version 4.04.011

STAR-CCM+ User Guide

Gravity-Driven Flow Tutorial 4003

Select Initial Distribution as the Scalar Function property.

It is not necessary to define a similar distribution for the Air node because any user-specified initial condition for the volume fraction of the last-defined phase in multi-phase flows is always ignored. Instead, this condition is obtained by subtracting the sum of the volume fraction distributions of the other phases from 1.0. Save the simulation.

Setting Boundary Conditions and Values


The geometry used for this tutorial has six boundaries, four of which will have no-slip wall conditions assigned to them. The remaining two boundaries will be assigned pressure boundary conditions. We will start with the wall boundary definitions. Open the Regions node, then right-click the Default_Fluid 2D node and select Rename... Enter the name Fluid and click OK. Open the Fluid > Boundaries node, then use the <Ctrl><Click> method to select the Bottom, Left, Middle, Right and TopRight nodes. These are the

Version 4.04.011

STAR-CCM+ User Guide

Gravity-Driven Flow Tutorial 4006

Value dialog.

Change the H2O value to 1.0 Leave the Air value as 0.0 and click OK. This in effect enforces the condition that only water may enter the solution domain through that boundary. This completes the boundary conditions specification. Save the simulation.

Setting Solver Parameters and Stopping Criteria


As we are solving an unsteady problem, it is necessary to specify the time-step size and the elapsed simulation time. This calculation will be run for 5.0 s with a time-step size of 0.005 s. To specify the step size: Select the Solvers > Implicit Unsteady node.

Version 4.04.011

STAR-CCM+ User Guide

Gravity-Driven Flow Tutorial 4008

The number of inner iterations per time-step is set to 20 by default. This is more than is necessary for this simulation so the value may be reduced. Select the Maximum Inner Iterations node. In the Properties window, change the Max Inner Iterations property to 5.

Save the simulation.

Visualizing and Initializing the Solution


We will view the air and water distributions throughout the run and also save this plot at regular intervals in order to create an animation. Start by creating a new scalar scene. Right-click on the Scenes node and then select New Scene > Scalar.

Version 4.04.011

STAR-CCM+ User Guide

Gravity-Driven Flow Tutorial 4011

Make the Scalar Scene 1 display active to look at the initialization result.

As expected, at the start of the run the left chamber is entirely filled with water whereas the right chamber and the connecting channel are entirely filled with air. A small region in which both fluids are apparently present is visible at the interface between the two fluids, but this effect is simply due to the coarseness of the mesh. Save the simulation.

Running the Simulation


To run the simulation, click on the (Run) button in the top toolbar. If you do not see this button, use the Solution > Run menu item.

Version 4.04.011

STAR-CCM+ User Guide

Gravity-Driven Flow Tutorial 4013

Visualizing Results
The Scalar Scene 1 display shows the water volume fraction profile at the end of the 5.0 s run.

Right-click on the scalar bar in the display.

Version 4.04.011

STAR-CCM+ User Guide

Gravity-Driven Flow Tutorial 4015

most Linux and Unix systems. An example of such an animation is shown below.

Summary
This STAR-CCM+ tutorial introduced the following features: Starting the code and creating a new simulation. Importing a mesh. Converting a three-dimensional mesh to a two-dimensional one. Visualizing the mesh structure. Defining models for multi-phase flow problems. Defining the material properties required for the selected models. Setting initial conditions and reference values. Creating and applying field functions. Defining boundary conditions. Setting solver parameters for an unsteady run. Initializing and running the solver for a given number of time-steps. Analyzing results using the built-in visualization facilities.

Version 4.04.011

STAR-CCM+ User Guide

4017

Capillary Effects Tutorial


This tutorial simulates two-dimensional forced flow of liquid glycerine through a nozzle and into an air-filled chamber at atmospheric pressure. The mesh used (shown below) is the same as in the Gravity-Driven Flow Tutorial except that, in this instance, the problems physical dimensions are scaled down by a factor of 1,000. This gives a nozzle width of about 1 mm. The boundary on the left of the problem geometry is an inlet with fluid velocity of 1 mm/s and the boundary on the right is at atmospheric pressure. The boundary at the bottom is a symmetry plane and all other boundaries are solid walls. Initially, the left chamber is filled with liquid and the remainder of the solution domain is filled with air. For the given geometry and inlet velocity, the flow can be assumed to be laminar. Gravity acts in the positive x-direction and so helps to drive the flow through the nozzle. The shape of the free-surface that develops in the chamber downstream of the nozzle depends on the contact angle between liquid and wall, specified as 45o.

Importing the Mesh and Naming the Simulation


Start up STAR-CCM+ in a manner that is appropriate to your working environment and select the New Simulation option from the menu bar. Continue by importing the mesh and naming the simulation. A one-cell-thick three-dimensional polyhedral cell mesh has been predefined for this analysis. Select File > Import... from the menus. In the Open dialog, navigate to the doc/tutorials/multiphase subdirectory of your STAR-CCM+ installation directory and select file

Version 4.04.011

STAR-CCM+ User Guide

Capillary Effects Tutorial 4019

There are special requirements in STAR-CCM+ for three-dimensional meshes that are to be converted to two-dimensional. These are: The grid must be aligned with the X-Y plane. The grid must have a boundary plane at the Z = 0 location. The mesh imported for this tutorial was built with these requirements in mind. Were the grid not to conform to the above conditions, it would have been necessary to realign the region using the transformation and rotation facilities in STAR-CCM+. Select Mesh > Convert to 2D... In the Convert Regions to 2D dialog that appears, make sure the checkbox of the Delete 3D regions after conversion option is ticked, and click OK.

Once this is done, the mesh conversion will take place and the new two-dimensional mesh will be created. Note that the mouse rotation option is suppressed for two-dimensional scenes. Right-click the Physics 1 continuum node and select Delete. Click Yes in the confirmation dialog.

Scaling the Mesh


The original mesh was not built to the correct scale and therefore requires scaling down by a factor of 1000.

Version 4.04.011

STAR-CCM+ User Guide

Capillary Effects Tutorial 4022

The dialog will guide you through the model selection process by showing only options that are appropriate to the initial choices made. Using the same technique as in the previous step: Select Implicit Unsteady in the Time group box. Select Multiphase Mixture in the Material group box. Select Volume of Fluid (VOF) in the Multiphase Model box. Select Laminar in the Viscous Regime group box. Select Gravity in the Optional Physics Models group box. Select Surface Tension in the Optional Physics Models group box. The Physics Model Selection dialog should look like this when you are done.

Click Close. Save the simulation by clicking on the (Save) button.

Setting Material Properties


In the capillaryEffects window, open the Continua node.

Version 4.04.011

STAR-CCM+ User Guide

Capillary Effects Tutorial 4026

The phase model objects should appear as shown in the following screenshot.

The default densities and viscosities for air and glycerine are suitable but the value of the surface tension coefficient needs to be changed. Select the Air > Material Properties > Surface Tension > Constant node. In the Properties window, change the Value property to 0.059688 N/m.

Open the C3H8O3 node and change the surface tension coefficient for glycerine to 0.059688 N/m also. The surface tension coefficients of the two fluids should always be given the same value to ensure that their treatment at the free surface is consistent. Save the simulation.

Setting Initial Conditions and Reference Values


The direction and magnitude of the gravity vector is set via the Reference Values node. In this case, a gravity force needs to be applied in the positive x-direction.

Version 4.04.011

STAR-CCM+ User Guide

Capillary Effects Tutorial 4029

Click OK to exit the editor.

Return to the C3H8O3 node, open it and select the Field Function node beneath it Select Initial Distribution as the Scalar Function property.

It is not necessary to specify a similar distribution for the Air node because any user-specified initial condition for the volume fraction of the last-defined phase in multi-phase flows is always ignored. Instead, this condition is obtained by subtracting the sum of the volume fraction distributions of the other phases from 1.0. Save the simulation.

Setting Boundary Conditions and Values


The geometry used for this tutorial has six boundaries, three of which will have no-slip wall conditions assigned to them. The remaining three boundaries will be assigned inlet, pressure and symmetry boundary conditions.

Version 4.04.011

STAR-CCM+ User Guide

Capillary Effects Tutorial 4033

This in effect enforces the condition that only air may enter the solution domain through that boundary. This completes the boundary condition specification. Save the simulation.

Setting Solver Parameters and Stopping Criteria


As we are solving an unsteady problem, it is necessary to specify the time-step size and the elapsed simulation time. This calculation will be run for 2.0 s with a time-step size of 0.001 s, so will require 2,000 time-steps. To specify the step size: Select the Solvers > Implicit Unsteady node. In the Properties window, change the Time-Step property to 0.001 s.

To set the run time: Select the Stopping Criteria > Maximum Steps node.

Set the Maximum Steps property to 2000 A maximum physical time is also defined. To remove this stopping criterion:

Version 4.04.011

STAR-CCM+ User Guide

Capillary Effects Tutorial 4037

Save the simulation.

Running the Simulation


To run the simulation: Click on the (Run) button in the top toolbar. If you do not see this button, use the Solution > Run menu item. The Residuals display will automatically be created and will show the progress being made by the solver.

The progress of the run can be observed by selecting the Scalar Scene 1 tab at the top of the Graphics window. It is possible to stop the process during the run by clicking on the (Stop) button in the toolbar. If you do halt the simulation, it can be continued again by clicking on the (Run) button. If left alone, the simulation will continue until all 2,000 time-steps are complete. Note that the numbers displayed in the Output window represent the solvers inner iterations, not time-steps. As there are 5 inner iterations per time-step, you may expect the run to perform 10,000 inner iterations. Save the simulation when the run is complete.

Version 4.04.011

STAR-CCM+ User Guide

Capillary Effects Tutorial 4040

The velocity vector plot shows high air velocities close to the free surface. This is a numerical inaccuracy known as parasitic currents. These currents arise because the surface tension and pressure forces are much larger than all other terms in the momentum equations, and their balance on an irregular grid is difficult to achieve numerically due to the discontinuous variation of pressure across the free surface and a large discretization error associated with it. Parasitic currents become appreciable when the problem size is small and fluid velocity and viscosity are low. For flows where diffusion and convection forces are of a similar magnitude to surface tension forces, these problems are not so pronounced. Since artificial velocities are generated only within the air, their effect on the liquid flow (which is usually what we are trying to predict) is small. Save the simulation.

Changing the Contact Angle


The contours of glycerine volume fraction shown below demonstrate the effect of changing the contact angle. In this case, the contact angle at all wall boundaries was changed from 45o to 135o. All other modeling options and material properties were kept the same and the analysis run for a physical time of 2.0 s, as before.

Summary
This STAR-CCM+ tutorial introduced the following features:

Version 4.04.011