Date post: | 04-Jan-2016 |
Category: |
Documents |
Upload: | tyrone-johns |
View: | 212 times |
Download: | 0 times |
Surfaces in Computational Physics
ECG-Workshop 2003
Surfaces in Computational Physics
Andreas Hildebrandt
Surfaces in Computational Physics
ECG-Workshop 2003
What is computational physics?
• Devoted to the numerical solution of „scientific problems“
• Conceptually in between theoretical and mathematical physics
• Extremely broad range of topics and applications
All pictures from www.opendx.org
Surfaces in Computational Physics
ECG-Workshop 2003
Reasons for using (hyper-)surfaces in physics
• Visualization,
Graphical Analysis
• Geometrization of Physics
(c.f. General Relativity electrodynamics etc)
• Speeding up expensive calculations
• Specifying boundary
conditions
www.opendx.org
www.scicomp.ucsd.edu/~mholst/
www.scicomp.ucsd.edu/~mholst/
www.vibroacoustics.co.uk/
Surfaces in Computational Physics
ECG-Workshop 2003
VisualizationVisualizing scalar 3D fields has many important applications in computational physics like:
1. Coloring a surface with a scalar quantity like
(a) an electrostatic potential (b) a pressure field
www.opendx.org www.scs.gmu.edu/~rlohner/
Surfaces in Computational Physics
ECG-Workshop 2003
Visualizing scalar 3D fields has many important applications in computational physics like:
2. Plotting the contour surface of a scalar quantity, e.g.
quantum mechanical electron densities
www.opendx.org
Visualization
Surfaces in Computational Physics
ECG-Workshop 2003
Visualizing scalar 3D fields has many important applications in computational physics like:
3. Comparing different numerical methods
www.opendx.org
Visualization
graphical analysis of quantum mechanical basis sets
Surfaces in Computational Physics
ECG-Workshop 2003
Geometrization of Physics
– General relativity: spacetime as a 4 dimensional Riemannian manifold, matter and energy yield the metric
– Electrodynamics: electric and magnetic fields and fluxes as forms on a 3d manifold
Many modern concepts in physics are based on geometrical theories like e.g.:
Surfaces in Computational Physics
ECG-Workshop 2003
Boundary Conditions
• Theoretical physics describes the various phenomena encountered in nature quantitatively in the form of “theories”
• These consist of one or more operator equations, connecting observable quantities of the system
• Observables can be predicted from the knowledge of the others (e.g. electrostatic potential from charge density)
Surfaces in Computational Physics
ECG-Workshop 2003
Boundary Conditions
• Most „physical“ operators are differential or integro-differential operators, e.g.
• LLaplace= = r ¢ r
• LSchrödinger = H – i~ t = –~2 (2m)(-1) – i ~ t
• Solving a differential equation introduces integration constants
) to find a unique solution, their values have to be fixed by demanding that they fullfil „boundary conditions“
Surfaces in Computational Physics
ECG-Workshop 2003
Boundary Conditions3d–Problems ) specification of boundary conditions on a 2d–surface
) need a parameterization of boundary surfaces
) analytical solutions only for simple geometries
or as perturbation expansion about simple geometries
www.csd.abdn.ac.uk/~dritchie/ graphics/
Surfaces in Computational Physics
ECG-Workshop 2003
Boundary Element Method (BEM)
• Powerful tool for solving differential equations
• Reduces the dimensionality of the problem
• Applicable to arbitrary closed surfaces
Surfaces in Computational Physics
ECG-Workshop 2003
Some applications for the boundary element method
Heat conduction
Molecular Modeling
www.opendx.org
Medical imaging and modeling
www.ccrl-nece.de/simbio
Computational Fluid Dynamics
wings.avkids.com
Sound propagation
urbana.mie.uc.edu/yliu/
Surfaces in Computational Physics
ECG-Workshop 2003
Hot conducting side
flux = ?
Cold conducting side
flux=?
Insulated side
temperature = ?
Insulated side
temperature = ?
tem
per
atu
re=
?
Example: 2D steady state heat conduction
Given a system with certain boundary temperatures and fluxes, compute the value of the temperature everywhere!
Surfaces in Computational Physics
ECG-Workshop 2003
Example: 2D steady state heat conduction
Given a system with certain boundary temperatures and fluxes, compute the value of the temperature everywhere!
2, q=0
3, u=100
1, u=0
4, q=0 u = 0
u = 0 ) L =
u = temperature
q = heat flux
Surfaces in Computational Physics
ECG-Workshop 2003
The Boundary Element Method
• Let L be a linear differential operator• We want to solve Lu = 0 in a domain of a
d-dimensional space E
• Let be the boundary of in E
E
Lu = 0
Surfaces in Computational Physics
ECG-Workshop 2003
• For the exact solution u, we have Lu = 0 in .
• But numerically we can only expect to compute an approximation ū, so that Lū = R in
• R is called the residual of the equation
• We can‘t hope for R=0, but we can try to find an particularly nice R!
E
Lu = 0
Lū = R
Surfaces in Computational Physics
ECG-Workshop 2003
E
Lu = 0
Lū = R
The residual R is a measure for the error of the numerical approximation.
We can‘t make it disappear, but we can try to distribute the error over so that it vanishes in a certain average sense:
Surfaces in Computational Physics
ECG-Workshop 2003
The weighted residual
• This integral is called a weighted residual• This is the starting point for many modern PDE
solvers like the Finite Element Method (FEM) and the Boundary Element Method (BEM). These differ in their choice of w.
• We have converted the differential equation Lū = 0 into an integro-differential equation with weaker continuity requirements and improved numerical stability
Surfaces in Computational Physics
ECG-Workshop 2003
„Roadmap“
• For a given L, simplify the integro-differential equation and convert it into an integral equation
• Choose a suitable w • Discretize (FEM) or (BEM)• Solve the simplified equation numerically on this
discretization
Surfaces in Computational Physics
ECG-Workshop 2003
Notational conventions
• We’ll use the simplified Einstein convention: any repeated index denotes a summation over its whole range
e.g.:
• For the partial derivative with respect to xj, we use the comma convention:
• Example: the Laplace equation:
Surfaces in Computational Physics
ECG-Workshop 2003
Example: The Laplace Equation
• The Laplace equation u,ii = 0 in describes e.g. the electrostatic potential in the absence of charges, steady-state heat conduction, ...
• It is a linear second order partial differential equation ) we need to specify two boundary conditions on =
• We can e.g. specify the ‚temperature‘ u on D (Dirichlet condition) and the ‚heat flux‘ q = -u,i on N (Neumann condition), so that = D + N
Surfaces in Computational Physics
ECG-Workshop 2003
2, q=0
3, u=100
1, u=0
4, q=0 u,ii = 0
A simple 2D example for steady state heat conduction:
N = 2 + 4
D = 1 + 3
u,ii = 0 ) L =
Weighted residual:
In the following we will try to shift the derivatives from the unkown u to the known function w () integro-differential ! integral equation)
Surfaces in Computational Physics
ECG-Workshop 2003
Integration by parts yields:
And with the Gauß – divergence theorem ( =:n=surface normal)
We arrive at Green‘s first identity:
Surfaces in Computational Physics
ECG-Workshop 2003
Now we repeat the same steps for the domain integral on the rhs,
which yields Green‘s second identity:
Surfaces in Computational Physics
ECG-Workshop 2003
Surfaces in Computational Physics
ECG-Workshop 2003
• Note that the only differential of the unknown function u appearing here is the heat flux qi = u,i. qi only appears in the boundary integral over .
• In the Finite Element Method (FEM) we would now proceed by discretizing (e.g. in a tetrahedron mesh), approximate u as a sum of piecewise polynomials on each element of the mesh and solve the above integral equation on the mesh using this approximation.
• For many choices of L (including LLaplaceu = u,ii), there is a much more efficient technique available: if we know a fundamental solution or Green‘s function for L, we only have to compute integrals on the boundary (Boundary Element Method, BEM)
Surfaces in Computational Physics
ECG-Workshop 2003
The fundamental solution
• For a given differential operator L, a fundamental solution or Green‘s function u* is given by the solution of the equation Lu* = -(x, )
• (x,) is Dirac‘s delta distribution, defined by the property:
Surfaces in Computational Physics
ECG-Workshop 2003
• If we now choose w =u* – the fundamental solution of the Laplace operator – it follows: w ,ii = -(x,)
• We define the scalar fluxes q = qi ni = u,i ni and q = u,i ni
• Substituting this into the above equation, we obtain for all 2 /
This representation formula yields the temperature inside , if the fundamental solution u* and the values of the heat flux and the temperature on the boundary are known. Only boundary integrals occur, and thus only the boundary needs discretization!
Surfaces in Computational Physics
ECG-Workshop 2003
This formula is only valid inside , i.e. in / .
Unfortunately we only know the values of q(x) on N and the values of u(x) on D, so we have to find a way to compute the remaining unknown boundary values of u(x) (on N) and q(x) (on D).
2, q=0
3, u=100
1, u=0
4, q=0 u,ii = 0
Surfaces in Computational Physics
ECG-Workshop 2003
The boundary integral equation
• We need to find a way to compute u(x) and q(x) on the whole of consistent with the prescribed boundary conditions
• The last derivation was only valid inside because the delta distribution (x,) is undefined if lies on the boundary of the integration domain
• To avoid this problem, we extend the boundary around and let the size of this extension shrink to zero in a special limiting process
Surfaces in Computational Physics
ECG-Workshop 2003
‘
*
‘ = - * +
! 0
Performing the limit !0, we can compute the integrals from the representation formula for the boundary terms. The integrals over are split according to = lim! 0 ‘= lim! 0{( - *) + }
Surfaces in Computational Physics
ECG-Workshop 2003
The computation of these integrals is cumbersome and highly dependent on the differential operator and the dimensionality of the system.
Carrying out the integrals for the Laplace equation yields the boundary integral equation:
Where is the Cauchy principle value of the integral.
Boundary Element Methods for Engineers and Scientists
Gaul, Kögl, Wagner
Surfaces in Computational Physics
ECG-Workshop 2003
For the Laplace equation in 2D we obtain with the fundamental solution
the 2D Laplace boundary integral equation:
Surfaces in Computational Physics
ECG-Workshop 2003
To solve this equation numerically, we discretize the boundary
1. We partition into E boundary elements (1),..., (E) , = i)
1
2
3
4
Surfaces in Computational Physics
ECG-Workshop 2003
To solve this equation numerically, we discretize the boundary
2. Each i is mapped into a standard form. Instead of the coordinates {xI} of the reference frame, we use a simple parameterization {si}
1
2
3
4
x
y
s0 1
Surfaces in Computational Physics
ECG-Workshop 2003
To solve this equation numerically, we discretize the boundary
3. On each i, u(x) and q(x) are approximated polynomially
The ûmi are the values of u at node m of element i.
The polynomials m(s) are called shape function of node m of element i.
Boundary Element Methods for Engineers and Scientists
Gaul, Kögl, Wagner
Surfaces in Computational Physics
ECG-Workshop 2003
q* u*
Discretization of :
! 1+…+E
Discretization of u and q:
u(x), q(x) ! ui, qi
Surfaces in Computational Physics
ECG-Workshop 2003
Boundary Elements in 2DIn 2D, the boundary elements i are line elements.
The degree of the interpolation (the degree of the polynomials m) is determined by the number of nodes per element (m)!
Node 1s
m
1
10
1(s)
Constant elements (m=1)
s
m
1
10
1(s)
Node 1 Node 2
2(s)
Linear elements (m=2)
Surfaces in Computational Physics
ECG-Workshop 2003
Example
2, q=0
3, u=100
1, u=0
4, q=0 u,ii = 0
Constant
elements
y
2, q21=0
3, û31=100
1, û11=0
4, q41=0
u,ii = 0
x
3
24
1
Surfaces in Computational Physics
ECG-Workshop 2003
• With this equation we can compute the unknown boundary values from the known boundary conditions
• Then we can use the representation formula to compute u and q everywhere in
• Several strategies exist for choosing the points that should be evaluated. We choose the collocation method:
The equation above is evaluated only on the nodes of the discretization l (u(l)=:u(l)
1)
Hli Gli
Surfaces in Computational Physics
ECG-Workshop 2003
Hli Gli
Collocation reduces the boundary integral equation to a matrix equation:
Hij and Gij only depend on the geometry, not on the values of u and q!
Surfaces in Computational Physics
ECG-Workshop 2003
• The computation of the non-diagonal entries Hij, Gij i j is straight-forward
• The diagonal terms Hii, Gii are a bit more difficult, since in these cases the integrand has a singularity in the integration domain!
• This poses special problems to any numerical integration procedure on the boundary elements
The Matrix Coefficients
Surfaces in Computational Physics
ECG-Workshop 2003
2, q2
1=0
3, û31=100
1, û11=0
4, q4
1=0 u,ii = 0
x
3
24
1
Surfaces in Computational Physics
ECG-Workshop 2003
This can be solved easily if we move all unknown variables to the lhs of the equation:
This yields:
Surfaces in Computational Physics
ECG-Workshop 2003
u,ii = 0
x
3
24
1
u21=50,q2
1=0
û31=100, q3
1 = -75.77
u41=50,q4
1=0
û11=0.00, q1
1 = +75.77
Heat flows from the high to the low temperature
Due to the symmetry, there is no lateral temperature gradient
Surfaces in Computational Physics
ECG-Workshop 2003
Temperature and heat flux for all points l inside the domain can now be computed from the representation formula:
Hli
Gli
Note that all coefficients on the rhs are known, i.e. we don’t have to solve any additional equations! Computing the boundary integrals H li and Gli suffices!
Surfaces in Computational Physics
ECG-Workshop 2003
u,ii = 0
x
3
24
1
u21=50,q2
1=0
û31=100, q3
1 = -75.77
u41=50,q4
1=0
û11=0.00, q1
1 = +75.77
Surfaces in Computational Physics
ECG-Workshop 2003
Generalization to the 3D caseMany of these techniques carry over to the 3 dimensional case. The most important changes are:
1) 2D triangular or quadrilateral elements replace the 1D line elements
s1
s21 2
3
s1
s21 2
3 4
Surfaces in Computational Physics
ECG-Workshop 2003
Generalization to the 3D caseMany of these techniques carry over to the 3 dimensional case. The most important changes are:
2) For each node we need tangential and normal vectors
Boundary Element Methods for Engineers and Scientists
Gaul, Kögl, Wagner
Surfaces in Computational Physics
ECG-Workshop 2003
Generalization to the 3D caseMany of these techniques carry over to the 3 dimensional case. The most important changes are:
3) For the numerical integration we need a mapping for the boundary elements to a local (s1, s2)2[0,1]£[0,1] orthogonal reference frame
Boundary Element Methods for Engineers and Scientists
Gaul, Kögl, Wagner
Surfaces in Computational Physics
ECG-Workshop 2003
Additional requirements
1. To increase the accuracy we need to place “additional points” on the edges of the boundary elements () increases the order of approximation)
s1 s1
s21 2
3
s1
s21 2
3
4 5
6
s1
s21 2
3 4
s21 2
3 4
5
6
7
8
Surfaces in Computational Physics
ECG-Workshop 2003
Additional requirements
2. For inhomogeneous systems we want a partition into subdomains
Contour: (x) = 0
21
Surfaces in Computational Physics
ECG-Workshop 2003
Additional requirements
3. Iterative predictor – corrector schemes profit much from a fast refinement (or coarsening) of the mesh
www.scicomp.ucsd.edu/~mholst/
Surfaces in Computational Physics
ECG-Workshop 2003
Discontinuous elements• The “primary variable” u is usually continuous in
the whole of (to avoid infinite fluxes!)
• For the flux qi = u,i however we have no such requirement ) it should be possible to model a discontinuous qi
(i) (i+1) (i) (i+1)
“Real system”: discontinuous flux
Numerical result: continuously interpolated flux
Surfaces in Computational Physics
ECG-Workshop 2003
(i) (i+1) (i) (i+1)
“Real system”: discontinuous flux
Numerical result: continuously interpolated flux
Possible solutions:
(a) Discontinuous elements:
(b) Multiple flux nodes:
geometry nodes“modelling” or flux nodes
(i) (i+1)
Geometry nodes
Flux nodes
(i) (i+1)
Don’t share flux nodes between elements
Surfaces in Computational Physics
ECG-Workshop 2003
Time dependent phenomena
Boundary Element Methods for Engineers and Scientists
Gaul, Kögl, Wagner
Surfaces in Computational Physics
ECG-Workshop 2003
“Coffee stains”• Did you ever wonder why coffee stains are darkest at the
border?
Surfaces in Computational Physics
ECG-Workshop 2003
“Coffee stains”• Did you ever wonder why coffee stains are darkest at the
border?• The principle is easy to grasp:
– the liquid in the drop evaporates approx. with the
same rate everywhere
– but in the middle, molecules leaving the drop are likely to fall back ) the effective rate of evaporation is highest at the border
– the drop tries to counter that by maintaining a flow from the middle to the border
– this flow carries most of the pigments to the border of the drop
Surfaces in Computational Physics
ECG-Workshop 2003
Conclusion• High quality triangulated surfaces can be used to
• significantly speed up computations in computational physics
• Accurately specify boundary conditions
• These methods could profit from • the use of discontinuous elements• fast remeshing
• Applications in• Computational fluid dynamics• Electrodynamics• …