Introduction To CF D Module
Introduction To CF D Module
CFD Module
Introduction to the CFD Module
© 1998–2016 COMSOL
Protected by U.S. Patents listed on www.comsol.com/patents, and U.S. Patents 7,519,518; 7,596,474; 7,623,991;
8,457,932; 8,954,302; 9,098,106; 9,146,652; and 9,323,503. Patents pending.
This Documentation and the Programs described herein are furnished under the COMSOL Software License
Agreement (www.comsol.com/comsol-license-agreement) and may be used or copied only under the terms of the
license agreement.
COMSOL, the COMSOL logo, COMSOL Multiphysics, Capture the Concept, COMSOL Desktop, LiveLink, and
COMSOL Server are either registered trademarks or trademarks of COMSOL AB. All other trademarks are the
property of their respective owners, and COMSOL AB and its subsidiaries and products are not affiliated with,
endorsed by, sponsored by, or supported by those trademark owners. For a list of such trademark owners, see
www.comsol.com/trademarks.
Version: COMSOL 5.2a
Contact Information
Visit the Contact COMSOL page at www.comsol.com/contact to submit general inquiries, contact
Technical Support, or search for an address and phone number. You can also visit the Worldwide
Sales Offices page at www.comsol.com/contact/offices for address and contact information.
If you need to contact Support, an online request form is located at the COMSOL Access page at
www.comsol.com/support/case. Other useful links include:
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Aspects of CFD Simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
The CFD Module Physics Interfaces . . . . . . . . . . . . . . . . . . . . . . 11
Physics Interface Guide by Space Dimension and Study Type . . . 18
Tutorial Example—Backstep . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Model Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Domain Equations and Boundary Conditions . . . . . . . . . . . . . . . . . 25
Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Tutorial Example—Water Purification Reactor . . . . . . . . . . . . . 34
Model Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Domain Equations and Boundary Conditions . . . . . . . . . . . . . . . . . 35
Notes About the Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Reference. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
|3
4|
Introduction
The CFD Module is used by engineers and scientists to understand, predict, and
design for fluid flow in closed and open systems. At a given cost, these types of
simulations typically lead to new and better products and improved operations of
devices and processes compared to purely empirical studies involving fluid flow.
As a part of an investigation, simulations give accurate estimates of flow patterns,
pressure losses, forces on submerged objects, temperature distributions, and
variations in fluid composition within a system.
Figure 1: Flow ribbons and velocity field magnitudes from a simulation of an Ahmed body. The simulation
yields the flow and pressure fields and calculates the drag coefficient as a benchmark for the verification
and validation of turbulence models.
|5
The physics interfaces build on conservation laws for momentum, mass, and
energy. These laws are expressed in terms of partial differential equations, which
are solved by the module together with the specified initial and boundary
conditions. The equations are solved using stabilized finite element formulations
for fluid flow, in combination with damped Newton methods and, for
time-dependent problems, different time-dependent solver algorithms. The
results are presented in the graphics window through predefined plots relevant for
CFD, expressions of physical quantities that you can freely define, and derived
tabulated quantities (for example, average pressure on a surface or drag
coefficients) obtained from a simulation.
The workflow in the CFD Module is quite straightforward and is described by the
following steps: define the geometry, select the fluid to be modeled, select the type
of flow, define boundary and initial conditions, define the finite element mesh,
select a solver, and visualize the results. All these steps are accessed from the
COMSOL Desktop. The mesh and solver steps are usually carried out
automatically using default settings that are tuned for each specific Fluid Flow
interface.
The CFD Module’s application library describes the Fluid Flow interfaces and
their different features through tutorial and benchmark examples for the different
types of flow. Here you find models of industrial equipment and devices, tutorials
for practice, and benchmark applications for verification and validation of the
Fluid Flow interfaces. Go to Tutorial Example—Backstep for information on how
to access these resources.
This introduction is intended to give you an accelerated start in CFD application
building. It contains examples of the typical use of the module, a list of all the
Fluid Flow interfaces including a short description of each, and two tutorial
examples, Tutorial Example—Backstep and Tutorial Example—Water Purification
Reactor, to introduce the workflow.
6|
characteristics of such regions are determined by the Reynolds number.
Eventually, for very large values of the Reynolds number, the flow becomes fully
turbulent. In contrast to laminar flow at high Reynolds numbers, viscous
dissipation is active everywhere in a turbulent flow field but acts on very small flow
structures. The energy is transfered from the large-scale flow structures to the
small-scale flow structures through a cascade of eddies. Due to the requirement of
resolving all these flow scales, direct numerical simulation of industrially relevant
turbulent flows is currently not a feasible approach. Instead, turbulence models are
applied when analyzing these flows. For very small values of the Reynolds number
the CFD Module offers the Creeping Flow interface; for intermediate values, the
Laminar Flow interface; and for large values, the Turbulent Flow interfaces.
The Mach number expresses the ratio of the speed of the fluid to the speed of
sound of the flowing medium. This dimensionless number measures the relevance
of compressible effects in the flow field, predicting occurrences of shock waves and
rarefaction waves. For Mach numbers greater than 0.3, the laminar and turbulent
High Mach Number Flow interfaces are available.
Temperature variations caused by heat transfer, compression work, or work done
by friction forces result in an inhomogeneous density field which may trigger
thermal convection. The significance of thermally induced buoyancy forces in the
momentum equation is characterized by the ratio of the Grashof number to the
square of the Reynolds number (for large Reynolds numbers), or of the Grashof
number to the Reynolds number (for small Reynolds numbers). For
non-vanishing values of this ratio, the Non-Isothermal Flow interfaces are
available.
You can use the Two-Phase Flow interfaces in the Multiphase Flow branch to
model moving, deformable interfaces separating two different fluids. The other
physics interfaces in this branch are mainly intended for modeling suspensions of
many particles, droplets or bubbles. Among the latter, the Euler-Euler Model
interface is able to handle high concentration levels with frequent collisions, as
well as transients in the relative velocity between the phases (that is, non-vanishing
ratios of the particle relaxation time to the macroscopic flow time-scale). For
reacting flow and flow in porous media, the Chemical Species Transport, and
Porous Media and Subsurface Flow branches are available.
Contrary to experimental analyses, which are most often performed in a laboratory
where measurements are limited to a small number of points, a CFD simulation
gives the “big picture” view of the flow field. A qualitative interpretation of the
flow and pressure fields is usually the first step toward creating or improving a
design.
Figure 2 shows the flow field around a solar panel. The presence of a wake in front
of the panel, caused by another panel in the solar power plant, may induce lift
forces that would not be present if the panel were analyzed alone.
|7
Three-dimensional graphics such as surface, streamline, ribbon, arrow, and
particle-tracing plots, as well as animations that include any combination of the
aforementioned features, are examples of tools you can use for qualitative studies.
Figure 2: Turbulent fluid flow around a solar panel solved using the CFD Module.
In addition to the qualitative “big picture” view, simulations performed with the
CFD Module give accurate quantitative estimates of properties of the flow field,
such as the average flow at a given pressure difference, the drag and lift coefficients
of bodies subjected to a flow, or the air quality in a ventilated room.
In Figure 3 and Figure 4, the pressure losses are estimated for a nozzle used in
medical devices. The shear stresses and fluid forces in the nozzle system may
damage blood cells in medical equipment, and must be accounted for when
controlling the flow.
8|
Figure 3: Pressure field and flow field in a model of a nozzle relevant for designs in medical applications.
Figure 4: Pressure difference between inlet and outlet at various average flow rates through the nozzle.
|9
The CFD Module has a vast range of tools for evaluating quantitative results. For
example, it comes with built-in functionality for evaluating surface and volume
averages, maximum and minimum values, and derived values (functions and
expressions of the solution), as well as for generating tables and x-y plots. Derived
values such as drag and lift coefficients and other values relevant for CFD are
predefined in the module.
Qualitative studies typically form the basis for understanding, which in turn can
spark new ideas. These ideas can then lead to significant improvements to products
and processes, often in quantum leaps. Quantitative studies, on the other hand,
form the basis for optimization and control, which can also greatly improve
products and processes but usually do so through a series of many smaller steps.
10 |
The CFD Module Physics Interfaces
The Fluid Flow interfaces in this module are based on the laws for conservation of
momentum, mass, and energy in fluids. The different flow models contain
different combinations and formulations of the conservation laws that apply to the
physics of the flow field. These laws of physics are translated into partial differential
equations and are solved together with the specified initial and boundary
conditions.
A physics interface defines a number of features. These features are used to specify
the fluid properties, boundary conditions, initial conditions, and possible
constraints. Each feature represents an operation describing a term or condition in
the conservation equations. Such a term or condition can be defined on a
geometric entity of the component, such as a domain, boundary, edge (for 3D
components), or point.
Figure 5 shows the Model Builder, including a Laminar Flow interface, and the
Settings window for the selected Fluid Properties 1 feature node. The Fluid
Properties 1 node adds the marked terms to the component equations in a
selected geometric domain. Furthermore, the Fluid Properties 1 feature may link
to the Materials feature node to obtain physical properties such as density and
dynamic viscosity, in this case the fluid properties of water. The fluid properties,
defined by the Water, liquid material, can be functions of the modeled physical
quantities, such as pressure and temperature. In the same way, the Wall 1 node
adds the boundary conditions at the walls of the fluid domain.
| 11
Figure 5: The Model Builder including a Laminar Flow interface (left), and the Settings window for Fluid
Properties for the selected feature node (right). The Equation section in the Settings window shows the
component equations and the terms added by the Fluid Properties 1. The added terms are underlined
with a dotted line. The arrows also explain the link between the Materials node and the values for the
fluid properties.
The CFD Module includes a large number of Fluid Flow interfaces for different
types of flow. It also includes Chemical Species Transport interfaces for reacting
flows in multicomponent solutions, and physics interfaces for heat transfer in
solids, fluids, and porous media found under the Heat Transfer branch.
12 |
Figure 6 shows the Fluid Flow interfaces as they are displayed when you add a
physics interface (see also Physics Interface Guide by Space Dimension and Study
Type for further information). A short description of the physics interfaces follows.
Figure 6: The physics interfaces for the CFD Module as shown in the Model Wizard.
| 13
Mach 0.3). The Laminar Flow interface also allows for simulation of
non-Newtonian flow.
The physics interfaces under the Turbulent Flow branch ( ) model flows at high
Reynolds numbers. These physics interfaces solve the Reynolds-averaged
Navier-Stokes (RANS) equations for the averaged velocity and pressure fields. The
turbulent flow interfaces provide different options for modeling the turbulent
viscosity. There are several turbulence models available—two algebraic turbulence
models, the Algebraic yPlus and L-VEL models, and five transport-equation
models, including a standard k-ε model, a k-ω model, an SST (Shear Stress
Transport) model, a low Reynolds number k-ε model and the Spalart-Allmaras
model. Similarly to the Laminar Flow interface, incompressible flow is selected by
default.
The Algebraic yPlus and L-VEL turbulence models are so-called enhanced
viscosity models. A turbulent viscosity is computed from the local distance to the
nearest wall. For this reason, the algebraic turbulence models are best suited for
internal flows, such as in electronic cooling applications. Algebraic turbulence
models are computationally economical, and more robust but, in general, less
accurate than transport-equation models. Among the transport-equation
turbulence models, the standard k-ε model is the most widely used since it often
is a good compromise between accuracy and computational cost (memory and
CPU time). The k-ω model is an alternative to the standard k-ε model and often
gives more accurate results, especially in recirculation regions and close to solid
walls. However, the k-ω model is also less robust than the standard k-ε model. The
SST model combines the robustness of the k-ε model with the accuracy of the k-ω
model, making it applicable to a wide variety of turbulent flows. The Low
Reynolds number k-ε model is more accurate than the standard k-ε model,
especially close to walls. The Spalart-Allmaras model is specifically designed for
aerodynamic applications, such as flow around wing profiles, but is also widely
used in other applications due to its high robustness and decent accuracy. Higher
resolution is needed in the near-wall region for the SST model, the Low Reynolds
number k-ε model, and the Spalart-Allmaras model. Thus, the better accuracy
provided by these models comes at a higher computational cost.
The Creeping Flow interface ( ) approximates the Navier-Stokes equations for
very low Reynolds numbers. This is often referred to as Stokes flow and is
applicable when viscous effects are dominant, such as in very small channels or
microfluidics devices.
The Rotating Machinery interfaces ( ) are applicable to fluid-flow problems
where one or more of the boundaries rotate, for example in mixers and around
propellers. The physics interfaces support incompressible, weakly compressible
and compressible (Mach < 0.3) flows, laminar Newtonian and non-Newtonian
14 |
flows, and turbulent flow using the standard k-ε model or either of the two
algebraic turbulence models (Algebraic yPlus or L-VEL).
M ULTIPHASE F LOW
The physics interfaces under the Bubbly Flow branch ( ) model two-phase flow
where the fluids form a gas-liquid mixture, and the content of the gas is less than
10%. There is support for both laminar flow and turbulent flow using an extended
version of the k-ε turbulence model that accounts for bubble-induced turbulence.
For laminar flow, the physics interface supports non-Newtonian liquids. The
Bubbly Flow interfaces also allow for mass transfer between the two phases.
The physics interfaces under the Mixture Model branch ( ) are similar to the
Bubbly Flow interfaces but assume that the dispersed phase consists of solid
particles or liquid droplets. The continuous phase has to be a liquid. There is
support for both laminar flow and turbulent flow using the k-ε turbulence model.
The Mixture Model interfaces also allow for mass transfer between the two phases.
The Euler-Euler Model interface ( ) for two-phase flow is able to handle the
same cases as the Bubbly Flow and Mixture Model interfaces, but is not limited to
low concentrations of the dispersed phase. In addition, the Euler-Euler Model
interface can handle large differences in density between the phases, such as the
case of solid particles in air. This makes the model suitable for simulations of, for
example, fluidized beds. There is support for both laminar flow and turbulent flow
using either a mixture or phase-specific k-ε turbulence model.
The Two-Phase Flow, Level Set interface ( ) and the Two-Phase Flow, Phase
Field interface ( ) are both primarily applied to model two fluids separated by a
fluid-fluid interface. The moving interface is tracked in detail using the level-set
method and the phase-field method, respectively. Similarly to other Fluid Flow
interfaces, these physics interfaces support both incompressible and compressible
(Mach < 0.3) flows. They support laminar flow and Stokes flow, where one or
both fluids can be non-Newtonian. The physics interfaces also support turbulent
flow, using the standard k-ε turbulence model.
The Laminar Three-Phase Flow, Phase Field interface ( ) models laminar flow
of three incompressible phases which may be either Newtonian or
non-Newtonian. The moving fluid-fluid interfaces between the three phases are
tracked in detail using the phase-field method.
N ONISOTHERMAL F LOW
The Non-Isothermal Flow, Laminar Flow interface ( ) is primarily applied to
model flow at low to intermediate Reynolds numbers in situations where the
temperature and flow fields have to be coupled. A typical example is natural
convection, where thermal buoyancy forces drive the flow. This is a multiphysics
| 15
interface for which the component couplings between fluid flow and heat transfer
are set up automatically.
The Non-Isothermal Flow, Turbulent Flow interfaces ( ) solve the
Reynolds-Averaged Navier-Stokes (RANS) equations coupled to heat transfer in
fluids and in solids. There is support for all the fluid-flow turbulence models – the
Algebraic yPlus model, the L-VEL model, the standard k-ε model, a k-ω model,
an SST model, a low Reynolds number k-ε model, and the Spalart-Allmaras
model.
The Conjugate Heat Transfer interfaces ( ) are also included with the CFD
Module and are almost identical to the Non-Isothermal Flow interfaces. They only
differ in the default domain feature selected -Heat transfer in Solids instead of
Fluid.
16 |
The Free and Porous Media Flow interface ( ) models porous media containing
open channels connected to the porous media, such as in fixed-bed reactors and
catalytic converters.
R EACTING F LOW
The Laminar Flow interface ( ) under the Reacting Flow branch combines the
functionality of the Single-Phase Flow and Transport of Concentrated Species
interfaces. The physics interface is primarily applied to model flow at low to
intermediate Reynolds numbers in situations where the mass transport and flow
fields have to be coupled. is primarily applied to model flow at low to intermediate
Reynolds numbers in situations where the temperature and flow fields have to be
coupled
The Turbulent Flow interfaces ( ) under the Reacting Flow branch apply the
Reynolds-Averaged Navier-Stokes (RANS) equations together with the
functionality in the Transport of Concentrated Species interface. They model mass
and momentum transport in turbulent reacting fluid flow. The supported RANS
models comprise of the standard k-ε model, a k-ω model, and a low Reynolds
number k-ε model.
| 17
Physics Interface Guide by Space Dimension and Study Type
18 |
PHYSICS INTERFACE ICON TAG SPACE AVAILABLE PRESET STUDY
DIMENSION TYPE
Fluid Flow
Single-Phase Flow
| 19
PHYSICS INTERFACE ICON TAG SPACE AVAILABLE PRESET STUDY
DIMENSION TYPE
Bubbly Flow
20 |
PHYSICS INTERFACE ICON TAG SPACE AVAILABLE PRESET STUDY
DIMENSION TYPE
| 21
PHYSICS INTERFACE ICON TAG SPACE AVAILABLE PRESET STUDY
DIMENSION TYPE
Turbulent Flow
22 |
PHYSICS INTERFACE ICON TAG SPACE AVAILABLE PRESET STUDY
DIMENSION TYPE
Moving Interface
| 23
PHYSICS INTERFACE ICON TAG SPACE AVAILABLE PRESET STUDY
DIMENSION TYPE
24 |
Tutorial Example—Backstep
Model Geometry
The model consists of a pipe connected to a block-shaped duct (see Figure 7).
Due to symmetry, it is sufficient to model one eighth of the full geometry.
Wall
Outlet
Symmetry
Wall
Inlet
Symmetry
| 25
condition at the outlet sets a constant relative pressure. Furthermore, the vertical
and inclined boundaries along the length of the geometry are symmetry
boundaries. All other boundaries are solid walls described by a no-slip boundary
condition.
Results
Figure 8 shows a combined surface and arrow plot of the flow velocity. This plot
does not reveal the recirculation region in the duct immediately beyond the inlet
pipe’s end. For this purpose, a streamline plot is more useful, as shown in Figure 9.
26 |
Figure 9: The recirculation region visualized using a velocity streamline plot.
The following instructions show how to set up the model, solve it, and reproduce
these plots.
M o d e l W i z a rd
The first step to build an application is to open COMSOL, then select the physics
interface and specify the type of analysis you want to do—in this case, a stationary,
Laminar Flow analysis.
Note: These instructions are for the user interface on Windows but also apply,
with minor differences, to Linux and Mac.
1 To open the software, double-click the COMSOL icon on the desktop. When
the software opens, you can choose to use the Model Wizard to create a new
COMSOL application or Blank Model to create one manually. For this tutorial,
click the Model Wizard button.
The Model Wizard guides you through the first steps of setting up an
application. If COMSOL is already open, you can start the Model Wizard by
selecting New from the File menu and then clicking Model Wizard .
The next window lets you select the dimension of the modeling space.
| 27
2 In the Select Space Dimension window click the 3D button .
3 In the Select Physics tree under Fluid Flow>Single-Phase Flow click
Laminar Flow (spf) .
4 Click Add and then click the Study button .
5 In the tree under Preset Studies, click Stationary .
6 Click the Done button .
The first task is to define a parameter for the inlet velocity. Then you will use this
parameter to run a parametric study.
1 On the Home toolbar click Parameters .
Note: On Linux and Mac, the Home toolbar refers to the specific set of controls
near the top of the Desktop.
2 In the Settings window for Parameters locate the Parameters section. In the
table enter the following settings:
- In the Name text field, enter v0
- In the Expression text field, enter 1[cm/s]
- In the Description text field, enter Inlet velocity
Geometr y 1
You can build the backstep geometry from geometric primitives. Here, instead use
a file containing the sequence of geometry features that has been provided for
convenience.
Note: The location of the file used in this exercise varies based on your
installation. For example, if the installation is on your hard drive, the file path
might be similar to
C:\Program Files\COMSOL\COMSOL52a\Multiphysics\applications\.
28 |
2 Browse to the applications library folder and double-click the file
\CFD_Module\Single-Phase_Tutorials\backstep_geom_sequence.mph.
3 Go to the Home toolbar and click Build All .
The geometry sequence is now inserted into your component and should look like
the geometry in Figure 7.
Mate rials
L a m i n a r F l ow
Inlet 1
1 On the Physics toolbar click Boundaries and choose Inlet .
2 Select Boundary 1, which represents the inlet.
| 29
3 Under Boundary Condition from the
Boundary condition list, select Laminar
inflow.
4 Under Laminar Inflow in the Uav text field,
type v0 (which you defined as a Global
Parameter).
Symmetry 1
1 On the Physics toolbar click
Boundaries and choose Symmetry .
2 Select Boundaries 2 and 3 only.
Outlet 1
1 On the Physics toolbar click
Boundaries and choose Outlet .
The default outlet condition specifies a zero relative pressure.
2 Go to the Settings window for Outlet. Select Boundary 7 only.
3 On the Settings window for Outlet, locate the Pressure Conditions section.
Select the Normal flow check box.
The sequence of nodes in the Model Builder under Laminar Flow should match
the figure. The ‘D’ in the upper left corner of a node means it is a default node.
30 |
Me sh 1
The figure below shows the boundary layer mesh at the walls. Zoom in to the
mesh using the zoom function on the Graphics toolbar to confirm that it
matches the figure.
| 31
Study 1
Results
Two plots are automatically created, one slice plot for the velocity and one
pressure contour plot on the wall.
Velocity (spf)
1 In the Model Builder under Results , expand the Velocity (spf) node.
2 Right-click Slice 1 and choose Delete. Click Yes.
3 Go to the Velocity (spf) toolbar and click Surface .
4 On the Velocity (spf) toolbar, click Arrow Surface .
5 Go to the Settings window for Arrow Surface.
- Under Coloring and Style from the Arrow length list, select Logarithmic.
- From the Color list, select Yellow.
6 Click the Plot button followed by the Zoom Extents button on the
Graphics window toolbar.
The plot in Figure 8 displays in the Graphics window.
To see the recirculation effects, create a streamline plot of the velocity field.
32 |
3D Plot Group 3
1 On the Home toolbar click Add Plot Group and choose
3D Plot Group .
2 Go to the 3D Plot Group 3 toolbar and click Streamline .
3 In the 3D Plot Group Settings window, scroll to the Selection section, and click
the Active button next to the Selection list.
4 Select Boundary 1 (the inflow boundary) only.
5 In the Settings window for Streamline locate the Coloring and Style section.
From the Line type list, choose Tube.
6 Right-click Streamline 1 and choose Color Expression .
| 33
Tutorial Example—Water Purification Reactor
Water purification is a multiple step process for turning natural water into drinking
water. At least one step must be a disinfectant step. One way to achieve efficient
disinfection in an environmentally friendly way is to use ozone. A typical ozone
purification reactor is about 40 m long and resembles a mace with partial walls or
baffles that divide the space into room-sized compartments (Ref. 1). When water
flows through the reactor, turbulent flow is created along its winding path around
the baffles towards the exit pipe. The turbulence mixes the water with ozone gas,
which enters through diffusers just long enough to inactivate micro-pollutants.
When the water leaves the reactor, the remaining purification steps filter off or
otherwise remove the reacted pollutants.
In analyzing an ozone purification reactor, the first step is to get an overview of
the turbulent flow field. The results from the turbulent-flow simulation can then
be used for further analyses of residence time and chemical species transport and
reactions. This requires adding more physics features to the model. The current
application solves for turbulent flow in a water treatment reactor using the
Turbulent Flow, k-ε interface.
34 |
Model Geometry
The model geometry along with some boundary conditions is shown in Figure 10.
The full reactor has a symmetry plane, which is utilized to reduce the size of the
component.
Symmetry
Outlet
Inlet
Figure 10: Model geometry. All boundaries except the inlet, outlet and symmetry plane are walls.
Here ν is the kinematic viscosity. The high Reynolds number clearly indicates that
the flow is turbulent and a turbulence model must be applied. In this case, you will
use the k-ε model. It is commonly used in industrial applications, because it is both
relatively robust and computationally inexpensive compared to more advanced
turbulence models. One major reason the k-ε model is inexpensive is that it
employs wall functions to describe the flow close to walls instead of resolving the
very steep gradients there. All boundaries are walls in Figure 10 except the inlet,
the outlet, and the symmetry plane.
| 35
The inlet velocity is prescribed as a plug flow profile. The turbulent intensity is set
to 5 % and the turbulent length scale is specified according to Table 3-5 in Theory
for the Turbulent Flow Interfaces in the CFD Module User’s Guide. A constant
pressure is prescribed on the outlet.
Results
The velocity field in the symmetry plane is shown in Figure 11. The jet from the
inlet hits the top of the first baffle, which splits the jet. One half creates a strong
recirculation zone in the first “chamber”. The other half continues downstream
into the reactor and gradually spreads out. The velocity magnitude decreases as
more fluid is entrained into the jet.
36 |
Figure 12 gives a more complete picture of the mixing process in the reactor. The
streamlines are colored by the velocity magnitude, and their widths are
proportional to the turbulent viscosity. Wide lines hence indicate a high degree of
mixing. The turbulence in this model is mainly produced in the shear layers
between the central jet and the recirculation zones. The mixing can be seen to be
relatively weak near the entrance to the reactor and to increase further
downstream.
Figure 12: Streamlines colored by velocity. The width of the streamlines is proportional to the turbulent
viscosity.
Reference
1. http://www.comsol.com/stories/hofman_water_purification/full/
M o d e l W i z a rd
The first step to build an application is to open COMSOL, then select the physics
interface and specify the type of analysis you want to do—in this case, a stationary,
Turbulent Flow, k-ε analysis.
| 37
1 Open COMSOL Multiphysics. On the New page click Model Wizard .
Then click the 3D button .
2 In the Select Physics tree under Fluid Flow>Single-Phase Flow>Turbulent
Flow, click Turbulent Flow, k-ε (spf) .
3 Click Add and then click the Study button
4 In the tree under Preset Studies, click Stationary .
5 Click the Done button .
The first task is to define a parameter for the inlet velocity. Parameters can be used
to run parametric studies.
1 On the Home toolbar click Parameters .
The Home toolbar refers to the specific set of controls near the top of the
Desktop.
2 Go to the Settings window for Parameters. In the table, enter the following
settings:
- In the Name text field, enter u_in
- In the Expression text field, enter 0.1[m/s]
- In the Description text field, enter Inlet velocity
Geometr y 1
You can build the reactor geometry from geometric primitives. Here, instead use
a file containing the sequence of geometry features that has been provided for
convenience.
Note: The location of the file used in this exercise varies based on your
installation. For example, if the installation is on your hard drive, the file path
might be similar to
C:\Program Files\COMSOL\COMSOL52a\Multiphysics\applications\.
38 |
2 Browse to the applications library folder and double-click the file
\CFD_Module\Single-Phase_Tutorials\water_purification_reactor
_geom_sequence.mph.
3 On the Home toolbar click Build All .
The geometry sequence is now inserted into your component and should look like
the figure below.
Mate rials
| 39
Tu r b u l e n t F l ow, k -ε
Inlet 1
1 On the Physics toolbar click Boundaries and choose Inlet .
2 Select Boundary 1, which represents the inlet.
3 In the Settings window for Inlet locate the
Velocity section. In the U0 text field, type
u_in.
4 Locate the Turbulence Conditions
section. In the LT text field, type
0.07*0.4[m] where 0.4[m] is the
diameter of the inlet (see Inlet Values for
the Turbulence Length Scale and
Intensity).
Symmetry 1
1 On the Physics toolbar click
Boundaries and choose Symmetry .
2 Select Boundary 3 only.
Outlet 1
1 On the Physics toolbar click Boundaries and choose Outlet .
2 Select Boundary 28 only.
The sequence of nodes in the Model Builder under
Turbulent Flow, k-ε should match the figure. The ‘D’ in
the upper left corner of a node means it is a default node.
All boundaries not selected in Inlet 1, Symmetry 1, or
Outlet 1 now have the default wall condition.
Me sh 1
40 |
1 In the Model Builder under Component 1 click Mesh 1 .
2 In the Settings window for Mesh, from the Element size list, choose Coarser.
Size 1
1 Go to the Mesh toolbar and click Edit .
A mesh sequence as shown below appears. It contains suggestions made by the
physics interface. The asterisk on each of the mesh features indicates that the
features are not yet built.
| 41
Study 1
Next, solve for the flow field. This takes approximately 15 minutes on a quad-core
desktop computer.
1 On the Home toolbar click Compute .
When Compute is selected, COMSOL automatically chooses a suitable solver for
the problem.
Results
Three plots are automatically created, one slice plot for the velocity, one pressure
contour plot on the walls and one boundary plot of the wall lift-off in viscous units
for the wall functions. The last one is important since it gives an indication of how
well resolved the flow is at the walls. See Theory for the Turbulent Flow Interfaces
in the CFD Module User’s Guide for further details on wall functions.
The following steps reproduce Figure 11.
First, create a data set that corresponds to the non-wall boundaries.
42 |
Data Sets
1 On the Results toolbar click More Data Sets and choose Surface .
2 Select Boundaries 1, 3, and 28 only which correspond to the non-wall
boundaries.
Velocity (spf)
1 In the Model Builder expand the Results>Velocity (spf) node.
2 Right-click Slice 1 and choose Disable .
3 In the Model Builder click Velocity (spf) .
4 In the Settings window for 3D Plot Group locate the Data section. From the
Data set list, choose Surface 2.
5 On the Velocity (spf) toolbar click Surface .
6 In the Settings window for Surface locate the Data section. From the Data set
list, choose Exterior Walls.
7 Locate the Coloring and Style section.
- From the Coloring list, choose Uniform.
- From the Color list, choose Gray.
8 On the Velocity (spf) toolbar click Surface to generate a surface plot of the
velocity magnitude.
9 On the Velocity (spf) toolbar click Arrow Surface .
10In the Settings window for Arrow Surface
locate the Coloring and Style section.
- From the Arrow length list, choose
Logarithmic.
- Select the Scale factor check box. In the
associated text field, type 1.4.
- In the Number of arrows text field, type
300.
- From the Color list, choose White.
| 43
13Click the Plot button .
3D Plot Group 4
1 On the Home toolbar click Add Plot Group and choose 3D Plot
Group .
2 In the Model Builder right-click 3D Plot Group 4 and choose Paste
Surface .
3 On the 3D Plot Group 4 toolbar click Streamline .
4 In the Settings window for Streamline go to the Selection section and click the
Active button next to the Selection list.
5 Select Boundary 1 which is the inlet. The streamlines now start at this boundary.
44 |
6 In the Settings window for Streamline:
- Locate the Streamline Positioning
section. In the Number text field,
type 45.
- Locate the Coloring and Style
section. From the Line type list,
choose Ribbon.
- In the Width expression text field,
type spf.nuT*1[s/m]. The width of
the streamlines is set to the local value
of the turbulent viscosity and the
factor 1[s/m] is used to get the right
dimension.
- Select the Width scale factor check
box. In the associated text field, type
100.
| 45
11On the 3D Plot Group 4 toolbar click Plot .
46 |