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 species transport problem.

Create multiple sub-tasks.

Define a PMAT function.

Define an EVOLUTION task.

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

Release 15.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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).

Release 15.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
2 of ANSYS, Inc. and its subsidiaries and affiliates.
Problem Description

Figure 8.2: Boundary Sets and Subdomains for the Problem

The conditions at the boundaries of the domains are:

boundary 1: flow inlet for fluid 1, volumetric flow rate = 3 cm3/s

boundary 2: outer wall common to subdomain 1 and subdomain 3: zero velocity

boundary 3: flow inlet for fluid 2, volumetric flow rate, = 1 cm3/s

boundary 4: outer wall common to subdomain 3 and subdomain 4: zero velocity

boundary 5: flow exit for both fluids

boundary 6: outer wall common to subdomain 1 and subdomain 2: zero velocity

The conditions at the boundaries of the domains for species transport:

boundary 1: scalar value equal to 1

Release 15.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 3
Flow of Two Immiscible Fluids by Species Method

boundary 3: scalar value equal to zero

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:

1. Prepare a working folder for your simulation.

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
Registration on the Log In page.

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.

a. Click ANSYS Polyflow under Product.

b. Click 15.0 under Version.

5. Select this tutorial from the list.

6. Click Files to download the input and solution files.

7. Unzip the Two-Fluids-Species_R150.zip file you have downloaded to your working folder.

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.

3. Import the mesh file (fluids.msh).

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.

Release 15.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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.

1. Create a task for the model.

Create a new task

2. Select the following options:

F.E.M. task

Evolution problem(s)

2D axisymmetric geometry

3. Click Accept the current setup.

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

2. Create a new species.

Create a new species

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

a. Enter Species A as the name of the species.

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

Release 15.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 5
Flow of Two Immiscible Fluids by Species Method

b. Enter spea as the nickname of the species.

c. Click Upper level menu.

The Create a sub-task menu item is highlighted.

3. Create a sub-task for transport of the species.

Create a sub-task

a. Click Transport of species.

Polydata will ask to select a species.

b. Click SpeciesA.

The Domain of the sub-task menu item is highlighted.

4. Define the domain where the sub-task applies.

Species transport equation is solved in all the subdomains.

Domain of the sub-task

Click Upper level menu to select all of the subdomains.

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).

Release 15.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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.

c. Click Modify diffusivity.

A small panel appears asking for New value of diffusivity.

Release 15.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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 .

e. Select the function f(S) = a*exp(b*S) + c + d*S.

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

g. Click Upper level menu.

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

i. Click Upper level menu twice to return to the Transport of SpeciesA menu.

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

Release 15.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
8 of ANSYS, Inc. and its subsidiaries and affiliates.
Step 2a: Definition of Species and Species Transport Sub-task

a. Set mass fraction at BOUNDARY1 equal to 1.

i. Select Mass fraction imposed along BOUNDARY1 and click Modify.

ii. Click Mass fraction imposed.

iii. Click Constant.

A small panel appears asking for the new value of concentration.

iv. Set New value to 1 and click OK.

v. Click Upper level menu.

Release 15.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 9
Flow of Two Immiscible Fluids by Species Method

b. Set insulated conditions at BOUNDARY2.

i. Select Mass fraction imposed along BOUNDARY2 and click Modify.

ii. Click Insulated boundary.

c. Set mass fraction at BOUNDARY3 equal to 0.

i. Select Mass fraction imposed along BOUNDARY3 and click Modify.

ii. Click Mass fraction imposed.

iii. Click Constant.

A small panel appears asking for the new value of concentration.

iv. Click OK to accept the default value of 0.

v. Click Upper level menu.

d. Set insulated conditions at BOUNDARY4, BOUNDARY5, and BOUNDARY6.

i. Select Mass fraction imposed along BOUNDARY4 and click Modify.

ii. Click Insulated boundary.

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

iv. Click Upper level menu twice.

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.

1. Create a sub-task for the fluids.

Create a sub-task

a. Click No in the window that pops up.

Select Generalized Newtonian isothermal flow problem.

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

Release 15.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
10 of ANSYS, Inc. and its subsidiaries and affiliates.
Step 2b: Definition of a Sub-task

b. Enter fluid 1 and 2 as the New value and click OK.

The Domain of the sub-task menu item is highlighted.

2. Define the domain where the sub-task applies.

This Sub-task is defined for all the subdomains.

Domain of the sub-task

Click Upper level menu to select all of the subdomains.

The Material data menu item is highlighted.

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.

a. Click Shear-rate dependence of viscosity.

b. Click Constant viscosity.

c. Click PMAT button at the top of Polydata.

d. Specify the value for .

Modify fac

Polydata prompts for the new value of .

Release 15.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 11
Flow of Two Immiscible Fluids by Species Method

Enter 1 as the New value and click OK.

e. Polydata will take you to PMAT menu as shown below.

f. Create a new function.

Create a new function

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

g. Click f1(...).

h. Select multi-ramp function.

f(X1) = Multi-ramp function

Release 15.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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.

i. Define new pairs.

Define new pairs (X1, f(X1))

Polydata prompts for X1 and f(X1) sequentially.

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

j. Define the second pair.

Insert new pair

k. Enter 0.505 for X1( 2) and 10000 for f(X1)( 2).

l. Click Upper level menu two times.

m. Change the field to species concentration.

Change field X1 = S (evol. var.)

n. Select SpeciesA.

o. Disable PMAT button at the top of Polydata.

p. Click Upper level menu six times to return to the fluid 1 and 2 menu.

Release 15.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 13
Flow of Two Immiscible Fluids by Species Method

The Flow boundary conditions menu item is highlighted.

4. Specify the flow boundary conditions for the fluids.

Flow boundary conditions

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.

ii. Click Inflow.

iii. Click Modify volumetric flow rate.

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

Release 15.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
14 of ANSYS, Inc. and its subsidiaries and affiliates.
Step 2b: Definition of a Sub-task

iv. Enter 3 as the New value and click OK.

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.

By default, Polydata imposes Zero wall velocity ( = = 0) along all boundaries.

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.

ii. Click Inflow.

iii. Click Modify volumetric flow rate.

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

iv. Enter 1 as the New value and click OK.

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.

g. Click Upper level menu to return to the fluid 1 and 2 menu.

h. Click Upper level menu two times.

The main menu of Polydata is displayed.

Release 15.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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.

1. Specify the system of units for the simulation.

a. Click Modify system of Units.

b. Click Set to metric_cm/g/s/A+Celsius.

c. Click Upper level menu twice.

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).

2. Check for convergence in the listing file.

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.

Release 15.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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.

c. Perform the following steps in the details view of Contour 1:

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

Release 15.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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.

iii. Select VELOCITIES from the Variable drop-down list.

iv. Click Apply.

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.

Release 15.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
18 of ANSYS, Inc. and its subsidiaries and affiliates.
Step 5: Postprocessing

There are three reasons for this:

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.

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

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.

Release 15.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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:

Release 15.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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.

v. Set Range to User Specified.

vi. Enter 0 for Min and 1 for Max.

vii. Click Apply.

Figure 8.5: Contours of Species A

Release 15.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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.

Release 15.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
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).

Release 15.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 23
Release 15.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
24 of ANSYS, Inc. and its subsidiaries and affiliates.

You might also like