mulit phase 1

20
STAR-CCM+ User Guide 3987 Version 4.04.011 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.

Upload: sb-ali

Post on 22-Oct-2015

33 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Mulit Phase 1

STAR-CCM+ User Guide 3987

Version 4.04.011

Multi-Phase Flow

Tutorials

The tutorials in this set illustrate various STAR-CCM+ facilities forsimulating 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 singlelayer of polygonal prisms. This is suitable for performing a planar,two-dimensional analysis and is shown below.

Page 2: Mulit Phase 1

STAR-CCM+ User Guide 3989

Version 4.04.011

Gravity-Driven Flow Tutorial

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

Under the action of gravity, water flows into the right chamber underassumed turbulent conditions. At the same time, water also flows inthrough the top left boundary so as to maintain a constant fluid level. Thepressure 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-staticequilibrium.

Importing the Mesh and Naming the Simulation

Start up STAR-CCM+ in a manner that is appropriate to your workingenvironment and select the New Simulation option from the menu bar.

Continue by importing the mesh and naming the simulation. Aone-cell-thick, three-dimensional, polyhedral cell mesh has been preparedfor this analysis.

• Select File > Import... from the menus

• In the Open dialog, navigate to the doc/tutorials/multiphasesubdirectory of your STAR-CCM+ installation directory and select file

Page 3: Mulit Phase 1

STAR-CCM+ User Guide Gravity-Driven Flow Tutorial 3991

Version 4.04.011

• 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 inmind. Were the grid not to conform to the above conditions, it would havebeen necessary to realign the region using the transformation and rotationfacilities in STAR-CCM+.

• Select Mesh > Convert to 2D...

• In the Convert Regions to 2D dialog that appears, make sure thecheckbox of the Delete 3D regions after conversion option is ticked, andclick OK.

Once you click OK, the mesh conversion will take place and the newtwo-dimensional mesh will be shown, viewed from the z-direction, in theGeometry Scene 1 display. The mouse rotation option is suppressed fortwo-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

Page 4: Mulit Phase 1

STAR-CCM+ User Guide Gravity-Driven Flow Tutorial 3993

Version 4.04.011

Setting up the Models

Models define the primary variables of the simulation, including pressure,temperature, velocity, and what mathematical formulation will be used togenerate the solution. In this example, the flow is turbulent. The defaultK-Epsilon turbulence model will be used and a gravitational force appliedin 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 samedomain, only one continuum and one mesh region are required to set up thesimulation.

By default, a continuum called Physics 1 2D is created when the mesh isconverted to two-dimensional.

• To use a more appropriate name for it, right-click on the Physics 1 2Dnode and select Rename...

The Rename dialog will appear.

• Change the name to Chambers. Click OK.

Page 5: Mulit Phase 1

STAR-CCM+ User Guide Gravity-Driven Flow Tutorial 3995

Version 4.04.011

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 theChambers node has turned from gray to blue to indicate that models havebeen activated.

• Open the Chambers > Models node. The selected models now appear

Page 6: Mulit Phase 1

STAR-CCM+ User Guide Gravity-Driven Flow Tutorial 3999

Version 4.04.011

Setting Initial Conditions and Reference Values

The direction and magnitude of the gravity vector are set via theReference Values node. In this case, a gravity force needs to be applied in thenegative 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

Page 7: Mulit Phase 1

STAR-CCM+ User Guide Gravity-Driven Flow Tutorial 4003

Version 4.04.011

• Select Initial Distribution as the Scalar Function property.

It is not necessary to define a similar distribution for the Air node becauseany user-specified initial condition for the volume fraction of thelast-defined phase in multi-phase flows is always ignored. Instead, thiscondition is obtained by subtracting the sum of the volume fractiondistributions 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 willhave no-slip wall conditions assigned to them. The remaining twoboundaries 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 andselect Rename...

• Enter the name Fluid and click OK.

• Open the Fluid > Boundaries node, then use the <Ctrl><Click> methodto select the Bottom, Left, Middle, Right and TopRight nodes. These are the

Page 8: Mulit Phase 1

STAR-CCM+ User Guide Gravity-Driven Flow Tutorial 4006

Version 4.04.011

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 solutiondomain 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 thetime-step size and the elapsed simulation time. This calculation will be runfor 5.0 s with a time-step size of 0.005 s.

To specify the step size:

• Select the Solvers > Implicit Unsteady node.

Page 9: Mulit Phase 1

STAR-CCM+ User Guide Gravity-Driven Flow Tutorial 4008

Version 4.04.011

The number of inner iterations per time-step is set to 20 by default. This ismore 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 alsosave 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.

Page 10: Mulit Phase 1

STAR-CCM+ User Guide Gravity-Driven Flow Tutorial 4011

Version 4.04.011

• 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 withwater whereas the right chamber and the connecting channel are entirelyfilled with air. A small region in which both fluids are apparently present isvisible at the interface between the two fluids, but this effect is simply dueto the coarseness of the mesh.

• Save the simulation.

Running the Simulation

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

Page 11: Mulit Phase 1

STAR-CCM+ User Guide Gravity-Driven Flow Tutorial 4013

Version 4.04.011

Visualizing Results

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

• Right-click on the scalar bar in the display.

Page 12: Mulit Phase 1

STAR-CCM+ User Guide Gravity-Driven Flow Tutorial 4015

Version 4.04.011

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

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.

Page 13: Mulit Phase 1

STAR-CCM+ User Guide 4017

Version 4.04.011

Capillary Effects Tutorial

This tutorial simulates two-dimensional forced flow of liquid glycerinethrough a nozzle and into an air-filled chamber at atmospheric pressure.The mesh used (shown below) is the same as in the Gravity-Driven FlowTutorial except that, in this instance, the problem’s physical dimensions arescaled 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 fluidvelocity of 1 mm/s and the boundary on the right is at atmosphericpressure. The boundary at the bottom is a symmetry plane and all otherboundaries are solid walls.

Initially, the left chamber is filled with liquid and the remainder of thesolution domain is filled with air. For the given geometry and inlet velocity,the flow can be assumed to be laminar. Gravity acts in the positivex-direction and so helps to drive the flow through the nozzle. The shape ofthe free-surface that develops in the chamber downstream of the nozzledepends 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 workingenvironment and select the New Simulation option from the menu bar.

Continue by importing the mesh and naming the simulation. Aone-cell-thick three-dimensional polyhedral cell mesh has been predefinedfor this analysis.

• Select File > Import... from the menus.

• In the Open dialog, navigate to the doc/tutorials/multiphasesubdirectory of your STAR-CCM+ installation directory and select file

Page 14: Mulit Phase 1

STAR-CCM+ User Guide Capillary Effects Tutorial 4019

Version 4.04.011

There are special requirements in STAR-CCM+ for three-dimensionalmeshes 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 inmind. Were the grid not to conform to the above conditions, it would havebeen necessary to realign the region using the transformation and rotationfacilities in STAR-CCM+.

• Select Mesh > Convert to 2D...

• In the Convert Regions to 2D dialog that appears, make sure thecheckbox of the Delete 3D regions after conversion option is ticked, andclick OK.

Once this is done, the mesh conversion will take place and the newtwo-dimensional mesh will be created. Note that the mouse rotation optionis 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 requiresscaling down by a factor of 1000.

Page 15: Mulit Phase 1

STAR-CCM+ User Guide Capillary Effects Tutorial 4022

Version 4.04.011

The dialog will guide you through the model selection process by showingonly options that are appropriate to the initial choices made. Using the sametechnique 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.

Page 16: Mulit Phase 1

STAR-CCM+ User Guide Capillary Effects Tutorial 4026

Version 4.04.011

The phase model objects should appear as shown in the followingscreenshot.

The default densities and viscosities for air and glycerine are suitable butthe 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 forglycerine to 0.059688 N/m also.

The surface tension coefficients of the two fluids should always be given thesame 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 theReference Values node. In this case, a gravity force needs to be applied in thepositive x-direction.

Page 17: Mulit Phase 1

STAR-CCM+ User Guide Capillary Effects Tutorial 4029

Version 4.04.011

• Click OK to exit the editor.

• Return to the C3H8O3 node, open it and select the Field Function nodebeneath it

• Select Initial Distribution as the Scalar Function property.

It is not necessary to specify a similar distribution for the Air node becauseany user-specified initial condition for the volume fraction of thelast-defined phase in multi-phase flows is always ignored. Instead, thiscondition is obtained by subtracting the sum of the volume fractiondistributions 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 willhave no-slip wall conditions assigned to them. The remaining threeboundaries will be assigned inlet, pressure and symmetry boundaryconditions.

Page 18: Mulit Phase 1

STAR-CCM+ User Guide Capillary Effects Tutorial 4033

Version 4.04.011

This in effect enforces the condition that only air may enter the solutiondomain 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 thetime-step size and the elapsed simulation time. This calculation will be runfor 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 stoppingcriterion:

Page 19: Mulit Phase 1

STAR-CCM+ User Guide Capillary Effects Tutorial 4037

Version 4.04.011

• Save the simulation.

Running the Simulation

To run the simulation:

• Click on the (Run) button in the top toolbar. If you do not see thisbutton, use the Solution > Run menu item.

The Residuals display will automatically be created and will show theprogress being made by the solver.

The progress of the run can be observed by selecting the Scalar Scene 1 tab atthe 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 againby clicking on the (Run) button. If left alone, the simulation will continueuntil all 2,000 time-steps are complete. Note that the numbers displayed inthe Output window represent the solver’s inner iterations, not time-steps.As there are 5 inner iterations per time-step, you may expect the run toperform 10,000 inner iterations.

• Save the simulation when the run is complete.

Page 20: Mulit Phase 1

STAR-CCM+ User Guide Capillary Effects Tutorial 4040

Version 4.04.011

The velocity vector plot shows high air velocities close to the free surface.This is a numerical inaccuracy known as parasitic currents. These currentsarise because the surface tension and pressure forces are much larger thanall other terms in the momentum equations, and their balance on anirregular grid is difficult to achieve numerically due to the discontinuousvariation of pressure across the free surface and a large discretization errorassociated with it. Parasitic currents become appreciable when the problemsize is small and fluid velocity and viscosity are low. For flows wherediffusion and convection forces are of a similar magnitude to surfacetension forces, these problems are not so pronounced. Since artificialvelocities 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 theeffect of changing the contact angle. In this case, the contact angle at all wallboundaries was changed from 45o to 135o. All other modeling options andmaterial properties were kept the same and the analysis run for a physicaltime of 2.0 s, as before.

Summary

This STAR-CCM+ tutorial introduced the following features: