You are on page 1of 24

Chapter 8: Flow of Two Immiscible Fluids by Species Method

8.1. Introduction
This tutorial examines the flow of two fluids in a single die. Two polymer melts with distinct physical
properties are fed through different channels into a die. The aim of the calculation is to predict the
location of the interface between the two fluids.

In this tutorial you will learn how to:

Define a species.

Define a PMAT function.

8.2. Prerequisites
This tutorial assumes that you are familiar with the menu structure in Polydata and Workbench and
that you have solved or read 2.5D Axisymmetric Extrusion (p. ?). Some steps in the set up procedure
will not be shown explicitly.

8.3. Problem Description

This problem analyzes the flow of two immiscible Newtonian fluids (fluid 1 and fluid 2) through a die
of diameter 1 cm, as shown in Figure 8.1: A Schematic Diagram of the Two Fluids in the Die (p. 2). The
melts are fed into the die through boundaries 1 and 3 (see Figure 8.2: Boundary Sets and Subdomains
for the Problem (p. 3)). The flow rates for the two fluids are not equal. The fluids come into contact
in the die, creating an interface. The location of the interface is unknown and will be determined by
Polyflow. The location of the interface depends on the physical properties of the fluids, the flow rates
of the fluids, and the geometry of the die.

Incompressibility and momentum equations are solved in the fluid domains. To determine the interface,
an extra scalar transport equation is solved and material properties are made functions of this scalar
using PMAT. If scalar value is greater than 0.5, material properties of first fluid are used and if scalar
value is less than 0.5, material properties of second species are used. Scalar value of 0.5 determines the
location of interface.

Note that same problem has been solved using the interface tracking method (see Flow of Two Immiscible
Fluids (p. ?)).

The advantage of this method over the interface tracking method is that you can use this method even
for complex geometries, and it is less expensive compared to interface tracking method (no remeshing

of ANSYS, Inc. and its subsidiaries and affiliates. 1
Flow of Two Immiscible Fluids by Species Method

method must be defined). But this comes at a loss of accuracy. The interface tracking method gives a
very accurate position of interface, whereas the species method produces a blurred interface.

The geometry and mesh from Flow of Two Immiscible Fluids (p. ?) is used.

Fluid 1 has a viscosity of = 10000 poise, and fluid 2 has a viscosity of = 5000 poise.

Figure 8.1: A Schematic Diagram of the Two Fluids in the Die

The boundary sets for the problem are shown in Figure 8.2: Boundary Sets and Subdomains for the
Problem (p. 3).

2 of ANSYS, Inc. and its subsidiaries and affiliates.
Problem Description

boundary 1: scalar value equal to 1

of ANSYS, Inc. and its subsidiaries and affiliates. 3
Flow of Two Immiscible Fluids by Species Method

Insulated condition at all other boundaries

Note that using this method, for sharp interface it should be ensured that the scalar doesn't diffuse
much into the domain. To ensure this, evolution is applied on scalar diffusivity starting from a large
value and gradually decreasing it to a very small number.

8.4. Preparation
To prepare for running this tutorial:

2. Go to the ANSYS Customer Portal, https://support.ansys.com/training.

Note

If you do not have a User Name and Password, you can register by clicking Customer

3. Enter the name of this tutorial into the search bar.

4. Narrow the results by using the filter on the left side of the page.

The mesh file fluids.msh can be found in the unzipped folder.

8. Start Workbench from Start All Programs ANSYS 15.0 Workbench 15.0.

8.5. Step 1: Project and Mesh

1. Create a Fluid Flow (Polyflow) analysis system by drag and drop in Workbench.

2. Save the ANSYS Workbench project using File Save, entering two-fluids-species as the name
of the project.

4. Double-click the Setup cell to start Polydata.

When Polydata starts, the Create a new task menu item is highlighted, and the geometry for the
problem is displayed in the Graphics Display window.

4 of ANSYS, Inc. and its subsidiaries and affiliates.
Step 2a: Definition of Species and Species Transport Sub-task

8.6. Step 2: Models, Material Data, and Boundary Conditions

In this step, you will define a single task that represents the global problem. Since this tutorial deals
with two fluids, each with its own physical properties, you will need to define two different sub-tasks
(one for each fluid) in steps that follow.

2. Select the following options:

Evolution problem(s)

2D axisymmetric geometry

8.7. Step 2a: Definition of Species and Species Transport Sub-task

In this step, define a species A and set material properties as well as boundary condition along its boundaries.

1. Create a species A.

Define species

A small panel appears asking for the nickname of the species.

of ANSYS, Inc. and its subsidiaries and affiliates. 5
Flow of Two Immiscible Fluids by Species Method

Polydata will ask to select a species.

b. Click SpeciesA.

5. Specify the material properties for species.

Material data

Polydata indicates the material properties that are relevant for the sub-task by graying out the irrelevant
properties. For this model, you will define only the diffusivity of the species. Evolution will be applied
on diffusivity with initial high value (1) and decreasing it to a small value (1e-9).

6 of ANSYS, Inc. and its subsidiaries and affiliates.
Step 2a: Definition of Species and Species Transport Sub-task

a. Click Diffusivity.

b. Click EVOL button at the top of Polydata menu to enable evolution inputs.

A small panel appears asking for New value of diffusivity.

of ANSYS, Inc. and its subsidiaries and affiliates. 7
Flow of Two Immiscible Fluids by Species Method

d. Click OK to accept the default value of 1.

Polydata will take you to evolution panel. Here you will make species diffusivity as a function of
evolution parameter . Since we want diffusivity to decrease by several orders of magnitude, we
use .

f. Modify the value of function parameters: a, b, c, and d to 1, 20, 0 and 0, respectively.

h. Click the EVOL button at the top of the Polydata menu to disable evolution inputs.

Boundary conditions of the species must be defined at all of the boundaries.

6. Specify the concentration boundary conditions for fluid 1 (SUBDOMAIN1 and SUBDOMAIN2).

Concentration boundary conditions

8 of ANSYS, Inc. and its subsidiaries and affiliates.
Step 2a: Definition of Species and Species Transport Sub-task

iv. Set New value to 1 and click OK.

of ANSYS, Inc. and its subsidiaries and affiliates. 9
Flow of Two Immiscible Fluids by Species Method

ii. Click Insulated boundary.

iii. Repeat step (i) and step (ii) for BOUNDARY5 and BOUNDARY6.

8.8. Step 2b: Definition of a Sub-task

In this step, define the nature of the flow problem, identify the domain of definition, set the relevant material
properties for fluid, and define boundary conditions along its boundaries.

A small panel appears asking for the title of the problem.

10 of ANSYS, Inc. and its subsidiaries and affiliates.
Step 2b: Definition of a Sub-task

3. Specify the material data properties for fluids.

Material Data

Polydata indicates the material properties that are relevant for the sub-task by graying out the irrelevant
properties. For this model, you will define only the viscosity of the material. The viscosity of material 1
will be used if the species concentration is greater than 0.5, otherwise the viscosity of material 2 will be
used. This can be achieved by the use of PMAT.

Modify fac

Polydata prompts for the new value of .

of ANSYS, Inc. and its subsidiaries and affiliates. 11
Flow of Two Immiscible Fluids by Species Method

A new function f1(...) will be created.

g. Click f1(...).

f(X1) = Multi-ramp function

12 of ANSYS, Inc. and its subsidiaries and affiliates.
Step 2b: Definition of a Sub-task

Polydata will ask to define pair of values. A minimum of two pairs need to be defined. Here we
define (0.495, 5000) and (0.505, 10000) where first index stands for species concentration and
second index stands for viscosity value.

Polydata prompts for X1 and f(X1) sequentially.

Enter 0.495 for X1( 1), and 5000 for f(X1)( 1).

Change field X1 = S (evol. var.)

n. Select SpeciesA.

o. Disable PMAT button at the top of Polydata.

of ANSYS, Inc. and its subsidiaries and affiliates. 13
Flow of Two Immiscible Fluids by Species Method

a. Set the conditions at the flow inlet for fluid 1 (BOUNDARY1).

i. Select Zero wall velocity (vn=vs=0) along BOUNDARY1 and click Modify.

iii. Click Modify volumetric flow rate.

Polydata prompts for the new value of the volumetric flow rate.

14 of ANSYS, Inc. and its subsidiaries and affiliates.
Step 2b: Definition of a Sub-task

v. Select Automatic. Click Upper level menu.

When this option is selected, Polydata automatically chooses the most appropriate method
to compute the inflow condition.

b. Retain the default condition Zero wall velocity (vn=vs=0) along BOUNDARY2.

At a solid-liquid interface, the velocity of the liquid is that of the solid surface. Hence the fluid is
assumed to stick to the wall. This is known as the no-slip assumption because the liquid is assumed
to adhere to the wall, and so has no velocity relative to the wall.

c. Set the conditions at the flow inlet for fluid 2 (BOUNDARY3).

i. Select Zero wall velocity (vn=vs=0) along BOUNDARY3 and click Modify.

iii. Click Modify volumetric flow rate.

Polydata prompts for the new value of the volumetric flow rate.

v. Select Automatic. Click Upper level menu.

d. Retain the default condition Zero wall velocity (vn=vs=0) along BOUNDARY4.

e. Set the conditions at the flow outlet (BOUNDARY5).

It is assumed that a fully developed velocity profile is reached at the exit, so the outflow condition
is most appropriate. This condition essentially imposes a zero normal force ( ) that includes a
pressure term, and a zero tangential velocity ( ).

i. Select Zero wall velocity (vn=vs=0) along BOUNDARY5 and click Modify.

ii. Click Outflow.

f. Retain the default condition Zero wall velocity (vn=vs=0) along BOUNDARY6.

The fluid is assumed to stick to the wall, since at a solid-liquid interface the velocity of the liquid
is that of the solid surface.

The main menu of Polydata is displayed.

of ANSYS, Inc. and its subsidiaries and affiliates. 15
Flow of Two Immiscible Fluids by Species Method

8.9. Step 3: Save the Data and Exit Polydata

After defining your model in Polydata, you need to save the data file. In the next step, you will have to read
this data file into Polyflow and calculate a solution.

Save and exit

Polydata asks you to confirm the current system units and fields that are to be saved to the results file for
postprocessing.

2. Click Accept.

This confirms that the default Current field(s) are correct..

3. Click Continue.

This accepts the default names for graphical output files (cfx.res) that are to be saved for postpro-
cessing, and the Polyflow format results file (res).

8.10. Step 4: Solution

Run Polyflow to calculate a solution for the model you just defined using Polydata.

1. Run Polyflow by right-clicking the Solution cell of the simulation and selecting Update.

This executes Polyflow using the data file as standard input, and writes information about the problem
description, calculations, and convergence to a listing file (polyflow.lst).

Right-click the Solution cell and click Listing Viewer....

Workbench opens the View listing file panel, which displays the listing file.

8.11. Step 5: Postprocessing

Use CFD-Post to view the results of the Polyflow simulation.

1. Double-click the Results tab in the Workbench analysis and read the results files saved by Polyflow.

CFD-Post reads the solution fields that were saved to the results file.

2. Align the view.

In the graphical window, right-click, and select View from +Z under Predefined Camera.

16 of ANSYS, Inc. and its subsidiaries and affiliates.
Step 5: Postprocessing

The central-mouse button allows you to zoom in and zoom out. The left-mouse button allows rotating
the image. The right-mouse button allows you to translate the image.

3. Display contours of velocity magnitude.

a. Click the Insert menu and select Contour or click the Contour button ( ).

b. Click OK to accept the default name (Contour 1) and display the details view below the Outline
tab.

i. In the Geometry tab, click the button next to Locations.

of ANSYS, Inc. and its subsidiaries and affiliates. 17
Flow of Two Immiscible Fluids by Species Method

ii. In the Location Selector dialog box that opens, select SUBDOMAIN1_surf, SUBDOMAIN2_surf,
SUBDOMAIN3_surf, and SUBDOMAIN4_surf (use Ctrl for multiple selection) and click OK.

Figure 8.3: Contours of Velocity Magnitude

The velocity is much larger at the inlet of fluid 1 than at the inlet of fluid 2. There are two reasons for
this:

The flow rate is three times larger for fluid 1 than for fluid 2.

You are modeling an annular die. Hence the flow section is smaller for the interior channel than for the
exterior channel.

When the two fluids come into contact with each other, the interface between the two fluids is pushed
towards the exterior of the annular die.

18 of ANSYS, Inc. and its subsidiaries and affiliates.
Step 5: Postprocessing

The flow rate for fluid 1 is higher than for fluid 2.

The die is annular, so even identical flow rates cause the interface to move in order to equilibrate the flow
sections.

The viscosity of fluid 1 is higher than the viscosity of fluid 2. In the process of giving more room to the
most viscous fluid, its shearing decreases. This leads to a smaller global dissipation.

4. Display the velocity vectors for the two fluids.

a. In Outline tree tab, under User Locations and Plots, deselect Contour 1.

b. Click the Insert menu and select Vector or click the button.

c. Click OK to accept the default name (Vector 1) and display the details view below the Outline
tab.

i. In the Geometry tab, click the button next to Location.

ii. In the Location Selector dialog box that opens, select the locations SUBDOMAIN1_surf,
SUBDOMAIN2_surf, SUBDOMAIN3_surf and SUBDOMAIN4_surf (use ctrl for multiple selec-
tions) and click OK.

iii. In the Symbol tab, select Arrow 3D from the Symbol drop-down list.

iv. Set Symbol Size to 2.

v. Click Apply.

of ANSYS, Inc. and its subsidiaries and affiliates. 19
Flow of Two Immiscible Fluids by Species Method

Figure 8.4: Velocity Vectors

You can see that the velocity is continuous across the interface. As both the fluids are Newtonian, the
velocity profile is a parabola on both sides of the interface. Since the force must be continuous across
the interface, the shear stress generated within fluid 1 is equal to the shear stress generated within fluid
2 along the interface.

5. Displaying the contours of Species A.

a. In Outline tree tab, under User Locations and Plots, deselect Vector 1.

b. Click the Insert menu and select Contour or click the Contour button ( ).

c. Click OK to accept the default name (Contour 2) and display the details view below the Outline
tab.

d. Perform the following steps in the details view of Contour 2:

20 of ANSYS, Inc. and its subsidiaries and affiliates.
Step 5: Postprocessing

i. Click the button next to Locations.

ii. In the Location Selector dialog box that opens, select SUBDOMAIN1_surf, SUBDOMAIN2_surf,
SUBDOMAIN3_surf, and SUBDOMAIN4_surf (use Ctrl for multiple selection), and then click
OK.

iii. Click the button next to Variable.

iv. In the Variable Selector dialog box that opens, select SpeciesA, and then click OK.

Figure 8.5: Contours of Species A

of ANSYS, Inc. and its subsidiaries and affiliates. 21
Flow of Two Immiscible Fluids by Species Method

6. Display the interface line.

a. In Outline tree tab, under User Locations and Plots, deselect Contour 2.

b. Select Isosurface from the Location drop-down menu ( ).

c. Click OK to accept the default name (Isosurface 1) and display the details view below the Outline
tab.

d. Perform the following steps in the details view of Isosurface 1:

i. In the Geometry tab, click the button next to Variable and select SpeciesA.

ii. Enter 0.5 for Value in order to locate the interface line.

iii. In the Color tab, select Constant from the Mode drop-down list and select pink by clicking

next to Color.

iv. In the Render tab, select Draw As Lines from the Draw Mode drop-down list.

v. Click Apply.

vi. Right-click in the Graphics Window and deselect Default Legend.

22 of ANSYS, Inc. and its subsidiaries and affiliates.
Summary

Figure 8.6: Location of Interface

8.12. Summary
This tutorial introduced the concept of fluid layers owing in the same duct. In Polydata, you learned
how to set up a species transport equation, PMAT function and how to define a co-extrusion problem
using species transport and PMAT functions. This method avoids the use of the remeshing method,
which is computationally expensive.

The species method although less accurate can help in quickly finding a solution even for a complex
die. For more accurate results, the interface tracking method as demonstrated in Flow of Two Immiscible
Fluids (p. ?) should be used. Generating a mesh for complex die may be an issue with the interface
tracking method.

The location of the interface depends largely on the physical properties of the fluids involved, the
geometry of the channels, and the operating conditions (for example: flow rates of the fluids). A CFD
simulation with Polyflow allows you to test different setups (for example: in order to optimize the
feeding of a co-extrusion die).