Vous êtes sur la page 1sur 123

Simulation of

Mechatronic Systems
SmSy Lecture Notes
SmSy Lecture Notes
Winter Semester 2006
Dr. Beat Ruhstaller
Dr. Jrgen Schumacher
Center for Computational Physics
Zurich University of Applied Sciences
8401 Winterthur
Switzerland
http://www.ccp.zhwin.ch
The contents of these notes were compiled either from newly written sections
or from manuscripts of previously held lectures. Some sections originate from the
SESES tutorial document
1
. Contributions from the following authors are included
in the enclosed lecture notes:
Roman Gmr
Dr. Thomas Hocker
Dr. Paul Ledger
Dr. Beat Ruhstaller
Dr. Guido Sartoris
Dr. Jrgen Schumacher
Dr. Hansueli Schwarzenbach
The copyright of these lecture notes is with the authors at the Center for Com-
putational Physics (www.ccp.zhwin.ch). Theses lecture notes cover the topics dis-
cussed in the lecture on Simulation of Mechatronic Systems held in the Winter
semester 2006 at the Zurich University of Applied Sciences, Switzerland.
1
http://www.ccp.zhwin.ch/seses/version/Tutorial.pdf
Contents
Introduction 7
1 Guidelines to CAE 9
1.1 Computer Simulations in Product Development . . . . . . . . . . . 9
1.1.1 Physical Understanding . . . . . . . . . . . . . . . . . . . . 9
1.1.2 Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.1.3 Mathematical Methods . . . . . . . . . . . . . . . . . . . . 9
1.1.4 Computer Simulation . . . . . . . . . . . . . . . . . . . . . 10
1.2 Physical Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.2.1 Transport Processes . . . . . . . . . . . . . . . . . . . . . 10
1.2.2 Conversion Processes . . . . . . . . . . . . . . . . . . . . 10
1.2.3 Methodology . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.2.4 Simulation Software . . . . . . . . . . . . . . . . . . . . . 11
1.3 Modeling Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.3.1 Dimensional Analysis . . . . . . . . . . . . . . . . . . . . . 11
1.3.2 Integral Balances . . . . . . . . . . . . . . . . . . . . . . . 12
1.3.3 Local Balances . . . . . . . . . . . . . . . . . . . . . . . . 12
1.4 Modeling Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.5 Simulation Guidelines . . . . . . . . . . . . . . . . . . . . . . . . 13
1.6 Project Management / Communication Guidelines . . . . . . . . . . 14
2 Balance Laws and Transport Processes 17
2.1 Governing Equations . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.1.1 Continuum hypothesis . . . . . . . . . . . . . . . . . . . . 18
2.1.2 Balance Laws . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.1.3 Material Laws . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.1.4 Boundary Conditions . . . . . . . . . . . . . . . . . . . . . 23
2.2 Example: Heat- and charge transport in an integrated circuit . . . . 25
3
CCP Center for Computational Physics SmSy
3 Numerical Solution of Ordinary Differential Equations using Finite El-
ements 29
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.2 Model problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.3 Derivation of the Finite Element Method for the model problem . . . 30
3.3.1 Method of Weighted Residuals . . . . . . . . . . . . . . . . 30
3.3.2 Choice of shape functions . . . . . . . . . . . . . . . . . . 31
3.3.3 A rst worked example . . . . . . . . . . . . . . . . . . . . 33
3.4 Boundary condition types . . . . . . . . . . . . . . . . . . . . . . 34
3.4.1 Finite elements with Neumann boundary conditions . . . . . 35
3.4.2 A second worked example . . . . . . . . . . . . . . . . . . 35
3.5 Element mappings . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.5.1 Linear shape functions . . . . . . . . . . . . . . . . . . . . 37
3.5.2 Quadratic shape functions . . . . . . . . . . . . . . . . . . 38
3.5.3 A third worked example . . . . . . . . . . . . . . . . . . . . 38
4 Heat Conduction in a Cylindrical Stick 41
4.1 Analytical model in 1D . . . . . . . . . . . . . . . . . . . . . . . . 42
4.2 Building a 2D SESES model for the heated stick . . . . . . . . . . 42
4.3 3D SESES Model for the heated stick . . . . . . . . . . . . . . . . 45
5 Calorimetric Flow Sensor 49
5.0.1 Building a Flow Sensor Model in SESES . . . . . . . . . . 51
5.0.2 Constant Heating Power Mode . . . . . . . . . . . . . . . . 52
5.1 Constant Sensor Temperature Mode . . . . . . . . . . . . . . . . . 53
5.2 Dynamic Response . . . . . . . . . . . . . . . . . . . . . . . . . . 55
6 Electrostatically Driven Comb Actuator 59
6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
6.2 Theoretical background . . . . . . . . . . . . . . . . . . . . . . . 59
6.2.1 Parallel-plate capacitor: Useful formulas . . . . . . . . . . . 59
6.2.2 Comb actuator . . . . . . . . . . . . . . . . . . . . . . . . 62
6.2.3 Numerical simulation . . . . . . . . . . . . . . . . . . . . . 65
6.3 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
6.3.1 Theoretical Understanding . . . . . . . . . . . . . . . . . . 67
6.3.2 FEM Calculations . . . . . . . . . . . . . . . . . . . . . . . 68
6.3.3 Practical hints . . . . . . . . . . . . . . . . . . . . . . . . . 68
7 Modelling of a Micro-Reed Switch 71
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
7.2 Switching characteristics . . . . . . . . . . . . . . . . . . . . . . . 71
7.3 Basics of magnetostatics . . . . . . . . . . . . . . . . . . . . . . . 73
ZHW, Smsy, WS06/07 4
CCP Center for Computational Physics SmSy
7.3.1 Magnetic eld . . . . . . . . . . . . . . . . . . . . . . . . . 73
7.3.2 Ampres law . . . . . . . . . . . . . . . . . . . . . . . . . 75
7.3.3 Material in a magnetic eld . . . . . . . . . . . . . . . . . . 76
7.3.4 Magnetic circuit . . . . . . . . . . . . . . . . . . . . . . . . 77
7.3.5 Magnetic eld energy . . . . . . . . . . . . . . . . . . . . . 78
7.4 Analytical model . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
7.4.1 Estimation of the magnetic force . . . . . . . . . . . . . . . 79
7.4.2 Saturation effects . . . . . . . . . . . . . . . . . . . . . . . 80
7.5 Numerical model of the micro-reed switch . . . . . . . . . . . . . . 82
7.5.1 Parameterisation of the B-H-characteristic . . . . . . . . . . 82
7.5.2 Poisson-equation for the magnetic scalar potential . . . . . . 83
7.6 Symbols and units . . . . . . . . . . . . . . . . . . . . . . . . . . 85
8 Coupled Transport Phenomena in Fuel Cells 89
8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
8.2 The open circuit voltage . . . . . . . . . . . . . . . . . . . . . . . 92
8.3 The effect of pressure and gas concentration on the reversible open
circuit voltage: Nernst equation . . . . . . . . . . . . . . . . . . . 93
8.4 The non-equilibrium fuel cell voltage . . . . . . . . . . . . . . . . . 94
8.5 A numerical fuel cell model . . . . . . . . . . . . . . . . . . . . . . 102
8.6 Simulation results . . . . . . . . . . . . . . . . . . . . . . . . . . 105
A Vector Algebra and Calculus 109
A.1 Vector Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
A.1.1 Addition of Vectors . . . . . . . . . . . . . . . . . . . . . . 110
A.1.2 Components of a Vector . . . . . . . . . . . . . . . . . . . 110
A.1.3 Dot Product . . . . . . . . . . . . . . . . . . . . . . . . . . 110
A.1.4 Cross Product . . . . . . . . . . . . . . . . . . . . . . . . . 112
A.1.5 Scalar Triple Product . . . . . . . . . . . . . . . . . . . . . 112
A.1.6 Vector Tripple Product . . . . . . . . . . . . . . . . . . . . 113
A.1.7 Scalar and Vector Fields . . . . . . . . . . . . . . . . . . . 113
A.2 Vector Calculus . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
A.2.1 Partial Differentiation . . . . . . . . . . . . . . . . . . . . . 114
A.2.2 Taylor Series in more than One Variable . . . . . . . . . . . 115
A.2.3 Gradient of a Scalar Field . . . . . . . . . . . . . . . . . . . 115
A.2.4 Physical Interpretations of the Gradient . . . . . . . . . . . 116
A.2.5 Divergence of a Vector Field . . . . . . . . . . . . . . . . . 117
A.2.6 Physical Interpretation of Divergence . . . . . . . . . . . . . 118
A.2.7 Laplacian Operator . . . . . . . . . . . . . . . . . . . . . . 118
A.2.8 Physical Applications of the Laplacian . . . . . . . . . . . . 119
A.2.9 Curl of a Vector Field . . . . . . . . . . . . . . . . . . . . . 119
ZHW, Smsy, WS06/07 5
CCP Center for Computational Physics SmSy
A.2.10 Physical Interpretation of Curl . . . . . . . . . . . . . . . . 121
A.2.11 Divergence Theorem . . . . . . . . . . . . . . . . . . . . . 121
ZHW, Smsy, WS06/07 6
Introduction
Computer Aided Engineering (CAE) concerns the application of physical-mathemati-
cal models to real-world engineering problems. In particular, CAE-methods play a
key role in the industrial product development process and help to
Speed-up the development cycle of products.
Optimize the product performance.
Develop a thorough understanding of the underlying physical-chemical processes
Visualize device functionality not accessible through experiments.
Support the decision making process at different product development stages.
Eliminate potential failures and identify pitfalls.
The past decade has been a period of rapid progress for CAE. The elds of ap-
plication have been expanded and computational methods have become increas-
ingly sophisticated. The Center for Computational Physics (CCP) a team of
physicists, mathematicians and engineers, located at the Zurich University of Ap-
plied Sciences in Winterthur (ZHW) unites 15 years of experience in the develop-
ment and application of computer simulations. For simulating coupled physical and
chemical processes, we use our in-house multiphysics nite element (FE) code NM
SESES (see http://ccp.zhwin.ch/seses/ for details). Our expertise in modeling and
simulation includes the following areas
Micro-Opto-Electro-Mechanical systems (MOEMS).
Magnetic eld and eddy current simulations.
Piezoelectric actuators and sensors.
Electrochemical processes (fuel cells, batteries).
Microuidics (microreactors, membranes, ow sensors).
7
CCP Center for Computational Physics SmSy
Thermal transport by convection, conduction and radiation.
Optical systems (OLEDs, solid state lasers, waveguides).
Semiconductor devices.
In general, an engineering problem to be analyzed with CAE tools is modeled by
identifying relevant physical effects together with a hierarchical structure. Often
a problem can be described by a network model on a high level of abstraction.
When it comes to understanding the physical origin of properties of system com-
ponents, however, numerical techniques like nite element methods are needed.
In this course, the theoretical background is provided for approaching engineering
problems by means of system, network and numerical modeling. Emphasis is put
on the ability to quickly form a solution path while references to in-depth literature
are also given. This document is addressed to engineering students majoring in
Computer Aided Engineering and is a prerequisite for efcient problem solving in
practice. The contents have been developed at the Zurich University of Applied
Sciences Winterthur.
ZHW, Smsy, WS06/07 8
Chapter 1
Guidelines to CAE
1.1 Computer Simulations in Product Development
Computational engineering, i. e., enhanced of product development by computa-
tional methods, requires experience and a variety of different skills. The following
list contains ingredients that are essential to it.
1.1.1 Physical Understanding
By what types of transport does the heat or particle transfer occur ?
Does one transport mechanism dominate over the others ?
1.1.2 Modeling
What are the correct governing equations for a specic process or phenomena ?
How to dene an appropriate domain for balancing the conservation properties ?
Wow to dene appropriate boundary conditions between the model domain and
its environment ?
Are there analogies to the considered processes and phenomena in other tech-
nical elds ?
1.1.3 Mathematical Methods
Formulation of the governing equations in mathematical form.
9
CCP Center for Computational Physics SmSy
For simplied cases, are there analytical solutions to the governing equations for
validation purposes ?
1.1.4 Computer Simulation
Which tools are best suited for specic simulation task ?
What numerical methods should be used in order to obtain reliable solutions ?
1.2 Physical Basics
Above all, a sound physical understanding of the underlying physical and chemical
phenomena and processes must be developed. Next, the physical picture needs
to be cast into a mathematical form that allows for the solution of the relevant state
variables.
1.2.1 Transport Processes
Transport of conservation properties: mass, momentum, energy, electrical charge,
etc.
Rhere are often generic expressions for balance and constitutive equations (in-
dependent of the technical eld).
1.2.2 Conversion Processes
Electro- and bio-chemical reactions.
Conversion of electrical power or kinetic energy into heat.
Semiconductor generation and recombination effects.
1.2.3 Methodology
Balance equations for conservation properties.
Constitutive equations to connect uxes with potential changes as driving forces.
Boundary conditions to specify the interactions between the model and its envi-
ronment.
ZHW, Smsy, WS06/07 10
CCP Center for Computational Physics SmSy
1.2.4 Simulation Software
Multipurpose mathematics programs: Matlab [8], Maple [6], Mathematica [7].
Network simulators: PSpice [13], Simulink [9].
FE-Tools: SESES [12], ANSYS [2], FEMLab [4].
CFD-Tools: CFX [3], Fluent [5], StarCD [14], CFD-ACE+ [1].
Scripting languages: Perl [10], Python [11].
1.3 Modeling Basics
There are generally a variety of modeling strategies that can be applied to a spe-
cic problem. As trivial as it is, one should always start with the simplest model
that one can think of and add further complexity thereafter. Often, valuable insight
is gained by comparing models with different levels of abstraction to each other.
1.3.1 Dimensional Analysis
Advantages
Estimation of characteristic times and lengths without the requirement to solve
differential equations.
Reduction of the number of parameters through formation of dimensionless
groups.
Estimations are possible for systems that would otherwise be too complex to be
studied.
Allows extrapolation of experimental data.
Disadvantages
Often only rough estimates are possible.
Does not provide a detailed understanding of the underlying processes and phe-
nomena.
Unsuitable for optimization tasks where geometric details are important.
ZHW, Smsy, WS06/07 11
CCP Center for Computational Physics SmSy
1.3.2 Integral Balances
Advantages
Often provides more than dimension analysis.
Often, simple numerical or analytical solutions for transport equations are avail-
able.
Allows to study fundamental issues like does it work in principle or not.
Disadvantages
Only provides limited understanding of the underlying processes and phenom-
ena.
Unsuitable for optimization tasks where geometric details are important.
1.3.3 Local Balances
Advantages
Very accurate, provided that the models provide a reasonable description of
reality.
Allows for a detailed understanding of the underlying processes and phenom-
ena.
Ideal for optimization tasks where coupled phenomena take place and where
geometric details are important.
Disadvantages
Calculations can be very lengthy (often large requirements in CPU power and
RAM).
Simulation codes are often difcult to learn and require experience.
There is a general risk to be drowned by the huge amounts of data generated.
ZHW, Smsy, WS06/07 12
CCP Center for Computational Physics SmSy
1.4 Modeling Guidelines
When setting-up the model keep in mind the main goals as well as the time
constraints of the project. The model should give answers to questions that need
to be answered in order to reach the project goals. Always try to understand the
results obtained. How do they compare with your expectations ?
Identify all physical parameters that might be important. Classify the identied
parameters according to their expected relevance.
Start with the simplest model that describes the basic aspects of the consid-
ered problem. Build more detailed models upon the basic one. Compare them
to each other in order to improve your understanding of the impact of various
physical-chemical phenomena and other model features.
Choosing an appropriate modeling domain is essential. The domain has to be
chosen such that meaningful boundary conditions can be applied to discriminate
the model from its surroundings.
Perform a sensitivity analysis of physical parameters as well as the types of
boundary conditions to see how they inuence the results.
Analytical models: whenever possible do back-of-the-envelope calculations to
get a rough idea of the results to expect. Apply more advanced analytical models
and check that the numerical results are within allowable limits.
Symmetries: whenever possible exploit symmetries in the eld variables to sim-
plify the model, preferentially from 3D to 2D.
Volume averaging: whenever possible, try to incorporate geometric details into
effective transport parameters using volume averaging methods.
1.5 Simulation Guidelines
When dening physical models in a simulation program be aware of the com-
plete set of model parameters that have to be adjusted. For example, when
solving steady-state heat conduction problems, only the thermal conductivity is
required. However, when transient heat conduction problems are solved, the
density and the heat capacity also needs to be prescribed.
Write all material properties and all important model parameters to a properties
le. This helps when reconsidering older simulations as well as to track down
incorrect parameter settings.
ZHW, Smsy, WS06/07 13
CCP Center for Computational Physics SmSy
Always do consistency checks, for example through evaluation of mass and en-
ergy balances.
To increase efciency run over night batch jobs.
Think about strategies to track down errors efciently.
Make a list of issues related to the interface, the syntax, and the results which
were not understood and discuss them with others.
Convergence criteria: check how your results alter when the convergence crite-
ria is changed.
Initialization conditions: check if the results depend on the initialization con-
ditions applied. This is a common problem whenever non-linear phenomena
(chemical reactions, thermal radiation, etc.) are present.
Mesh-size: check if the results depend on the mesh-size.
Temperature-dependent material parameters: check if temperature-dependent
material parameters are used within valid temperature ranges.
For large models that require constant modications use a version control sys-
tem such as CVS that keeps track of the changes made. This allows one to
easily get back to previous model versions.
1.6 Project Management / Communication Guidelines
Pursue a goal-oriented approach: in the end, it is not just the developed model
counts, but also the goals reached to achieve it. Identify the goals to be reached
and the main problems to be solved. Develop strategies of how to approach
them and discuss them with other project members. Make a list of questions that
need to be answered in order to reach the project goals. Ask yourself from time
to time what is the current status of your work. Are you on time ? In case you
have unforeseen difculties with your work, talk to other project members. Take
responsibilities within the project. A fair distribution of responsibilities among the
project members makes the project more fun for everybody.
Meeting protocols: its very important to keep track of the issues discussed and
the tasks assigned.
To-do-lists: helps to keep track of main goals as well as of details.
ZHW, Smsy, WS06/07 14
CCP Center for Computational Physics SmSy
Reports and presentations: helps yourself and others to see the current status
of your work.
Make clear to other project members the differences between the model you
have developed and the real world. Point out the capabilities as well as the
limitations of the model.
Data representation: extract the key results from the simulations in a way so that
they can be understood by yourself and others. Try to condense your ndings
into a small number of tables and graphs.
Getting stuck: get feedback from others whenever you get stuck.
Transparency and openness: make your work transparent to other project mem-
bers.
Communication: think about how to best communicate your ndings to others.
References
[1] ACE-CFD+ CFD-Software: http://www.cfdrc.com/
[2] ANSYS FE-Software: http://www.ansys.com/
[3] CFX CFD-Software: http://www-waterloo.ansys.com/cfx/
[4] FEMLab FE-Software: http://www.femlab.com/
[5] Fluent CFD-Software: http://www.uent.com/
[6] Maple: http://www.maplesoft.com/
[7] Mathematica: http://www.wolfram.com/
[8] Matlab: http://www.mathworks.com/
[9] Simulink: http://www.mathworks.com/
[10] Perl scripting language: http://www.perl.org/
[11] Python scripting language: http://www.python.com/
[12] NM-SESES FE-Software: http://ccp.zhwin.ch/seses/
[13] PSpice network simulator: http://www.orcad.com/
[14] StarCD CFD-Software: http://www.cd-adapco.com/
ZHW, Smsy, WS06/07 15
CCP Center for Computational Physics SmSy
ZHW, Smsy, WS06/07 16
Chapter 2
Balance Laws and Transport
Processes
The design of a numerical model is a creative and often challenging task. For prac-
tical applications, simple recipes usually do not exist. Rather, it is the combination
of physical insight, a sound basis in mathematics and last but not least comprehen-
sive modeling experience that leads to the correct model and strategies for model
validation, respectively. One should always keep in mind that a nice graphical out-
put is never proof of correct and useful results. This is especially true nowadays,
where a number of easy to use, commercially available simulation packages make
it easy to produce nice pictures. In this section we are going to
Explain fundamental concepts to model transport processes.
Show how to put these concepts into mathematical language together with some
examples.
A transport model is complete when the governing equations have been specied.
The governing equations consist of the following parts.
Conservation Laws: Exist for countable quantities such as mass m, number
of molecules N, electrical charge Q, momentum

I and energy E. Conserva-
tion laws are universal, i.e. they are independent of the materials considered
and they always need to be satised. As an example, the conservation laws in
uid mechanics are the mass and momentum balances, of which former is also
known as the continuity equation. In thermodynamics, the energy and entropy
balances additionally come into play. These balance equations are also known
as the rst and second laws of thermodynamics.
Material Laws: Balance equations by themselves are insufcient for a com-
plete problem description, i. e. they usually contain more unknowns than avail-
able equations. Furthermore, they often contain unknowns such a ux-quantities
17
CCP Center for Computational Physics SmSy
that cannot be directly measured. However, it turns out that further relationships
exist between these unknowns, i. e., they are not independent of each other.
These relationships are called material laws or constitutive equations. As the
name suggests, they do not hold universally, but only for particular materials or
material classes, such as the class of ideal gases or the class of incompressible
uids.
Boundary Conditions: Are required to cut-off a model, i. e. to separate the
modeling domain from its surroundings. The number of boundary conditions
required is determined by the degree (highest derivative) of the governing equa-
tions involved. Often, the solution strongly depends on the chosen boundary
conditions and an improper choice may render the results useless, irrespective
of the numerical accuracy. Using the wrong boundary conditions means that the
model is incorrect or its connection to the exterior world is not correctly specied.
Combining these ingredients together, we obtain a coupled system of governing
equations belonging, almost exclusively, to the class of Partial Differential Equa-
tions or PDE. In light of the specic geometries and boundary conditions that ap-
pear in realistic problems and the complexity of material laws, it is no surprise that
analytical solutions to these problems can rarely be found. This in turn, motivates
the use of numerical tools.
2.1 Governing Equations
2.1.1 Continuum hypothesis
The eld equations used for the description of transport processes depend on the
so-called continuum hypothesis. In continuum theory, physical effects on the scale
of single or few molecules are neglected. Instead, eld quantities that obey the
continuum approximation are assumed to be averaged over a very small, but nite
volume V
cont
=
1
V
cont
_
V
cont
dV, V
1/3
cont
l
c
, (2.1)
where is a molecular dimension of the order 1 = 10
10
m and l
c
is a char-
acteristic length of the considered system of the order l
c
> 1m. The following
consequences arise from the continuum hypothesis
Distinction between convective (macroscopic) and conductive (molecular) trans-
port processes.
ZHW, Smsy, WS06/07 18
CCP Center for Computational Physics SmSy
Necessity for boundary conditions to discriminate the modeling domain from its
surroundings.
2.1.2 Balance Laws
For the theoretical description of a dynamical system, as a rst step, one has to
ask oneself about the relevant physical-chemical phenomena taking place. These
phenomena usually involve transport processes of quantities for which conserva-
tion principles do apply. The following list gives a number of physical quantities to
be conserved.
Mass m =
_

dV.
Momentum

I =
_

vdV.
Energy E =
_

(u+
1
2
v
2
)dV, Helmholtz, Joule, Mayer 1845.
Consider an arbitrary conservation quantity = m,

I, E, .... For a nite and


stationary arbitrary control volume with boundary , the conservation principle
can be stated as follows
Accumulation of within =convective ux J
conv
of over
+conductive ux J
cond
of over
+production and/or loss of within
We now aim at putting the above statement into mathematical terms. Let be the
density related to through the relation
=
_

dV . (2.2)
The accumulation of then follows as
d
dt
=
_

t
dV. (2.3)
As illustrated in Fig. 2.1, the differential volumetric ux d

V through the differential


surface element dA is given by
d

V = dAv n =v dn. (2.4)


ZHW, Smsy, WS06/07 19
CCP Center for Computational Physics SmSy
Figure 2.1: Differential volumetric
ux d

V through the differential sur-


face element dA characterized by
its normal vector n. The differen-
tial volume is given by dV =dAdl =
dAdtv n, wherev denotes the uid
velocity through dA. Hence, d

V =
dAv n.
Consequently, the convective ux of over follows as
J
conv
=
_

v dn. (2.5)
Similarly, the conductive ux of over can be expressed as
J
cond
=
_

j
cond
dn, (2.6)
with

j
cond
denoting the local conductive ux-vector. By dening the production
density related to by
=
_

dV , (2.7)
the integral formulation of the conservation law follows through combination of
(2.3)
_

t
dV =
_

_
v +

j
cond
_
dn+
_

dV. (2.8)
To obtain a differential formulation of (2.8), we rst need to convert the surface into
a volume integral by use of the divergence theorem of Gauss
_

k dn =
_

kdV. (2.9)
This form states that for a system at steady state, the total ux of

k over the sur-


face of the control volume is equal to the sum of all productions and losses within
. These productions and losses are causing a local, spatial variation of

k, rep-
resented by its divergence

k. With (2.9) and since the control volume is


arbitrary, Eq. (2.8) is equivalent to the differential formulation

t
= (v +

j
cond
) +. (2.10)
ZHW, Smsy, WS06/07 20
CCP Center for Computational Physics SmSy
Both formulations (2.8) and (2.10) are quite general in that they describe time-
dependent, molecular as well as convective transport processes in the presence
of different types of sources and sinks. In the case of stationarity, i. e. time-
independent processes, the time-derivative /t in (2.8) and (2.10) vanishes. For
systems at rest, we havev = 0 and (2.8), (2.10) simplify to
_

j
cond
dn =
_

dV , (2.11)
or equivalently

j
cond
= . (2.12)
As shown in the following examples, a large class of physical phenomena can be
understood in terms of the above balance equations for some conserved ux

j
cond
.
B
1
: Charge balance with

j
cond
=

D the dielectric displacement and = q the
charge density.
B
2
: Thermal energy balance with

j
cond
=

j
th
the molecular heat energy ux and
= q the heat source density.
B
3
: Force balance in a solid body with

j
cond
= s the stress tensor and =

f
the body force. Note that the ux eld

j
cond
is here a tensor and the source
a vector so that (2.11) and (2.12) become vector equations.
B
4
: Current balance with

j
cond
=

j
el
the electric current and a zero source den-
sity = 0.
B
5
: A particular case of B
4
for currents with positive and negative charges.
We then have two current balances

j
cond
=

j

el
,

el
for negative and posi-
tive charges and the recombination R as source = R, R with the total
current

j
el
=

el
+

el
being divergence free, i. e.

j
el
= 0.
B
6
: Diffusive ux, where each species has its own balance equation with

j
cond
=

the species molecular mass ow and =

the production rate


for the species with

= 0 and

= 0.
The mechanical case for the stress s deserves special attention since applied
forces deform the body and force balance must be expressed as
_
()
s dn =
_

()

f d, (2.13)
with

=x +u the mechanical deformation, u the displacement at the point x and
the domain of the initial conguration at rest. In the kinematic linear theory, we
assume small displacement u 1 so that we have

() thus tting into the


general form of balance equations.
ZHW, Smsy, WS06/07 21
CCP Center for Computational Physics SmSy
2.1.3 Material Laws
There are two types of commonly encountered material laws, those that represent
interrelations between state variables and those that relate uxes to the gradients
of associate elds.
State Variables and Equations of State: A state variable characterizes as
its name suggests the thermodynamic state of a system. Examples for thermody-
namic state variables are: temperature T, pressure p, density , specic internal
energy u and specic enthalpy h = u+ p/.
1
The thermal equation of state is an
example of a material law that represents a relation between T, p and
f (T, p, ) = 0. (2.14)
This means that T, p and cannot be varied independently of each other. For
example, when T and p are given, follows from (2.14). Specically for ideal
gases, we have
p =
R
M
T, (2.15)
with R = 8.314 J/(mol K) and M the molecular weight in kg/mol. The caloric
equation of state gives a relation between the internal energy u and the state vari-
ables T, p, .
2
Because of (2.14), u can only depend on two independent state
variables
u = u(T, p), u = u(T, ). (2.16)
For most gases, liquids and solids, u can be well approximated as a linear function
of temperature only, i. e.
u = c
v
T +u
0
, (2.17)
with c
v
the heat capacity at constant volume and u
0
an integration constant.
Fluxes and the Gradients of Fields: The conductive or molecular ux per
area

j
cond
of a conservation quantity can generally be related to the gradient

of an associated eld

. In the simplest case,

j
cond
depends linearly on

,
i. e.

j
cond
=

x
, (2.18)
1
Note that state variables can be combinations of other state variables, as in the case of , u
and h.
2
The internal energy is the sum of all microscopic energies of the considered system. In a gas,
U is primarily given by the kinetic energies (translation, rotation, oscillation) of single molecules.
In liquids, interaction energies between neighboring molecules come into play, whereas in solids,
translational and rotational degrees are absent.
ZHW, Smsy, WS06/07 22
CCP Center for Computational Physics SmSy
where represents a material-dependent coefcient that can be a function of the
state variables (T, ).
3
The list below gives several examples of material laws of
the this type.
L
1
: Ohms law for a conductor with the drift current

J =

E proportional to the
electric eld

E and the conductivity.
L
2
: An improvement of Ohms law with the addition of a diffusion current

J =

E+Dn with D a diffusion constant and n the mobile carrier density. Note
that in general and D are related to each other.
L
3
: Fouriers law

j
th
= T with the heat ux

j
th
proportional to the tempera-
ture gradient T and the thermal conductivity.
L
4
: Hooks law s =Ce(u) of linear elasticity withe(u) =
1
2
(u+u
T
) the engi-
neering strain, s stress tensor, C the elasticity tensor and u the mechanical
deformation.
More complex material laws are nonlinear functions of the gradient eld

e.g.
hyper-elastic, hypo-elastic and plastic mechanical models. For some materials,
good models are not known as difculties arise in the mathematical description
of the physical world. Clearly complex models often have more parameters to be
specied which may not be ready available thus contributing to the uncertainty of
the model description.
2.1.4 Boundary Conditions
Combining together balance laws and material laws, we obtain governing equa-
tions in the form of PDEs for some unknown elds to be determined by solving the
equations. Some typical examples to be discussed later in more details are
E
1
: The electrostatic Poisson equation .

= for the potential .


E
2
: The thermal diffusion equation .T = q for the temperature T.
E
3
: The linear elasticity equation .(C (
u+u
T
2
)) =

f for the displacement u.
E
4
: The Ohmic model of current ow . = 0 for the potential .
E
5
: The drift-diffusion model of a semiconductor. This is an improvement of E
4
by
including diffusion .(D
n
e
/V
T
e
/V
T
n) = R and .(D
p
e
/V
T
e
/V
T
p) =
R for the electron and hole densities n, p.
3
The fact that in general = (T, ) introduces nonlinearity into Eq. (2.18). However, the
dependence of on other state variables is usually weak and therefore can be often neglected.
ZHW, Smsy, WS06/07 23
CCP Center for Computational Physics SmSy
In order to be able to solve these equations, one needs to specify some val-
ues at the boundary of the modeling domain . These constraints are called
boundary conditions (BCs). BCs represent the exterior world i.e. everything
happening in the complement of must be condensed into BCs on . The
number and type of BCs required is determined by the degree (highest derivative)
of the PDEs involved, which in our case is generally two. If the problem is time
dependent, initial conditions on need also to be specied. Let us discuss the
commonly used BCs for the solution of a degree two problem.
Dirichlet Boundary Condition: Named after the nineteenth century French
analyst Lejeune Dirichlet this BC species the value of the eld on the bound-
ary
= f
Dirichlet
(x, t). (2.19)
Neumann Boundary Condition: Named after Carl Gottfried Neumann this BC
species the component of the ux

F normal to the boundary. This can be stated
in the form

F n = f
Neumann
(x, t), (2.20)
with n the unit vector normal to the boundary and pointing in the outward
direction i.e. the exterior of . The ux

F is the value within the divergence
operator .(.) of the equations E
1
E
5
and can be seen to be directly related to
the eld gradient . The special case where the normal ux component at the
boundary is zero

F n = 0, is called a natural BC.
Neumann Mixed Boundary Condition: This BC is a generalization of the
Neumann BC, where the normal component of the ux may depend on , i. e.

F n = f
Mixed
(,x, t). (2.21)
Floating Boundary Condition: This BC is somewhat similar to a Dirichlet
BC where the eld value over the boundary is prescribed but now only up to a
constant C
= f
Floating,1
(x, t) +C, (2.22)
and where the value of the constant C is determined by prescribing the integral of
the normal ux component over the boundary i. e.
_

F dn = f
Floating,2
(t). (2.23)
Jump Boundary Condition: This BC cannot be considered a native BC since
it is not dened on the boundary . It is an artefact used to dene a discontinuous
eld on some internal surface of

= f
Jump
(

n,

,x, t), (2.24)


ZHW, Smsy, WS06/07 24
CCP Center for Computational Physics SmSy
with the superscripts and indicating evaluation on two different sides of the
surface. A jump BC is often used to replace a complex physical process taking
place on a surface by an analytical model and for this reason the jump value f
Jump
is often a function of the eld and normal ux component. It is to be noted, that in
general across the jump we have

F

n =

n, but this condition may be violated


by dening a Neumann BC on the same surface.
2.2 Example: Heat- and charge transport in an inte-
grated circuit
The following example studies heat and charge transport in two legs of an inte-
grated circuit (IC) that is soldered to a printed-circuit board [2]. The geometry of
the modeled device covers half of the support frame for the IC. Fig. 2.2 shows the
model geometry including the two legs that are made of copper, while the solder
joints are made of an alloy containing tin.
It is important to understand the coupling between charge transport and heat trans-
port to guarantee a failure-free operation of the IC. Therefore, the model accounts
for the coupling of thermal and electronic current balances. The ohmic losses in
the metal legs generate heat, which increases the conductors temperature and
thus also changes the materials electric conductivity.
The model is formulated in terms of balance equations for the electric current and
heat that are similar to Eq. 2.10. The electric current density j
el
is driven by a local
gradient in the electric potential
j
el
=, (2.25)
where is the electrical conductivity of the respective metal. For a steady-state
model we set the time derivative in Eq. 2.10 to zero. Moreover, electron transport
does not include a convective transport mechanism, that is, the term including the
velocity can be neglected, too. There is no current source present in the metal, ie.
= 0, and we obtain the electronic current balance equation
() = 0. (2.26)
The electric conductivity depends on the local temperature
=
1

0
(1+(T T
0
))
, (2.27)
where
0
is a reference resistivity at a reference temperature T
0
, and is a pro-
portionality constant for the temperature dependence.
ZHW, Smsy, WS06/07 25
CCP Center for Computational Physics SmSy
The thermal energy balance equation is also obtained from Eq. 2.10. It includes a
heat production term = q
el
arising form the losses in the electronic conductors,
and a term for the conductive heat ux j
heat
=T,
(T) = q
el
(2.28)
The thermal concuctivity is abbreviated with , it is assumed to be constant.
The ohmic heat production term is
q
el
= | V |
2
. (2.29)
To obtain a solution, boundary conditions for the balance equations 2.26 and
2.28 have to be specied for all domain boundaries. The boundary conditions for
the electronic current balance are as follows:
At the solder-joint bases, where the joints make contact to the circuit board,
the potential is set to a given value
V
0
= V
device
, (2.30)
that is, a Dirichlet boundary condition is specied at the contact points.
The boundary condition for the top surface of the device gives the current
density as a function of the potential difference over a thin oxide lm
() n = k(V V
g
), (2.31)
where n denotes the outward pointing normal vector of the boundary, k
equals the lms conductance and V
g
is the ground potential (V
g
= 0Volt).
This is a Neumann boundary condition, that is, the ux over the surface
() n is specied.
All other boundaries are assumed to be electrically insulating
() n = 0. (2.32)
The boundary conditions for the thermal energy balance are:
For both the lm surface and the solder-joint bases we assume
(T) n = 0, (2.33)
i.e. these boundaries are modelled to be thermally insulating.
ZHW, Smsy, WS06/07 26
CCP Center for Computational Physics SmSy
Figure 2.2: Unstructured geometrical grid that is used for the discretisation of the
partial differential equations.
All other surfaces are in contact with the surrounding air at that is at temper-
ature T
amb
. These surfaces are cooled by natural convection
(T) n = h(T T
amb
), (2.34)
where h is the heat transfer coefcient.
The purpose of the model is to calculate the unknown eld values, that is,
the position dependent temperature T and the electric potential . Approximated
solutions for the eld variables can be obained with the Finite Element Method
(FEM). Exemplary simulation results were obtained with the Software COMSOL
Multiphysics [2]. Fig. 2.4 shows the electric potential distribution in the model do-
main at a voltage difference of 0.11mV between the right solder joints and the
outer surface of the lm. The electric current ow is indicated by the arrows in
the plot. The left solder joint is assumed to be broken leading to a contact failure
(electrical insulation), and thus, no electric current ows in the left contact leg. The
temperature distribution in the model domain is shown in Fig. 2.3. The model can
be used to simulate the thermal load in the IC for different operating conditions,
and to perform failure analysis of the IC.
References
[1] NM-SESES Tutorial, NM Numerical Modelling GmbH, http://www.nmtec.ch,
Thalwil, Switzerland, 2005.
[2] COMSOL Multiphysics Quick Start and Quick Reference, COMSOL AB,
http://www.comsol.com, Stockholm, Sweden, 2005.
ZHW, Smsy, WS06/07 27
CCP Center for Computational Physics SmSy
Figure 2.3: Temperature distribution.
Figure 2.4: Electric potential distribution.
ZHW, Smsy, WS06/07 28
Chapter 3
Numerical Solution of Ordinary
Differential Equations using Finite
Elements
3.1 Introduction
The Finite Element Method is one of the the most powerful computer-oriented
methods ever devised to analise practical engineering problems. Today, Finite
Element analysis is an integral and major component in many elds of engineering
design and manufacturing. One of the reasons for the wide applicability of Finite
Element Methods is that they are intrinsically well-suited to treating second order
partial differential equation systems (PDE). An example of a second order PDE
system was given in Section 2.2. Most PDEs encountered in science and engi-
neering are of second order, i.e. the highest derivative term is a second partial
derivative.
The FEM approach is explained for a one-dimensional test problem in this chapter.
However, the same terminology applies to two- and three dimensional models. An
excellent introductory book on FEM was written by Reddy [3].
3.2 Model problem
For the purposes of this lecture, we will restrict consideration to the following model
problem. Let us suppose that we wish to compute the solution to the ordinary
differential equation
d
2

dx
2
= 0, (3.1)
29
CCP Center for Computational Physics SmSy
for the domain = 0 x L, where we know that (x = 0) = 0 and (x =
L) = 1. As we saw before the exact solution for this problem is
(x) =
sinhx
sinhL
. (3.2)
3.3 Derivation of the Finite Element Method for the
model problem
We shall begin to develop the nite element method for the solution of the model
problem described in the previous section. There are several different approaches
for deriving the nite element method. We shall follow the method of weighted
residuals, which is probably the simplest to understand.
3.3.1 Method of Weighted Residuals
In the nite element method we wish to approximate in our domain . This
approximation we shall denote by

. In the nite difference approach, the approxi-
mation was pointwise and in the nite element approach the approximation will be
given by

=
M

i=1

i
N
i
, (3.3)
where

i
are constant coefcients and N
i
are linearly independent functions, often
called shape functions.
When building our approximation, we wish to ensure that

satises the bound-
ary conditions exactly, so that

(x =0) =0 and

(x =L) =1. In addition, we wish
that as M , our approximation

tends in some way to the exact solution .
If our approximation is not exact, then the differential equation (3.19), will no
longer be satised exactly, that is
R

:=
d
2

dx
2



_
d
2

dx
2

_
=
d
2

dx
2


,= 0, (3.4)
and we call the remainder R

, the residual. For a good approximation, we want to


make R

as small as possible. It turns out that this can be achieved, by multiplying


R

by a series of weights W
i
, i = 1, , M integrating over the domain and setting
the result to 0. This has been done below
_

W
i
d=
_
L
0
_
d
2

dx
2

_
W
i
dx = 0 i = 1, , M. (3.5)
ZHW, Smsy, WS06/07 30
CCP Center for Computational Physics SmSy
Depending on the choice of weights, different numerical methods can be obtained.
We wish to pursue the standard Galerkin nite element method, where the weights
are chosen to be the shape functions W
i
= N
i
, giving
_
L
0
_
d
2

dx
2
N
i


N
i
_
dx = 0 i = 1, , M. (3.6)
An important tool in the derivation of the nite element method is the integration by
parts formula, this states that
_
u
dv
dx
dx = uv
_
du
dx
vdx. (3.7)
Applying this formula to the term
d
2

dx
2
N
i
in equation (3.6) gives
_
L
0
_
d

dx
dN
i
dx
+

N
i
_
dx =
_
d

dx
N
i
_
x=L

_
d

dx
N
i
_
x=0
i = 1, , M. (3.8)
In doing this, we note that the second oder derivative has now disappeared and we
have an equation involving only rst order derivatives. If we substitute

=
M

i=1

i
N
i
in to the terms on the left of equation (3.8) we obtain
M

j=1

j
_
L
0
_
dN
j
dx
dN
i
dx
+N
j
N
i
_
dx =
_
d

dx
N
i
_
x=L

_
d

dx
N
i
_
x=0
i = 1, , M.
(3.9)
where we have chosen to leave the boundary terms on the right hand side of the
equation untouched. We may write this equation as linear system of equations

=r, (3.10)
where

= (

1
,

2
, ,

M
)
T
and typical entries in

K andr are given by


K
i j
=
_
L
0
_
dN
j
dx
dN
i
dx
+N
j
N
i
_
dx, r
i
=
_
d

dx
N
i
_
x=L

_
d

dx
N
i
_
x=0
. (3.11)
3.3.2 Choice of shape functions
To be able to solve the linear system in equation (3.22), we need to specify the
shape functions N
i
. In the nite element method, we rst subdivide in to a num-
ber of non-overlapping sub-domains or elements and construct the approximation
ZHW, Smsy, WS06/07 31
CCP Center for Computational Physics SmSy
Figure 3.1: A typical nite element mesh, containing 5 elements and 6 Nodes
in a piecewise manner over each sub-domain. An illustration of the subdivision of
the domain is given in Figure 3.1.
Thus we may write a typical contribution to the matrix

K as
K
i j
=
E

e=1
K
e
i j
where K
e
i j
=
_
_
dN
j
dx
dN
i
dx
+N
j
N
i
_
d
e
, (3.12)
where E is the number of elements and =
E

e=1

e
.
The shape functions can also be dened in a piecewise manner by using dif-
ferent expressions in the various sub-domains from which the total domain is de-
veloped. Finite element shape functions are usually dened so that they are 1 at
one node and 0 at all other nodes. In addition they are often chosen to vary lin-
early within the elements in which the node associated with it occurs, this gives
them a hat like appearance, for this reason they are often called hat functions. An
illustration of the shape functions is shown in Figure 3.2.
Figure 3.2: Typical linear nite element shape functions
Here we observe that the function N
1
is only non-zero in element 1, for all
other elements it is zero, also the function N
2
is only nonzero in elements 1 and
2. Similar observation can be made about the other functions. Consider Figure 3.3
which introduces a numbering convention for an element and its nodes. Using this
convention we write the shape functions associated with this element as
N
p
= N
e
p
=
x
q
x
h
e
, N
q
= N
e
q
=
x x
p
h
e
, (3.13)
where h
e
= x
q
x
p
= x
e+1
x
e
. It is now possible to obtain K
e
i j
for different values
ZHW, Smsy, WS06/07 32
CCP Center for Computational Physics SmSy
Figure 3.3: Numbering convention for elements and nodes
Figure 3.4: A mesh of 2 elements
of i and j:
K
e
i j
= 0 when i, j ,= p, q
K
e
pq
= K
e
qp
=
_
x
e+1
x
e
dN
q
dx
dN
p
dx
+N
q
N
p
dx =
h
e
6

1
h
e
K
e
pp
= K
e
qq
=
_
x
e+1
x
e
_
dN
p
dx
_
2
+N
2
p
dx =
1
h
e
+
h
e
3
3.3.3 A rst worked example
If we assume that the nodes are equally spaced, so that x
i
= (i 1)h where h =
L/(M1) = L/2 then, for the mesh containing two elements, shown in Figure 3.5
we get

K
1
=
_
_
1
h
+
h
3
h
6

1
h
0
h
6

1
h
1
h
+
h
3
0
0 0 0
_
_
,

K
2
=
_
_
0 0 0
0
1
h
+
h
3
h
6

1
h
0
h
6

1
h
1
h
+
h
3
_
_
(3.14)
By adding these contributions we obtain the matrix

K =
_
_
1
h
+
h
3
h
6

1
h
0
h
6

1
h
2
h
+
2h
3
h
6

1
h
0
h
6

1
h
1
h
+
h
3
_
_
(3.15)
The linear system for the nite element solution of the problem is then
_
_
1
h
+
h
3
h
6

1
h
0
h
6

1
h
2
h
+
2h
3
h
6

1
h
0
h
6

1
h
1
h
+
h
3
_
_
_
_

3
_
_
=
_
_
_
_

dx

x=0
0
d

dx

x=L
_
_
_
_
. (3.16)
ZHW, Smsy, WS06/07 33
CCP Center for Computational Physics SmSy
From the boundary conditions, we already know that
1
= (x = 0) = 0 and
3
=
(x = L) = 1, therefore, we can dispose of the rst and last equations and obtain
that
_
2
h
+
2h
3
_

2
=
1
h

h
6
(3.17)
For the particular case of L = 1 we obtain the solution

2
= 0.4423076 which
compares well with the exact result
_
x =
1
2
_
= 0.4434094.
It should be apparent that it is not necessary to compute all the entries for each
element. Instead we usually perform

k
e
=
_
x
e+1
x
e
_
dN
e
p
dx
dN
e
p
dx
+N
e
p
N
e
p
dN
e
q
dx
dN
e
p
dx
+N
e
q
N
e
p
dN
e
p
dx
dN
e
q
dx
+N
e
p
N
e
q
dN
e
q
dx
dN
e
q
dx
+N
e
q
N
e
q
_
dx =
_
1
h
e
+
h
e
3
h
e
6

1
h
e
h
e
6

1
h
e
1
h
e
+
h
e
3
_
(3.18)
which can then be added to the correct position in the matrix

K for each element


using the connectivity information
Element 1 2
p 1 2
q 2 3
We wish to explore the topics of boundary conditions as well as exploring the
possibilities of quadratic shape functions in the following.
3.4 Boundary condition types
Let us remind ourselves of our model problem We wish to compute the solution to
the ordinary differential equation
d
2

dx
2
= 0, (3.19)
for the domain = 0 x L, where we know that (x = 0) = 0 and (x =
L) = 1. As we saw before the exact solution for this problem is
(x) =
sinhx
sinhL
. (3.20)
Up until now we have always prescribed the values of the solution at the two
ends of our domain. Namely that (x = 0) = 0 and (x = L) = 1. In fact, the
prescription of these values is given the special name, boundary conditions. In
this example we prescribed known values of the solution, this type of boundary
conditions is called a Dirichlet boundary condition.
An alternative boundary condition, often used with ordinary differential equa-
tions, is where the values of the rst derivative of the dependent variable with
ZHW, Smsy, WS06/07 34
CCP Center for Computational Physics SmSy
respect to the independent variable are prescribed, eg
d
dx
= f (x). This type of
boundary condition is called a Neumann boundary condition.
Note that we could formulate our model problem with Neumann boundary con-
ditions instead of Dirichlet boundary conditions. The model problem would then
read as follows: Find the solution to the ordinary differential equation
d
2

dx
2
= 0, (3.21)
for the domain = 0 x L, where we know that
d
dx

x=0
=
cosh0
sinhL
and
d
dx

x=L
=
coshL
sinhL
. The exact solution to this problem is again (x) =
sinhx
sinhL
.
3.4.1 Finite elements with Neumann boundary conditions
We saw in the last lecture that the nite element method was well suited to solving
problems with Dirichlet boundary conditions. In fact, it is equally well suited to
solving problems with Neumann boundary conditions. Let us remind ourselves of
the linear system that one obtains from the nite element derivation

=r, (3.22)
where

= (

1
,

2
, ,

M
)
T
and typical entries in

K andr are given by


K
i j
=
_
L
0
_
dN
j
dx
dN
i
dx
+N
j
N
i
_
dx, r
i
=
_
d

dx
N
i
_
x=L

_
d

dx
N
i
_
x=0
. (3.23)
If Neumann values of the solution are prescribed, we may directly substitute them
in to the vectorr.
3.4.2 A second worked example
Let us assume that we wish to solve our model problem using Neumann boundary
conditions. For simplicity we consider the two element mesh shown in Figure 3.5
where the nodes are equally spaced with coordinates x
i
= (i 1)h where h =
L/(M1). Note this is the same mesh that was used in our rst worked example.
The connectivity information for this mesh is
Element 1 2
p 1 2
q 2 3
and the elemental
ZHW, Smsy, WS06/07 35
CCP Center for Computational Physics SmSy
Figure 3.5: A mesh of 2 elements
matrices maybe evaluated giving

k
1
=

k
2
=
_
1
h
+
h
3
h
6

1
h
h
6

1
h
1
h
+
h
3
_
. (3.24)
Assembling these contributions using the connectivity information gives

K =
_
_
1
h
+
h
3
h
6

1
h
0
h
6

1
h
2
h
+
2h
3
h
6

1
h
0
h
6

1
h
1
h
+
h
3
_
_
. (3.25)
The nite element solution of the problem then reduces to the solution of the linear
system
_
_
1
h
+
h
3
h
6

1
h
0
h
6

1
h
2
h
+
2h
3
h
6

1
h
0
h
6

1
h
1
h
+
h
3
_
_
_
_

3
_
_
=
_
_

cosh0
sinhL
0
coshL
sinhL
_
_
, (3.26)
where the Neumann boundary conditions have already been substituted in to the
vector r. Note that in the case of Neumann boundary conditions, the value of the
solution at the boundary nodes 1 and 3 is not known and therefore we are also
required to determine its value at these locations.
For the particular case of L = 1, we obtain that
_
_
13
6

23
12
0

23
12
26
6

23
12
0
23
12
13
6
_
_
_
_

3
_
_
=
_
_

cosh0
sinh1
0
cosh1
sinh1
_
_
, (3.27)
which may then be solved by Gauss elimination to give

0
= 0.01,

2
= 0.43,

3
=0.98. These values compare reasonably with the exact solution (x =0) =0,
(x =
1
2
) = 0.4434094 and (x = 1) = 1, although we observe that the numerical
solution is less accurate than the same problem solved with Dirichlet boundary
conditions.
3.5 Element mappings
A useful technique often used in the implementation nite elements is element
mapping. The element mapping takes an element in the physical domain and
maps it to a reference domain. This procedure has several advantages
ZHW, Smsy, WS06/07 36
CCP Center for Computational Physics SmSy
It is easier to the dene shape functions on the reference domain than in the
physical domain;
Approximate numerical integration (eg Gauss Quadrature) is more easily
performed on the reference domain;
In higher dimensions, the approach allows deformed elements to be gener-
ated and used.
Let us assume that we wish to map our physical element
e
=x
e
x x
e+1
=
x
p
x x
q
to a reference element

e
=1 1. A suitable mapping is
given by
x() = x
p

N
e
p
() +x
q

N
e
q
(), (3.28)
where

N
e
p
=
1
2
(1),

N
e
q
=
1
2
(1+), (3.29)
are the linear shape functions on the reference element. The mapping gives the
desired result x(1) = x
p
and x(1) = x
q
. Note that by differentiating (3.28) we
obtain
dx
d
=
x
q
x
p
2
=
x
e+1
x
e
2
.
3.5.1 Linear shape functions
We notice that

N
e
p
and

N
e
q
are equivalent to the hat functions, but now expressed in
the reference coordinates. To evaluate the elemental contribution to the stiffness
we change the limits of integration so that a typical integral becomes
k
e
i j
=
_
x
e+1
x
e
_
d

N
e
j
dx
d

N
e
i
dx
+

N
e
j

N
e
i
_
dx =
h
e
2
_
1
1
_
d

N
e
j
dx
d

N
e
i
dx
+

N
e
j

N
e
i
_
d, (3.30)
where h
e
= x
e+1
x
e
. To obtain the derivative of

N
e
j
with respect to x, we use the
chain rule
d

N
e
j
dx
=
d

N
e
j
d
d
dx
=
2
h
e
d

N
e
j
d
, (3.31)
so that
k
e
i j
=
_
1
1
_
2
h
e
d

N
e
j
d
d

N
e
i
d
+
h
e
2

N
e
i

N
e
j
_
d. (3.32)
By evaluating the integrals for the four cases k
e
pp
, k
e
pq
, k
e
qp
and k
e
qq
one obtains

k
e
=
_
k
e
pp
k
e
pq
k
e
qp
k
e
qq
_
=
_
1
h
e
+
h
e
3
h
e
6

1
h
e
h
e
6

1
h
e
1
h
e
+
h
e
3
_
, (3.33)
which is the same that was obtained by using the linear hat functions in the physical
domain.
ZHW, Smsy, WS06/07 37
CCP Center for Computational Physics SmSy
3.5.2 Quadratic shape functions
Finite elements of higher order may be easily developed using the technique of
element mapping. In order to build a piecewise quadratic approximation to the
solution we use elements which have three nodes: One located at = 1, one
located at = 1 and an extra node located at the middle = 0. Associated with
each node is a shape function

N
e
p
=
( 1)
2
,

N
e
q
=
( +1)
2
,

N
e
r
=( 1)( +1). (3.34)
The shape functions are illustrated in Figure 3.6. Then, by following a similar pro-
Figure 3.6: Illustration of quadratic shape functions on the reference element.
cedure to that used for the linear shape functions, one may obtain the following
elemental matrix

k
e
=
_
_
k
e
pp
k
e
pq
k
e
pr
k
e
qp
k
e
qq
k
e
qr
k
e
rp
k
e
rq
k
e
rr
_
_
=
_
_
7
3h
+
2h
15
1
3h

h
30

8
3h
+
h
15
1
3h

h
30
7
3h
+
2h
15

8
3h
+
h
15

8
3h
+
h
15

8
3h
+
h
15
16
3h
+
8h
15
_
_
, (3.35)
which represents the contribution to the matrix

K for a quadratic element. Problems


involving quadratic nite elements may then be solved in much the same way as
linear nite elements.
3.5.3 A third worked example
As a last example let us assume that we wish to solve our model problem us-
ing quadratic nite elements. We use a mesh consisting of just one element and
compute the solution for the cases
1. Dirichlet boundary conditions (x = 0) = 0 and (x = L) = 1
ZHW, Smsy, WS06/07 38
CCP Center for Computational Physics SmSy
2. Neumann boundary conditions
d
dx

x=0
=
cosh0
sinhL
and
d
dx

x=L
=
coshL
sinhL
.
Applying the quadratic nite element to this problem we obtain the linear system
_
_
7
3h
+
2h
15
1
3h

h
30

8
3h
+
h
15
1
3h

h
30
7
3h
+
2h
15

8
3h
+
h
15

8
3h
+
h
15

8
3h
+
h
15
16
3h
+
8h
15
_
_
_
_

3
_
_
=
_
_
_
_

dx

x=0
d

dx

x=L
0
_
_
_
_
, (3.36)
where x
1
= 0, x
2
= L and x
3
= L/2. The solutions for the particular case of L = 1
are then as follows
1. For Dirichlet boundary conditions, the rst and last equations are not re-
quired and the middle equation becomes
88
15

3
=
39
15
((x = 0) +(x = L)), (3.37)
substituting the known values gives,

1
= 0,

2
= 1 and

3
= 0.44318.
2. Substituting the Neumann boundary conditions gives the linear system
_
_
37
15
3
10

39
15
3
10
37
15

39
15

39
15

39
15
88
15
_
_
_
_

3
_
_
=
_
_

cosh0
sinh1
cosh1
sinh1
0
_
_
, (3.38)
and upon solution of the linear system we obtain

1
= 0.0006,

2
= 0.4476
and

3
= 0.9994.
Comparing these results to the earlier results, we can see that for this problem a
single quadratic nite element is more accurate than two linear nite elements.
References
[1] J.N. Reddy An introduction to the Finite Element Method, McGrawHill, USA,
ISBN 007-124473-5, 2006.
ZHW, Smsy, WS06/07 39
CCP Center for Computational Physics SmSy
ZHW, Smsy, WS06/07 40
Chapter 4
Heat Conduction in a Cylindrical
Stick
Heat issues are of common interest since they occur in many distinct application
elds and in general are the result of coupled effects. Thus it is worthwhile to con-
sider a basic heat problem here in order to get familiar with the relevant simulation
concepts.
Let us consider a cylindrical aluminum stick of total length 125cm and a diam-
eter of 4cm being cooled at one end and heated by a gas burner at the other end.
For an overview of the experimental setup see Fig. 4.1. Essentially, the elongated
geometry of the stick suggests a simplication to a 1D problem and so we will rst
present an analytical solution to a simplied 1D problem. As a next step, heat ra-
diation loss at the stick surface is considered and an analytical solution method is
proposed. Then a SESES model for a 2D case and lastly a 3D case are calculated
in order to rene the simulation results and make them comparable to experimental
data of the stick in transient and steady-state.
Figure 4.1: Sketch of the horizontal alu-
minum stick heated on the right and wa-
ter cooled on the left side.
Figure 4.2: 2D SESES Model of the
heated stick with cooling on the left and
heating on the right.
41
CCP Center for Computational Physics SmSy
4.1 Analytical model in 1D
In one dimension, the heat equation reads
c
dT
dt

d
2
T
dx
2
= q. (4.1)
with T the temperature, the heat conductivity, q the heat density rate, c the
specic heat capacity and the specic density. As a rst approach let us consider
the stationary equation with a heat loss proportional to the local temperature

d
2
T
dx
2
=(T T
ref
), (4.2)
with a phenomenological heat loss coefcient. As boundary conditions, we
choose
T(0) = T
ref
and F(L) = h, (4.3)
with T
ref
the temperature of the cooling water at x = 0,

F = T the heat ux
and h a measure of the heating power at x =L. The general solution is a particular
solution to the inhomogeneous equation that we simply choose as T
I
= T
ref
plus
the homogeneous solution which can be found with the help of the Ansatz T
H
(x) =
Ce
x
. Back substitution yields the characteristic polynomial and the general form

2
= 0

=
_

T
H
(x) =C
1
e

+
x
+C
2
e

x
(4.4)
with the two coefcients C
1
and C
2
determined by the boundary conditions (4.3).
At x = 0, we obtain C
2
= C
1
= C and since dT/dx = h/ at x = L, we nd
C = h/(2cosh(L)) with =
_
/. The solution to (4.2)-(4.3) is therefore
T(x) = T
I
(x) +T
H
(x) = T
ref
+
h
2 cosh(L)
sinh(x). (4.5)
The larger the heat transfer coefcient the stronger the temperature prole devi-
ates from the linear solution obtained for 0. In other words, determines the
curvature of the temperature prole.
4.2 Building a 2D SESES model for the heated stick
We shall start with a 2D model of the heated stick which will be used to cal-
culate the time-dependent temperature at selected points in the stick as well as
complete temperature proles in the stick. The SESES input le can be found at
ZHW, Smsy, WS06/07 42
CCP Center for Computational Physics SmSy
examples/sens/HeatStick.s2d. These calculations will be compared to mea-
surement data acquired at the slots indicated in Fig. 4.1. The mesh of the 2D
model is shown in Fig. 4.2. In order to get accurate simulation results one needs
to consider heat loss by radiation and convective transport apart from the cooling
and heating boundary conditions mentioned above in (4.3). In heat problems, it is
common to introduce a phenomenological heat transfer coefcient as the pro-
portionality factor between the heat change and the temperature difference with
respect to a reference point of temperature T
ref
dQ
dt
= A(T T
ref
), (4.6)
with A being the surface area. The transfer coefcients for convection can be
derived tabulated gures of merit that depend on the specic geometry and sur-
rounding material. In the section discussing a 3D model, we will also introduce
heat radiation and consider a realistic value for the heat transfer coefcient. In our
SESES model heat transfer is dened with the following statements
BC Transfer IType nx-4 nx 1 IType 0 nx-5 1 IType 0 nx 0 JType 0 1 nx
Neumann Temp D_Temp tcoeff*(-refTmp+Temp),tcoeff W/m**2-W/(m**2*K)
with the reference temperature refTmp. We note that since the Neumann
boundary condition depends on the temperature itself one needs to supply the
derivative of the temperature dof eld with the D_Temp statement in order to en-
able a successful Newton-Raphson algorithm.
The cooling conditions enforced with water ow through the left end of the
heated stick is implemented with a simple Dirichlet boundary condition
BC Cooling JType 0 1 0
Dirichlet Temp refTmp K
The heat source located at the right end of the stick is dened as follows
BC Heating IType nx-5 nx-4 1
Neumann Temp -(time<=toff?heaterflux:0) W/(cm**2) (* time-dep. heating *)
where a (test?true:false) statement was constructed to implement switch-
ing off the heat source after the time toff. The duration of the time-dependent
simulation is set with the parameter period and the turn-off time toff is set to
half this time interval. The time-dependent simulation is dened with the statement
Dump AtStep 1 Mesh Temp ThermDiff
Solve Unstationary At 0 Step period/npts Until period
ZHW, Smsy, WS06/07 43
CCP Center for Computational Physics SmSy
Figure 4.3: Temperature elds at differ-
ent times after turn-on during heating
(temperature scale not shown).
Figure 4.4: Temperature elds at differ-
ent times after turn-off during cooling
(temperature scale not shown).
The rst line above makes sure that the temperature and heat ux elds are
stored in the Data le at each time step. For a heating parameter of h =160W/cm
2
some time-dependent temperature elds during heating are shown in Fig. 4.3. The
lowermost distribution corresponds to the steady state. In Fig. 4.4 some tempera-
ture elds during cooling t >t
o f f
are shown. Note that the color scale is normalized
for each instance in time and therefore cannot be compared directly.
Let us now compare the simulation results with measured data sets of tem-
perature proles and transients. For this purpose four points along the aluminum
stick were dened with Lattice statements whose temperature is written to a le
during the calculation. Moreover a line was dened along the stick along which the
temperature prole was recorded. In Fig. 4.5 two measurements with distinct heat-
ing intensities are shown that can be reproduced successfully by our 2D simulation
by adjusting the heating parameter h, denoted by heaterflux. For the simulation
shown in this gure the heat transfer coefcient tcoeff was set to 100W/(m
2
K).
This value seems quite large but includes a correction factor due to the reduced
surface area in the 2D model. The reduced surface area results from the 2D model
dimensions that were determined by the requirement of identical volume as in the
real geometry, thus leading to a surface area smaller by a factor of 11 with respect
to the real cylinder surface. The exact value of tcoeff will be discussed in more
detail in the next section on a 3D SESES model of the heated stick. In addition, the
analytical solution of (4.5) is also plotted. The factor of sinh representing the heat-
ing intensity was adjusted. By contrast, the prefactor in the argument, =
_
/
where corresponds to our parameter tcoeff, was calculated as 0.021cm
1
using = 10W/(m
3
K) and = 235W/(mK).
Keeping the simulation parameters xed, we can nowconsider the time-dependent
temperature at 4 selected points on the stick, denoted by T10, T21, T31, T41. The
transient behavior is shown in Fig. 4.6 during a 200 minute time window. The
heat source was switched off after 100 minutes. Fig. 4.6 exhibits good agreement
ZHW, Smsy, WS06/07 44
CCP Center for Computational Physics SmSy
50
100
150
200
250
300
0 50 100 150 200
t
e
m
p
e
r
a
t
u
r
e

(
K
)
time (min)
Temperature Transients at 4 Positions
T10 exp
T21 exp
T31 exp
T41 exp
T10 sim 2D
T21 sim 2D
T31 sim 2D
T41 sim 2D
Figure 4.5: Steady-state temperature
prole in the stick for two distinct heat-
ing powers and simulations with ad-
justed heating parameter h(W/m
2
).
The prediction by the 1D analytical
model is shown for comparison.
Figure 4.6: Time-dependent tempera-
ture at different positions on the alu-
minum stick.
0
50
100
150
200
250
300
350
0 20 40 60 80 100 120
t
e
m
p
e
r
a
t
u
r
e

(
K
)
distance (cm)
Heating Temperature Profiles vs Time
10 min, exp
20 min, exp
30 min, exp
40 min, exp
90 min, exp
10 min, sim 2D
20 min, sim 2D
30 min, sim 2D
40 min, sim 2D
90 min, sim 2D
0
50
100
150
200
250
300
350
0 20 40 60 80 100 120
t
e
m
p
e
r
a
t
u
r
e

(
K
)
distance (cm)
Heating Temperature Profiles vs Time
100 min, exp
110 min, exp
120 min, exp
130 min, exp
140 min, exp
100 min, sim 2D
110 min, sim 2D
120 min, sim 2D
130 min, sim 2D
140 min, sim 2D
Figure 4.7: Time-dependent tempera-
ture proles during heating.
Figure 4.8: Time-dependent tempera-
ture proles during cooling.
between measurement and simulation during the heating cycle. However, after
turn-off the temperature drops signicantly faster in the simulation. In addition we
can compare the time-dependent temperature proles during heating as well as
cooling. The former is shown in Fig. 4.7. The data plotted in constant time incre-
ments demonstrates that the heat conduction is fast initially but slows down when
approaching steady state.
4.3 3D SESES Model for the heated stick
In the 2D approach above, we have achieved satisfactory agreement with mea-
surement data by assuming convective heat transfer only and by adjusting the two
ZHW, Smsy, WS06/07 45
CCP Center for Computational Physics SmSy
parameters heating intensity heaterflux and the transfer coefcient tcoeff. The
former adjusts the resulting temperature scale and the latter the curvature of the
temperature prole. With the optimum value tcoeff=100 the data is reproduced
nicely. However, a closer look into the heat transfer literature reveals that typical
values for are around 5 to 20W/(m
2
K). In particular, the convective heat trans-
fer coefcient is determined by the Nusselt number Nu through =Nu/d where
d is the characteristic length scale, in our case the cylinder diameter. For horizontal
cylinders the Nusselt number is given by
Nu =
_
0.6+
0.387Ra
0.167
(1+(
0.559
Pr
)
0.563
)
0.296
_
2
, (4.7)
where both the Prandtl number Pr and the Rayleigh number Ra depend on material
parameters of the surrounding air. For our geometry the convective heat transfer
coefcient is calculated as 10.1W/(m
2
K). We note that this value is in good
agreement with the value of 100W/(m
2
K) used in the 2D model if the surface
reduction factor is considered. We shall now keep this value xed and in addition
consider heat transfer by radiation. The Stephan-Boltzmann radiation law states
dQ
dt
= A(T
4
T
4
ref
), (4.8)
where we have introduced the Stephan-Boltzmann constant and the emissivity
. The emissivity is a unitless material parameter between 0 and 1 and for a
given material varies depending on the surface quality such as the roughness. For
aluminum a typical value above room temperature is 0.25. The new heat transfer
boundary condition considering both convective and radiative loss thus reads
BC Transfer OnChange 1 Neumann Temp
D_Temp tcoeff*(-refTmp+Temp)+sigma*eps*(-(refTmp**4)+Temp**4),
tcoeff+sigma*eps*4*Temp**3 W/m**2-W/(m**2*K)
As for the geometry, a 3D model is derived with only minor corrections to the
2D SESES le. For our cylindrical stick, we keep the x-axis parallel to the stick
and choose the z-axis perpendicular to x and y. By use of the cylinder homotopy
routine we can thus dene the 3D stick geometry and the resulting geometry is
illustrated in Fig. 4.9.
XME nx xlen/nx
YME ny ylen/ny
ZME nz=ny (zlen=ylen)/ny
Coord cylx(ylen/2,zlen/2,1)*1E-2 1
ZHW, Smsy, WS06/07 46
CCP Center for Computational Physics SmSy
Alu Cooling Heating
x
y
z
Figure 4.9: 3D SESES Model of the
heated stick shown from below with
cooling on the right and heating on the
left.
Figure 4.10: Example of calculated
temperature distribution in 3D assum-
ing both convective and radiative heat
transfer.
Figure 4.11: Comparison of the 3D
simulation results with the previously
shown temperature prole data.
Figure 4.12: Comparison of the 3D
simulation results with the previously
shown transient data.
With the heat ux now chosen as 60W/m
2
we calculate the stationary distri-
bution shown in Fig. 4.10. The heated spot on the stick is pointing upward in this
gure. With the rened 3D model, we expect the data to be reproduced more ac-
curately which is conrmed in the comparison of Fig. 4.11. The curvature of the
temperature prole is now matched more closely to the measured data. Note that
the temperature drops at distances exceeding 102.5cm since the stick is heated
at this location. As for the transient behavior, the 3D model gives comparable re-
sults as the 2D model, see Fig. 4.12. With the 3D model the temperature decay is
matched somewhat closer.
The last simulation aspect to be discussed here is the thermal expansion re-
sulting from the heat distribution calculated above. For this purpose the thermal
expansion coefcient AlphaIso and the displacement eld Disp needs to be de-
ned and enabled, respectively. The following statement inserted in the command
section dening the calculation sequence is also required.
ZHW, Smsy, WS06/07 47
CCP Center for Computational Physics SmSy
Figure 4.13: Calculation of the dis-
placement due to thermal expansion in
the aluminum stick.
Figure 4.14: Calculation of the dis-
placement prole in x-direction due to
thermal expansion.
BlockStruct Block Temp Block Disp
To x the cooled left end of the aluminum stick, we set the x-component of the
displacement eld to zero in the boundary condition
BC Cooling JKType 0 ny 0 nz 0
Dirichlet Temp refTmp K
Dirichlet Disp.X 0 m
The resulting total elongation of the stick is the value of the displacement eld
x-component at the right end of the stick. For our example with h = 60W/(m
2
K)
and an expansion coefcient of AlphaIso =2.310
5
K
1
, we get an elongation of
3mm. The displacement prole is shown in Fig. 4.14 and is essentially the integral
of the temperature prole times the expansion coefcient. From the solution of
the simple 1D analytical model (4.5) one would thus predict a hyperbolic cosine
function for this x-displacement prole.
In conclusion we have demonstrated the use of SESES to model the tempera-
ture distribution and thermal expansion in a heated aluminum stick by considering
both convective and radiative heat loss. The simulation results were compared
successfully with experimental data in transient and steady state.
ZHW, Smsy, WS06/07 48
Chapter 5
Calorimetric Flow Sensor
In this tutorial example the operating principle of a calorimetric ow sensor and
its implementation in SESES is discussed. Rather than focusing on the geomet-
rical design of realistic ow sensors, we wish to illustrate a modeling method for
this specic microuidic device that relies on the solution of the heat conduction
equation with forced convection.
Many different physical principles for measuring ow are employed in practice
1
. For conductive uids, an electromagnetic measuring principle based on the in-
duced voltage in a magnetic eld is employed. For microuidic systems, the calori-
metric ow sensor principle is widely used. Such sensors contain a heater and
two temperature sensors that are in good thermal contact with the ow channel
volume, see Fig. 5.1. Typically, the sensor and heater pads are separated from the
ow channel by a thin membrane. If the medium is at rest, a symmetric tempera-
ture distribution around the heater is expected and the two sensors, one upstream
and one downstream from the heater location, measure identical temperatures.
For non-zero ow rates, however, the temperature distribution is not symmetric
any more. The difference of the two sensor temperatures is then proportional to,
and therefore a measure of, the ow rate. The design of a specic sensor geom-
etry will depend on the application of interest and the sensor electronics at hand.
The simulations documented here allow for efcient sensor characterization prior
to fabrication. In particular, a qualitative and quantitative understanding of sensor
operation is enabled by the simulation. We attempt to illustrate what kind of ques-
tions might arise when developing a calorimetric ow sensor [1]. Table 5 gives an
overview of the operating principles commonly used with calorimetric ow sensors.
Each operation mode has its benets and drawbacks. For instance, in constant
power mode, a regulation of the temperature of the heater is not necessary but the
sensor signal will react slowly to an abrupt change in the ow rate. The simulation
1
see, for instance, www.owmeterdirectory.com
49
CCP Center for Computational Physics SmSy
Figure 5.1: Geometry of a typical calori-
metric ow sensor.
Figure 5.2: Simulation domain with the
boundary conditions highlighted.
Operation Mode Characteristics Application Comments
Constant T
21
= f (v
0
) small uid ows, no temperature
Power P gaseous media regulation necessary
T
H
= f (v
0
) uid ows
Constant T
21
= f (v
0
) small uid ows temperature regulation
Temperature T
H
P = f (v
0
) medium uid ows fast response
Table 5.1: Operating principles of the calorimetric ow sensor.
ZHW, Smsy, WS06/07 50
CCP Center for Computational Physics SmSy
results for different operating principles will be discussed below.
5.0.1 Building a Flow Sensor Model in SESES
Let us now build a SESES model of the ow sensor. Since we focus on the solution
algorithm and the operating principle, we choose a simple 2D model of the sensor
geometry and solve the heat transport equation only. I.e. rather than solving a fully
coupled thermo-uidic model, we shall solve the heat transport equation only and
prescribe the uid ow independently as a parabolic velocity prole
v = v
0
(1
4y
2
d
2
), (5.1)
where v
0
is the maximum speed at the center (y = 0) of the channel and d the
height of the channel. Equation (5.1) is the Hagen-Poiseuille law for viscous lami-
nar ow, see also the example on page ??. This simplication is justied whenever
the temperature rise is relatively small and thus not changing the uid properties
themselves.
Let us discuss nowthe key parts of the input le examples/flow/FlowSens.s2d
provided for this example. The geometry of our sensor is comprised of a horizon-
tal uid channel, a medium above (pyrex) and a medium below (plexy glass), see
Fig. 5.2. The temperature sensors and the signal analysis electronics are both
located on the upper side of the thin pyrex plate. The material specication state-
ments contain the statement Equation Temp Enable for enabling the heat trans-
port equation. Only for the uid material we need to specify also the Navier-Stokes
equation as follows
MaterialSpec Fluid
Equation ThermalEnergy NavierStokes Enable
Parameter PressEps 5e-8*1 s
Parameter Viscosity 1e-3 Pa*s
Parameter KappaIso 0.585 W/(K*m)
Parameter Enthalpy cpFl*Temp,cpFl J/kg-J/(K*kg)
Parameter Mmol MFl kg/mol
Parameter Density.Val rhoFl kg/m**3
The parameters stated above correspond to water, which is the incompressible
uid chosen here. The heat transport equation has a convective term which is
automatically accounted for in SESES. Therefore, no additional boundary condition
for the channel entrance and exit needs to be specied. For the boundary of the
simulation domain we may formulate a heat transfer boundary condition (not shown
in the screenshot of Fig. 5.2), namely
ZHW, Smsy, WS06/07 51
CCP Center for Computational Physics SmSy
BC Transfer OnChange 1 IType nnx3 nnx4 nytot Disable
Neumann Temp D_Temp alpha*(Temp-Tamb) alpha (W/cm**2)-W/(cm**2*K)
where is the heat transfer coefcient.
The heater is specied either with a Dirichlet or a Neumann type boundary
condition, depending on whether we wish to operate the sensor in constant heater
temperature or power mode, also compare with Table 5. To implement the constant
power mode we write
BC Heater IType nnx3 nnx4 nytot
Neumann Temp -Power/(lc*hcb) W/um**2
where the negative sign prescribes the inward direction of the heat ux. The
temperature sensors have been dened as boundary conditions of Floating type
BC SensUp IType nnx1+1 nnx2-1 nytot Floating Temp 0 W
BC SensDown IType nnx5+1 nnx6-1 nytot Floating Temp 0 W
and are visible in the DRAW window. The temperature and the thermal ux
(power) at these boundaries will be exported for postprocessing.
In the command section we rst initialize the velocity and we specify the tem-
perature eld as the only dof eld to be calculated, since the velocity eld is pre-
scribed.
Solve Init Velocity.X=v0*(1-4*y*y/(h*h))
In our example we have generated a Gnuplot script le which is embedded in
the SESES container le. For plotting the simulation data, the Gnuplot script le is
extracted and used as command line argument for the Gnuplot command with the
following SESES statements
Extract flowsensor.gnu
System gnuplot flowsensor.gnu
5.0.2 Constant Heating Power Mode
For designing a realistic ow sensor, the geometry is optimized such that the sen-
sor characteristics are as desired for the application of interest. In particular, the re-
lation between the ow rate and the sensor temperatures for a given heater power
range needs to be analyzed. This relation will then be used for calibration in prac-
tice.
ZHW, Smsy, WS06/07 52
CCP Center for Computational Physics SmSy
Figure 5.3: Steady-state temperature elds for different ow rates at identical
power of the heater. The upper left shows the temperature eld when the uid
is at rest, followed by examples of increasing ow rates.
First, let us consider the situation when the uid is not owing for reference.
For non-zero heating power one expects a symmetric temperature eld. The tem-
perature eld can be visualized as shown in Fig. 5.3 with contour lines of equal
temperature by choosing MATERIAL in the STYLE menu of the FIELD palette. The
case of zero ow is shown in the upper left corner of Fig. 5.3. Steady-state tem-
perature elds for increasing ow rate are shown in the other examples of Fig. 5.3.
The difference in the thermal conductivity is apparent in the contour lines travers-
ing material boundaries. As expected, the temperature eld is moving downstream
with increasing ow rate.
The sensor calibration curve is the curve relating the measurement signal and
the quantity of interest, i.e. the ow rate. In our example, we calculate the depen-
dence of the sensor temperature difference T
21
= T
2
T
1
on the mid-channel
velocity v
0
. Fig. 5.4 shows the dependence of T
21
and the heater temperature
rise above ambient temperature T
H
at a given power density applied to the heater.
We note that T
21
exhibits a maximum value while T
H
decreases monotonically
with increasing velocity in the channel. The slope of the T
21
curve decreases
and thus the sensitivity of the sensor is reduced at higher velocities. The heating
power inuences the ow rate range in which the sensor can be operated. As an
example, Fig. 5.5 shows such a dependence for the same geometry as above.
5.1 Constant Sensor Temperature Mode
As indicated in Table 5, an alternative measurement mode adjusts the heater
power density at constant heater temperature. For this mode one needs to mea-
sure the local heater temperature and then regulate the heating power to maintain
a constant heater temperature. The sensor temperature difference T
21
and the
heater power is plotted in Fig. 5.6 versus the ow velocity v
0
. The temperature
difference T
21
assumes a local maximum and decays at large velocities as in
Fig. 5.4. By contrast, the heater power density increases monotonically with in-
ZHW, Smsy, WS06/07 53
CCP Center for Computational Physics SmSy
Figure 5.4: Sensor calibration curve relating the sensor temperature difference
T
21
(red) and the heater temperature rise T
H
(green) to the velocity v
0
in the
center of the ow channel in constant power mode (heating power P = 10
3
W).
Figure 5.5: Plot of the sensor temper-
ature difference T
21
= T
2
T
1
(red)
and T
H
(green) versus the power ap-
plied to the heater (velocity v
0
= 2
10
4
m/s).
Figure 5.6: Sensor calibration curve
relating the sensor temperature differ-
ence T
21
(red) and the heater power
to the velocity v
0
in constant temper-
ature mode (heater temperature rise
above ambient: T
H
= 10K).
ZHW, Smsy, WS06/07 54
CCP Center for Computational Physics SmSy
creasing ow velocity.
5.2 Dynamic Response
For sensor applications, the dynamic response behaviour to a stepwise increase
of the ow rate is often critical. Therefore, let us illustrate how the transient turn-
on behaviour can be simulated with SESES. To date, only the stationary Navier-
Stokes equations are implemented. Thus, in order to simulate the time-dependent
evolution of the temperature eld in the ow sensor, the thermal problem is solved
dynamically while the velocity eld is kept constant. This method is justied, by
arguing that heat transport happens on a time scale much longer than the uidic
mass ow. Therefore, we simply increase the magnitude of the velocity eld at
certain instants in time and calculate how the temperature eld evolves and ap-
proaches a new steady-state.
For instance, in constant power mode, we perform a calculation of the transient
temperature eld for a series of ow rate steps. The ow rate staircase and the
corresponding unstationary solution of the temperature eld is carried out with the
statements
For i From 0 To nFlowSteps
{
Solve Define v0=@i/nFlowSteps*v0max
Solve Init Velocity.X=v0*(1-4*y*y/(h*h)) Temp=Temp
Write AtStep 1 File pdyn.txt Append
"%12.10f " time+@i*tStop
"%12.10f " SensDown.Temp.Shift-Tamb
"%12.10f " SensUp.Temp.Shift-Tamb
"%12.10f " integrate(Bound Heater;Temp)/(lc*micron)-Tamb
"%.3e\n" v0
Solve Unstationary At 0 Step tStop/50,automatic Until tStop Failure step/2
}
where we have used a loop for the different ow rate levels and the unstationary
temperature solutions. Note, that the statement Init Temp Temp is used to avoid
the temperature eld to be reset to Temperature0 at the ow rate steps. The
average temperature at the heater boundary is calculated using the integral of the
temperature at that boundary condition. The transient sensor temperatures are
written to the le pdyn.txt. The resulting transient temperature difference T
21
is depicted in Fig. 5.7 and resembles the curve in Fig. 5.4, as expected. At the rst
ow rate step the temperature eld changes from a symmetric to an unsymmetrical
eld as a function of time in a similar manner as depicted in Fig. 5.3 for the different
ow rates. For the constant heater temperature mode, the sensor temperature
ZHW, Smsy, WS06/07 55
CCP Center for Computational Physics SmSy
Figure 5.7: Dynamic response of the
sensor temperature difference T
21
(red) to a series of velocity v
0
steps
(blue) in constant power mode (p =
10mW).
Figure 5.8: Dynamic response of the
sensor temperature difference T
21
(red) to a series of velocity v
0
steps
(blue) in constant temperature mode
(T
H
= 10K).
transient T
21
is shown in Fig. 5.8. In this plot the approach to steady state upon
each ow rate step is faster than for the constant power mode.
As discussed above in the stationary simulation shown in Fig. 5.4, the heater
temperature can be used as the sensor signal in constant power mode. The tran-
sient response of this signal is depicted in Fig. 5.9 with an monotonic decrease of
the steady-state values that is consistent with Fig. 5.4. Finally, we may also use
the heater power as the sensor signal if the sensor is operated in constant heater
temperature mode. In this case, the power peaks at each ow rate step and then
decays to the steady state values as can be seen in the plot of Fig. 5.10. The plots
of the dynamic responses show, that the constant heater temperature mode allows
for faster response at the cost of power regulation.
In summary, we reported a modeling method for the time-dependent thermal
analysis of ow-rate dependent heat transport in a calorimetric ow sensor with
a straight microuidic channel. Some general measurement principles have been
discussed with the help of a simple 2D SESES model.
References
[1] G. GERLACH, W. DTZEL, Grundlagen der Mikrosystemtechnik, Hanser Ver-
lag, Mnchen, 1997.
ZHW, Smsy, WS06/07 56
CCP Center for Computational Physics SmSy
Figure 5.9: Dynamic response of the
heater temperature rise T
H
(green) to
a series of velocity v
0
steps (blue) in
constant power mode (p = 10mW).
Figure 5.10: Dynamic response of the
heater power (green) to a series of ve-
locity v
0
steps (blue) in constant tem-
perature mode (T
H
= 10K).
ZHW, Smsy, WS06/07 57
CCP Center for Computational Physics SmSy
ZHW, Smsy, WS06/07 58
Chapter 6
Electrostatically Driven Comb
Actuator
6.1 Introduction
Micro manipulators are employed to generate linear motions. Electrostatic comb
actuators rely on an electric eld that generates the force causing a displacement.
Depending on the geometry and layout of the actuators, the displacement may
occur in the xy plane or in one direction only, (see Fig. 6.1 and Fig. 6.2) Here, we
consider the displacement in one direction only. The considered actuator Fig. 6.2
consists of a moveable (E) and a xed (F) electrode. The moveable electrode is
attached to a cantilever spring system, that is connected to the substrate at the
points A, B, C, and D
1
. If a bias is applied between the two parts, a displacement
of the moveable part is resulting. The cantilevers that connect to the moveable part
act as restoring springs.
The design problem discussed here is based on published experimental re-
sults
2
.
6.2 Theoretical background
6.2.1 Parallel-plate capacitor: Useful formulas
Electrostatically-driven microactuators rely on a force F that is caused by an elec-
tric eld E. The parallel-plate capacitor depicted in Fig. 6.3 is governed by the
1
The moveable parts were fabricated in silicon using the sacricial layer technique.
2
N.F. de Rooij et al., "Micromechanical comb actuators with low driving voltage",
Proc. of the 3rd Intl. Conf. on New Actuators, 24-26 June, Bremen, 1992.
Http://ej.iop.org/links/q94/Cb+zihLC6an1QXdvTYYeJg/jm920406.pdf
59
CCP Center for Computational Physics SmSy
Figure 6.1: Picture of an xy micro manipulator.
Figure 6.2: Comb actuator with xed (F) and moveable (E) electrode. The restoring
spring is attached to the substrate at points A, B, C and D.
ZHW, Smsy, WS06/07 60
CCP Center for Computational Physics SmSy
Figure 6.3: Schematic representation of the parallel-plate capacitor.
following physical formulas.
The energy W of the electric eld in the capacitor is given by
W =
1
2
CU
2
. (6.1)
The capacity amounts to
C =
0

r
A
d
(6.2)
with the overlapping plate area A = a b. We now shall derive the forces that
are generated if the plates are misaligned. If the lower plate is displaced by (x, y, z),
the energy stored in the capacitor amounts to
W =
1
2

r
(ax)(by)
(d z)
U
2
(6.3)
In general, forces in physics can be derived from corresponding energy functions.
The force vector F is thus given by the gradient eld of the energy function W, i.e.
F =W. The force components are thus obtained as
F
x
=
W
x
(6.4)
F
y
=
W
y
(6.5)
F
z
=
W
z
. (6.6)
For our plate capacitor we thus obtain the following force components along the
coordinate axes
F
x
=
1
2

r
U
2
b
d
(6.7)
ZHW, Smsy, WS06/07 61
CCP Center for Computational Physics SmSy
Figure 6.4: Schematic illustration of the comb geometry.
F
y
=
1
2

r
U
2
a
d
(6.8)
F
z
=
1
2

r
U
2
ab
(d z)
2
. (6.9)
It is notable that the transversal forces (F
x
,F
y
) are independent of the plate dis-
placement. The displacement z only inuences the normal force F
z
.
6.2.2 Comb actuator
We now consider a comb actuator whose ngers interpenetrate under application
of a bias. I.e. a displacement in x direction results for the moveable electrode. A
section of the comb actuator geometry is depicted in Fig. 6.4. In a comb actuator
several forces occur, see also illustration Fig. 6.5. We shall now discuss these
forces and relate them to the governing plate capacitor formulas.
Transversal force
The transversal force F
t
depicted in Fig. 6.5 is caused by a lateral pair of
plates, i.e. a pair of opposing sides of the comb ngers. According to (6.7)
and (6.8) it is given by
F
t
=
1
2

r
U
2
t
g
(6.10)
for the comb geometry considered in Fig. 6.4. For a comb actuator with N
ZHW, Smsy, WS06/07 62
CCP Center for Computational Physics SmSy
Figure 6.5: Schematic representation of the acting forces F
t
, F
n
and F
s
.
moveable ngers the total transversal force amounts to
F
t
= N
0

r
U
2
t
g
. (6.11)
Normal forces
The normal force F
n
depicted in Fig. 6.5 is caused by a plate pair that is
perpendicular to the x axis at the tip of each comb nger. For the geometry
given in Fig. 6.4 it is given by
F
n
=
1
2

r
U
2
t b
(d x)
2
, (6.12)
where x is the displacement of the actuator from its initial position and d
the distance of the capacitor plates for zero bias (U = 0 Volt) For our comb
actuator with N ngers the total normal force amounts to
F
n
= N
0

r
U
2
t b
(d x)
2
. (6.13)
The 1/2 pre-factor has dropped since 2 plate capacitors result per nger
pair. Note that this force has a signicant inuence on the displacement-bias
relation only for small distances d x. It thus may be neglected in some
cases.
ZHW, Smsy, WS06/07 63
CCP Center for Computational Physics SmSy
Figure 6.6: Sketch of the comb structure including the restoring spring.
Spring force
The electrostatic force described above acts against a mechanical spring
force that attempts to reset the comb to its neutral position x = 0. As shown
in Fig. 6.6 this restoring force can be described by a spring according to
F
s
= k
e f f
x. (6.14)
The effective spring constant k
e f f
depends on the cantilever spring system.
The spring constant k
x
for a single cantilever spring is given by the formula
k
x
=
Et
b
b
3
b
4l
3
b
, (6.15)
where E is the elasticity module for polycrystalline silicon, b
b
the thickness
of the cantilever spring, t
b
the width and l
b
the length of the (horizontal)
cantilever spring.
The force balance in x direction of the moveable electrode is thus given by

F
tot
=

F
x
(U) +

F
s
(x). (6.16)
By neglecting the normal force derived in (6.13) the force balance becomes
F
tot
= 0 = N
0

r
U
2
t
g
k
x
x (6.17)
For the displacement of the moveable electrode in direction of increasing overlap
distance we thus obtain
x = N
0

r
U
2
t
g
1
k
x
(6.18)
ZHW, Smsy, WS06/07 64
CCP Center for Computational Physics SmSy
x U
2
(6.19)
In this approximation the displacement is therefore a quadratic function function of
the applied bias.
The parameters of the described comb structure are:
Parameter Value Unit

0
8.854e-12
As
Vm
t 2 m
b 6 m
d 15 m
g 2 m
l 10 m
t
b
2 m
b
b
14.5 m
l
b
300 m
E 160 GPa
N 16
6.2.3 Numerical simulation
In this section we discuss the connection between the numerical eld calculation
and the force, displacement and bias quantities. The electrostatic force is related
to the electric eld by the energy density w =
1
2

E =
1
2

0

E
2
. The total energy
is therefore given by the volume integral
W =
_
V
w dV =
_
V
1
2

0

E
2
dV (6.20)
It can be shown
3
that this expression can be rewritten as the surface integral
W =
_
A
1
2

0

E d=
1
2

0
_
A

E d, (6.21)
where is the electrostatic potential difference between the opposing electrical
contacts and A the area of the non-zero bias contact
4
.
Therefore one has two options for the calculation of the energy.
3
Use the identity div(

D) = grad

D + div

D and Gausss law. In addition we have


div

D[

= 0 due to the charge-free simulation domain and the electric eld



E is given by a gra-
dient eld grad =

E.
4
The surface integral is reduced to area A as the potential is zero elsewhere.
ZHW, Smsy, WS06/07 65
CCP Center for Computational Physics SmSy
We now may determine the x component of the actuator force with the help of
the following equation

F =

W. (6.22)
An alternative, more direct method of calculating the force makes use of the Maxwell
tension tensor
5
.
5
Compare with the boundary condition ElStatForce in SESES .
ZHW, Smsy, WS06/07 66
CCP Center for Computational Physics SmSy
6.3 Problems
6.3.1 Theoretical Understanding
1. Calculate the effective spring constant for the cantilever structure depicted
in Fig. 6.6 expressed in the spring constant k for 1 cantilever. Draw an effec-
tive circuit model for the cantilever structure.
2. Calculate the displacement of the cantilever as a function of the of the ap-
plied voltage by considering the transversal force only, see Fig. 6.18. Make
a direct comparison with experimental data.
3. Derive a formula analogous to Eq. (6.18), which applies to the case of only
considering the normal force.
4. Derive a relation between the displacement and the applied voltage by con-
sidering both the transversal as well as the normal force. Compare the result
with the experimental data.
5. Investigate the normal versus the transversal force. Which force dominates
in the discussed geometrical setup? Estimate the normal force at the maxi-
mum measured displacement.
6. Electrostatic actuators are affected by the sticking effect. Calculate the max-
imum displacement in direction x. such that no sticking occurs.
7. How can a greater maximum displacement be achieved? Which parameters
can be adjusted for this purpose?
8. Consider the lateral sticking effect. Derive a formula for the total lateral elec-
trostatic normal force. With this, you may derive a condition for the lateral
spring constant k
y
of the cantilever structure.
ZHW, Smsy, WS06/07 67
CCP Center for Computational Physics SmSy
6.3.2 FEM Calculations
With a lateral nite element eld calculation we wish to obtain a more realistic
model of the comb actuator with the hope of taking care of the stray effects which
are not accessible to analytical considerations. We restrict our problem specica-
tion to the electrostatic simulation of one comb actuator and model the restoration
spring force with a simple linear spring law F =k
x
x.
The electrostatic force is numerically determined according to Eq. (6.22) at
various displacements x of the actuator at constant electrical potential.
Set up a SESES model by proceeding according the subsequent step-by-step
procedure.
1. Set up a SESES model of a plate capacitor in air. Calculate the energy
according to Eq.(6.21) and the applied voltages U. Verify the result using
the plate capacitor formula W =
1
2
C U
2
.
2. Investigate the stray effects of the plate capacitor by extending the model-
ing domain. Formulate conditions for which the analytical expressions are
reasonable estimation.
3. Set up a two-dimensional SESES model of the comb actuator. Take ad-
vantage of symmetries in order to get a geometrically reduced simulation
domain. Compare the two integration methods.
4. Compare the two integration methods: boundary versus volume integral, in
analogy to test problem 1.
5. Calculate the equilibrium displacement as a function of the applied bias.
For this, rst calculate the energy as a function of the displacement and
differentiate the result numerically. Compare the resulting electrical force
with the spring force. Which equilibrium points do result?
6. In order to check the reliability of your numerical result, investigate the con-
vergence behavior with increasing mesh renement. Which integration method
is more sensitive to mesh renement?
6.3.3 Practical hints
Hint for automatic mesh renement
6
:
Set AutoRemesh AllME Refine ErrPhi EpsRel 0.03 Global
6
See also Section 2.4 in the SESES tutorial
ZHW, Smsy, WS06/07 68
CCP Center for Computational Physics SmSy
For the investigation of the convergence, the listing of the CPU statistics may
be helpful.
Set Info TimeSummary HideBC
For the specication of a boundary condition that uses the vector perpendic-
ular to the boundary, one can use the vector components named Normal.X,
Normal.Y and Normal.Z.
ZHW, Smsy, WS06/07 69
CCP Center for Computational Physics SmSy
ZHW, Smsy, WS06/07 70
Chapter 7
Modelling of a Micro-Reed Switch
7.1 Introduction
Micro-reed relays with a magnetostatic operating principle were further miniatur-
ized during the last years. These electrical switches provide a galvanic separa-
tion of the control and load circuit, so they are of special interest in micro system
engineering applications [4]. Magnetostatic sensors are particularly valuable for
portable applications because they require little energy or space, are sealed, and
can withstand high mechanical stresses. The reed switches currently found on
the market are made of two ferromagnetic metal blades placed in a glass tube [5].
Fig. 7.2 shows the structure of such a micro-reed switch [6]. This structure is in-
vestigated by modelling and simulation in the following text. The micro-reed switch
is made of two overlapping metal blades, where one of the blades is xed to the
substrate. The other blade is free to move and touch the xed blade in order to
close the contact.
7.2 Switching characteristics
Fig. 7.3 shows the magnetic force and the mechanical force that act on the bend-
able lamella [7]. The mechanical force F
mech
is represented by the plane. It is a
linear function of the contact distance, and it does not depend on the magnetic
eld. The magnetic force F
mag
is a nonlinear function of the contact distance and
the magnetic ux density. Both forces are along the cut curve of both surfaces in
equilibrium. If the magnetic force sinks below the value at the point 3, then the
relay opens and enters the new equilibrium state that is indicated by point 4. If
the outside magnetic eld is increased and exceeds the value at point 1, then the
relay closes again. The mobile lamella snatches down, the new equilibrium state
is indicated by point 2. The contact hysteresis is drawn in path along the points 1,
71
CCP Center for Computational Physics SmSy
Figure 7.1: Detail view of a micro-reed switch. Components manufactured accord-
ing to this process are 2.00 x 1.40 x 0.75 mm in size.
Figure 7.2: Schematic drawing of a micro-reed relay. [6]
ZHW, Smsy, WS06/07 72
CCP Center for Computational Physics SmSy
Figure 7.3: Magnetic force and mechanical force as a function of the contact dis-
tance and the magnetic ux density B. The value of the magnetic ux density was
varied at the boundary of the computational domain. This variation of the boundary
ux represents a variation of the distance of an external permanent magnet to the
switch.
2, 3 and 4. An optimal relay is characterised by a low value of the magnetic eld,
which is necessary for closing the contact. It is important that the switching hys-
teresis is not too small to guarantee a reliable operation of the relay, i.e. to prevent
a utter of the contacts at the switching points [8]. The mathematical model helps
to identify the important parameters that determine the switching hysteresis.
7.3 Basics of magnetostatics
7.3.1 Magnetic eld
The force between two magnetic poles p
1
and p
2
in the distance r from each other
is found experimentally as
F = f
p
1
p
2
r
2
. (7.1)
The proportionality constant f depends on the denition of the magnetic mo-
ment p. The unit of the magnetic moment p is V s in the SI system. The value of f
ZHW, Smsy, WS06/07 73
CCP Center for Computational Physics SmSy
is determined by measurement of the magnetic forces between two wires, whereby
an electrical current ows through the wires
f =
1
4
0
. (7.2)
The constant
0
is the magnetic permeability

0
= 4 10
7
V s
A m
(7.3)
The magnetic eld intensity H is dened as the value that results in the limiting
case of a small magnetic moment p
2
in comparison to the magnetic moment of the
eld generating magnet p
1
H= lim
p
2
0
F
p
2
. (7.4)
The magnetic ux density is related to the magnetic eld intensity by the for-
mula
B =
0
H (7.5)
The magnetic ux is dened as
=
_
A
BdA. (7.6)
is a measure of the number of magnetic ux lines through an area A.
Fig. 7.4 shows magnetic eld lines that are generated by a long cylindrical coil.
One recognises that the magnetic eld lines do not end at the magnetic poles.
Magnetic eld lines are closed. Therefore, the magnetic ux through the boundary
A of a simply connected volume equals zero: the same number of eld lines
enter the volume than the number of eld lines leaving the volume,
=
_
A

BdA = 0. (7.7)
The volume integral can be converted to a surface integral by applying the
divergence theorem (Gausss theorem)
_
A

BdA =
_

Bd= 0. (7.8)
Thus we get
B = 0. (7.9)
ZHW, Smsy, WS06/07 74
CCP Center for Computational Physics SmSy
Figure 7.4: Magnetic eld lines of a long cylindrical current-carrying coil[9]
This formula expresses that magnetic monopoles do not exist. Indeed, mag-
netic monopoles have never been observed experimentally.
7.3.2 Ampres law
Integration of the magnetic eld along a closed path does not result in a zero value.
Experimentally, one nds
_
Hds = I, (7.10)
where the electrical current I is passing through the area that is bounded by
the closed integration path. Equations 7.10 and 7.5 yield
_
Bds =
0
I. (7.11)
The electrical current can be expressed in terms of a current density
I =
_
jdA. (7.12)
Eq. 7.11 can be transformed by application of Stokes theorem

0
_
A
jdA =
_
A
Bds =
_
A
B dA (7.13)
This integral equation is valid for an arbitrarily shaped surface A, and therefore
B =
0
j, (7.14)
ZHW, Smsy, WS06/07 75
CCP Center for Computational Physics SmSy
i.e.
H=j. (7.15)
7.3.3 Material in a magnetic eld
If one lls the interior of a coil with a material, e.g. iron, then the magnetic ux
density B increases by the factor
r
in comparison to a coil that is lled with air
B =
0

r
H. (7.16)
The dimenensionless parameter
r
is called relative permeability. The mag-
netic polarisation of the material is particularly high for so-called ferromagnetic
materials (like iron). The polarisation results from the production or adjustment of
atomic magnetic moments. Macroscopically one describes it by the magnetisation
Mof a volume V that is lled with the magnetic moments p
m
M=
1
V

V
p
m
. (7.17)
The magnetic ux density B of a coil that is lled with a ferromagnetic material
is expressed as
B =
0
(H+M). (7.18)
If the magnetic ux density is not too high, then the magnetisation Mis approx-
imately proportional to the magnetic eld intensity H. The proportionality constant
is called magnetic susceptibility
M= H. (7.19)
Generally, the magnetic susceptibility decreases with increasing temperature.
From Eqs. 7.18, 7.16 it follows
B =
0

r
H=
0
(1+)H (7.20)
and therefore

r
= 1+. (7.21)
The magnetic susceptibility of ferromagnetic materials is high 1.
ZHW, Smsy, WS06/07 76
CCP Center for Computational Physics SmSy
7.3.4 Magnetic circuit
The magnetic eld lines of a given domain are concentrated in a ferromagnetic
material. Consider a coil that is lled with an iron core. With the extraordinarily
high susceptibility (and/or relative permeability) of the iron it follows that nearly
all magnetic eld lines of the coil are present within the coil. Field lines that are
present in the surrounding of the iron core are named scatter eld [10].
Suppose a coil has N turns. Eqs. 7.10 and 7.16 apply to this coil with a ferro-
magnetic core
_
ABCD
Bds =
0

r
N I, (7.22)
where the integration path is taken along the points ABCD as shown in Fig. 7.5.
The dominant part of the integral is the one that belongs to the path AB along the
length of the core L
BL
0

r
N I (7.23)
Therefore, the magnetic ux of a coil with cross-sectional area A is approxi-
mately
=
0

r
N I
L
A. (7.24)
The specic magnetic resistance
m
is introduced as
1

r
=
N I

m
L/A
=
V

m
L/A
. (7.25)
The magnetic potential is V = N I, and a magnetic resistance can be dened as
follows
R
m
=
m
L
A
. (7.26)
These equations are in analogy to Ohms law for electric current ow if one com-
pares the magnetic ux with the electric current I. Here, we neglected the
inuence of a magnetic scatter eld. Hence, the equations 7.25 and 7.26 are not
exact. Moreover, the approximation of a constant relative permeability is not valid
for high values of the magnetic eld intensity: the relative permeability is a nonlin-
ear function of the eld intensity in the case of high H-values. Thus, the magnetic
resistivity is not a constant in this case.
The approximation of a constant relative permeability is sometimes acceptable to
model a magnetic circuit. It is assumed that the magnetic eld lines pass through
the components of the magnetic circuit that are connected in series or in parallel.
ZHW, Smsy, WS06/07 77
CCP Center for Computational Physics SmSy
Figure 7.5: Here, the magnetic eld is integrated over a closed path that runs
along the points A, B, C and D. The term belonging to the path AB inside the coil
is dominant. The terms that belong to AC and DB can be neglected since the
magnetic eld lines are perpendicular to the integration path.
Each component of the magnetic circuit has a magnetic resistivity R
m1
, R
m2
, ....
The overall magnetic resistivity of m components that are connected in series is
calculated in analogy to the electric resistivity of an electric circuit
R
m,ges
=

n
R
m,n
. (7.27)
7.3.5 Magnetic eld energy
The buildup of a magnetic eld consumes energy. The energy density w
m
is
w
m
=
B
_
0
H(B)dB. (7.28)
The magnetic energy that is contained in a volume V is calculated by integra-
ZHW, Smsy, WS06/07 78
CCP Center for Computational Physics SmSy
tion
W =
_
V
B
_
0
H(B)dBdV. (7.29)
The magnetic force is calculated from the derivative of the magnetic energy
with respect to the local coordinate x
F
mag
=
W
x
. (7.30)
7.4 Analytical model
7.4.1 Estimation of the magnetic force
To estimate the magnetic force that acts on the lamellas the magnetic eld energy
is calculated. As a rst step we consider the magnetic energy of a magnetic core
with an air gap as shown in Fig. 7.6, where d is the air gap distance. The magnetic
energy that is stored in the magnet is obtained from Eqs. 7.29 and 7.16
W =
_
V
_
_
B
_
0
B

r
dB
_
_
dV =
_
V
_
1
2
B
2

r
_
dV. (7.31)
A constant relative permeability
r
is assumed in the integration over the mag-
netic eld in Eq. 7.31. This assumption is modied in Section 7.4.2.
Inside the magnetic core the relative permeability of the ferromagnetic material is
high, that is,
r
1. The relative permeability of air equals 1,
r
= 1, and there-
fore W
m
W
Lu f t
, i.e. the largest part of the magnetic energy is stored in the air
gap volume. The magnetic scatter eld around the air gap is not considered in this
simple estimate. Integration over the volume A
Q
d of the air gap yields
W W
Lu f t
=
1
2
B
2

0
A
Q
d, (7.32)
where A
Q
is the cross-sectional area of the magnet. The magnetic force is
obtained from Eq. 7.30 by derivation with respect to the air gap distance d
F
mag
=
1
2
B
2

0
A
Q
. (7.33)
ZHW, Smsy, WS06/07 79
CCP Center for Computational Physics SmSy
Figure 7.6: Ring coil with an air gap
Figure 7.7: Saturation of the magnetic ux density B for large values of the mag-
netic eld intensity H
7.4.2 Saturation effects
The relative permeability
r
of a ferromagnetic material is not constant at high
magnetic eld intensity. Nevertheless, one uses the equation B =
0

r
H, and
therefore
r
is a function of the applied magnetic eld intensity H. Fig. 7.7 shows
the magnetic ux density inside a ferromagnetic material as a function of the ap-
plied magnetic eld intensity.
The relative permeability
r
is almost constant for small values of the magnetic
eld intensity H, thereby
r
1. The relative permeability increases for increasing
magnetic eld intensity. At large values of H the relative permeability decreases,
the magnetic material starts to saturate, where
r
1 in the limit of high magnetic
eld intensity.
ZHW, Smsy, WS06/07 80
CCP Center for Computational Physics SmSy
This behaviour can be approximated the following distinction of two cases
B =
_

0

r
H (B B
sat
)
B
sat
+
0
(HH
sat
) (B > B
sat
).
(7.34)
The case B B
sat
indicates the non-saturated case, whereas B > B
sat
for the
saturated case. Therefore, the magnetic eld intensity H is
H =
_
B

r
(B B
sat
)
B
sat

r
+
BB
sat

0
(B > B
sat
)
(7.35)
The magnetic energy for B B
sat
is obtained from Eq. 7.29. A homogenous
magnetic eld over the cross-sectional area of the magnet is assumed. Hence, the
volume integration is simplied by multiplication of the integrand with the integration
volume. Moreover, we consider a part of the BH characteristic, where
r
can
be taken as a constant value.
W = V
B
_
0
B

r
dB =
V

r
1
2
B
2
=
1
2
A
Q
B
2

r
(Ld) +
1
2
A
Q
B
2

0
d. (7.36)
The rst term on the right side of Eq. 7.36 describes the energy content of the
ferromagnetic core of the coil in Fig. 7.6. This term is small (
r
1) and it can
be neglected. The second term describes the energy content of the air gap with
volume A
Q
d. This air lled part contains the main part of the magnetic energy.
From the case B B
sat
we get with Eq. 7.30
F
mag
= A
Q
B
2
2
0

1
2
A
Q
B
2

r
(7.37)
The magnetic energy W
coil
in the core of the coil for B > B
sat
is obtained from
Eq. 7.35
W
coil
=V
coil
B
_
0
HdB =V
coil
_
_
B
sat
_
0
B

r
dB+
B
_
B
sat
_
BB
sat

0
+
B
sat

r
_
dB
_
_
(7.38)
The integrals in the last equation yield
W
coil
= A
Q
(Ld)
_
(BB
sat
)
2
2
0
+
B
sat
B
1
2
B
2
sat

r
_
(7.39)
ZHW, Smsy, WS06/07 81
CCP Center for Computational Physics SmSy
Therefore, the total magnetic energy for the case of saturation is
W =W
gap
+W
coil
= A
Q
d
B
2
2
0
+A
Q
(Ld)
_
(BB
sat
)
2
2
0
+
B
sat
B
1
2
B
2
sat

r
_
(7.40)
Derivation of Eq. 7.30 with respect to the air gap distance d gives for the case
B > B
sat
F
mag
= A
Q
B
2
2
0
A
Q
_
(BB
sat
)
2
2
0
+
B
sat
B
1
2
B
2
sat

r
_
(7.41)
In summary, the magnetic force can be estimated by the following formula
F
mag
=
_
_
_
A
Q
B
2
2
0

1
2
A
Q
B
2

r
(B B
sat
)
A
Q
B
2
2
0
A
Q
_
(BB
sat
)
2
2
0
+
B
sat
B
1
2
B
2
sat

r
_
(B > B
sat
).
(7.42)
7.5 Numerical model of the micro-reed switch
7.5.1 Parameterisation of the B-H-characteristic
The material law given by Eq. 7.16 of Section 7.3.3 can be parameterised by the
following continuous function
B(H) =
init
H
H
asim
_
1

asim

init
_
B
sat
+1
H(
init

asim
)
B
sat
+1
. (7.43)
Fig. 7.8 shows a B-H-characteristic that is calculated with Eq. 7.43. The pa-
rameterisation has the following properties
lim
H0
B(H)
H
=
init
(7.44)
and
lim
H
B(H)
H
=
asim
, (7.45)
that is, the slope of the B-H-curve is given by
init
for small values of H. The
asymptotic limit of the slope of the B-H-curve for large values of H is
asim
.
ZHW, Smsy, WS06/07 82
CCP Center for Computational Physics SmSy
Figure 7.8: Parameterisation of the B-H-curve as obtained from Eq. 7.43 with
B
sat
= 0.88T,
r
= 12000,
init
=
0

r
,
asim
= 1.0
r
.
7.5.2 Poisson-equation for the magnetic scalar potential
To numerically calculate the magnetic eld one has to solve Maxwells equations
7.9 and 7.15. The switching characteristic is calculated under the assumption that
no electrical current ows in the lamellas, that is, the macroscopic current density
j equals zero. Maxwells equations can be written in this case as follows
B = 0 (7.46)
and
H= 0. (7.47)
The material lawgiven by Eq. 7.16 that connects Band Hhas to be considered,
too.
The differential equations simplify if one introduces a scalar magnetic potential
so that
H=, (7.48)
for details see [11]. Thereby, B = 0 leads to
B[] =B[] = 0 (7.49)
Using B =
0

r
H (Eq. 7.16) we obtain
B =(
0

r
(H)H) =(
0

r
()) = 0. (7.50)
This is a Poisson equation for the magnetic scalar potential
(
0

r
()) = 0, (7.51)
ZHW, Smsy, WS06/07 83
CCP Center for Computational Physics SmSy
Figure 7.9: Numerical solution of Eq. 7.51 for the magnetic scalar potential .
where
r
=
r
(H) represents a non-linear material law that can be parame-
terised by Eq. 7.43.
Fig. 7.9 shows a solution to Eq.7.51 that was calculated with the program
SESES. The differential equation is discretised with the Finite Element Method
to calculate . The corresponding local distribution of the magnetic ux density is
shown in Fig. 7.10.
ZHW, Smsy, WS06/07 84
CCP Center for Computational Physics SmSy
Figure 7.10: The vector eld B is obtained from the solution of the scalar magnetic
potential using the equations H= and B =
0

r
(H)H. The arrows indi-
cate the direction and intensity of the magnetic ux density B around the lamellas
of the micro-reed switch.
7.6 Symbols and units
ZHW, Smsy, WS06/07 85
CCP Center for Computational Physics SmSy
Table of symbols
Symbol Explanation Value Unit
l1y Height of lamella m
b Width of lamella m
e, d Distance of both lamellas, air gap distance m
k Spring constant N/m
j Electrical current density
A
m
2
r Length of the overlapping regions of
lamellas
m
A Area m
2
A
Q
Cross-sectional area of ferromagnetic ma-
terial
m
2
B Magnetic ux density
V s
m
2
= Tesla = T
F
mech
Mechanical force N
F
mag
Magnetical force N
H Magnetic eld intensity
A
m
I Electric current A
L Overall length of lamellas (without over-
lap), length of coil
m
M Magnetisation A/m
R
f
Magnetic resistivity of scatter eld
A
Vs
R
gap
Magnetic resistivity of the volume inbe-
tween the lamellas
A
Vs
R
m
Magnetic resistivity of the lamellas
A
Vs
V Magnetic potential A

0
Magnetic permeability 4 10
7 V s
A m

r
Relative permeability -

m
Specic magnetic resistance
Am
Vs
Magnetic ux V s
Magnetic susceptibility -
ZHW, Smsy, WS06/07 86
CCP Center for Computational Physics SmSy
References
[1] J. Schimkat, Grundlagen und Modelle zur Entwicklung und Optimierung
von Silizium-Mikrorelais Dissertation, Technische Universitt Berlin, FB
Maschinenbau und Produktionstechnik, 1996.
[2] URL: http://www.asulab.ch/de/composants_de.html
[3] F. Gueissaz, D. Piguet, The microreed, an ultra-small passive MEMS mag-
netic proximity sensor designed for portable applications., Proceedings of
the 14th IEEE International Conference on Micro Electro Mechanical Sys-
tems : MEMS 2001 : Interlaken, Switzerland, January 21-25, 2001.
[4] B. Odermatt, FEM-Berechnung von magnetischen Krften, Diplomarbeit,
Zrcher Hochschule Winterthur, Center for Computational Physics, Win-
terthur, Switzerland, 2001.
[5] T. Haller, H. Schwarzenbach, G. Steiner, Finite Element model based product
development with NM SESES, Orell Fssli Verlag AG, Zrich, ISBN 3-280-
02773-X, 2002.
[6] Skript zur Magnetostatik, Rheinische Friedrich-Wilhelms Universitt
Bonn, Institut fr Theoretische Geodsie, URL: http://www.geod.uni-
bonn.de/apmg/pdf_doc/4_Magnetostatik.pdf.
[7] E. Grimsehl Lehrbuch der Physik, Bd. 2, Elektrizittslehre, Teubner Verlags-
gesellschaft, Leipzig, Germany, 1985.
[8] J. D. Jackson Klassische Elektrodynamik, De Gruyter, Berlin, Germany, 2002.
ZHW, Smsy, WS06/07 87
CCP Center for Computational Physics SmSy
ZHW, Smsy, WS06/07 88
Chapter 8
Coupled Transport Phenomena in
Fuel Cells
8.1 Introduction
A fuel cell is an electrochemical energy conversion device. Fuel cells differ from
batteries in that they are designed for continuous replenishment of the reactants
consumed; they produce electricity from an external supply of fuel and oxidant.
Typically, oxygen or air is used as oxidant.
This chapter contains an introduction to the mathematical modeling of proton
exchange membrane (PEM) fuel cells. This type of fuel cell is currently being de-
veloped intensively; elds of application are for back-up power, portable power,
small distributed generation, and transportation. The efciency of PEM fuel cells
are in the range of 50-60% electric, and outputs up to 250 kilowatts can be realised.
The basic components of a PEM fuel cell can be seen in Fig. 8.1:
The ionomeric membrane is an ion conducting polymer. The mobile ion
in the polymer is a proton H
+
. The most common membrane material is
a sulphonated uoropolymer [2]. This polymer contains SO

3
-ions that are
highly hydrophillic, that is, water is attracted. As a result, large quantities
of water are absorbed within these membranes, and H
+
ions (protons) can
move quite freely within this material. This is why this type of fuel cell is
named proton exchange membrane fuel cell; the protons are exchanged
between the anode side and the cathode side of the cell.
The electrodes are shown in the enlargement on the right hand side of
Fig. 8.1. The electrodes contain dispersed platinum (Pt) catalyst. The plat-
89
CCP Center for Computational Physics SmSy
inum decreases the activation energy of the chemical reactions
Hydrogen oxidation on the anode side:
H
2
2H
+
+2e

(8.1)
Oxygen reduction reaction and water production on the cathode side:
1
2
O
2
+2H
+
+2e

H
2
O (8.2)
The platinum catalysts participate in the reactions but are neither reactants
nor products of the reaction they catalyse. They reduce the activation energy
and increase the reaction rate.
The gas diffusion layers (GDL) are in immediate contact with the catalyst lay-
ers. They are made of hydrophobized porous carbon paper, or carbon cloth.
These layers are typically 100 300m thick and are wet-proofed by treat-
ment with poly-tetrauoroethylene (PTFE). The role of these gas diffusers
is to enable direct and uniform access of the reactant gases, hydrogen and
oxygen, to the catalyst layers, without having to diffuse through lms of liquid
water.
The single cell is completed by current collector plates. The current collector
plates of the self-breathing fuel cells that we consider in this chapter can be
fabricated in printed circuit board technology (PCB) that is commonly used
to mechanically support and electrically connect electronic components.
Here, we will restrict to the case of modeling so-called self-breathing fuel cells
for small portable applications. A photograph of laboratory samples of these fuel
cells is shown in Fig. 8.2.
Important advantages of planar self-breathing PEM fuel cells include the ro-
bustness and reliability of this technology and the fast prototype cycle times. More-
over, they provide high design exibility and low weight, and facilitate complex con-
ductor and insulator design. Schmitz and co-workers [5] developed self-breathing
fuel cell prototypes in PCB technology. The benets of self-breathing fuel cells
are the silent operation and the small volume and low weight of the system since
very few peripheral components are required. These properties make planar self-
breathing fuel cells in PCB technology a strong candidate for the energy supply of
portable electronic devices.
ZHW, Smsy, WS06/07 90
CCP Center for Computational Physics SmSy
Figure 8.1: The gure shows a cross-section of a single proton exchange mem-
brane fuel cell (PEM). The enlargement in the scheme illustrates the so-called
membrane-electrode assembly. The electrode componenet contains dispersed Pt
catalyst. This catalyst layer is in good contact with an ionomeric membrane, the
central slab in the scheme, which serves as the electrolyte and the gas separator
in the cell. The ionomeric membrane electrolyte is typically 50175m thick [1].
Figure 8.2: Laboratory samples of planar self-breathing fuell cells for use in
portable electronic devices.
ZHW, Smsy, WS06/07 91
CCP Center for Computational Physics SmSy
8.2 The open circuit voltage
In a fuel cell the "external work" involves moving electrons round an external circuit.
The electrons are created by an electrochemical reaction. The maximum amount
of work obtainable from that reaction is given by the change in Gibbs free energy
of formation
G
f
(T, P), (8.3)
where the temperature T and pressure P are assumed to be constant. In a
fuel cell the Gibbs free energy of formation is given by the difference between the
Gibbs free energy of the products and the Gibbs free energy of the reactants
G
f
= G
f
of products G
f
of reactants. (8.4)
The Gibbs free energy is mostly given in a "per mole" form, which is indicated
with a lower case letter and a bar symbol; for example
_
g
f
_
H
2
O
is the molar spe-
cic Gibbs free energy of formation of water. Consider the basic reaction for the
hydrogen/oxygen fuel cell 2H
2
+O
2
2H
2
O. The product is one mole of H
2
O,
and the reactants are one mole of H
2
and half a mole of O
2
g
f
=
_
g
f
_
H
2
O

_
g
f
_
H
2

1
2
_
g
f
_
O
2
. (8.5)
If there are no losses in the fuel cell, then all this Gibbs free energy is converted
into electrical energy. For the hydrogen fuel cell two electrons pass round the
external circuit for each water molecule produced and each molecule of hydrogen
used. So, for one mole of hydrogen used 2N electrons pass round the external
circuit, where N is Avogadros number, that is, N = 6.022 10
23
. If e is the
charge on one electron, then the charge that ows is
2Ne =2F Coulombs, (8.6)
where F = N e = 96485 Coulombs is the Faraday constant, or the charge on
one mole of electrons. If V is the voltage of the fuel cell, then the electrical work
W
el
done moving this charge round the circuit is
W
el
= charge voltage =2FV Joules. (8.7)
If the system is reversible (or has no losses) then this electrical work done will
be equal to the Gibbs free energy g
f
released
g
f
=2FV, (8.8)
ZHW, Smsy, WS06/07 92
CCP Center for Computational Physics SmSy
or
V
oc
=
g
f
2F
. (8.9)
This fundamental equation gives the reversible open circuit voltage of the hy-
drogen fuel cell [2]. For example, a hydrogen fuel cell operating at T = 200

C
has g
f
=220kJ/mol, so the maximum voltage of an ideal hydrogen fuel cell at
this temperature is V
oc
= 1.14 Volts. The Gibbs free energy of formation depends
on temperature and state (liquid or gas), and therefore, the reversible open circuit
voltage depends on temperature.
8.3 The effect of pressure and gas concentration on
the reversible open circuit voltage: Nernst equa-
tion
In addition, the Gibbs free energy of the overall hydrogen fuel cell reaction H
2
+
1
2
O
2
H
2
O changes with reactant pressure and concentration
g
f
= g
0
f
RT ln
_
_
a
H
2
a
1
2
O
2
a
H
2
O
_
_
. (8.10)
Eq. 8.10 states that the change in molar Gibbs free energy of formation at
standard pressure is modied by an extra logarithmic term. This term contains the
activities of the reactants H
2
, O
2
and of the product H
2
O. Activity in chemistry is
a measure of how different molecules in a non-ideal gas or solution interact with
each other. For a mix of gas at low pressure, the activity is equal to the ratio of the
partial pressure P
i
of the gas component i over the standard pressure P
0
a
i
=
P
i
P
0
. (8.11)
Therefore, the activity is equal to the partial pressure in bars (compared to a stan-
dard pressure of 1 bar). Combining Eqs. 8.10 and 8.11 yields
g
f
= g
0
f
RT ln
_
_
P
H
2
P
1
2
O
2
P
H
2
O
_
_
. (8.12)
ZHW, Smsy, WS06/07 93
CCP Center for Computational Physics SmSy
This formula can be inserted into Eq. 8.9 to calculate the open circuit voltage
of the fuel cell
V
oc
=V
0
oc
RT ln
_
_
P
H
2
P
1
2
O
2
P
H
2
O
_
_
, (8.13)
where
V
0
oc
=
g
0
f
2F
. (8.14)
Eq. 8.13 is the Nernst equation. This equation is important to predict a large
number of variables in fuel cell design and operation.
8.4 The non-equilibrium fuel cell voltage
The voltage is reduced in comparison to the ideal open circuit voltage Eq. 8.9 when
an electrical current is drawn from the cell. The equilibrium cell voltage is reduced
by the so-called overpotential
V =V
oc
. (8.15)
The most important contribution to the overpotential stems from electrochemi-
cal "activation losses"
act
: during the electrochemical charge transfer reaction, an
electron is transferred from the ion to the electrode, or vice versa. This is called
a redox-reaction. In order to be transferred, the electron has to overcome the po-
tential barrier between the electronically conducting phase (e.g. carbon) and the
electrolyte (e.g. proton conducting polymer). The electron donator is labelled re-
ducing agent, the electron acceptor is called oxidant. The electrode where the
oxidation reaction is dominant is the anode; the electrode where the reduction
reaction is dominant is the cathode. The electrical potential value at the phase
boundary changes from
e
in the electronically conducting phase to
p
in the elec-
trolyte; the electrical current ow occurs in two different phases.
The redox-reaction at the phase boundary can be modelled as follows [3]. The
current density across the phase boundary that corresponds to the reduction reac-
tion can be written as
j
c
= F k
c
[Ox] , (8.16)
ZHW, Smsy, WS06/07 94
CCP Center for Computational Physics SmSy
and the current density that corresponds to the oxidation reaction at the same
location is
j
a
= F k
a
[Red]. (8.17)
Here, k
c
and k
a
are the rate coefcients of the reactions, and [Ox], [Red] are the
species concentrations of the oxidant and the reductant, respectively. The charge
transfer reaction is always active in both directions, that is, the reduction reaction
and the oxidation reaction is present in the same electrode at the same location.
The overall current density across the phase boundary is
j = j
a
j
c
= F (k
a
[Red] k
c
[Ox]) . (8.18)
The rate coefcients follow an Arrhenius equation
k
i
= B
i
exp
_

G
i
()
RT
_
, (8.19)
where B
i
is a constant with the dimension of a velocity.

G
i
() is the Gibbs
free energy of activation, and R is the universal gas constant. This activation en-
ergy, the transition state energy, can be associated to the energy which the re-
actants have to surpass when they transform into products. Now, the Boltzmann
factor exp
_

G
i
()
RT
_
reects the probability to nd the system in the transition
state, and B
i
is a frequency factor connected to the decay of the transition state
into products. The latter interpretation justies Arrhenius-type reaction rates of
reactions in solution, in which case the reactants do not actually collide at high
velocities. We can also understand that the addition of an extra chemical that sta-
bilizes the transition state (i.e. a catalyst like platinum), thus lowering the activation
energy, will speed up the chemical reaction.
Inserting Eq. 8.19 into Eq. 8.18 yields
j = F B
a
[Red] exp
_

G
a
()
RT
_
F B
c
[Ox] exp
_

G
c
()
RT
_
. (8.20)
Reduction reaction: During the reduction reaction, n electrons are transferred
from the electrode to the electrolyte. Assume that the transition state is product-
like, that is, the peak of the transition state is close to the electrode as indicated
in Fig. 8.4. A potential difference between the phases shifts the Gibbs free energy

G
c
(0) by

G
c
() =

G
c
(0) +nF . (8.21)
ZHW, Smsy, WS06/07 95
CCP Center for Computational Physics SmSy
The Gibbs free energy does not depend on the potential difference =

p
if the transition state is reactand-like (Fig. 8.5). The transition state of the
real electrochemical reaction is inbetween those two cases; therefore a symmetry
factor is introduced

G
c
() =

G
c
(0) + nF . (8.22)
The value of the symmetry factor is between 0 and 1. This situation is shown
in Fig. 8.6.
Oxidation reaction: In the general case the Gibbs free energy of the anode
reaction process can be written as

G
a
() =

G
a
(0) (1)nF . (8.23)
The combination of Eq.8.20, Eq.8.22 and Eq.8.23 gives
j = n
g
F B
a
[Red] exp
_

G
a
(0)
RT
_
exp
_
(1)nF
RT
_
n
g
F B
c
[Ox] exp
_

G
c
(0)
RT
_
exp
_

nF
RT
_
, (8.24)
n
g
number of electrons, that contribute to the reaction ,
n number of transferred electrons in the rate limiting
reaction step .
Let us consider the case if the partial ionic current of the oxidation reaction
equals the partial ionic current of the reduction reaction, that is, the total electrical
current is zero. In this case, the Galvani potential equals the equilibrium elec-
trode potential difference of both phases =
0
. The partial ionic current of the
equilibrium case is named exchange current density j
0
j
0
= n
g
F B
a
[Red] exp
_

G
a
(0)
RT
_
exp
_
(1)nF
0
RT
_
= n
g
F B
c
[Ox] exp
_

G
c
(0)
RT
_
exp
_

nF
0
RT
_
. (8.25)
The activation overpotential is dened as

act
=
0
, (8.26)
ZHW, Smsy, WS06/07 96
CCP Center for Computational Physics SmSy
Figure 8.3: This gure represents the case where the
potential difference between both phases is zero.
Figure 8.4: Product-like transition state: a potential
difference =
e

p
shifts the peak of the Gibbs
free energy by F .
ZHW, Smsy, WS06/07 97
CCP Center for Computational Physics SmSy
Figure 8.5: The peak position of the Gibbs free energy
is independent for a reacand-like transition state.
Figure 8.6: For a real electrochemical reaction the the
peak is shifted by F .
ZHW, Smsy, WS06/07 98
CCP Center for Computational Physics SmSy
that is, the activation overvoltage equals the deviation of =
e

p
from its
equilibrium value
0
.
The rst term in Eq. 8.24 can be rewritten by replacing the potential difference
by Eq. 8.26, and introducing the exchange current density j
0
(Eq.8.25). This
leads to the following expression
j
a
= n
g
F B
a
[Red] exp
_

G
a
(0)
RT
_
exp
_
(1)nF(
0
+
act
)
RT
_
= j
0
exp
_
(1)nF
act
RT
_
. (8.27)
Accordingly, the second term in Eq. 8.24 leads to
j
c
= n
g
F B
c
[Ox] exp
_

G
c
(0)
RT
_
exp
_

nF(
0
+
act
)
RT
_
= j
0
exp
_

nF
act
RT
_
. (8.28)
Thus, the total current density j = j
a
j
c
reads
j = j
0
_
exp
_
(1)nF
RT

act
_
exp
_

nF
RT

act
__
. (8.29)
This important equation is named Butler-Volmer equation. Fig. 8.7 shows the
total current density j as a function of the activation overvoltage
act
as predicted
by the Butler-Volmer equation. In the case of high activation overvoltage the total
current is approximately equal to the anodic partial current density j
a
. In contrast,
the total current density can be approximated by the cathodic partial current den-
sity for
act
<< 0.
The shape of the current voltage characteristic of a PEM fuel cell is mainly de-
termined by the Butler-Volmer equation. As outlined in Section 8.2 the cell voltage
is V =V
oc
. The current density that corresponds to a given value of the activa-
tion overvoltage
act
is calculated by the Butler-Volmer equation (Eq. 8.29). Fig.8.8
shows three current-voltage curves that were calculated by using the Butler-Volmer
equation, and by subtracting the absolute value of the activation overvoltage from
the equilibrium open circuit voltage V
oc
. Each curve corresponds to a different
value of the exchange current density j
0
which is the most important parameter
that determines the fuel cell performance. It is vital to make its value as high as
possible. The smaller is j
0
, the greater is the activation overvoltage
act
. On the
other hand, improving the catalytic activity of the electrode means to increase the
exchange current density j
0
, and therefore, to improve the fuel cell performance.
ZHW, Smsy, WS06/07 99
CCP Center for Computational Physics SmSy
Figure 8.7: The anodic partial current density j
a
and the cathodic partial cur-
rent density j
c
are plotted as a function of the activation overvoltage
act
=

0
. In addition, the resulting total current density j = j
a
j
c
is plotted
as predicted by the Butler-Volmer equation (Eq. 8.29).
ZHW, Smsy, WS06/07 100
CCP Center for Computational Physics SmSy
Figure 8.8: The three different current voltage curves that are shown in this plot
were calculated by using the Butler-Volmer equation Eq. 8.29 in combination with
the basic equation V =V
oc

act
. Each curve corresponds to a different value of
the exchange current density j
0
that mainly reects the electrode performance.
ZHW, Smsy, WS06/07 101
CCP Center for Computational Physics SmSy
Figure 8.9: The gure shows the domain of the planar self-breathing fuell cell
model. The coordinate origin is located at the lower left corner of the domain.
8.5 A numerical fuel cell model
In the following, a numerical model of planar self-breathing fuel cells for small
portable applications is explained. Due to the symmetry of the ribs on the cath-
ode side that can be seen in Fig. 8.2 it is sufcient to restrict the simulation domain
to half of the region under one rib and half of the region that is opened on the
cathode side. This simulation domain is plotted in Fig. 8.9.
The SESES model of the fuel cell takes into account the electrochemical reac-
tion on the cathode side, gas transport in the gas diffusion layers (GDL), and the
current transport in the GDLs and the membrane. The following assumptions are
made:
Heat transport is not accounted for in the model. Heat transport leading to
temperature variations within the fuel cell are of prime importance in larger
fuel cells, and fuel cell stacks. However, for small devices the temperature
differences throughout the device are smaller than 1

C for moderate current


density, and may well be neglected.
The membrane protonic conductivity is xed to a constant value in the model.
In reality the membrane conductivity depends on the water content of the
membrane. The membrane water content itself depends on the water pro-
duction on the cathode side.
Water is treated as an ideal gas in the model. Liquid water transport is not
accounted for in the model. This assumption leads to reasonable results for
ZHW, Smsy, WS06/07 102
CCP Center for Computational Physics SmSy
planar fuel cells with an open cathode. Gas transport may be blocked by
liquid water droplets in fuel cell stacks for high power applications.
The water distribution in PEM fuel cells depends on the water transport
through the polymer membrane. A concentration gradient from anode side
to cathode side, or vice versa, leads to diffusion of water through the mem-
brane. Additionally, water is carried from anode side to cathode side by
so-called electroosmotic drag: H
+
ions moving from the anode to the cath-
ode pull water molecules with them. This effect is especially important at
high current densities, and therefore the anode side of the electrolyte can
become dried out. Water transport through the membrane is neglected in
the model; this assumption is valid if the water transport by electroosmotic
drag from anode to cathode is balanced by back-diffusion from the cathode
to the anode.
Electrochemical reaction
The electrodes where the electrochemical reactions take place are modeled as
innitely thin layers. In PEM fuel cells the exchange current density j
0
of the oxy-
gen reduction on the cathode side is about three orders of magnitude lower in
comparison to the exchange current density that corresponds to the hydrogen oxy-
dation reaction. Therefore, as explained in Section 8.4, the activation overvoltage
is mainly caused by the slowness of the oxygen reduction reaction. To approxi-
mately predict the fuel cell performance it is sufcient to account for the potential
jump across the cathode electrode. This potential jump is
=
e

p
=
0
+
act
V
oc
+
act
, (8.30)
where we assume that any contribution from the (small) potential jump across
the anode electrode is neglectable. The open circuit voltage V
oc
is calculated from
the Nernst equation Eq. 8.13. The potential jump is accounted for by the following
boundary condition in SESES
(* Cathode electrode *)
BC bc_CathodeCatalyst Restrict material(GDLcathode)
IType @I0(GDLcathode) @I1(GDLcathode) @J0(GDLcathode)
...
(* Potential jump across the cathode electrode *)
Jump Psi
Nernst(Temp, H2, O2) + activationOvervoltage(Temp, @localCurrent, O2)
The activation overvoltage is computed by calling a function that depends on
the local temperature, the local current density, and the local oxygen molar fraction.
ZHW, Smsy, WS06/07 103
CCP Center for Computational Physics SmSy
This function solves the Butler-Volmer equation Eq. 8.29 implicitly for the given lo-
cal current density using the Newton-Raphson method. The Butler-Volmer equa-
tion depends on the oxygen concentration because the exchange current density
Eq. 8.25 depends on the oxygen concentration
j
0
= j

0
[O2], (8.31)
where
j

0
= n
g
F B
c
exp
_

G
c
(0)
RT
_
exp
_

nF
0
RT
_
(8.32)
can be found experimentally from measured temperature dependent ionic cur-
rent density data.
Note that the potential jump is coupled to the diffusion equation for the gas com-
ponents; this is discussed in the next paragraph.
Multicomponent diffusion in the gas diffusion layers
The gas transport in the gas diffusion layers is driven by diffusion. For example,
the gas components O
2
, H
2
O, and N
2
are present on the cathode side of the
air breathing fuel cell. In a gas mixture like this where relative concentrations
are of the same order of magnitude Ficks law is not suitable to describe the gas
transport. Here, all species interact with each other and themselves. Their diffusion
coefcients are therefore species and concentration dependent. Multicomponent
diffusion with composition-dependent diffusion coefcients can be described by
the Stefan-Maxwell model. The SESES keywords to activate the Stefan-Maxwell
model for the gas components O
2
, H
2
O, and N
2
are
TransportO2 TransportN2 TransportH2O
At the cathode electrode oxygen is consumed and water is produced due to the
electrochemical reaction. This is accounted for by specifying Neumann boundary
conditions.
(* Cathode electrode *)
BC bc_CathodeCatalyst Restrict material(GDLcathode)
IType @I0(GDLcathode) @I1(GDLcathode) @J0(GDLcathode)
(* Oxygen consumption *)
Neumann O2 (* Faradays law *)
M_O2()*@localCurrent/(4*F)
(* Water production *)
Neumann H2O (* Faradays law *)
-M_H2O()*@localCurrent/(2*F)
ZHW, Smsy, WS06/07 104
CCP Center for Computational Physics SmSy
Here, Faradays law is used: the mass ux of a substance produced (con-
sumed) at an electrode during an electrochemical reaction is proportional to the
electrical current transferred at that electrode. M
O2
is the molar mass of oxygen,
and M
H
2
O
is the molar mass of water vapour.
Dirichlet boundary conditions are specied at the cathode side. The gap between
the ribs is open to the ambient.
* Cathode opening *)
BC bc_gap IType @I0(gap) @I1(gap) @J0(gap)
Dirichlet O2 xO2Cathode
Dirichlet H2O xH2OCathode
Dirichlet N2 xN2Cathode
Electrical current transport
Electrical current transport is accounted for in the gas diffusion layers, and in the
polymer membrane. The transport equation j
el
= 0, j
el
= is enabled
with the SESES keyword
OhmicCurrent
Therefore, in addition to the electrical potential jump at the cathode electrode,
the electric potential drops in the GDLs and in the membrane. These additional
Ohmic losses are named "Ohmic overpotential" in the electrochemical literature.
The external cell voltage that corresponds to a given total current density is found
by averaging the local potential on the anode side with the SESES command
(* Cathode opening *)
externalVoltage = integrate(Bound bc_AnodeGasSupply; Psi)
/ integrate(Bound bc_AnodeGasSupply; 1)
The potential on the cathode side is set to zero Volts.
8.6 Simulation results
Fig. 8.10 shows an isoline-plot of the oxygen molar fraction within the planar fuel
cell that was obtained with the model. The oxygen is nearly depleted under the
current collecting rib on the left hand side. Mass transport limitation sets in under
the rib at rather low current densities. In contrast, the water vapour concentration
is highest under the rib as shown in Fig. 8.11.
Current-voltage curves were simulated by a variation of the total electrical cur-
rent that is specied as a Neumann boundary condition of the potential equation
ZHW, Smsy, WS06/07 105
CCP Center for Computational Physics SmSy
Figure 8.10: Isolines of the oxygen molar fraction at an electrical current density
of 50
mA
cm
2
are plotted. The oxygen depletes under the current collecting rib that is
located on the left hand side of the device.
Figure 8.11: Isolines of the water vapour molar fraction at an electrical current
density of 50
mA
cm
2
are plotted. The water concentration is highest under the current
collecting ribs; therefore, condensation of water occurs under the ribs at higher
current densities.
ZHW, Smsy, WS06/07 106
CCP Center for Computational Physics SmSy
at the anode side. Fig. 8.12 shows four different current-voltage curves (see gure
caption for details).
A more sophisticated model of planar self-breathing fuel cells for use in elec-
tronic devices can be found in Ref. [6].
Figure 8.12: The plot shows current-voltage curves that were simulated with the
numerical fuel cell model. The solid curve represents a reference case. The
dashed curve was simulated by reducing the exchange current density j

0
by
one order of magnitude. This results in performance degradation in the "kinetic
regime" at low current density. The dash-dotted curve was simulated with in-
creased Ohmic losses in the gas diffusion layers; as a result the absolute value of
the slope of the current-voltage curve increases in the mid-current regime. Finally,
the GDL porosity was reduced to 30% resulting in the dotted curve. This repre-
sents the case of ooded pores by liquid water in the porous material that cause
a blockage of gas transport to the fuel cell electrode. The fuel cell performance
dramatically decreases in this case.
ZHW, Smsy, WS06/07 107
CCP Center for Computational Physics SmSy
References
[1] S. Gottesfeld The Polymer Electrolyte Fuel Cell: Materi-
als Issues in a Hydrogen Fueled Power Source, URL:
http://education.lanl.gov/resources/h2/gottesfeld/education.html
[2] J. D. Larminie Fuel Cell Systems Explained, John Wiley and Sons, England,
2000.
[3] C. H. Hamann, W. Vielstich Electrochemistry, John Wiley and Sons, England,
1998.
[4] C. Berger, Handbook of Fuel Cell Technology, Prentice Hall, USA, 1968.
[5] A. Schmitz et al., Planar self-breathing fuel cells, Journal of Power Sources,
118, pp. 162-171, 2003.
[6] C. Ziegler, A. Schmitz, M. Tranitz, E. Fontes, J.O. Schumacher Modeling pla-
nar and self-breathing fuel cells for use in electronic devices, Journal of
the Electrochemical Society, 151, No. 12, pp. A2028-A2041, 2004.
ZHW, Smsy, WS06/07 108
Appendix A
Vector Algebra and Calculus
Real engineering problems are in general three dimensional. Therefore, we need
to be able to work with vectors and to be able to perform operations on them and
so we recap here the basics of vector algebra. Once a sound basis for describing
our three dimensional space has been established, we will then turn our attention
to calculus operations on vector quantities. The information described here will
be invaluable when solving real world engineering problems using computer aided
engineering programs.
A.1 Vector Algebra
In this section we will study vectors in the 3D Euclidian space. A scalar is a quantity
which has magnitude only and we shall use the plain notation u to denote that the
quantity is a scalar. A vector is a quantity which has both a magnitude as well as
u
a
b
b a +
(x ,y ,z )
x
y
z
e
e
e
1 1 1
2 2 2
1
2
3
a
(x ,y ,z )
T
T
Figure A.1: (Left): Illustration of a vector. (Middle): Addition of the vectors a and

b. (Right): Components of the vector a = (x


2
x
1
, y
2
y
1
, z
2
z
1
)
T
expressed in
Cartesian coordinates.
109
CCP Center for Computational Physics SmSy
a direction as shown in Fig. A.1 and we shall use the bold notation u for a vector
but other authors may also use the notations u or u. A vector with unit magnitude
is called a unit vector.
A.1.1 Addition of Vectors
The vectors a and

b may be added to give a new vector a +

b as illustrated in
Fig. A.1. Note that the vector a is the vector with equal magnitude to that of a,
but with opposite direction. Adding a and a gives the

0 vector which has zero


magnitude and so has no direction.
A.1.2 Components of a Vector
Vectors are often represented in a Cartesian coordinate system, as illustrated in
Fig. A.1. By introducing the three unit vectors e
1
, e
2
ande
3
which point along the
x-, y- and z-axis, any vector a can be uniquely written in the form
a = a
1
e
1
+a
2
e
2
+a
3
e
3
. (A.1)
The vector a can now be identied and represented by the three vector compo-
nents (a
1
, a
2
, a
3
) and one often uses the colum vector form a = (a
1
, a
2
, a
3
)
T
.
Clearly we have e
1
= (1, 0, 0)
T
, e
2
= (0, 1, 0)
T
and e
3
= (0, 0, 1)
T
. This unique
identication of a vector and its components can be actually done for any basis
of three vectors which are linearly independent, i.e. three non-coplanar vectors.
However, for each different basis, we obtain different vector components and it is
therefore important to x a basis. The advantage of using an orthonormal basis
i.e. basis vectors of length one and perpendicular to each other like e
1
, e
2
and
e
3
, will become clear when dening the scalar and vector product of vectors. The
vector component representation a = (a
1
, a
2
, a
3
)
T
is particularly well suited when
dening linear maps for vectors, since then the map can be represented by a ma-
trix together with a matrix-vector product. Using this representation with respect to
the basise
1
,e
2
,e
3
, the summation of two vectors can be written as
a+

b = (a
1
+b
1
)e
1
+(a
2
+b
2
)e
2
+(a
3
+b
3
)e
3
, (A.2)
or in component form as a+

b = (a
1
, a
2
, a
3
)
T
+(b
1
, b
2
, b
3
)
T
.
A.1.3 Dot Product
The dot product or scalar product of two vectors is a scalar quantity dened as
a

b =[a[[

b[ cos , (A.3)
ZHW, Smsy, WS06/07 110
CCP Center for Computational Physics SmSy
cos

b
b
a
x
v

a
b
a
b
x
v

Figure A.2: (Left): Physical realization of the dot product a

b. (Right): Physical
realization of the cross product a

b.
where is the angle between the two vectors. The dot product has the following
properties.
The dot product is commutativea

b =

ba.
If a and

b are perpendicular a

b = 0.
If a

b = 0 thena and

b are perpendicular or a or

b or both are zero.


aa =[a[
2
.
As shown in Fig. A.2, a

b is the magnitude of a multiplied by the component of

b in the direction of a.
The dot product is distributive over additiona (

b+c) =a

b+ac.
We may write a formula for the dot product in terms of the Cartesian component
of a vector as follows. First note that e
1
e
1
= 1, e
2
e
2
= 1, e
3
e
3
= 1 and that
e
1
e
2
=e
1
e
3
=e
2
e
3
= 0, then
a

b = (a
1
e
1
+a
2
e
2
+a
3
e
3
) (b
1
e
1
+b
2
e
2
+b
3
e
3
)
= a
1
b
1
e
1
e
1
+a
2
b
2
e
2
e
2
+a
3
b
3
e
3
e
3
= a
1
b
1
+a
2
b
2
+a
3
b
3
.
(A.4)
Using Cartesian components, the magnitude of a vector is therefore given as [a[ =
_
a
2
1
+a
2
2
+a
2
3
.
ZHW, Smsy, WS06/07 111
CCP Center for Computational Physics SmSy
A.1.4 Cross Product
The cross product or vector product between two vectors is a vector quantitya

b.
It has magnitude and direction. Its magnitude is [a[[

b[ sin where is the angle


between the vectors a and

b. The direction of a

b is perpendicular to both a
and

b in a right handed sense, i.e. a right handed screw rotated froma towards

b
moves in the direction of a

b. Thus a

b = [a[[

b[ sinv wherev is a unit vector


perpendicular to both a and

b in a right handed sense. The cross product has the


following properties.
The cross product is not commutativea

b =

ba.
If the two vectors a and

b are parallel thena

b =

0.
The magnitude of a

b is the area of parallelogram made by the vectors a and

b.
The cross product may also be written in terms of components. Consider rst
e
1
e
2
, since these two vectors have magnitude 1 and are perpendicular sin =1
an therefore the magnitude of e
1
e
2
is 1. The direction of e
1
e
2
perpendicular
to both e
1
and e
2
and so e
1
e
2
=e
3
. It follows that e
1
e
1
=

0, e
2
e
2
=

0,
e
3
e
3
=

0, e
2
e
3
=e
1
ande
3
e
1
=e
2
. Thus
a

b = (a
1
e
1
+a
2
e
2
+a
3
e
3
) (b
1
e
1
+b
2
e
2
+b
3
e
3
)
= a
1
b
2
e
1
e
2
+a
1
b
3
e
1
e
3
+a
2
b
1
e
2
e
1
+a
2
b
3
e
2
e
3
+
a
3
b
1
e
3
e
1
+a
3
b
2
e
3
e
2
= (a
2
b
3
a
3
b
2
)e
1
+(a
3
b
1
a
1
b
3
)e
2
+(a
1
b
2
a
2
b
1
)e
3
.
(A.5)
Note that this may also be written as the determinate of a matrix
a

b =

e
1
e
2
e
3
a
1
a
2
a
3
b
1
b
2
b
3

. (A.6)
A.1.5 Scalar Triple Product
The scalar triple product is dened asa (

bc) and is a scalar quantity. The scalar


triple product has the following properties
The dot and the cross may be interchangeda (

bc) = (a

b) c.
The vectors a,

b and c may be permuted cyclically a (

b c) =

b (c a) =
c (a

b).
ZHW, Smsy, WS06/07 112
CCP Center for Computational Physics SmSy
Using the previous results, we have that
a (

bc) = a
1
b
2
c
3
a
1
b
3
c
2
+a
2
b
3
c
1
a
2
b
1
c
3
+a
3
b
1
c
2
a
3
b
2
c
1
, (A.7)
which may also be written as a determinate of a matrix
a (

bc) =

a
1
a
2
a
3
b
1
b
2
b
3
c
1
c
2
c
3

. (A.8)
A.1.6 Vector Tripple Product
The vector triple product a (

b c) is a vector quantity. Note that the brackets


are important here as a(

bc) ,= (a

b) c. The vector triple product has the


following properties
a(

bc) = (ac)

b(a

b)c.
(a

b) c =c (a

b) =(c

b)a+(c a)

b.
A.1.7 Scalar and Vector Fields
A scalar or vector quantity is said to be a scalar or vector eld if it is a function
of the position x. To display scalar elds one often plots contours of the solution.
The isolines on these contour diagrams represent constant values of the solution.
These plots can be compared to the lines that one sees on a map, where the iso-
lines in this case represent lines of constant height. Vector elds are often plotted
as arrows on graph, where the length of the arrow represents the magnitude of a
vector. Plots of this type are often used on weather maps to illustrate wind speed.
An example of a contour plot and a vector eld diagram is shown in Fig. A.3.
A.2 Vector Calculus
In the previous section, we discussed some of the standard operations that can be
performed on vectors, namely the dot product, the cross product, the scalar triple
product and the vector triple product. In this section, we wish to remind ourselves
of partial differentiation and explore the gradient operator for scalar elds, the di-
vergence operator for vector elds, the Laplacian operator for scalar and vector
elds, the curl operator for vector elds as well as the divergence integral theorem.
ZHW, Smsy, WS06/07 113
CCP Center for Computational Physics SmSy
y
x
y
x
Figure A.3: Illustrations of a contour plot and a vector eld diagram. (Left): Con-
tours of the scalar eld T(x, y) = x
2
+y
2
. (Right): The vector eldv = (y, x, 0)
T
.
A.2.1 Partial Differentiation
Consider a scalar quantity f which is a function of three variables so that f =
f (x, y, z). Then the partial derivative of f with respect to x is dened to be the
derivative of f with respect to x where y and z are regarded as constants. To
indicate that the function f is a function of more than one variable, the partial
derivative is written using the curly-d glyph . More formally the denition of a
partial derivative is
f
x
= lim
x0
f (x +x, y, z) f (x, y, z)
x
. (A.9)
Example: The function f (x, y, z) is dened as f = x
2
+xysinz yz. Show that

2
f /xy =
2
f /yx. 2 Differentiating f with respect to x, y and z in turn gives
f
x
= 2x +ysinz,
f
y
= xsinz z,
f
z
= xycosz y. (A.10)
Then

2
f
xy
=

x
_
f
y
_
= sinz, (A.11)
and

2
f
yx
=

y
_
f
x
_
= sinz. (A.12)
In fact, the result that
2
f /xy =
2
f /yx is always true provided that the
second derivatives exist and are continuous. 2
ZHW, Smsy, WS06/07 114
CCP Center for Computational Physics SmSy
Constant f

f
Figure A.4: The gradient of f is a vector perpendicular to the surface
f (x, y, z) =constant.
A.2.2 Taylor Series in more than One Variable
In the nite difference approximation of ordinary differential equations we used
the Taylor series for functions of one variable to derive an approximation to the
derivatives. There also exists a form of the Taylor series for functions of more than
one variable, for a function of two variables this can be written as
f (x +x, y +y) = f (x, y) +x
f
x
+y
f
y
+
(x)
2
2!

2
f
x
2
+
(y)
2
2!

2
f
y
2
+
(A.13)
or as
f = x
f
x
+y
f
y
+
(x)
2
2!

2
x
x
2
+
(y)
2
2!

2
x
y
2
+ (A.14)
where f = f (x +x, y +y) f (x, y). Similarly for a function of three variables
f (x, y, z) the lowest order terms in the Taylor series are
f = x
f
x
+y
f
y
+z
f
z
+ (A.15)
or the following sections we shall use this form of the Taylor series, but only the
lowest order terms will be required.
A.2.3 Gradient of a Scalar Field
Previously, we saw that a scalar eld f can be visualized as a series of iso-lines
which represent where f is constant. The gradient of the scalar eld f is a vec-
tor eld with a direction that is perpendicular to the level surface pointing in the
direction of increasing f , with a magnitude equal to the rate of change of f in this
ZHW, Smsy, WS06/07 115
CCP Center for Computational Physics SmSy
direction, see Fig. A.4. The gradient of f is often written as grad f or as f . In the
Cartesian coordinate system it can be also written in terms of the partial derivatives
of f
f =
f
x
e
1
+
f
y
e
2
+
f
z
e
3
. (A.16)
We now show that these two denitions are equivalent.
Consider an innitesimal change in position in space fromr to r +

dr. This
results in a small change in the value of the scalar eld f from f to f +df where
d f =
f
x
dx +
f
y
dy +
f
x
dx
=
_
f
x
,
f
y
,
f
z
_
T
(dx, dy, dz)
T
= f

dr . (A.17)
Now suppose that

dr lies in the surface f =constant, In this case the change in the
value of f must be zero and so we have df =f

dr = 0. Now in general f ,= 0
and

dr ,= 0 and so the the vectors f and

dr must be perpendicular. Since

dr is
in the level surface f =constant, the vector f must be perpendicular to the level
surface.
To show that f has the correct magnitude, we now consider

dr = dsn where
n is the unit normal to the level surface and s is a distance measured along the
normal. In this case df = f (dsn) = [f [ds since f and n are parallel and
[n[ = 1. Hence the magnitude of f is
[f [ =
df
ds
, (A.18)
which is the rate of change of f with position along the normal.
A.2.4 Physical Interpretations of the Gradient
The gradient occurs in many physical contexts. Two examples are given below
Let p denote the pressure in a gas. Then there is a force

F acting on any volume
element V due to the pressure gradient, given by

F =(p)V .
A material has a constant thermal conductivity and a variable temperature
T(r). Because of the temperature variation, heat ows from the hot regions to
the cold regions. The heat ux q is a vector quantity q =T .
ZHW, Smsy, WS06/07 116
CCP Center for Computational Physics SmSy
S
P
V
n
Figure A.5: Denition of the diver-
gence. The small volume V has
surface S and outward normal n.
(x,y,z)
n
n
x
y
z

x
y
z
S S
1
2
T
Figure A.6: Rectangular box used to obtain
an expression for divu in Cartesian coordi-
nates.
A.2.5 Divergence of a Vector Field
This section considers a possible ways of differentiating a vector eld. The di-
vergence of a vector eld u is a scalar eld, its value at a point P is dened as
divu = lim
V0
1
V
_
S
undS, (A.19)
where V is a small volume enclosing P with surface S andn is the unit outward
normal to S. Physically, this corresponds to the amount of ux of the vector eld
u out of V divided by the volume V, see Fig. A.5. We now derive an expression
for the divergence in terms of Cartesian components of the vector u. To obtain this
alternative form, take the volume V to be a small rectangular box with sides of
length x, y and z centered on a point (x, y, z)
T
, see Fig. A.6. It is assumed
the components of u have continuous partial derivatives. Since the box has six
faces there are six contributions to the integral. Consider the rst rst surface S
1
.
The face is perpendicular to the x axis so the unit normal is (1, 0, 0)
T
and hence
u n = u
1
. The center of the face is at the point (x +x/2, y, z)
T
and the area of
the face is yz, so the contribution to the surface integral from this face is
_
S
1
undS u
1
(x +x/2, y, z)yz, (A.20)
where we used the fact that since the surface is small, it can be approximated by
the value of un multiplied by the area of the surface.
A similar argument can be used to approximate the contribution to the sur-
face from S
2
which is located at (x /2, y, z)
T
. The outward normal for S
2
is
(1, 0, 0)
T
, soun =u
1
and the contribution to the surface integral is
_
S
2
undS u
1
(x x/2, y, z)yz. (A.21)
ZHW, Smsy, WS06/07 117
CCP Center for Computational Physics SmSy
Adding these contributions gives
_
S
1
+S
2
undS (u
1
(x +x/2, y, z) u
1
(x x/2, y, z))yz

u
1
x
xyz

u
1
x
V.
Hence the contribution to divu from surfaces S
1
and S
2
is u
1
/x. Note that this
is now exact as the divergence is obtained by taking the limit V 0. By evalu-
ating similar contributions from the surfaces perpendicular to the y and z axis, one
obtains the denition of divu in Cartesian coordinates
divu =
u
1
x
+
u
2
y
+
u
3
z
. (A.22)
Note that this may also be written as
divu =
u
1
x
+
u
2
y
+
u
3
z
=
_

x
,

y
,

z
_
T

_
u
1
, u
2
, u
3
_
T
=.u,
(A.23)
and that henceforth we will use notation .u to denote the divergence of u.
A.2.6 Physical Interpretation of Divergence
The physical interpretation of the divergence is that it can be thought of the rate
of expansion or stretching of the vector eld. Consider the three vector elds u =
(x, 0, 0)
T
, v = (x, 0, 0)
T
and w = (0, x, 0)
T
shown in Fig. A.7. We observe that
the .u =1 and that plot indicates that the eld is expanding away from the yaxis.
For the second eld .v = 1 and we observe that the eld is contracting. In the
case of the third eld .w = 0 and the eld is neither expanding or contracting.
A.2.7 Laplacian Operator
Suppose that a scalar eld is twice differentiable. Then the gradient of is a
differentiable vector eld , so we can take the divergence of and obtain
another scalar eld, .. The scalar eld . is called the Laplacian of and
has its own symbol
2
, so
. =
2
. (A.24)
The formula for
2
in Cartesian coordinates is given by applying rst the gradient
and then the divergence operator

2
=

x
_

x
_
+

y
_

y
_
+

z
_

z
_
=

2

x
2
+

2

y
2
+

2

z
2
. (A.25)
ZHW, Smsy, WS06/07 118
CCP Center for Computational Physics SmSy
x
y
x
y
y
x
u = (x, 0, 0)
T
v = (x, 0, 0)
T
w = (0, x, 0)
T
.u = 1 .v =1 .w = 0
Figure A.7: Diagrams of the the three vector elds u, v and w.
The Laplacian also exists for vector elds in Cartesian coordinates. If we were
to apply the gradient operator to each component of a vector u = (u
1
, u
2
, u
3
)
T
we
would get a 33 matrix
1
u =
_
_
_
u
1
x
u
1
y
u
1
z
u
2
x
u
2
y
u
2
z
u
3
x
u
3
y
u
3
z
_
_
_
. (A.26)
If we take the divergence of u, we obtain the vector

2
u =
_

2
u
1
x
2
+

2
u
1
y
2
+

2
u
1
z
2
_
e
1
+
_

2
u
2
x
2
+

2
u
2
y
2
+

2
u
2
z
2
_
e
2
+
_

2
u
3
x
2
+

2
u
3
y
2
+

2
u
3
z
2
_
e
3
=
_

2
u
1
,
2
u
2
,
2
u
3
_
T
.
(A.27)
A.2.8 Physical Applications of the Laplacian
The Laplacian is an important operator which has many important applications
including heat transfer and wave motion. The equation
2
= 0 is known as the
Laplace equation.
A.2.9 Curl of a Vector Field
The curl of a vector eld is another type of differentiation that can be applied to a
vector. The curl of a vector eld is a vector eld, its component in the direction of
1
In vector calculus, we often to refer to matrices as a special type of tensor. For our purposes it
is sufcient to know that a matrix is the same as tensor of rank 2. The rank 2 refers to the fact that
each component A
i j
of A =u has two indices i and j (the row and the column).
ZHW, Smsy, WS06/07 119
CCP Center for Computational Physics SmSy
n
C
S

Figure A.8: Denition of the curl of a


vector eld. The small surface S is
enclosed by the curve C and has
the unit vector n.
C
C
C
C
(x,y,z)

y
x
x
y
1
2
3
4
T
Figure A.9: A rectangle of four line seg-
ments is used to nd an expression for curlu
in Cartesian coordinates.
the unit vector n is dened by
n curlu = lim
S0
1
S
_
C
u

dr, (A.28)
where S is a small surface perpendicular ton and C is the closed curve forming
the boundary of S, as shown in Fig. A.8. We now wish to derive an expression for
curlu in Cartesian coordinates. To do this we consider n =e
3
and try to determine
the zcomponent of curlu. The surface S lies in the x, y plane and can be chosen
as a small rectangle with sides x and y centered on the point (x, y, z)
T
and area
xy. The conguration is shown in Fig. A.9. Consider the rst segment C
1
of
the line integral which has center at the point (x, y /2, z)
T
. Here the integral is
directed in the positive x direction, so u

dr = u
1
dx. Since the length x is small,
the contribution to the line integral is approximately
_
C
1
u

dr u
1
(x, y y/2, z)x.
Similarly, on C
3
, centered on (x, y +y/2, z)
T
, the integral is directed in the nega-
tive direction so
_
C
3
u

dr u
1
(x, y +y/2, z)x.
Adding the two contributions gives
_
C
1
+C
3
u

dr (u
1
(x, y y/2, z) u
1
(x, y +y/2, z))x

u
1
y
yx.
ZHW, Smsy, WS06/07 120
CCP Center for Computational Physics SmSy
Proceeding in a similar manner for integrals along segments C
2
and C
4
one obtains
_
C
2
+C
4
u

dr (u
2
(x +x/2, y, z) u
2
(x x/2, y, z))y

u
2
x
xy.
Adding all four contributions, diving by S and taking the limit S 0 gives the z
component of curlu
e
3
curlu =
u
2
x

u
1
y
. (A.29)
In a similar way the other components of the curlu can be derived. The complete
expression is
curlu =
_
u
3
y

u
2
z
,
u
1
z

u
3
x
,
u
2
x

u
1
y
_
T
. (A.30)
The curl of a vector eldu is often also written as u or as the determinate of a
special matrix, so that the following are equivalent
curlu =u =

e
1
e
2
e
3

z
u
1
u
2
u
3

. (A.31)
A.2.10 Physical Interpretation of Curl
The curl operator is less easy to visualize than the gradient or the divergence
operators. From the physical denition of the curl operator we know that it relates
to the amount of twisting of the vector eld. We again consider the elds u =
(x, 0, 0)
T
, v = (x, 0, 0)
T
and w= (0, x, 0)
T
which we used to examine the physical
interpretation of the divergence. The elds u andv have a zero curl and exhibit no
twisting behavior where as the eld w has w = (0, 0, 1)
T
which means that
there is a component of w in the z direction, out of the page. The curl operator
occurs in Maxwells equations which govern electromagnetic phenomena.
A.2.11 Divergence Theorem
Up until now we have been concerned with differentiation of vector and scalar
elds. We may also be interested in integrating vector elds. A useful tool which
is often used to convert volume integrals to surface integrals is the divergence
theorem, also known as Gausss theorem.
ZHW, Smsy, WS06/07 121
CCP Center for Computational Physics SmSy

V
S
n
Figure A.10: Division of a volume V
into small sub-volumes V for the
proof of the divergence theorem.
n
n
V
S
V

S
1
1
2
2
1
2

Figure A.11: Enlargement of two adjacent
volume elements.
For the integral of the divergence of a vector eldu over a volume V this states
that
_
V
.udV =
_
S
undS, (A.32)
where S is the surface of V andn is a unit normal to the surface.
Proof: We just give here an outline of the proof. Let us subdivide V in to a large
number of smaller sub-domains V
i
each with surfaces S
i
as shown in Fig. A.10.
Within each of the sub-domains .u is given by
.u
1
V
i
_
S
i
undS, (A.33)
where the approximation becomes exact in the limit V 0. Multiplying both sides
of this expression by V
i
and adding up contributions from all sub-domains

i
.uV
i

i
_
S
i
undS. (A.34)
Now take the limit V
i
0. The left hand side of this equation becomes the
volume integral of .u over the volume V. To simplify the right hand side, consider
two adjacent volume elements V
1
and V
2
(Fig. A.11). Since the normal vector
to each surface points outward, the normal vectors to the two surfaces along their
common surface point in opposite directions: n
1
= n
2
. Therefore the values of
nu cancel along the common surface: u
1
n
1
+u
2
n
2
=0. This means that all the
contributions to the sum on the right hand side of equation (A.34) from the interior
of V cancel out, leaving only the surface integral over the exterior surface S. So in
the limit V
i
0 equation (A.34) becomes
_
V
.udV =
_
S
undS. 2 (A.35)
ZHW, Smsy, WS06/07 122
CCP Center for Computational Physics SmSy
References
[1] NM-SESES Tutorial, NM Numerical Modelling GmbH, http://www.nmtec.ch,
Thalwil, Switzerland, 2005.
[2] COMSOL Multiphysics Quick Start and Quick Reference, COMSOL AB,
http://www.comsol.com, Stockholm, Sweden, 2005.
[3] J.N. Reddy An introduction to the Finite Element Method, McGrawHill, USA,
ISBN 007-124473-5, 2006.
[4] J. Schimkat, Grundlagen und Modelle zur Entwicklung und Optimierung
von Silizium-Mikrorelais Dissertation, Technische Universitt Berlin, FB
Maschinenbau und Produktionstechnik, 1996.
[5] URL: http://www.asulab.ch/de/composants_de.html
[6] F. Gueissaz, D. Piguet, The microreed, an ultra-small passive MEMS mag-
netic proximity sensor designed for portable applications., Proceedings of
the 14th IEEE International Conference on Micro Electro Mechanical Sys-
tems : MEMS 2001 : Interlaken, Switzerland, January 21-25, 2001.
[7] B. Odermatt, FEM-Berechnung von magnetischen Krften, Diplomarbeit,
Zrcher Hochschule Winterthur, Center for Computational Physics, Win-
terthur, Switzerland, 2001.
[8] T. Haller, H. Schwarzenbach, G. Steiner, Finite Element model based product
development with NM SESES, Orell Fssli Verlag AG, Zrich, ISBN 3-280-
02773-X, 2002.
[9] Skript zur Magnetostatik, Rheinische Friedrich-Wilhelms Universitt
Bonn, Institut fr Theoretische Geodsie, URL: http://www.geod.uni-
bonn.de/apmg/pdf_doc/4_Magnetostatik.pdf.
[10] E. Grimsehl Lehrbuch der Physik, Bd. 2, Elektrizittslehre, Teubner Verlags-
gesellschaft, Leipzig, Germany, 1985.
[11] J. D. Jackson Klassische Elektrodynamik, De Gruyter, Berlin, Germany, 2002.
ZHW, Smsy, WS06/07 123

Vous aimerez peut-être aussi