Pipe Flow Module Users Guide
Pipe Flow Module Users Guide
Users Guide
VERSION 4.3
pipe_ug.book Page 1 Monday, April 23, 2012 5:04 PM
Contact Information
Visit www.comsol.com/contact for a searchable list of all COMSOL offices and local
representatives. From this web page, search the contacts and find a local sales
representative, go to other COMSOL websites, request information and pricing, submit
technical support queries, subscribe to the monthly eNews email newsletter, and much
more.
C o n t e n t s
Chapter 1: Introduction
CONTENTS |3
pipe_ug.book Page 4 Monday, April 23, 2012 5:04 PM
Pump . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
T-Junction . . . . . . . . . . . . . . . . . . . . . . . . . 31
C h a p t e r 3 : T h e H e a t Tr a n s f e r B r a n c h
CONTENTS |4
pipe_ug.book Page 5 Monday, April 23, 2012 5:04 PM
C h a p t e r 4 : T h e C h e m i c a l S p e c i e s Tr a n s p o r t B r a n c h
CONTENTS |5
pipe_ug.book Page 6 Monday, April 23, 2012 5:04 PM
Fluid . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Chapter 6: Materials
6 | CONTENTS
pipe_ug.book Page 7 Monday, April 23, 2012 5:04 PM
Introduction
This guide describes the Pipe Flow Module, an optional add-on package for
COMSOL Multiphysics designed to model and simulate incompressible flow, heat
and mass transfer in pipes and channels with the Pipe Flow physics. Compressible
hydraulic transients and acoustics waves can also be modeled using the Water
Hammer physics and Pipe Acoustics physics, respectively. The Pipe Flow module
can address problems involving flow velocity, pressure, temperature and sound
waves in cooling systems, ventilation systems, pipe systems in the chemical
processing industry, and pipelines in the oil and gas industry.
This chapter introduces you to the capabilities of this module. A summary of the
physics interfaces and where you can find documentation and model examples is
also included. The last section is a brief overview with links to each chapter in this
guide.
In this chapter:
7
pipe_ug.book Page 8 Monday, April 23, 2012 5:04 PM
In common for pipes and channels that can be modeled is that the pipe length is large
enough so that the flow inside can be considered fully developed. Piping components
such as bends, valves, T-junctions, contractions/expansions and pumps are also
available in the module.
The Pipe Flow physics computes the pressure and velocity field in isothermal pipe
systems.
The Heat Transfer in Pipes physics computes the energy balance in pipe systems
but receives the flow field as a value or as a known solved field. Wall heat transfer to
the surroundings is included.
The Transport of Diluted Species in Pipes physics solves a mass balance equation
for pipes in order to compute the concentration distribution of a solute in a dilute
solution, considering diffusion, dispersion, convection, and chemical reactions.
The Non-Isothermal Pipe Flow physics is a multiphysics interface that solves the
flow, pressure, and temperature simultaneously and fully coupled.
8 | CHAPTER 1: INTRODUCTION
pipe_ug.book Page 9 Monday, April 23, 2012 5:04 PM
The Reacting Pipe Flow physics is a multiphysics interface that solves the flow,
pressure, temperature, and reacting species transport simultaneously and fully
coupled.
The Water Hammer physics solves rapid hydraulic transients in pipe systems, taking
the elastic properties of both the fluid and pipe wall into account.
The Pipe Acoustics, Transient physics models sound waves in flexible pipe systems.
The physics in the module define the conservation of momentum, energy, and mass of
an fluid inside a pipe or channel system. The flow, pressure, temperature, and
concentration fields across the pipe cross sections are modeled as cross-section
averaged quantities, which only vary along the length of the pipes and channels. The
pressure losses along the length of a pipe or in a pipe component are described using
friction factor expressions. A broad range of built-in expressions for Darcy friction
factors are used that cover the entire flow regime from laminar to turbulent flow,
Newtonian and non-Newtonian fluids, different cross-sectional geometries, and a wide
range of relative surface roughness values. In addition to the continuous frictional
pressure drop along pipe stretches, pressure drops due to momentum changes in
components such as bends, contractions, expansions, T-junctions and valves are
computed through an extensive library of industry standard loss coefficients. Pumps
are also available as components.
Acoustics
Acoustic-Structure Interaction
Fluid Flow
Single-Phase Flow
To display additional features for the physics interfaces and feature nodes, click the
Show button ( ) on the Model Builder and then select the applicable option.
10 | CHAPTER 1: INTRODUCTION
pipe_ug.book Page 11 Monday, April 23, 2012 5:04 PM
After clicking the Show button ( ), some sections display on the settings window
when a node is clicked and other features are available from the context menu when a
node is right-clicked. For each, the additional sections that can be displayed include
Equation, Advanced Settings, Discretization, Consistent Stabilization, and Inconsistent
Stabilization.
You can also click the Expand Sections button ( ) in the Model Builder to always show
some sections or click the Show button ( ) and select Reset to Default to reset to
display only the Equation and Override and Contribution sections.
For most physics nodes, both the Equation and Override and Contribution sections are
always available. Click the Show button ( ) and then select Equation View to display
the Equation View node under all physics nodes in the Model Builder.
Availability of each feature, and whether it is described for a particular physics node, is
based on the individual physics selected. For example, the Discretization, Advanced
Settings, Consistent Stabilization, and Inconsistent Stabilization sections are often
described individually throughout the documentation as there are unique settings.
Show More Options and Showing and Expanding Advanced Users Guide
Expand Sections Physics Sections
The Model Builder Window
Discretization Show Discretization Users Guide
Element Types and Discretization
Finite Elements Reference Guide
Discretization of the Equations
Discretization - Splitting Compile Equations Reference Guide
of complex variables
Pair Selection Identity and Contact Pairs Users Guide
Specifying Boundary Conditions for
Identity Pairs
Consistent and Show Stabilization Users Guide
Inconsistent Stabilization
Stabilization Techniques Reference Guide
Numerical Stabilization
If you are reading the documentation as a PDF file on your computer, the
blue links do not work to open a model or content referenced in a
different users guide. However, if you are using the online help in
Important COMSOL Multiphysics, these links work to other modules, model
examples, and documentation sets.
THE DOCUMENTATION
The COMSOL Multiphysics Users Guide and COMSOL Multiphysics Reference
Guide describe all interfaces and functionality included with the basic COMSOL
Multiphysics license. These guides also have instructions about how to use COMSOL
Multiphysics and how to access the documentation electronically through the
COMSOL Multiphysics help desk.
and then either enter a search term or look under a specific module in the
documentation tree.
12 | CHAPTER 1: INTRODUCTION
pipe_ug.book Page 13 Monday, April 23, 2012 5:04 PM
as MPH-files that you can open for further investigation. You can use the step-by-step
instructions and the actual models as a template for your own modeling and
applications.
SI units are used to describe the relevant properties, parameters, and dimensions in
most examples, but other unit systems are available.
To open the Model Library, select View>Model Library ( ) from the main menu, and
then search by model name or browse under a module folder name. Click to highlight
any model of interest, and select Open Model and PDF to open both the model and the
documentation explaining how to build the model. Alternatively, click the Dynamic
Help button ( ) or select Help>Documentation in COMSOL to search by name or
browse by module.
The model libraries are updated on a regular basis by COMSOL in order to add new
models and to improve existing models. Choose View>Model Library Update ( ) to
update your model library to include the latest versions of the model examples.
If you have any feedback or suggestions for additional models for the library (including
those developed by you), feel free to contact us at [email protected].
To receive technical support from COMSOL for the COMSOL products, please
contact your local COMSOL representative or send your questions to
[email protected]. An automatic notification and case number is sent to you by
email.
Typographical Conventions
All COMSOL users guides use a set of consistent typographical conventions that make
it easier to follow the discussion, understand what you can expect to see on the
graphical user interface (GUI), and know which data must be entered into various
data-entry fields.
CONVENTION EXAMPLE
14 | CHAPTER 1: INTRODUCTION
pipe_ug.book Page 15 Monday, April 23, 2012 5:04 PM
CONVENTION EXAMPLE
Italic Code (monospace) An italic Code (monospace) font indicates user inputs and
font parts of names that can vary or be defined by the user.
Arrow brackets <> The arrow brackets included in round brackets after either
following the Code a monospace Code or an italic Code font means that the
(monospace) or Code content in the string can be freely chosen or entered by the
(italic) fonts user, such as feature tags. For example,
model.geom(<tag>) where <tag> is the geometrys tag
(an identifier of your choice).
When the string is predefined by COMSOL, no bracket is
used and this indicates that this is a finite set, such as a
feature name.
Caution A Caution icon is used to indicate that the user should proceed
carefully and consider the next steps. It might mean that an
action is required, or if the instructions are not followed, that
there will be problems with the model solution.
Important An Important icon is used to indicate that the information
provided is key to the model building, design, or solution. The
information is of higher importance than a note or tip, and the
user should endeavor to follow the instructions.
Note A Note icon is used to indicate that the information may be of
use to the user. It is recommended that the user read the text.
Tip A Tip icon is used to provide information, reminders, shortcuts,
suggestions of how to improve model design, and other
information that may or may not be useful to the user.
See Also The See Also icon indicates that other useful information is
located in the named section. If you are working on line, click
the hyperlink to go to the information directly. When the link is
outside of the current PDF document, the text indicates this,
for example See The Laminar Flow Interface in the
COMSOL Multiphysics Users Guide. Note that if you are in
COMSOL Multiphysics online help, the link will work.
16 | CHAPTER 1: INTRODUCTION
pipe_ug.book Page 17 Monday, April 23, 2012 5:04 PM
TA BL E O F C O N T E N T S A N D I N D EX
To help you navigate through this guide, see the Contents and Index.
T H E H E A T TR A N S F E R B R A N C H
The The Heat Transfer Branch chapter describes the Heat Transfer in Pipes interface
and the underlying theory for the interface.
O V E R V I E W O F T H E U S E R S G U I D E | 17
pipe_ug.book Page 18 Monday, April 23, 2012 5:04 PM
18 | CHAPTER 1: INTRODUCTION
pipe_ug.book Page 19 Monday, April 23, 2012 5:04 PM
This chapter has information about the interfaces in the Pipe Flow Module
available under the Fluid Flow branch ( ) in the Model Wizard.
In this chapter:
19
pipe_ug.book Page 20 Monday, April 23, 2012 5:04 PM
The Pipe Flow interface ( ), found under the Single-Phase Flow branch ( ) in the
Model Wizard, is used to model incompressible fluid flow in piping systems. The
equations that are solved are 1D equations that live on 2D boundary segments or 3D
edge segments. The Non-Isothermal Pipe Flow interface ( ), found under the
Non-Isothermal Flow branch ( ) in the Model Wizard, solves a temperature equation
together with the equations for incompressible flow. The Water Hammer
interface ( ), found under the Fluid Flow>Single-Phase Flow branch ( ) in the
Model Wizard, has the equations and boundary conditions for modeling rapid pressure
transients in a pipe systems.
More advanced descriptions 2D and 3D continuum fluid flow, such as turbulent and
multiphase flow, can be found in the CFD Module. More extensive descriptions of heat
transfer, such as in turbulent flow or involving radiation, can be found in the Heat
Transfer Module. Furthermore, some applications involving the flow of liquids and
gases in porous media are better handled by the Chemical Reaction Engineering
Module.
When this interface is added, these default nodes are also added to the Model Builder
Fluid Properties, Pipe Properties, Pressure, and Initial Values. Right-click the Pipe Flow
node to add other features that implement, for example, boundary conditions and
volume forces.
Model
Convective Flow in a Heat Exchanger Plate: Model Library path
Pipe_Flow_Module/Heat_Transfer/heat_exchanger_plate
3D
INTERFACE IDENTIFIER
The interface identifier is a text string that can be used to reference the respective
physics interface if appropriate. Such situations could occur when coupling this
interface to another physics interface, or when trying to identify and use variables
defined by this physics interface, which is used to reach the fields and variables in
expressions, for example. It can be changed to any unique string in the Identifier field.
The default identifier (for the first interface in the model) is pfl.
DEPENDENT VARIABLES
This interface defines these dependent variables (fields). If required, edit the name, but
dependent variables must be unique within a model:
For an explanation of the tangential velocity, see further in the section Theory for the
Pipe Flow Interface.
DISCRETIZATION
To display this section, click the Show button ( ) and select Discretization. It controls
the discretization (the element types used in the finite element formulation).
Select discretization options from the Pressure and Tangential velocity listsQuadratic
(the default), Linear, Cubic, or Quartic.
For each Dependent variable in the table under Value types when using splitting of
complex variables, choose either a Complex or Real Value type. Click the cell to select
from a drop-down list.
Edge, Boundary, Point, and Pair Features for the Pipe Flow Interface
3D
The Pipe Flow Interface has these boundary, edge, point, and pair features available
and listed in alphabetical order:
Bend
Contraction / Expansion
Initial Values
Inlet
No Flow
Outlet
Pipe Properties
Pressure
Pump
T-Junction
Valve
These features are described for the Laminar Flow interface in the COMSOL
Multiphysics Users Guide:
Fluid Properties
Volume Force
For this interface, apply the Fluid Properties and Volume Force node to
Edges (3D models) and Boundaries (2D models) instead of Domains.
Note
Pipe Properties
The Pipe Properties node is used to define the pipe shape, flow resistance, and surface
roughness.
For the default node no user selection is required. All boundaries or All
edges is automatically selected.
Note
When additional nodes are added, from the Selection list choose the boundaries or
edges to define the pipe properties.
PIPE SHAPE
Select a pipe shape from the listNot set (the default), Round, Square, Rectangular, or
User defined.
If Round is selected, enter a value or expression for the Inner diameter di (SI unit:
m). The default is 10 cm.
If Square is selected, enter a value or expression for the Inner width wi (SI unit: m).
The default is 5 cm.
If Rectangular is selected, enter a value or expression for the Inner width wi (SI
unit: m. The default is 5 cm) and Inner height hi (SI unit: m. The default is 10cm).
If User defined is selected, enter a value or expression for the Cross sectional area Ac
(SI unit: m2. The default is 0.01 m2) and Wetted perimeter Z (SI unit: m. The
default is 0.4 m).
FLOW RESISTANCE
Select a Friction model
Newtonian fluids
SelectChurchill (the default), Stokes, Wood, Haaland, Colebrook, Von Karman,
Swamee-Jain, or User defined.
Non-Newtonian fluids
For Power-law and Bingham fluids in round tubes, the Irvine, Stokes, and Darby friction
models are available.
For more information about the friction models, please refer to the theory section
Expressions for the Darcy Friction Factor.
SURFACE ROUGHNESS
Select a Surface roughness from the listDrawn tubing (0.0015 mm) (the default), Glass
(0.0015 mm), Thermoplastics (0.0015 mm), Commercial steel (0.046 mm), Wrought iron
(0.046 mm), Steel welded seamless (0.061 mm), Asphalted cast iron (0.12 mm), Galvanized
iron (0.15 mm), Cast iron (0.26 mm), Wood stave (0.5 mm), Copper and brass (0.61 mm),
Concrete (1.5 mm), Riveted steel (4.5 mm), or User defined.
If User defined is selected, enter a value or expression for the Roughness (SI unit: m).
Initial Values
The Initial Values feature adds initial values for the pressure and tangential velocity that
can serve as an initial condition for a transient simulation or as an initial guess for a
nonlinear solver.
IN IT IA L VA LUES
Enter values or expressions for the initial value of the Pressure p (SI unit: Pa) and the
Tangential Velocity u (SI unit: m/s).
Inlet
Use the Inlet node to set the velocity, volumetric flow rate, or mass flow rate inlet
conditions that describe the fluid flow condition at an inlet.
In most cases the inlet boundary conditions appear, some of them slightly
modified, in the Outlet type as well. This means that there is nothing in
the mathematical formulations to prevent a fluid from leaving the domain
Tip
through boundaries where the Inlet type is specified.
POINT SELECTION
From the Selection list, choose the points that represent inlets.
INLET SPECIFICATION
Select a Specification for the inletMass flow rate (the default), Velocity, or Volumetric
flow rate.
If Mass flow rate is selected, enter a value or expression for the Mass flow rate qm,0
(SI unit: kg/s). The default is 0.
If Velocity is selected, enter a value or expression for the Velocity u0 (SI unit: m/s).
The default is 0.
If Volumetric flow rate is selected, enter a value or expression for the Volumetric flow
rate qv,0 (SI unit: m3/s). The default is 0.
Outlet
Use the Outlet node to set the velocity, volumetric flow rate, or mass flow rate point
conditions that describe the fluid flow condition at an outlet.
All of the formulations for the Outlet type are also available, possibly
slightly modified, in other boundary types as well. This means that there
is nothing in the mathematical formulations to prevent a fluid from
Tip entering the domain through boundaries where the Outlet boundary type
is specified.
No Flow
Use the No Flow node to define plugged exits or inlets (no flow).
PO IN T S EL EC TIO N
From the Selection list, choose the points that represent no flow.
Pressure
Use the Pressure node to define the boundary pressure at points.
PO IN T S EL EC TIO N
When additional nodes are added, from the Selection list choose the points that
represent the pressure.
BOUNDARY PRESSURE
Enter a value or expression for the Pressure p0 (SI unit: Pa). The default is 101325 Pa.
CONSTRAINT SETTINGS
To display this section, click the Show button ( ) and select Advanced Physics Options.
Select a Constraint typeBidirectional, symmetric or Unidirectional. If required, select
the Use weak constraints check box.
Bend
Use the Bend node to introduce a pressure drop in a point associated with a bend in
the pipe system.
The Bend can only be applied to a point which is connected to exactly two
edges.
Note
POINT SELECTION
From the Selection list, choose the points that represent the bend.
BEND SPECIFICATION
Select a Bend90 degrees standard elbow (K = 0.9) (the default), 45 degrees standard
elbow (K = 0.5), or User specified loss coefficient. If User specified loss coefficient is
selected, also enter a Loss coefficient Kf (unitless).
CONSTRAINT SETTINGS
To display this section, click the Show button ( ) and select Advanced Physics Options.
If required, select the Use weak constraints check box.
Valve
Use the Valve node to introduce a pressure drop in a point associated with the position
of a valve in the pipe system. Select a predefined valve type or provide a user defined
loss coefficient.
The Valve can only be applied to a point which is connected to exactly two
edges.
Note
PO IN T S EL EC TIO N
From the Selection list, choose the points for the valve.
VA L VE S P E C I F I C AT I O N
Select a ValveGlobe valve (K = 10) (the default), Angle valve (K = 4.4), Gate valve (K =
0.2), Ball valve (K = 4.5), Butterfly valve (K = 0.6), Swing check (K = 2.5), or User specified
loss coefficient. For all selections, enter values or expressions for the First edge i and
Second edge j (unitless numbers). If User specified loss coefficient is selected, also enter
a Loss coefficient Kf (unitless).
CONSTRAINT SETTINGS
To display this section, click the Show button ( ) and select Advanced Physics Options.
If required, select the Use weak constraints check box.
Contraction / Expansion
Use the Contraction/Expansion node to introduce a pressure drop in a point associated
with the position of a contraction or expansion in the pipe system.
POINT SELECTION
From the Selection list, choose the points for the contraction.
CONTRACTION SPECIFICATION
Select an option from the Friction listSudden (the default), Gradual, or User specified
loss coefficient.
If Gradual is selected, also enter an Angle of convergence (SI unit: radians). The
default is 0.
If User specified loss coefficient is selected, also enter a Loss coefficient Kf (unitless).
The default is 0.
CONSTRAINT SETTINGS
To display this section, click the Show button ( ) and select Advanced Physics Options.
If required, select the Use weak constraints check box.
Pump
Use the Pump node to introduce a pressure jump in a point associated with the position
of a pump in the pipe system. Alternatively, specify a fixed mass flow rate for the pump.
POINT SELECTION
From the Selection list, choose the points for the pump.
PUMP SPECIFICATION
Select a Pump direction (available options are based on space dimension)Positive X
direction (the default), Negative X direction, Positive Y direction, Negative Y direction,
Positive Z direction, or Negative Z direction.
Select an option from the Type listFixed flow rate (the default), Downstream pressure,
or Pressure increase.
If Fixed flow rate is selected, also enter a value or expression for the Mass flow rate
mpump (SI unit: kg/s). The default is 0.
If Downstream pressure is selected, also enter a value or expression for the Pressure
pdown (SI unit: Pa). The default is 101 325 Pa.
If Pressure increase is selected, also enter a value or expression for the Pressure
increase p (SI unit: Pa). The default is 0.
CONSTRAINT SETTINGS
To display this section, click the Show button ( ) and select Advanced Physics Options.
If required, select the Use weak constraints check box.
T-Junction
Use the T-Junction node to specify the friction coefficients for a T-junction, which can
act as a split or a merger. The pressure drop is calculated according to Equation 2-9.
pjunction
pmain pmain
pside
PO IN T S EL EC TIO N
From the Selection list, choose the points for the T-junction.
FRICTION SPECIFICATION
Enter a value or expression for the Loss coefficient main branch Kf,main for the loss
between main and junction pressure (the default is 0.1) and the Loss coefficient side
branch Kf, sidefor the loss between the side pressure and junction pressure (the default
is 1.2). Both are unitless numbers. See Figure 2-1.
1 2
p main p junction = --- K f main u main (2-1)
2
1 2
p side p junction = --- K f side u side . (2-2)
2
CONSTRAINT SETTINGS
To display this section, click the Show button ( ) and select Advanced Physics Options.
If required, select the Use weak constraints check box.
When this interface is added, these default nodes are also added to the Model Builder
Fluid, Pipe Properties, Pressure, Temperature, and Initial Values. Right-click the
Non-Isothermal Pipe Flow node to add other features that implement, for example,
boundary conditions and volume forces.
3D
INTERFACE IDENTIFIER
The interface identifier is a text string that can be used to reference the respective
physics interface if appropriate. Such situations could occur when coupling this
interface to another physics interface, or when trying to identify and use variables
defined by this physics interface, which is used to reach the fields and variables in
expressions, for example. It can be changed to any unique string in the Identifier field.
The default identifier (for the first interface in the model) is nipfl.
FLUID MODEL
Select a Fluid modelNewtonian (the default), Power law, or Bingham.
DEPENDENT VARIABLES
This interface defines these dependent variables (fields). If required, edit the name, but
dependent variables must be unique within a model:
For an explanation of the tangential velocity, see further in the section Theory for the
Pipe Flow Interface.
DISCRETIZATION
To display this section, click the Show button ( ) and select Discretization. It controls
the discretization (the element types used in the finite element formulation).
Select discretization options from the Pressure and Tangential velocity listsQuadratic
(the default), Linear, Cubic, or Quartic.
For each Dependent variable in the table under Value types when using splitting of
complex variables, choose either a Complex or Real Value type. Click the cell to select
from a drop-down list.
3D
The Fluid node and Heat Transfer are described in this section.
These features are described for the Reacting Pipe Flow interface:
Fluid Properties
Pipe Properties
These features are described for the Heat Transfer in Pipes interface:
These features are described for the Heat Transfer interface in the COMSOL
Multiphysics Users Guide:
Heat Source
Outflow
Temperature
These features are described for the Pipe Flow interface (listed in alphabetical order):
Bend
Contraction / Expansion
Inlet
No Flow
Outlet
Pressure
Pump
T-Junction
Valve
Fluid
Use the Fluid node to define the density, dynamic viscosity, and heat convection and
conduction properties.
For the default node no user selection is required. All boundaries or All
edges is automatically selected.
Note
When additional nodes are added, from the Selection list choose the boundaries or
edges to define the fluid.
FLUID PROPERTIES
The default Density (SI unit: kg/m3) is User defined and is 1 x 103 kg/m3. Enter a
different value or expression as required.
Enter a value or expression for the Yield stress s (SI unit: Pa) and Plastic viscosity s
(SI unit: Pas). The defaults are 0.
Heat Transfer
Use the Heat Transfer node to define the density, yield stress, plastic viscosity, and heat
convection and conduction properties.
MODEL INPUTS
This section contain fields and values that are inputs to expressions that define material
properties. If such user-defined material models are added, the model inputs appear
here. Initially, this section is empty.
FLUID PROPERTIES
The default Density (SI unit: kg/m3) is User defined and is 1 x 103 kg/m3. Enter a
different value or expression as required.
Enter a value or expression for the Yield stress s (SI unit: Pa) and Plastic viscosity s
(SI unit: Pas). The defaults are 0.
T he Wa t e r H a m m er In t erface
The Water Hammer interface ( ), found under the Fluid Flow>Single-Phase Flow
branch ( ) in the Model Wizard, has the equations and boundary conditions for
modeling rapid pressure transients in a pipe systems.
When this interface is added, these default nodes are also added to the Model Builder
Fluid Properties, Pipe Properties, Closed, and Initial Values. Right-click the Water
Hammer node to add other features.
INTERFACE IDENTIFIER
The interface identifier is a text string that can be used to reference the respective
physics interface if appropriate. Such situations could occur when coupling this
interface to another physics interface, or when trying to identify and use variables
defined by this physics interface, which is used to reach the fields and variables in
expressions, for example. It can be changed to any unique string in the Identifier field.
The default identifier (for the first interface in the model) is whtd.
DEPENDENT VARIABLES
This interface defines these dependent variables (fields). If required, edit the name, but
dependent variables must be unique within a model:
DISCRETIZATION
To display this section, click the Show button ( ) and select Discretization. It controls
the discretization (the element types used in the finite element formulation).
Select discretization options from the Pressure and Tangential velocity listsQuadratic
(the default), Linear, Cubic, or Quartic.
For each Dependent variable in the table under Value types when using splitting of
complex variables, choose either a Complex or Real Value type. Click the cell to select
from a drop-down list.
Edge, Boundary, Point, and Pair Features for the Water Hammer
Interface
The Water Hammer Interface has these edge, boundary, point, and pair features
available and listed in alphabetical order:
3D
Closed
Fluid Properties
Local Friction Loss
Pipe Properties
Pressure
Velocity
The Initial Values node is described for the Pipe Flow interface.
T H E WA T E R H A M M E R I N T E R F A C E | 39
pipe_ug.book Page 40 Monday, April 23, 2012 5:04 PM
Fluid Properties
The Fluid Properties feature adds the momentum equations solved by the interface,
except for volume forces which are added by the Volume Force feature. The node also
provides an interface for defining the physical properties of the fluid.
Volume Force is described for the Laminar Flow interface in the COMSOL
Multiphysics Users Guide:
Note
MODEL INPUTS
Edit input variables to the fluid-flow equations if required. For fluid flow, these are
typically introduced when a material requiring inputs has been applied.
PHYSICAL PROPERTIES
Select a Fluid modelLinear elastic (the default).
The default Density (SI unit: kg/m3) uses the value From material. Select User defined
to enter a different value or expression.
The default Dynamic viscosity (SI unit: Pas) uses the value From material and
describes the relationship between the shear rate and the shear stresses in a fluid.
Intuitively, water and air have a low viscosity, and substances often described as thick
(such as oil) have a higher viscosity.
The default Speed of sound cs (SI unit: m/s) uses the value From material. Select User
defined to enter a different value or expression.
Pipe Properties
The Pipe Properties node is used to define the pipe shape, pipe model, and flow
resistance.
For the default node no user selection is required. All boundaries or All
edges is automatically selected.
Note
When additional nodes are added, from the Selection list choose the boundaries or
edges to define the pipe properties.
PIPE SHAPE
The Pipe Shape settings are the same as for the Pipe Properties node
described for the Pipe Flow interface.
Note
PIPE MODEL
Select a Pipe modelZero axial stress (the default), Anchored at one end, Anchored at
both ends, or Incompressible cross section.
If Zero axial stress is selected, select a Youngs modulus ENot set (the default) or
User defined. If User defined is selected, enter a value or expression.
If Anchored at one end or Anchored at both ends is selected, enter a value or
expression for the Youngs modulus E. Select a Poissons ratio vNot set (the default)
or User defined. If User defined is selected, enter a value or expression.
When Zero axial stress, Anchored at one end, or Anchored at both ends is selected, also
select a Wall thickness wNot set (the default) or User defined. If User defined is
selected, enter a value or expression.
T H E WA T E R H A M M E R I N T E R F A C E | 41
pipe_ug.book Page 42 Monday, April 23, 2012 5:04 PM
FLOW RESISTANCE
The Flow Resistance settings are the same as for the Pipe Properties node
described for the Pipe Flow interface.
Note
POINT SELECTION
From the Selection list, choose the local friction loss points.
FRICTION SPECIFICATION
Enter a Loss coefficient Kf (unitless). The default is 0.
CONSTRAINT SETTINGS
To display this section, click the Show button ( ) and select Advanced Physics Options.
Select a Constraint typeBidirectional, symmetric or Unidirectional. If required, select
the Use weak constraints check box.
Closed
Use the Closed feature to impose zero velocity.
POINT SELECTION
From the Selection list, choose the closed points.
Velocity
Use the Velocity feature to prescribe a velocity.
POINT SELECTION
From the Selection list, choose the velocity points.
VE L O C I T Y
Enter a value or expression for uin (SI unit: m/s). The default is 0.
Pressure
Use the Pressure node to define the boundary pressure at points.
PO IN T S EL EC TIO N
From the Selection list, choose the pressure points.
PRESSURE
Enter a value or expression for the Pressure p (SI unit: Pa).
CONSTRAINT SETTINGS
To display this section, click the Show button ( ) and select Advanced Physics Options.
Select a Constraint typeBidirectional, symmetric or Unidirectional. If required, select
the Use weak constraints check box.
T H E WA T E R H A M M E R I N T E R F A C E | 43
pipe_ug.book Page 44 Monday, April 23, 2012 5:04 PM
Flow Equations
References for the Pipe Flow Interface
Flow Equations
The Pipe Flow interface calculates the pressure and velocity of an incompressible fluid
by solving the continuity and momentum equations outlined below.
u
------- = p f D ---------- u u + F (2-3)
t 2d h
and
A
----------- + Au = 0 (2-4)
t
The second term on the right hand side in Equation 2-3 represents the pressure drop
due to viscous shear. Here, u is the cross section averaged velocity (m/s), the density
(kg/m3), p pressure (Pa), fD (dimensionless) the Darcy friction factor (see Expressions
for the Darcy Friction Factor) and F is a volume force term (N/m3).
4A
d h = ------- (2-5)
Z
where A is the pipe cross section area (m2) available for flow, and Z is the wetted
perimeter (m).
et
Let
e t = e t x e t y e t z
be the unit tangent vector to the pipe axis. Since all the velocity components normal
to the pipe axis is assumed to be 0, the momentum balance in Equation 2-3 can be
rewritten as
u
e t ------- = p f D ---------- u u + F (2-6)
t 2d h
and we can define the tangential velocity u as u = ue t . The Physics Pipe Flow in
COMSOL solves for the tangential velocity u. This is also the quantity the user
specifies in for example inflow boundary conditions.
The velocity profile is fully developed and does not change within a section.
The cross section area is allowed to change between pipe segments.
Empirical functions describe viscous losses
Shocks are neglected
The flow direction is in the direction of the pipe axis.
The Darcy friction factor in Equation 2-3 accounts for the continuous pressure drop
along a pipe segment due to viscous shear, and is expressed as a function of the
Reynolds number (Re) and the surface roughness divided by the hydraulic diameter
(e/dh).
f D = f D Re ------
e
(2-7)
dh
where
ud h
Re = -------------- (2-8)
1 2
p = --- K f u (2-9)
2
Loss coefficients, Ki, for turbulent flow are available in the literature (Ref. 14) and the
set predefined in the Pipe Flow interface is reproduced in the table below:
TABLE 2-1: LOSS COEFFICIENTS
Gradual, angle of 2 2
convergence < 22 2.6 sin 1
Gradual, angle of 2 2
convergence > 22 1
Above, is the ratio of small to large cross-sectional area. The point friction losses
listed above apply for Newtonian fluids. Point losses applying to non-Newtonian flow
can be added as user defined expressions, for instance from (Ref. 15).
Newtonian Fluids The Churchill equation (Ref. 1) for the Darcy friction factor can be
used for the full range of Re (laminar, transition and turbulent) and e/d:
8 12 1 12
f D = 8 ------ + A + B
-1.5
(2-10)
Re
where
0.9 16
A = -2.457ln ------ + 0.27 e d
7
(2-11)
Re
37530 16
B = ---------------- (2-12)
Re
In the laminar regime (Re < 2000), fD is independent of the surface roughness and is
given by the Stokes formula:
64
f D = ------ (2-13)
Re
The Wood equation (Ref. 2) gives the friction factor for 4000 < Re < 1107 and
110-5 < e/d < 0.04, according to
0.225 0.44 a
f D = 0.094 e d + 0.53 e d + 88 e d Re (2-14)
with
0.134
a = 1.62 e d (2-15)
The Haaland equation (Ref. 3) for the Darcy friction factor is commonly used for oil
pipelines and wells. It can recover both small and large relative roughness limits for a
wide range of Reynolds numbers (4103 < Re < 1108)
e d- 1.11 6.9
1 = 1.8log ---------
----- 10 3.7 + -------- (2-16)
fD Re
It can be rewritten as
2
1 1.8
f D = -------------------------------------------------------------------
- (2-17)
log e--------- d- 1.11 6.9
2
+ --------
10 3.7 Re
For very low relative roughness e/d, the Haaland equation simplifies to Colebrooks
explicit formula (Ref. 4)
For very large relative roughness e/d, the Haaland equation simplifies to the von
Karman formula (Ref. 5)
d- 1.11
1 = 1.8log e--------- ed
----- 10 3.7 = 2log 10 ---------- (2-19)
fD 3.7
0.25
f D = --------------------------------------------------------------------2- (2-20)
log --------- e d- -----------------
5.74 -
+
10 3.7 Re 0.9
The equation is valid for relative roughness 110-6 < e/d < 110-2 and for Reynolds
number in the range 5103 < Re < 1108.
All the above equations are selectable from a list of friction factor expressions. As
noted, only the Churchill equation covers both the laminar and turbulent flows, as well
as the transitional region in between these flow regimes. The equations by Wood,
Haaland, Colebrook, von Karman, or Swamee-Jain, intended for the turbulent regime,
are combined with the Stokes equation for laminar flow to cover all flow conditions.
When Re<1000, COMSOL selects Stokes equation if it predicts a friction factor
greater than equations for the turbulent regimes. This produces more accurate results
that using the turbulent frictions factors in the laminar regime, but it does not
necessarily produce accurate estimates of the friction factor in the transition region.
Therefore, it is always advisable to check the Reynolds number for a give pipe flow
solution and change the friction model and recalculate, if necessary.
Non-Newtonian Power-law Fluids For Power-law fluids the apparent viscosity is related
to the shear rate as
n 1
= m ----- (2-21)
t
where m and n are two empirical curve fitting parameters known as the fluid
consistency coefficient and the flow behavior index, respectively. In the laminar regime
the friction factor for power law fluids can be calculated by the Stokes equation using
the modified Reynolds number proposed by Metzner and Reed (Ref. 7):
64
f D = -------------- (2-22)
Re MR
2 n n
u dh
Re MR = ------------------------------------------------n- (2-23)
n 1 3n + 1
8 m -----------------
4n
For the turbulent regime Irvine (Ref. 8) proposed the following expression for the
friction factor:
----------------
1
-
3n + 1
D n
fD = 4 -------------- (2-24)
Re MR
where
n + 4 2
4n - 3n
- ----------------
2
D n = ----------------
7n 3n + 1
(2-25)
7
Ryan and Johnson (Ref. 9) formulated a criterion for the transition between laminar
and turbulent flow, where
2
-------------
+n
6464n 1 + n
Re MR = -----------------------2- 2 + n (2-26)
3n + 1
= B + B ----- for B
t
(2-27)
----- =0 for B
t
The yield stress, B (Pa), and the plastic viscosity, B (Pas), are found by curve fitting
to experimental data.
The Swamee-Aggarwal equation (Ref. 10) gives the friction factor for a Bingham
plastic fluid in the laminar regime according to:
He 1.143
10.67 + 0.1414 ----------
Re B
- ---------
64 He-
f D, laminar = ---------- + ------------------------------------------------------------------- (2-28)
Re B 1.16 Re
1 + 0.149 ---------- Re
He B
Re B B
where
ud h
Re B = -------------- (2-29)
B
and
d h B
He = ----------------
2
(2-30)
B
a 0.193
f D, turbulent = 4 10 0 Re B (2-31)
with
5
a 0 = -1.47 1 + exp -2.9 10 He (2-32)
1
---
b b b
fD = f D, laminar + f D, turbulent (2-33)
where
40000
b = 1.7 + ---------------- (2-34)
Re B
The non-Newtonian friction models outlined above apply for pipes with circular
cross-section. The generalized Reynolds number needs to be modified to account for
other cross-sections.
Surface Roughness
Values of the absolute surface roughness found in the literature (Ref. 13 and Ref. 14)
are reproduced in the table below:
TABLE 2-2: SURFACE ROUGHNESS
Concrete 0.3-3
Riveted steel 0.9-9
Copper and brass 0.61
2. D.J. Wood, An Explicit Friction Factor Relationship, Civil Engrs., ASCE 60,
1966.
3. S.E. Haaland, Simple and Explicit Formulas for the Friction Factor in Turbulent
Flow, Journal of Fluids Engineering (ASME), vol. 103, no. 5, pp. 8990, 1983.
6. P.K Swamee and A.K. Jain, Explicit Equations for Pipe-flow Problems, Journal
of the Hydraulics Division (ASCE), vol 102, no. 5, pp. 657664, 1976.
9. N.W. Ryan and M.M. Johnson, Transistion from laminar to turbulent flow in
pipes, AIChE Journal, vol. 5, no. 4, pp. 433435, 1959.
10. P.K. Swamee and N. Agarwal, Explicit equations for laminar flow of Bingham
plastic fluids, J Petroleum Science and Engineering, vol. 76, no. 34, pp. 178184,
2011.
11. R. Darby, R. Mun, and D.V. Boger, Predict friction loss in slurry pipes, Chem
Eng, vol. 99, p. 116, 1992.
13. J.M. Coulson and J.F. Richardson, Chemical Engineering, Volume. 1, 4th ed.,
Pergamon Press, p. 56, 1990.
14. Engineering and Design Liquid Process Piping, Department of the Army, U.S.
Army Corps of Engineers, Engineering Manual No.1110-1-4008, 1999.
16. C.L. Barnard, et. al., A Theory of Fluid Flow in Compliant Tubes, Biophysical
Journal, vol. 6, no. 6, pp. 717724, 1966.
17. F.P. Incropera and D.P. DeWitt, Fundamentals of Heat and Mass Transfer, 4th
ed., John Wiley & Sons, 1996.
18. V. Gnielinski, New Equations for Heat and Mass Transfer in Turbulent Pipe and
Channel Flow, Int. Chem. Eng, vol. 16, pp. 359368, 1976.
20. S.W. Churchill and H.H.S. Chu, Correlating equations for laminar and turbulent
free convection from a vertical plate, Int J Heat Mass Transfer, vol. 18, no. 11, p.
13231329, 1975.
22. G. Taylor, The dispersion of matter in turbulent flow through a pipe, Proc. Roy.
Soc. A., vol. 223, pp. 446468, 1954.
23. L.T. Fan and C. B. Wang, Dispersion of Mater in Non-Newtonian Laminar Flow
Trhough a Circular Tube, Proc. Roy. Soc. A., vol. 292, pp. 203208, 1966.
A
----------- + Au = 0 (2-35)
t
where A (SI unit: m2) is the cross section area of the pipe, (SI unit: kg/m3) is the
fluid density, and u (SI unit: m/s) is the tangential fluid velocity.
For isothermal processes, the density and cross section area are function of the
pressure, so the continuity equation reads
A p p -
--------------------------- + A p p u = 0 (2-36)
t
1 p
A 0 0 ------- + ------- ------ + A 0 0 u = 0
1
(2-37)
K K A t
where K is the bulk modulus of the fluid (the inverse of its compressibility), and KA
is the effective bulk modulus of the cross section area. A0 and 0 are the reference area
and reference density at a given pressure p0.
The Water Hammer wave speed c (SI unit: m/s) is given by a combination of fluid and
structural material properties
= 0 ------- + -------
1- 1 1
---- (2-38)
c2 K K A
The effective bulk modulus for the cross sectional area KA (SI unit: Pa) is given by the
pipes material properties
w th
K A = E ---------
dh
where E is the Youngs modulus, dh is the hydraulic diameter, and wth is the pipes
wall thickness. This is the so-called Korteweg formula (Ref. 1)
The Korteweg formula can also be extended to pipes suffering from axial stresses, in
this case, a more general formula would include the Poissons ration of the pipes
material
E w th
K A = ---- --------- (2-39)
dh
where = 1 for pipe with zero axial stress (this is Kortewegs original formula for a
pipe furbished with expansion joints), = 1 2 for a pipe anchored at one end,
2
and = 1 for a pipe anchored at both ends.
u
------- = p f D ---------- u u + F (2-40)
t 2d h
here, fD is the Darcy friction factor, normally a function of the Reynolds number, the
surface roughness and the hydraulic diameter, as described in Expressions for the
Darcy Friction Factor.
This set of equations are normally acknowledged as the Water Hammer equations, and
are they mainly written in the literature as (consider gravity forces, so F = g )
1 p
A ----2- ------ + Au = 0 (2-41)
c t
u
------- = p f D ---------- u u + g (2-42)
t 2d h
BOUNDARY CONDITIONS
The available boundary conditions are Closed, Pressure, Velocity, and Additional Flow
Resistances.
T H E O R Y F O R T H E WA T E R H A M M E R I N T E R F A C E | 55
pipe_ug.book Page 56 Monday, April 23, 2012 5:04 PM
This physics, which is found under the Heat Transfer branch ( ) in the Model
Wizard, has functionality for simulating heat transfer in pipe networks, including
wall heat transfer to the surroundings.
In this chapter:
57
pipe_ug.book Page 58 Monday, April 23, 2012 5:04 PM
The Heat Transfer in Pipes interface ( ), found under the Heat Transfer branch ( )
in the Model Wizard, solves a temperature equation for a fluid transported in a pipe. The
interface requires the fluid velocity as input, provided either by the user or by coupling
to the Pipe Flow interface. However, it is advisable to instead use The Non-Isothermal
Pipe Flow Interface which is a multiphysics interface that combines Pipe Flow and
Heat Transfer in Pipes to model the velocity, pressure and temperature fully coupled.
58 | C H A P T E R 3 : T H E H E A T TR A N S F E R B R A N C H
pipe_ug.book Page 59 Monday, April 23, 2012 5:04 PM
T H E M E C H A N I S M S F O R H E A T TR A N S F E R | 59
pipe_ug.book Page 60 Monday, April 23, 2012 5:04 PM
T he H e a t T r a nsfer i n Pi p es In t erfac e
The Heat Transfer in Pipes interface ( ), found under the Heat Transfer branch ( )
in the Model Wizard, has the equations and boundary conditions for modeling heat
transfer for an incompressible fluid in one dimension.
3D
When this interface is added, these default nodes are also added to the Model Builder
Heat Transfer, Pipe Properties, Temperature, and Initial Values. Right-click the Heat
Transfer in Pipes node to add other features.
INTERFACE IDENTIFIER
The interface identifier is a text string that can be used to reference the respective
physics interface if appropriate. Such situations could occur when coupling this
interface to another physics interface, or when trying to identify and use variables
defined by this physics interface, which is used to reach the fields and variables in
expressions, for example. It can be changed to any unique string in the Identifier field.
The default identifier (for the first interface in the model) is htp.
DEPENDENT VARIABLES
This interface defines the Temperature T (SI unit: K) dependent variable (field). If
required, edit the name, but dependent variables must be unique within a model.
DISCRETIZATION
To display this section, click the Show button ( ) and select Discretization. It controls
the discretization (the element types used in the finite element formulation).
60 | C H A P T E R 3 : T H E H E A T TR A N S F E R B R A N C H
pipe_ug.book Page 61 Monday, April 23, 2012 5:04 PM
Select an option from the Temperature listQuadratic (the default), Linear, Cubic, or
Quartic. Specify the Value type when using splitting of complex variablesReal or
Complex (the default).
Edge, Boundary, Point, and Pair Features for the Heat Transfer in
Pipes Interface
3D
The Heat Transfer in Pipes Interface has these boundary, edge, point, and pair features
available and listed in alphabetical order:
Heat Outflow
Heat Source
Heat Transfer
Initial Values
Pipe Properties (described for the Pipe Flow interface)
Temperature
Wall Heat Transfer
Heat Transfer
Use the Heat Transfer node to define the tangential velocity, density, dynamic viscosity,
and heat convection and conduction properties.
T H E H E A T TR A N S F E R I N P I P E S I N T E R F A C E | 61
pipe_ug.book Page 62 Monday, April 23, 2012 5:04 PM
MODEL INPUTS
This section contain fields and values that are inputs to expressions that define material
properties. If such user-defined material models are added, the model inputs appear
here. Initially, this section is empty.
FLUID PROPERTIES
The default Density (SI unit: kg/m3) uses the value From material. Select User defined
to enter a different value or expression.
The default Dynamic viscosity (SI unit: Pas) uses the value From material and
describes the relationship between the shear rate and the shear stresses in a fluid.
Intuitively, water and air have a low viscosity, and substances often described as thick
(such as oil) have a higher viscosity.
The default Density (SI unit: kg/m3), Dynamic viscosity (SI unit: Pas), Heat capacity
at constant pressure Cp (SI unit: J/(kgK)), Ratio of specific heats (unitless), and
Thermal conductivity k (SI unit: W/(mK)) all use values From material. If User defined
is selected, enter different values or expressions.
Heat Source
The Heat Source describes heat generation within the domain. Express heating and
cooling with positive and negative values, respectively. Add one or more nodes as
requiredall heat sources within a domain contribute to the total heat source. Specify
the heat source as W/m in the domain, as linear heat source.
62 | C H A P T E R 3 : T H E H E A T TR A N S F E R B R A N C H
pipe_ug.book Page 63 Monday, April 23, 2012 5:04 PM
HEAT SOURCE
Click the General source or Linear source button.
If General source is selected, enter a value for the distributed heat source Q
(SI unit: W/m3).
If Linear source (QqsT) is selected, enter the Linear heat source qs (SI unit: W/
(m3K)).
The advantage of writing the source in this form is that it can be stabilized
by the streamline diffusion. The theory covers qs that is independent of
the temperature, but some stability can be gained as long as qs is only
Tip
weakly dependent on the temperature.
T H E H E A T TR A N S F E R I N P I P E S I N T E R F A C E | 63
pipe_ug.book Page 64 Monday, April 23, 2012 5:04 PM
Wall layers
Figure 3-1: Internal and external films and the associated film coefficients (blue), and
wall layers (dark and light grey).
H E A T TR A N S F E R M O D E L
Select an option from the External temperature listUser defined, Temperature (nipfl/
nipfl), or Temperature (pfl/pfl). If User defined is selected, enter a value for the
Temperature Text (SI unit: K).
Enter a value or expression for the Heat transfer coefficient h (SI unit: W/(m2K). The
default is 0.
Even if you do not expect a boundary layer to build up, the thermal film
theory works well for laminar flow profiles. In fact, there is an analytical
solution available to the Nusselt number for laminar flow in circular tubes
Note
(Nu = 3.66).
64 | C H A P T E R 3 : T H E H E A T TR A N S F E R B R A N C H
pipe_ug.book Page 65 Monday, April 23, 2012 5:04 PM
FILM RESISTANCE
The default Internal film resistance model is Automatic and the Nusselt number is
computed as described in the section Theory for the Heat Transfer in Pipes Interface.
Select User defined to enter a user defined Nusselt number (unitless). The default is 3.66.
SPECIFICATION
Select an External film heat transfer modelExternal forced convection (the default),
External natural convection, or User defined.
Be careful to select the right material in the settings window for External
Film Resistance. Many times this should be another material than the
Caution Domain material which is the internal fluid.
The default Heat capacity at constant pressure Cp (SI unit: J/(kgK)), Thermal
conductivity k (SI unit: W/(mK)), Density (SI unit: kg/m3), and Dynamic viscosity
(SI unit: Pas), all use values From material. If User defined is selected, enter different
values or expressions than the default, which is 0 for all options.
The External velocity uext (SI unit: m/s) is User defined by default. This is the velocity
of the cooling or heating fluid outside the pipe.
For External natural convection only, also enter a value or expression for the External
pressure pext (SI unit: Pa). The default is 1 atm.
T H E H E A T TR A N S F E R I N P I P E S I N T E R F A C E | 65
pipe_ug.book Page 66 Monday, April 23, 2012 5:04 PM
Figure 3-2: Before you use the Natural Convection option, it is good practice to select
Density in the used material, and click Plot in the settings window. That way you can
inspect the behavior and make sure it is smooth within the temperature interval you plan
to use it.
User Defined
If User defined is selected:
Wall Layer
Right-click the Wall Heat Transfer node to add the Wall Layer node and define the
thermal conductivity and wall thickness. You can add more layers.
66 | C H A P T E R 3 : T H E H E A T TR A N S F E R B R A N C H
pipe_ug.book Page 67 Monday, April 23, 2012 5:04 PM
SPECIFICATION
Select an option from the Thermal conductivity list k (SI unit: W/(mK))Not set (the
default), or select User defined to enter a different value or expression. The default is 0.
Select an option from the Wall thickness list w (SI unit: m)Not set (the default) or
User defined. If User defined is selected, enter a value or expression. The default is 0.
Initial Values
The Initial Values feature adds an initial value for the temperature that can serve as an
initial condition for a transient simulation or as an initial guess for a nonlinear solver.
IN IT IA L VA LUES
Enter values or expressions for the initial value of the Temperature T (SI unit: K).
Temperature
Use the Temperature node to specify the temperature at an inlet of the pipe system.
PO IN T S EL EC TIO N
From the Selection list, choose the points to apply a temperature.
TE M P E R A T U R E
The equation for this condition is T = T0 where T0 is the prescribed temperature
(SI unit: K) on the boundary. Enter the value or expression for the Temperature Tin.
The default is 293.15 K.
CONSTRAINT SETTINGS
To display this section, click the Show button ( ) and select Advanced Physics Options.
If required, select the Use weak constraints check box.
T H E H E A T TR A N S F E R I N P I P E S I N T E R F A C E | 67
pipe_ug.book Page 68 Monday, April 23, 2012 5:04 PM
Heat Outflow
The Heat Outflow node provides a suitable boundary condition for
convection-dominated heat transfer at outlet boundaries. In a model with convective
heat transfer, this condition states that the only heat transfer over a boundary is by
convection. The temperature gradient in the normal direction is zero, and there is no
radiation. This is usually a good approximation of the conditions at an outlet boundary
in a heat transfer model with fluid flow.
POINT SELECTION
From the Selection list, choose the points to apply the heat outflow.
68 | C H A P T E R 3 : T H E H E A T TR A N S F E R B R A N C H
pipe_ug.book Page 69 Monday, April 23, 2012 5:04 PM
T A 3
AC p ------- + AC p u T = Ak T + f D ---------- u + Q + Q wall (3-1)
t 2d h
where is the fluid density (kg/m3), A is the pipe cross section area (m2) available for
flow, Cp (J/(kgK)) is the heat capacity at constant pressure, T (K) is the temperature.
u is a velocity field. For information about the tangential velocity in pipe flow, see
Theory for the Pipe Flow Interface. Further, k (W/(mK)) is the thermal conductivity.
The second term on the right hand side corresponds to friction heat dissipated due to
viscous shear. Q (W/m) represents a general heat source and Qwall (W/m) represents
external heat exchange through the pipe wall. Note that the Qwall term is detailed
below.
T H E O R Y F O R T H E H E A T TR A N S F E R I N P I P E S I N T E R F A C E | 69
pipe_ug.book Page 70 Monday, April 23, 2012 5:04 PM
The Wall Heat Transfer feature requires the external temperature and at least an
internal film resistance subnode added to it. The individual contributions of heat
transfer coefficients can be added by subfeatures to the Wall Heat Transfer feature. The
subfeatures are:
70 | C H A P T E R 3 : T H E H E A T TR A N S F E R B R A N C H
pipe_ug.book Page 71 Monday, April 23, 2012 5:04 PM
The overall heat transfer coefficient including internal film resistance, wall resistance
and external film resistance can be deduced as follows, with reference to Figure 3-3.
r1
r0
rN
dr wn
T
Fluid domain T1
T T0
T2 Tn
TN
Text
Wall number: 1 2 n N
r0 r
Shell balance In Figure 3-3, consider a short length section L of pipe, perpendicular
to the figure plane. The heat leaving the internal fluid of that segment into the wall is
Here, A Q = L2r 0 (m2) is the area available for heat flux into the wall. For
stationary conditions that same amount of heat must travel through any cylindrical
shell at radius r in wall 1 (or any wall).
Q 1 = L2r k 1 --------
dT
(3-4)
dr
T H E O R Y F O R T H E H E A T TR A N S F E R I N P I P E S I N T E R F A C E | 71
pipe_ug.book Page 72 Monday, April 23, 2012 5:04 PM
T1 r0
Q1
= --------------------- --- dr
1
dT
L2k 1 r
(3-5)
T0 r0
Q1 r1
T 1 T 0 = --------------------- ln ----- (3-6)
L2k 1 r0
and rearrange
L2k 1
Q 1 = --------------------- T 0 T 1 . (3-7)
r1
ln -----
r0
For the example of two wall layers, the heat flow is equal across any shell from the inner
bulk fluid to the surroundings, and we can set all Q n = Q .
Q = h int L2r 0 T T 0
L2k 1
Q = -------------------------- T 0 T 1
ln r 1 r 0
(3-8)
L2k 2
Q = -------------------------- T 1 T 2
ln r 2 r 1
Q = h ext L2r 2 T 2 T ext
Substituting
= L2 , (3-9)
1
hA Q eff = ----------------------------------------------------------------------------------------------------------------- (3-11)
1 ln r 1 r 0 ln r 2 r 1 1 -
------------------- + -------------------------- + -------------------------- + -------------------
r 0 h int k1 k2 r 2 h ext
72 | C H A P T E R 3 : T H E H E A T TR A N S F E R B R A N C H
pipe_ug.book Page 73 Monday, April 23, 2012 5:04 PM
1
hA Q eff = ---------------------------------------------------------------------------------------------- (3-12)
rn
N ln ---------
1 r n-1
1
-------------------
r 0 h int
+
---------------------- + ---------------------
k n r N h ext
n = 1
Now let
hA Q eff
hZ eff = ---------------------- , (3-13)
L
where Z (m) is an average perimeter (circumference), of the pipe, taken over the
thickness of the pipe walls. Combine Equation 3-9 and Equation 3-13 such a that
hA Q eff = hZ eff 2
2
hZ eff = ------------------------------------------------------------------------------------ (3-14)
rn
N ln ---------
1 1 r n-1
--------------- + ---------------- +
r 0 h int r N h ext ----------------------
kn
n = 1
For a circular pipe cross sections, this effective hZ in can now be used in Equation 3-2.
Note the reversed sign since Qwall is the heat added to the pipe from the surroundings.
The assumption in the deduction above is
1
hZ eff = -------------------------------------------------------------------------------------------------------
N
- (3-15)
1 1 - w
---------------- + ----------------- n
+ -----------------------------------------------
Z 0 h int Z N h ext k n Z n + Z n-1 2
n=1
T H E O R Y F O R T H E H E A T TR A N S F E R I N P I P E S I N T E R F A C E | 73
pipe_ug.book Page 74 Monday, April 23, 2012 5:04 PM
k
h = Nu ------ (3-16)
dh
where k is the thermal conductivity of the material, and Nu is the Nusselt number. dh
is the hydraulic diameter, defined as
d h = 4A Z . (3-17)
The local temperatures in each radial position of the pipe wall (see Figure 3-3) are
computed considering the fact that Equation 3-2 also can be applied for each
individual wall layer:
Combining Equation 3-2, Equation 3-18 and Equation 3-14 or Equation 3-15
(depending on pipe shape) for each wall layer explicitly gives each Tn.
Internal Film Resistance For Internal laminar forced convection in fully developed
pipe flow, the Nusselt number is a constant that depends on the pipe cross-section.
Values are listed in the table below (Ref. 1). The Pipe Flow interface interpolates to
find values for width/height ratios not listed. Default settings for film coefficient
calculations are Automatic, which means that laminar and turbulent correlations are
applied according to the Re number.
TABLE 3-1: NUSSELT NUMBERS FOR INTERNAL LAMINAR PIPE FLOW
circular - 3.66
square 1 2.98
rectangular 1.43 3.08
74 | C H A P T E R 3 : T H E H E A T TR A N S F E R B R A N C H
pipe_ug.book Page 75 Monday, April 23, 2012 5:04 PM
rectangular 2 3.39
rectangular 3 3.96
rectangular 4 4.44
rectangular 8 5.60
parallel plates infinity 7.54
For user-defined cross sections, Nu is suggested to 3.66 as a default.
For Internal turbulent forced convection (3000 < Re < 6106, 0.5 < Pr < 2000), the
Gnielinski equation (Ref. 18) applies:
f D 8 Re 1000 Pr
Nu int = ------------------------------------------------------------------------------
12 23
(3-19)
1 + 12.7 f D 8 Pr 1
Cp
Pr = ----------- (3-20)
k
The film resistance due in the internal flow can be calculated using material properties
defined in the Heat Transfer feature and the calculated friction factor. Material
properties are evaluated at the mean internal film temperature (T+T0)/2 (see
Expressions for the Darcy Friction Factor).
The using the hydraulic diameter makes the equations applicable to non-circular pipe
cross sections.
External film resistance The material properties used should be those of the external
fluid. Do not set the material to Domain Material if you have a different fluid on the
inside and outside. Typically, the temperature and pressure are required to evaluate the
material functions. The external fluid velocity is required for the Forced Convection
option and is a user defined input.
For External forced convection around a pipe, valid for all Re and for Pr > 0.2, the
Churchill and Bernstein (Ref. 19) correlation is used:
12 13
0.62Re Pr 58 45
Nu ext = 0.3 + ------------------------------------------------------- 1 + Re 282000 . (3-21)
23 14
1 + 0.4 Pr
T H E O R Y F O R T H E H E A T TR A N S F E R I N P I P E S I N T E R F A C E | 75
pipe_ug.book Page 76 Monday, April 23, 2012 5:04 PM
For External natural convection around a pipe, the Churchill and Chu (Ref. 20)
correlation is used which is recommend for Ra < 1012:
16 2
0.387Ra
Nu ext = 0.60 + -------------------------------------------------------------------
8 27
(3-22)
9 16
1 + 0.559 Pr
Ra = PrGr (3-23)
3
g T N T ext d
Gr = ----------------------------------------
- (3-24)
2
---
Above d is the outside diameter of the pipe and, is the fluids coefficient of
volumetric thermal expansion:
1
= --- ------- (3-25)
T p
76 | C H A P T E R 3 : T H E H E A T TR A N S F E R B R A N C H
pipe_ug.book Page 77 Monday, April 23, 2012 5:04 PM
This chapter has information about the interfaces available under the Chemical
Species Transport branch ( ) in the Model Wizard.
In this chapter:
77
pipe_ug.book Page 78 Monday, April 23, 2012 5:04 PM
When this interface is added, these default nodes are also added to the Model Builder
Convection and Diffusion, Concentration, and Initial Values. Right-click the node to add
other features that implement, for example, boundary conditions and volume forces.
3D
INTERFACE IDENTIFIER
The interface identifier is a text string that can be used to reference the respective
physics interface if appropriate. Such situations could occur when coupling this
interface to another physics interface, or when trying to identify and use variables
defined by this physics interface, which is used to reach the fields and variables in
expressions, for example. It can be changed to any unique string in the Identifier field.
The default identifier (for the first interface in the model) is dsp.
FLUID MODEL
Select a Fluid modelNewtonian (the default), Power law, or Bingham.
78 | C H A P T E R 4 : T H E C H E M I C A L S P E C I E S TR A N S P O R T B R A N C H
pipe_ug.book Page 79 Monday, April 23, 2012 5:04 PM
If required, edit the name, but dependent variables must be unique within a model:
DISCRETIZATION
To display this section, click the Show button ( ) and select Discretization. It controls
the discretization (the element types used in the finite element formulation).
For each Dependent variable in the table under Value types when using splitting of
complex variables, choose either a Complex or Real Value type. Click the cell to select
from a drop-down list.
Concentration
Convection and Diffusion
Initial Values
Mass Outflow
T H E TR A N S P O R T O F D I L U T E D S P E C I E S I N P I P E S I N T E R F A C E | 79
pipe_ug.book Page 80 Monday, April 23, 2012 5:04 PM
For the default node no user selection is required. All boundaries or All
edges is automatically selected.
Note
MODEL INPUTS
This section contain fields and values that are inputs to expressions that define material
properties. If such user-defined material models are added, the model inputs appear
here. Initially, this section is empty.
FLUID PROPERTIES
The default Density (SI unit: kg/m3) uses the value From material. Select User defined
to enter a different value or expression.
The default Dynamic viscosity (SI unit: Pas) uses the value From material and
describes the relationship between the shear rate and the shear stresses in a fluid.
Intuitively, water and air have a low viscosity, and substances often described as thick,
such as oil, have a higher viscosity.
80 | C H A P T E R 4 : T H E C H E M I C A L S P E C I E S TR A N S P O R T B R A N C H
pipe_ug.book Page 81 Monday, April 23, 2012 5:04 PM
VE L O C I T Y
Enter a value or expression for the Tangential velocity u (SI unit: m2/s). The default
is 0.
DIFFUSION COEFFICIENT
Enter a value or expression for the diffusion coefficient Dc (SI unit: m2/s). The default
is 1 x 10-9 m2/s.
DISPERSION
Select a Dispersion modelUser defined (the default), Taylor (laminar, round pipes), or
Taylor (turbulent, round pipes). If User defined is selected, enter a value or expression
for the Dispersion coefficient DD (SI unit: m2/s). The default is 0. Find more detail in
the theory section Dispersion.
Initial Values
The Initial Values feature adds an initial value for the concentration that can serve as an
initial condition for a transient simulation or as an initial guess for a nonlinear solver.
For the default node no user selection is required. All boundaries or All
edges is automatically selected.
Note
When additional nodes are added, from the Selection list choose the boundaries or
edges to define the initial values.
IN IT IA L VA LUES
Enter values or expressions for the initial value of the Concentration c (SI unit:
mol/m3). The default is 0.
Reactions
Use the Reactions node to account for the consumption or production of species.
Define the reaction rate expression as required, which displays on the right-hand side
of the species transport equations in the Convection and Diffusion node.
T H E TR A N S P O R T O F D I L U T E D S P E C I E S I N P I P E S I N T E R F A C E | 81
pipe_ug.book Page 82 Monday, April 23, 2012 5:04 PM
REACTIONS
Enter a Reaction rate Rc (SI unit: mol/(m3s)). The default is 0.
WA L L M A S S TR A N S F E R
For each species, enter a Mass transfer coefficient kwall,c (SI unit: m/s). The default is 0.
For each species, select an option from the list (when available) or define the Bulk
concentration cbulk (SI unit: mol/m3). The default is 0.
Concentration
The Concentration node adds a point condition for the species concentration. For
example, a c = c0 condition specifies the concentration of species c.
POINT SELECTION
From the Selection list, choose the points to define the concentration.
CONCENTRATION
Specify the Concentration cinc (SI unit: mol/(m3s)) for each species. Enter a value or
expression in the field for each species. The default is 0.
CONSTRAINT SETTINGS
To display this section, click the Show button ( ) and select Advanced Physics Options.
If required, select the Use weak constraints check box.
82 | C H A P T E R 4 : T H E C H E M I C A L S P E C I E S TR A N S P O R T B R A N C H
pipe_ug.book Page 83 Monday, April 23, 2012 5:04 PM
Mass Outflow
Use the Mass Outflow feature to define species mass outflow. Mathematically this is
defined so that convection is the sole contribution to species mass transfer. Normally
this constitutes a well posed condition for all outflows.
PO IN T S EL EC TIO N
From the Selection list, choose the points to define the mass outflow.
T H E TR A N S P O R T O F D I L U T E D S P E C I E S I N P I P E S I N T E R F A C E | 83
pipe_ug.book Page 84 Monday, April 23, 2012 5:04 PM
When this interface is added, these default nodes are also added to the Model Builder
Fluid, Pipe Properties, Temperature, Pressure, Concentration, and Initial Values.
Right-click the node to add other features that implement, for example, boundary
conditions and volume forces.
3D
INTERFACE IDENTIFIER
The interface identifier is a text string that can be used to reference the respective
physics interface if appropriate. Such situations could occur when coupling this
interface to another physics interface, or when trying to identify and use variables
defined by this physics interface, which is used to reach the fields and variables in
expressions, for example. It can be changed to any unique string in the Identifier field.
The default identifier (for the first interface in the model) is rpfl.
FLUID MODEL
Select a Fluid modelNewtonian (the default), Power law, or Bingham.
84 | C H A P T E R 4 : T H E C H E M I C A L S P E C I E S TR A N S P O R T B R A N C H
pipe_ug.book Page 85 Monday, April 23, 2012 5:04 PM
DISCRETIZATION
To display this section, click the Show button ( ) and select Discretization. It controls
the discretization (the element types used in the finite element formulation).
Select discretization options from the Pressure, Tangential velocity, Temperature, and
Concentration listsQuadratic (the default), Linear, Cubic, or Quartic.
For each Dependent variable in the table under Value types when using splitting of
complex variables, choose either a Complex or Real Value type. Click the cell to select
from a drop-down list.
Edge, Boundary, Point, and Pair Features for the Reacting Pipe Flow
Interface
3D
Because the The Reacting Pipe Flow Interface is a multiphysics interface, many nodes
are described for other interfaces. These boundary, edge, point, and pair features are
described as indicated.
Initial Values
Convection and Diffusion
Fluid
Fluid Properties
Pipe Properties
These features are described for the Pipe Flow interface (listed in alphabetical order):
Bend
Contraction / Expansion
Inlet
No Flow
Outlet
Pressure
Pump
T-Junction
Valve
Volume Force is described for the Laminar Flow interface in the COMSOL
Multiphysics Users Guide:
Note
These features are described for the Heat Transfer in Pipes interface (listed in
alphabetical order):
86 | C H A P T E R 4 : T H E C H E M I C A L S P E C I E S TR A N S P O R T B R A N C H
pipe_ug.book Page 87 Monday, April 23, 2012 5:04 PM
These features are described for the Transport of Diluted Species in Pipes interface (listed
in alphabetical order):
Concentration
Mass Outflow
Reactions
Wall Mass Transfer
Pipe Properties
The Pipe Properties node is used to define the pipe shape and flow resistance.
For the default node no user selection is required. All boundaries or All
edges is automatically selected.
Note
When additional nodes are added, from the Selection list choose the boundaries or
edges to define the pipe properties.
PIPE SHAPE
The Pipe Shape settings are the same as for the Pipe Properties node
described for the Pipe Flow interface.
Note
FLOW RESISTANCE
The Friction model is User defined by default. Enter a value or expression for the Darcy
friction factor fD (unitless). The default is 0.
Initial Values
The Initial Values feature adds initial values for the pressure, tangential velocity,
temperature, and concentration that can serve as an initial condition for a transient
simulation or as an initial guess for a nonlinear solver.
INITIAL VALUES
Enter values or expressions for the initial value of the:
Fluid Properties
The Fluid Properties feature adds the momentum equations solved by the interface,
except for volume forces which are added by the Volume Force feature. The node also
provides an interface for defining the fluid properties of the fluid.
Volume Force is described for the Laminar Flow interface in the COMSOL
Multiphysics Users Guide:
Note
MODEL INPUTS
Edit input variables to the fluid-flow equations if required. For fluid flow, these are
typically introduced when a material requiring inputs has been applied.
FLUID PROPERTIES
The default Density (SI unit: kg/m3) is User defined and is 1 x 103 kg/m3. Enter a
different value or expression as required.
The the fluid model is selected as non-Newtonian, enter a value or expression for the
more parameters like Yield stress s (SI unit: Pa) and Plastic viscosity s (SI unit: Pas).
88 | C H A P T E R 4 : T H E C H E M I C A L S P E C I E S TR A N S P O R T B R A N C H
pipe_ug.book Page 89 Monday, April 23, 2012 5:04 PM
MODEL INPUTS
This section contain fields and values that are inputs to expressions that define material
properties. If such user-defined material models are added, the model inputs appear
here. Initially, this section is empty.
FLUID PROPERTIES
The default Density (SI unit: kg/m3) is User defined and is 1 x 103 kg/m3. Enter a
different value or expression as required.
Enter a value or expression for the Yield stress s (SI unit: Pa) and Plastic viscosity s
(SI unit: Pas). The defaults are 0.
VE L O C I T Y
DIFFUSION COEFFICIENT
Enter a value or expression for the diffusion coefficient Dc (SI unit: m2/s). The default
is 1 x 10-9 m2/s.
DISPERSION
Select a Dispersion modelUser defined (the default) or Fan (laminar, round pipes). If
User defined is selected, enter a value or expression for the Dispersion coefficient DD (SI
unit: m2/s). The default is 0. For detailed information about dispersion, see the theory
section Dispersion.
Fluid
Use the Fluid node to define the density, dynamic viscosity, and heat convection and
conduction properties.
For the default node no user selection is required. All boundaries or All
edges is automatically selected.
Note
When additional nodes are added, from the Selection list choose the boundaries or
edges to define the fluid.
FLUID PROPERTIES
The default Density (SI unit: kg/m3) uses the value From material. Select User defined
to enter a different value or expression.
The default Dynamic viscosity (SI unit: Pas) uses the value From material and
describes the relationship between the shear rate and the shear stresses in a fluid.
Intuitively, water and air have a low viscosity, and substances often described as thick,
such as oil, have a higher viscosity.
DISPERSION
Select a Dispersion modelUser defined (the default), Taylor (laminar, round pipes), or
Taylor (turbulent, round pipes). If User defined is selected, enter a value or expression
for the Dispersion coefficient DD (SI unit: m2/s). The default is 0. For detailed
information about dispersion, see the theory section Dispersion.
90 | C H A P T E R 4 : T H E C H E M I C A L S P E C I E S TR A N S P O R T B R A N C H
pipe_ug.book Page 91 Monday, April 23, 2012 5:04 PM
T he o r y f o r t he Tran sp ort of D i l u t ed
Species in Pipes Interface
The Transport of Diluted Species in Pipes Interface theory is described in this section.
This interface solves a mass balance equation for pipes in order to compute the
concentration distribution of a solute in a dilute solution, taking the flow velocity as
input.
c i
A ------- + Au c i = A D i + D D i c i + A
t Rik + Rwall ik (4-1)
k k
where A (m2) is the cross section area available for flow, ci (mol/m3) is the diluted
species concentration, and u a velocity field. For information about tangential velocity
in pipe flow, see Theory for the Pipe Flow Interface. Further, Di (m2/s) is the species
diffusion coefficient and DD,i (m2/s) is the species dispersion coefficient. The second
term on the right hand side, Rik (mol/(m3s)), corresponds a source or sink due to
chemical reaction number k for species i. Finally, Rwall,ik (mol/(ms)), is a source term
due to mass transfer contribution k through the pipe wall:
Dispersion
The Transport of Diluted Species in Pipes interface can automatically calculate the axial
dispersion of species transported in a solvent stream.
For laminar flow in circular, straight pipes the, total dispersion is given by the sum of
molecular diffusion, Di (m2/s), and the effect of the velocity profile causing some
fractions of an initial plane of fluid in the pipe to move faster than others. COMSOL
uses the Taylor (Ref. 21) correlation for this second contribution, DD,i (m2/s):
2 2
u d
D D,i = ---------------- (4-2)
192D i
T H E O R Y F O R T H E TR A N S P O R T O F D I L U T E D S P E C I E S I N P I P E S I N T E R F A C E | 91
pipe_ug.book Page 92 Monday, April 23, 2012 5:04 PM
L
---- 0.04 ud
------- (4-3)
d Di
where d is the pipe diameter and L a characteristic pipe length. For turbulent
conditions Taylor (Ref. 22) suggested:
d fD
D D,i = 10.1 --- u ----- (4-4)
2 2
For non-Newtonian fluids in the laminar regime Fan (Ref. 23) extended the analysis
of Taylor:
2 2
u d
D D,i = k ------------- (4-5)
4D i
1
k = ---------------------------------------- (4-6)
2n + 3n + 5
The parameter 0 is
r0
0 = ----- (4-8)
R
where R is the pipe radius and r0 is the radius of the plug flow region in the plastic
flow, defined as
2L B
r 0 = -------------- (4-9)
p
4 B
0 = -----------------
T
- (4-10)
d p
where the tangential pressure gradient is calculated by the Pipe Flow interface.
92 | C H A P T E R 4 : T H E C H E M I C A L S P E C I E S TR A N S P O R T B R A N C H
pipe_ug.book Page 93 Monday, April 23, 2012 5:04 PM
T H E O R Y F O R T H E TR A N S P O R T O F D I L U T E D S P E C I E S I N P I P E S I N T E R F A C E | 93
pipe_ug.book Page 94 Monday, April 23, 2012 5:04 PM
94 | C H A P T E R 4 : T H E C H E M I C A L S P E C I E S TR A N S P O R T B R A N C H
pipe_ug.book Page 95 Monday, April 23, 2012 5:04 PM
This module has extra functionality for simulating acoustics in pipe networks,
which is found under the Acoustics>Acoustic-Structure Interaction branch ( ) in
the Model Wizard.
In this chapter:
95
pipe_ug.book Page 96 Monday, April 23, 2012 5:04 PM
3D
When this interface is added, these default nodes are also added to the Model Builder
Fluid Properties, Pipe Properties, Closed, and Initial Values. Right-click the Pipe Acoustics,
Transient node to add other features.
INTERFACE IDENTIFIER
The interface identifier is a text string that can be used to reference the respective
physics interface if appropriate. Such situations could occur when coupling this
interface to another physics interface, or when trying to identify and use variables
defined by this physics interface, which is used to reach the fields and variables in
expressions, for example. It can be changed to any unique string in the Identifier field.
The default identifier (for the first interface in the model) is patd.
DISCRETIZATION
To display this section, click the Show button ( ) and select Discretization. It controls
the discretization (the element types used in the finite element formulation).
Select discretization options from the Pressure and Tangential velocity listsLinear,
Quadratic, Cubic, or Quartic. The defaults is quadratic for the pressure and linear for the
tangential velocity.
For each Dependent variable in the table under Value types when using splitting of
complex variables, choose either a Complex or Real Value type. Click the cell to select
from a drop-down list.
Edge, Boundary, Point, and Pair Features for the Pipe Acoustics,
Transient Interface
The Pipe Acoustics, Transient Interface has these edge, boundary, point, and pair
features available and listed in alphabetical order:
3D
Closed
T H E P I P E A C O U S T I C S , TR A N S I E N T I N T E R F A C E | 97
pipe_ug.book Page 98 Monday, April 23, 2012 5:04 PM
Fluid Properties
Initial Values
Open
Pipe Properties
Pressure
Velocity
Initial Values
The Initial Values feature adds initial values for the pressure and tangential velocity that
can serve as an initial condition for a transient simulation or as an initial guess for a
nonlinear solver.
INITIAL VALUES
Enter values or expressions for the initial value of the Pressure p (SI unit: Pa) and the
Tangential Velocity u (SI unit: m/s).
Fluid Properties
The Fluid Properties feature adds the momentum and continuity equations solved by
the interface, except for volume forces which are added by the Volume Force feature.
The node also provides an interface for defining the material properties of the fluid.
Volume Force is described for the Laminar Flow interface in the COMSOL
Multiphysics Users Guide:
Note
For the default node no user selection is required. All boundaries or All
edges is automatically selected.
Note
When additional nodes are added, from the Selection list choose the boundaries or
edges to define the fluid properties.
MODEL INPUTS
Edit input variables to the fluid-flow equations if required. For fluid flow, these are
typically introduced when a material requiring inputs has been applied.
BACKGROUND PROPERTIES
Enter a value or expression for the Background velocity u0 (SI unit: m/s) and
Background pressure p0 (SI unit: Pa).
PHYSICAL PROPERTIES
Select a Fluid modelLinear elastic (the default).
The default Density (SI unit: kg/m3) uses the value From material. Select User defined
to enter a different value or expression.
The default Speed of sound cs (SI unit: m/s) uses the value From material. Select User
defined to enter a different value or expression.
T H E P I P E A C O U S T I C S , TR A N S I E N T I N T E R F A C E | 99
pipe_ug.book Page 100 Monday, April 23, 2012 5:04 PM
Pipe Properties
The Pipe Properties node is used to define the pipe shape, pipe model, wall drag force,
and swirl correction.
For the default node no user selection is required. All boundaries or All
edges is automatically selected.
Note
When additional nodes are added, from the Selection list choose the boundaries or
edges to define the pipe properties.
PIPE SHAPE
Select a pipe shape from the listNot set (the default), Round, Square, Rectangular, or
User defined.
If Round is selected, enter a value or expression for the Inner diameter di (SI unit:
m). The default is 10 cm.
If Square is selected, enter a value or expression for the Inner width wi (SI unit: m).
The default is 5 cm.
If Rectangular is selected, enter a value or expression for the Inner width wi (SI
unit: m. The default is 5 cm) and Inner height hi (SI unit: m. The default is 10cm).
If User defined is selected, enter a value or expression for the Cross sectional area Ac
(SI unit: m2. The default is 0.01 m2) and Wetted perimeter Z (SI unit: m. The
default is 0.4 m).
PIPE MODEL
Select a Pipe modelIncompressible cross section (the default), Zero axial stress,
Anchored at one end, or Anchored at both ends. When Zero axial stress, Anchored at one
end, or Anchored at both ends is selected, also select a Thickness wNot set (the
default) or User defined. If User defined is selected, enter a value or expression.
When Anchored at one end or Anchored at both ends is selected, also select a Poissons
ratio vNot set (the default) or User defined. If User defined is selected, enter a value
or expression.
WAL L DR AG FORCE
Enter a value or expression for w (SI unit: N/m2). The default is 0.
SWIRL CORRECTION
Enter a value or expression for (unitless). The default is 1.
Closed
Use the Closed feature to impose zero velocity. This is the default condition added on
all end points.
PO IN T S EL EC TIO N
From the Selection list, choose the closed points.
Open
Use the Open feature to model an open pipe end where waves propagate out of the
system without any reflections. The boundary condition prescribes the velocity given
for plane waves moving in an infinitely long pipe of constant cross section area A. The
relation between the pressure p and tangential velocity u is given by
u 2
--- 1 u 0 + c 1 -----0- + 1 + A p 0
u 1- 1
--- = ----
p c
2 c
where u0 is the background tangential flow, c is the wave speed, is the fluid density,
Ais the cross sectional area compressibility, and is the swirl correction factor.
T H E P I P E A C O U S T I C S , TR A N S I E N T I N T E R F A C E | 101
pipe_ug.book Page 102 Monday, April 23, 2012 5:04 PM
POINT SELECTION
From the Selection list, choose the open points.
The wave speed c may be different from the speed of sound cs and
depends on the elastic properties of the pipe structure. It is defined in
Equation 5-3 in the Governing Equations section.
Note The wave speed may be evaluated as sqrt(1/patd.invc2) during the
analysis and results stage.
Pressure
Use the Pressure node to define the boundary pressure at the pipe ends.
POINT SELECTION
From the Selection list choose the points that represent the pressure.
PRESSURE
Enter a value or expression for the Pressure p (SI unit: Pa). The default is 0 Pa.
CONSTRAINT SETTINGS
To display this section, click the Show button ( ) and select Advanced Physics Options.
Select a Constraint typeBidirectional, symmetric or Unidirectional. If required, select
the Use weak constraints check box.
Velocity
Use the Velocity feature to prescribe a velocity at the pipe ends.
PO IN T S EL EC TIO N
From the Selection list, choose the velocity points.
VE L O C I T Y
Enter a value or expression for uin (SI unit: m/s). The default is 0.
T H E P I P E A C O U S T I C S , TR A N S I E N T I N T E R F A C E | 103
pipe_ug.book Page 104 Monday, April 23, 2012 5:04 PM
Governing Equations
Theory for the Pipe Acoustics, Transient Interface Boundary Conditions
Solving Transient Problems
References for the Pipe Acoustics, Transient Interface
The Pipe Acoustics, Transient interface requires both the Pipe Flow
Module and the Acoustics Module.
Note
Governing Equations
The continuity equation derived for a control volume is given by
---------------
A -
+ Au = 0 (5-1)
t
-------------------
Au - 2
+ Au = Ap + f drag Z + AF (5-2)
t
where Z is the inner circumference of the pipe and A = A(x,p,...) is the inner wetted
cross sectional area. u is the area-averaged mean velocity, and it is also defined in the
tangential direction u = uet, p is the mean pressure along the pipe, fdrag is the drag
force, and F is a volume force. The gradient is taken in the tangential direction et. The
term is a swirl-correction factor relating the mean of the squared total velocity to the
square of the mean velocity. Such that
= ---- u dA u
1 1 1 2
2
u = ---- u dA p = ---- p dA
A A A
where
p = p x and u = u x
are here the local parameters. Again p and u are the are the area-averaged dependent
variables.
LINEARIZATION
The governing equations are now linearized, that is, all variables are expanded to first
order assuming stationary zero (0th) order values (steady state background
properties). The acoustic variations of the dependent variables are assumed small and
on top of the background values. This is done according to the following scheme:
u x t = u 0 x + u 1 x t
p x t = p 0 x + p 1 x t
x t = 0 x + 1 x t
A x t = A 0 x + A 1 x t
2
1 0 p1 0 c 0 u1 c0 A1 A0
Moreover, the perturbations for the fluid density and cross section area are expanded
to first order in p0 in a Taylor series such that
1 = 0 = p p 0 ------
p s
0
A
A 1 = A A 0 = p p 0 -------
p s
0
T H E O R Y F O R T H E P I P E A C O U S T I C S , TR A N S I E N T I N T E R F A C E | 105
pipe_ug.book Page 106 Monday, April 23, 2012 5:04 PM
where the subscript s refers to constant entropy, that is, the processes are isentropic.
The relations for the fluid compressibility and the cross sectional area compressibility
are
1 1 1 1 1
0 = ------- = ------ = ------ ------ = ------ ----2-
K0 Ks 0 p s 0 c
0 s
1 A
A = ------- -------
A 0 p s
0
here, 0 is the fluid compressibility at the given reference pressure p0, the isentropic
bulk speed of sound is denoted cs, and 0 is the fluid density at the given reference
temperature and reference pressure. A is the effective compressibility of the pipes
cross section A0 due to changes in the inner fluid pressure.
Inserting the above expansions into the governing equations (Equation 5-1 and
Equation 5-2) and retaining only 1st order terms yield the pipe acoustics equations
including background flow. These are (after some manipulation and dropping the
suffix 1 on the acoustic variations):
1 p u0
A 0 ----2- ------ + A 0 0 u 1 + -----------2 p = 0
c t 0 c
2
u u 0 p u0
0 A 0 ------- + -----------2 ------ + A 0 ------ p + 2 0 A 0 u 0 u
t 0 c t c
2
(5-3)
+ A 0 p 1 + p 0 A + f drag Z = 0
1 0
----- = 0 0 + A = 0 ------- + ------- = ----- + -------
1 1 1
2 K 0 K A
cs KA
2
c
The bulk modulus for the cross sectional area KA is given by the pipe material
properties according to the so-called Korteweg formula (see Ref. 2).
Finally, using the fact that the velocity is taken along the tangential direction et the
governing equations are re-written in terms of the scalar values u and p, and projecting
onto the tangent. The 0 subscript is dropped on the density and area and the 1
subscript is also dropped on the dependent variables.
1 p u0
A ----2- ------ + A u + --------2- p e t = 0
c t c
2
u u 0 p u0
A ------ + --------2- ------ + A -----2- p + 2Au 0 u e t
t c t c (5-4)
+ Ap 1 + p 0 A e t + w Z + A F e t = 0
= 0 + A = ------- + ------- = ----2- + -------
1-
----
1 1 1
2 K 0 K A K
c cs A
where w is the tangential wall drag force (SI unit: N/m2) and F is a volume force
(SI unit: N/m3).
p = p in
u = u in
and can be set independently of each other leaving the other dependent variable free.
A special subclass of the velocity condition is the Closed condition where
u = 0
The final condition to specify is the Open condition. In this case it is assumed that the
pipe continues with constant cross section A. This requires specifying as the acoustic
waves are, by design, always normal to the pipe ends, for example, the velocity as a
function of the pressure. In order to define this, the dispersion relation and the relation
between p and u for a plane wave needs to be determined.
T H E O R Y F O R T H E P I P E A C O U S T I C S , TR A N S I E N T I N T E R F A C E | 107
pipe_ug.book Page 108 Monday, April 23, 2012 5:04 PM
i t kx
p = Re p e
i t kx
u = Re u e
into the governing Equation 5-4 and solve for the desired relations. After some
manipulation this results in
---
---- u 0
u 1- 1
--- = ----
p c2 k
u 2
---- = u 0 + c 1 -----0- + 1 + A p 0
k c
u 2
--- 1 u 0 + c 1 -----0- + 1 + A p 0
u 1- 1
--- = ----
p c 2 c
dx
CFL = ------------- = 0,2
c dt
This conditions restricts any acoustic disturbances to propagate more than 20 % of the
mesh size dx during one time step dt.
For an example of a model where the CFL condition is used see Water
Hammer: Model Library path Pipe_Flow_Module/Verification_Models/
Model water_hammer_verification.
T H E O R Y F O R T H E P I P E A C O U S T I C S , TR A N S I E N T I N T E R F A C E | 109
pipe_ug.book Page 110 Monday, April 23, 2012 5:04 PM
Materials
111
pipe_ug.book Page 112 Monday, April 23, 2012 5:04 PM
For detailed information about all the other material databases and the
separately purchased Material Library, see Materials in the COMSOL
Note Multiphysics Users Guide.
In this section:
Material LibraryPurchased
separately. Select from over 2500
predefined materials.
All COMSOL modules have predefined material data available to build models. The
most extensive material data is contained in the separately purchased Material Library,
but all modules contain commonly used or module-specific materials. For example, the
Built-In database is available to all users but the MEMS database is included with the
MEMS Module and Structural Mechanics Module. Also create custom materials and
material libraries by researching and entering material properties.
All the material databases (including the Material Library) are accessed from the
Material Browser. These databases are briefly described below.
RECENT MATERIALS
From the Recent Materials folder ( ), select from a list of recently used materials, with
the most recent at the top. This folder is available after the first time a material is added
to a model.
MATERIAL LIBRARY
An optional add-on database, the Material Library ( ), contains data for over 2500
materials and 20,000 property functions.
BUILT-IN
Included with COMSOL Multiphysics, the Built-In database ( ) contains common
solid materials with electrical, structural, and thermal properties.
AC/DC
Included in the AC/DC Module, the AC/DC database ( ) has electric properties for
some magnetic and conductive materials.
Flow Module, the Liquids and Gases database ( ) includes transport properties and
surface tension data for liquid/gas and liquid/liquid interfaces.
MEMS
Included in the MEMS Module and Structural Mechanics Module, the MEMS
database ( ) has properties for MEMS materialsmetals, semiconductors,
insulators, and polymers.
PIEZOELECTRIC
Included in the Acoustics Module, MEMS Module, and Structural Mechanics
Module, the Piezoelectric database ( ) has properties for piezoelectric materials.
PIEZORESISTIVITY
Included in the MEMS Module, the Piezoresistivity database ( ) has properties for
piezoresistive materials, including p-Silicon and n-Silicon materials.
USER-DEFINED LIBRARY
The User-Defined Library folder ( ) is where user-defined materials databases
(libraries) are created. When any new database is created, this also displays in the
Material Browser.
heat_sink.mph model file contained in the Heat Transfer Module and CFD Module
Model Libraries.
Figure 6-1: Assigning materials to a heat sink model. Air is assigned as the material to
the box surrounding the heat sink, and aluminum to the heat sink itself.
If a geometry consists of a heat sink in a container, Air can be assigned as the material
in the container surrounding the heat sink and Aluminum as the heat sink material itself
(see Figure 6-1). The Conjugate Heat Transfer interface, selected during model set-up,
has a Fluid flow model, defined in the box surrounding the heat sink, and a Heat
Transfer model, defined in both the aluminum heat sink and in the air box. The Heat
Transfer in Solids 1 settings use the material properties associated to the Aluminum
3003-H18 materials node, and the Fluid 1 settings define the flow using the Air material
properties. The other nodes under Conjugate Heat Transfer define the initial and
boundary conditions.
All physics interface properties automatically use the correct Materials properties when
the default From material setting is used. This means that one node can be used to
define the physics across several domains with different materials; COMSOL then uses
the material properties from the different materials to define the physics in each
domain. If material properties are missing, the Material Contents section on the
Materials page displays a stop icon ( ) to warn about the missing properties and a
warning icon ( ) if the property exists but its value is undefined.
There are also some physics interface features where you can explicitly select a material
from which material properties are retrieved. The default setting is then always to use
the Domain material on each domain (that is, the materials defined on the same
domains as the physics interface). In addition to the Domain Material, you can select
any other material that is present in the model, regardless of its selection. The selected
materials properties are then applied to all domains in the features selection.
To access a material property throughout the model (across several materials) and
not just in a specific material, use the special material container root.material. For
example, root.material.rho is the density as defined by the materials in each
domain in the geometry. For plotting, you can type the expression material.rho
to create a plot that shows the density of all materials.
To access a material property from a specific material, you need to know the tags for
the material and the property group. Typically, for the first material (Material 1) the
tag is mat1 and most properties reside in the default Basic property group with the
tag def. The variable names appear in the Variable column in the table under Output
properties in the settings window for the property group; for example, Cp for the
heat capacity at constant pressure. The syntax for referencing the heat capacity at
constant pressure in Material 1 is then mat1.def.Cp. Some properties are
anisotropic tensors, and each of the components can be accessed, such as
When using the Material Browser, the words window and page are
interchangeable. For simplicity, the instructions refer only to the Material
Note Browser.
To clear the search field and browse, delete the search term and click
Search to reload all the databases.
Tip
- Click to open each database and browse for a specific material by class (for
example, in the Material Library) or physics module (for example, MEMS
Materials).
Always review the material properties to confirm they are applicable for
the model. For example, Air provides temperature-dependent properties
Important that are valid at pressures around 1 atm.
In this section:
for a selected set of liquid/gas and liquid/liquid systems. All functions are based on
data collected from scientific publications.
TABLE 6-1: LIQUIDS AND GASES MATERIALS
GROUP MATERIAL
The MEMS Materials database has data for these materials and a default
appearance for 3D models is applied to each material as indicated.
3D
SPECULAR EXPONENT
SURFACE ROUGHNESS
NORMAL INCIDENCE
NOISE FREQUENCY
REFLECTANCE AT
NORMAL VECTOR
NORMAL VECTOR
COLOR OPACITY
NOISE SCALE
5. B.E. Poling, J.M. Prausnitz, and J.P. OConnell, The Properties of Gases and
Liquids, 5th ed., McGraw-Hill, 2001.
6. C.F. Spencer and B.A. Adler, A Critical Review of Equations for Predicting
Saturated Liquid Density, J. Chem. Eng. Data, vol. 23, no. 1, pp. 8288, 1978.
8. R.C.Weast (editor), CRC Handbook of Chemistry and Physics, 69th ed., CRC
Press, 1988.
10. M. Zabransky, V. Ruzicka, Jr., and E.S. Domalski, Heat Capacity of Liquids:
Critical Review and Recommended Values. Supplement I, J. Phys. Chem. Ref. Data,
vol. 30, no. 5, pp. 11991397, 2002.
11. W. Wagner, and H-J Kretzschmar, International Steam Tables, 2nd ed., Springer,
2008.
12. F.P. Incropera and D.P. DeWitt, Fundamentals of Heat and Mass Transfer, Fifth
ed. John Wiley & Sons, 2002.
I n d e x
A advanced settings 11 Prandtl 75
INDEX| 123
pipe_ug.book Page 124 Monday, April 23, 2012 5:04 PM
INDEX| 124
pipe_ug.book Page 125 Monday, April 23, 2012 5:04 PM
INDEX| 125
pipe_ug.book Page 126 Monday, April 23, 2012 5:04 PM
126 | I N D E X