You are on page 1of 17

COMSOL (FEMLAB) TUTORIAL

Example 3 (MOMENTUM TRANSFER)

Consider two immiscible and viscous liquids A and B flowing at 27°C in the z-direction in a
horizontal thin slit of length 0.5 m and width 0.1 m under the influence of a pressure gradient.
Both liquids can be considered as incompressible. The inlet velocities are 25 cm/s and 45 cm/s
for A and B, respectively. Determine the corresponding velocity profile for each fluid.

Liquid Density Viscosity


(kg/m3) (Pa.s)
A 800 1.0

B 1200 0.4
Physical properties at 27°C

To simplify the analysis it is convenient to define two subdomains or regions. The first
subdomain comprises the liquid A phase and the second one the liquid B phase. Navier-Stokes
equation seems to be suitable to perform the simulation and therefore this equation needs to be
defined as an application mode within each subdomain. Boundary conditions are supposed to
be the same on the interface. The geometry of the system may be defined as follows.
Solution using Comsol Graphical User Interface.

1. In the Model Navigator we choose the


2D coordinate system given the
geometry of the system. In the same
window we must click on the Steady-
state analysis option of the application
mode Incompressible Navier-Stokes
in the folder Momentum balance
within the Chemical Engineering
Module. This application mode is to
determine the velocity profile of liquid
A and therefore the dependant
variables are to be called ua, va, pa,
which are the x and y components of
the velocity and the pressure of A,
respectively. Le us name this
application mode aph (from A phase).

2. Before clicking on OK, we must define


another application mode for the liquid
B phase and to do so the Multiphysics
mode must be activated by clicking on
the button Multyphisics located at the
bottom of the window Model
Navigator.
3. After clicking on this button the window Model
Navigator will change and a new button Add will
show up at the top of the right-hand side of this
window. The application mode just defined for A
must be included in the list of modes of the option
Multiphysics. This can be done by clicking on the
button Add.

We must be able to see the application mode aph


in the list and also the name of the dependant
variables we have defined in this mode.
4. The gasoline phase is to be solved using Navier-Stokes as well, but with different
dependant variables. For this mode we can use ub, vb and pb for the x and y components
of the velocity and the pressure, respectively. In addition, let us name this mode bph (for B
phase). After doing this, we must click one more time on the button Add to include this
application mode into our model.

5. Next, we must specify the geometry of the system. Let us draw two rectangles with a
common side and with the properties shown below.

Thus, the geometry of the model is defined by the following figure.


Each rectangle corresponds to one phase. R1 is for the A phase (the less dense fluid) and
R2 for the B phase (the more dense fluid).

6. Next, we must specify the physical properties of the fluids in each subdomain. The
currently active subdomain is indicated by a
black dot to the left of the name of the
application mode in the menu Multiphysics. To
change the active subdomain we just have to do
one click on the mode we want to activate.

To define the settings in the mode bph (which is currently active) we press the key F8. In
the window Subdomain Parameters we select the subdomain 1 (B is more dense) and
specify the properties of the fluid B as indicated below.
Subdomain 2 must be inactive for this mode. To deactivate this subdomain we select it in
the same window and clear the box Active this domain. After this, click OK.

7. To do the same with the other mode we must activate it. This can be done by clicking on its
name in the menu Multiphysics.

8. After pressing the key F8 we must be able to specify the active and inactive subdomains
and the physical properties for this application mode. Let us deactivate the subdomain 1 as
explained above.
In the subdomain 2 we specify the physical properties of the fluid A, as shown below.

9. After clicking OK we are ready to specify the boundary conditions. To do so, we must
press the key F7 and the windows Boundary Settings will show up. The active mode is aph
and therefore the
boundary conditions
will be defined for
this mode. In the
boundary 3 we must
specify the inlet
velocity, which is
assumed to have
only x-component.
To do this, we select
the option Inflow/
Outflow velocity
flow and type the
value of the
velocity.
Next, we select the
boundary 4 and
specify the velocity
which is supposed to
be the same for both
fluids at the
interface, this is, x
and y components
must be the same. It
is important to
mention at this point
that to avoid the
boundary to move
we must equal the y-
component of the
velocity at the
interface to 0.

The boundary 5 is
defined by the non-
slip condition.
Finally, in the
boundary 7 we must
specify the pressure.
To do this, we select
the option Outflow
/Pressure and type
the value of 0 for the
pressure. This value
makes sense if we use
relative pressure
instead of the absolute
one. The results
should be the same
although a zero value
reduces the
computation time.

10. Once we have entered


the boundary con-
ditions for the mode
aph we must click
OK and then activate
the mode bph to
repeat the same
procedure to set the
boundary conditions
for that mode.
To visualize the velocity profiles at each subdomain in the same plot we must define
subdomain expressions. Let us define U as the module of the velocity anywhere within our
system. This variable will be equal to sqrt(ub^2+vb^2) within the subdomain 1 and
sqrt(ua^2+va^2) within the subdomain 2. To do so, let us click on the option Subdomain
Expressions in the menu Options, as shown below.
In the window Subdomain Expressions we enter the expressions that define U, as follows.
Postprocessing

After running the model the following surface plot showing the velocity field of A will be
displayed.

To visualize both velocity fields, A and B, at the same time we must use the subdomain
expression just created. To do this, we press the key F12 to open the window Plot Parameters.
In this window we select the tab Surface and in the field Expression we type the name of the
subdomain expression, U, as shown below.
After clicking OK we should be able to visualize both velocity profiles as surface plots.

It is possible to visualize
the velocity fields using
arrows. To achieve this, let
us select the tab Arrow at
the top of the window Plot
Parameters. Next, we must
check the box Arrow plot
to activate this option and
then to specify any quantity
that we want to be
displayed this way. For our
case, let us select the
velocity field of A (aph).
We can also choose the
color of the arrows by
clicking on the button
Color.
The velocity field of A will be now displayed as shown below.

The velocity profile is obtained by using the option


Cross-Section Plot Parameters in the menu
Postprocessing.

Let us visualize the velocity profile in the


middle of the slit. To do this, we select the
tab Line/Extrusion and specify two points
to define this section. The values are
entered in the field Cross-section line
data. In the field Expression we type the
name of the subdomain expression U that
was defined earlier.
To add labels and title to our plot we select the tab General in the window Cross-Section Plot
Parameters and click on the button Title/Axis.

In doing so, the window Title/Axis Settings will show up. Now we can type the labels and title
for our graph.
Finally, we click OK and the velocity profile will be displayed as shown below.

You might also like