?? fe.html
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>The QMG Finite Element Solver</title>
</head>
<body BGCOLOR="#E0FFE0" TEXT="#000000" LINK = "#0080C0" VLINK = "#004060" ALINK = "#FF0000" >
<center>
<table>
<tr>
<td>
<a href="qmg2_0_home.html"><img src=logo1.jpg alt="QMG logo"></a></td>
<td>
<h1>
The QMG Finite Element Solver
</h1>
</td>
</table>
</center>
The QMG finite element package is intended to be a demonstration of the
use of the mesh generator (as well as sparse-matrix operations in
Matlab) and is by no means
a full-scale finite element package. These routines are available only
in Matlab, not in Tcl/Tk.
The finite element package computes approximate
solutions to boundary value problems of the
following form.
<blockquote>
div (<em>c</em> grad <em>u</em>) = −<em>f</em> on <em>D</em> <br>
<em>u</em> = <em>g</em> on <em>B</em><sub>1</sub><br>
<em>c·du/dn</em> = <em>h</em> on <em>B</em><sub>2</sub><br>
</blockquote>
This equation is called an isotropic
linear second-order elliptic boundary value
problem with nonconstant coefficients.
The scalar field <em>u</em> is the unknown field. Scalar field <em>c</em>
is a function of the domain called the <em>conductivity</em>
and must be positive at every point, and is
given.
Scalar field <em>f</em>
is a function of the domain called the <em>source term.</em>
Domain <em>D</em> is a brep.
The boundary of domain <em>D</em> is denoted <em>B</em>,
and <em>B</em> is partitioned
into two subsets <em>B</em><sub>1</sub> and
<em>B</em><sub>2</sub>.
On <em>B</em><sub>1</sub> we have Dirichlet data given by
function <em>g</em>, and on
<em>B</em><sub>2</sub>
we have Neumann data given by function <em>h</em>.
<p>
This equation arises in many physical problems including
electrostatics, certain kinds of fluid flow, thermodynamics,
chemistry, and astrophysics.
The finite element package currently handles breps of dimension
2 and 3 and handles onlylinear elements.The remainder of this page will assume that the reader is at
least somewhat familiar with boundary value problems and the finite
element method.
<p>
The call to solve the above problem is
<blockquote>
<strong>
<em>u</em> =
gmfem(<em>brep, scomplex {, conductivity {, source {, userdata}}}</em>);
</strong>
</blockquote>
The simplicial complex must have been constructed from the
brep using the mesh generator. The conductivity and source arguments
are optional; see below. Boundary conditions are not
arguments to <code>gmfem</code>; they are specified
using property/value pairs associated with the facets of the domain.
<p>
The brep and simplicial complex must both be full-dimensional, i.e.,
they must have their embedded dimensional equal to their intrinsic
dimension.
<p>
The return value <em>u</em> is a <a href="geom.html#zba">zba</a>, in other
words, subscripting starts at 0. This is because node numbering
also starts at 0.
<p>
Boundary conditions, conductivity and source terms
are all associated with the brep rather than the mesh (unlike some other
finite element software packages).
This approach has
the advantage that the user can change the boundary conditions, source
terms, and so on after the mesh has been generated. The disadvantage
is that the finite element solver needs to have access to the brep
as well as the mesh to look up this data.
<p>
The return value represents the solution field <em>u</em> to the
BVP. The elements of this vector are in correspondence with the nodes
of the mesh: each of vector <em>u</em> is the
the computed value of the solution
field at the corresponding node.
(For Dirichlet boundary nodes, the value of <em>u</em> is copied
directly from the Dirichlet boundary data.)
<p>
For 2D problems, the solution may be plotted with
<code><a href="ref.html#gmplot">gmplot</a></code>. For 3D
problems, the boundary values of the solution may be plotted
on the boundary of the domain with the same function. In this
case the solution <em>u</em> must first be restricted to the boundary
using the <a href="ref.html#gmboundary"><code>gmboundary</code></a> function.
<h2> Specifying the conductivity & source terms</h2>
The conductivity is specified either as a value associated with a region
(under property name <strong>conductivity</strong>),
by the third argument to <code>gmfem</code>, or by the
default conductivity function which is 1 everywhere (Poisson's equation).
The order of precedence is as given in the previous sentence (i.e.,
the property-value pair gets highest precedence, etc.)
The user specifies conductivity as a string. This string is passed
to <code>gm_conductivity</code> by <code>gmfem</code>.
See the <a href="userfunc.html">page</a> on user-defined
functions for details on defining conductivity
functions.
<p>
The source term is specified either as a value associated with a region
(under the property name <strong>source</strong>)
by the fourth argument to <code>gmfem</code>, or by the
default source-term function which is 0 everywhere (Laplace's equation).
The order of precedence is as given in the previous sentence (i.e.,
the property-value pair gets highest precedence, etc.)
The user-specified source is a string. This string is passed
to <code>gm_source</code> by <code>gmfem</code>.
See the
<a href="userfunc.html">page</a> on user-specified functions.
<p>
A <strong>conductivity</strong> or <strong>source</strong>property attached to a face of lower dimension than the top-level is ignored.
<h2>Boundary conditions</h2>
Boundary conditions are specified on facets, that is, faces of
the brep of dimension <em>d</em>−1 (assuming the dimension of the brep is d).
They are specified by a property-value pair associated with the
face. The property name is <strong>bc</strong>. The value is an ordered pair
of the form (<em>type func</em>) where <em>type</em>
is either <strong>d</strong>
for Dirichlet or <strong>n</strong> for Neumann, and <em>func</em>
is a string defining the function.
See the <a href="userfunc.html">page</a> on
user-defined functions.
<p>
Dirichlet boundary data means
<em>u</em> is specified, whereas Neumann data means
<em>c·du/dn</em> is specified.
Thus, the same
type of boundary condition must be applied to an entire facet, i.e.,
it is not possible to have a Dirichlet boundary condition on
half a facet and a Neumann condition on the other half. The desiredeffect can be obtained by splitting the brep facet into two subfacets.
<p>
Note that boundary conditions are specified only on facets. Boundary
conditions for faces of lower dimension (e.g. an edge of a 3D brep)
are inferred by <code>gmfem</code> from the facets that contain them.
In particular, a mesh vertex on a low-dimensional face will take on the Dirichlet boundary condition equal to theaverage of the value computed from those facets, assuming at leastone facet is Dirichlet.
<p>
When every facet adjacent to a low-dimensional face has Neumann data,
the nodes on that face will also take on Neumann conditions.
Since Neumann data is integrated, such a vertex will combine all the
Neumann integrations from the facets that contain it and so
local consistency is not needed.
<p>
The default boundary condition for faces with no specified<strong>bc</strong> property is
Neumann condition of 0 (i.e., the face is “insulated”).
<p>
If all the facets of the domain have Neumann conditions, then
the <code>gmfem</code> routine will change one node of the mesh (chosen
arbitrarily) to a Dirichlet condition of <em>u</em>=0 to make the problem
well-posed. It will also verify that the overall integral of
the Neumann boundary conditions are zero. The routine will solve the problem anyway even if the integral is nonzero,but in this case it may issue a warning.
<p>
For a disconnected domain, gmfem carries out the transformation
described in the previous paragraph on each connected component
of the domain individually.
<p>
In order to figure out which facet is which (for assigning
boundary conditions),
it may be helpful to color the faces with <a href="ref.html#gmrndcolor">
<code>gmrndcolor</code></a> and display the brep with
<a href="ref.html#gmviz"><code>gmviz</code></a>.
The mapping of facet indices to colors can be displayed with
<a href="ref.html#gmshowcolor"><code>gmshowcolor</code></a>.
<h2> <a name = "internal_boundaries"> Boundary conditions on internal
boundaries </a></h2>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -