Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
tutorials
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
documentation
tutorials
Commits
6a21d983
There was a problem fetching the pipeline summary.
Commit
6a21d983
authored
7 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
up
parent
c697a7fa
No related branches found
No related tags found
No related merge requests found
Pipeline
#
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Electrostatics/microstrip.pro
+55
-54
55 additions, 54 deletions
Electrostatics/microstrip.pro
with
55 additions
and
54 deletions
Electrostatics/microstrip.pro
+
55
−
54
View file @
6a21d983
...
...
@@ -53,24 +53,26 @@ Group {
scalar electric potential formulation:
Vol_Ele : volume where -Div(epsilon Grad v) = 0 is solved
SurNeumann_Ele
: surface where non homogeneous Neumann boundary conditions
Sur
_
Neumann_Ele: surface where non homogeneous Neumann boundary conditions
(on n.d == epsilon n.Grad v) are imposed
Vol* groups contain only volume elements of the mesh (triangles here).
Sur* groups contain only surface elements of the mesh (lines here). */
Vol_xxx groups contain only volume elements of the mesh (triangles here).
Sur_xxx groups contain only surface elements of the mesh (lines here).
Since there are no non-homogeneous Neumann conditions in the model,
Sur_Neumann_Ele is defined as empty.
*/
Vol_Ele
=
Region
[
{
Air
,
Diel1
}
];
SurNeumann_Ele
=
Region
[
{}
];
// empty for this model
Sur
_
Neumann_Ele
=
Region
[
{}
];
}
Function
{
/* Constants are evaluated (only once) when the .pro file is parsed by GetDP,
before any finite element calculation takes place. */
eps0
=
8.854187818e-12
;
// permittivity of empty space
/* Material laws (here the dielectric permittivity) are defined as piecewise
functions (note the square brackets), in terms of the above defined
physical regions. */
eps0
=
8.854187818e-12
;
epsilon
[
Air
]
=
1.
*
eps0
;
epsilon
[
Diel1
]
=
9.8
*
eps0
;
}
...
...
@@ -79,6 +81,7 @@ Constraint {
/* As for material laws, the Dirichlet boundary condition is defined
piecewise. The constraint "Dirichlet_Ele" is invoked in the FunctionSpace
below. */
{
Name
Dirichlet_Ele
;
Type
Assign
;
Case
{
{
Region
Ground
;
Value
0.
;
}
...
...
@@ -96,7 +99,7 @@ Group{
both volume and surface regions. Hence the use of the prefixes Vol_, Sur_
and Dom_ to avoid confusions.*/
Dom_Hgrad_v_Ele
=
Region
[
{
Vol_Ele
,
SurNeumann_Ele
}
];
Dom_Hgrad_v_Ele
=
Region
[
{
Vol_Ele
,
Sur
_
Neumann_Ele
}
];
}
FunctionSpace
{
...
...
@@ -117,8 +120,8 @@ FunctionSpace {
nodal basis functions. Not all connectors are unknowns of the FE problem,
due to the "Constraint", which assigns particular values to the nodes of
the Ground and Electrode regions. GetDP deals with that automatically on
basis of the definition of the FunctionSpace.
*/
basis of the definition of the FunctionSpace.
*/
{
Name
Hgrad_v_Ele
;
Type
Form0
;
BasisFunction
{
{
Name
sn
;
NameOfCoef
vn
;
Function
BF_Node
;
...
...
@@ -135,13 +138,16 @@ FunctionSpace {
Jacobian
{
/* Jacobians are used to specify the mapping between elements in the mesh and
the reference elements (in
a
standard unit
-type
cell) over which
the reference elements (
defined
in standard
ized
unit cell
s
) over which
integration is performed. "Vol" represents the classical 1-to-1 mapping
between elements of identical geometrical dimension, i.e. in this case
triangles/quadrangles in the plane onto the reference triangle/quadrangle
(2D to 2D). "Sur" would be used to map triangles/quadrangles in a 3D volume
onto the reference triangle/quadrangle (3D to 2D). "Lin" would be used to
map segments in a volume to the unit segment (3D to 1D). */
between elements of identical geometrical dimension, i.e. in this case a
reference triangle/quadrangle onto triangles/quadrangles in the z=0 plane
(2D <-> 2D). "Sur" would be used to map the reference triangle/quadrangle
onto triangles/quadrangles in a 3D space (2D <-> 3D), or to map the
reference line segment onto segments in 2D space (1D <-> 2D). "Lin" would
be used to map the reference line segment onto segments in 3D space (1D <->
3D). */
{
Name
Vol
;
Case
{
{
Region
All
;
Jacobian
Vol
;
}
...
...
@@ -151,6 +157,7 @@ Jacobian {
Integration
{
/* A Gauss quadrature rule with 4 points is used for all integrations below. */
{
Name
Int
;
Case
{
{
Type
Gauss
;
Case
{
{
GeoElement
Triangle
;
NumberOfPoints
4
;
}
...
...
@@ -170,15 +177,15 @@ Formulation {
(-Div(epsilon Grad v) , v')_Vol_Ele = 0
holds for all so-called "test-functions" v', where (.,.) denotes an inner
product. If the test-functions v' are differentiable,
integration by parts
using Green's identity leads to finding v such that
holds for all so-called "test-functions" v', where (.,.)
_D
denotes an inner
product
over the domain D
. If the test-functions v' are differentiable,
integration by parts
using Green's identity leads to finding v such that
(epsilon Grad v, Grad v')_Vol_Ele + (epsilon n.Grad v, v')_SurNeumann_Ele = 0
(epsilon Grad v, Grad v')_Vol_Ele + (epsilon n.Grad v, v')_Sur
_
Neumann_Ele = 0
holds for all v'.
In
this particular
example the Neumann boundary term vanishes and we are
In
our microstrip
example the Neumann boundary term vanishes and we are
looking for functions v in the function space Hgrad_v_Ele such that
(epsilon Grad v, Grad v')_Vol_Ele = 0
...
...
@@ -187,11 +194,9 @@ Formulation {
("sn_k") as the ones used to interpolate the unknown potential v.
The Galerkin statement in the Formulation is a symbolic representation of
this weak formulation.
It has got 4 semicolon separated arguments:
* the density [.,.] to be integrated, with the test-functions (always) on
the right side of the comma
this weak formulation. It has got 4 semicolon separated arguments:
* the density [.,.] to be integrated (note the square brackets instead of
the parentheses), with the test-functions (always) after the comma
* the domain of integration,
* the Jacobian of the transformation reference element <-> real element,
* the integration method to be used.
...
...
@@ -204,43 +209,39 @@ Formulation {
What can be a bit confusing is that the two comma-separated terms of the
density are not interpreted exactly in the same way. Let us unravel this in
detail. As the Galerkin method uses as test functions the basis functions
"sn_k" of the unknown field "v", the density should be something like this
[ epsilon[] * {d v} , basis_functions_of {d v} ].
Since the second argument is always devoted to test functions, the operator
"basis_functions_of" would always be there. It can therefore be made
implicit, and, according to the GetDP syntax, it is omitted. So, one
writes simply "{d v}".
detail.
The first argument, on the other hand, can contain a much wider variety of
expressions than the second one. In this problem, it contains
As the Galerkin method uses as test functions the basis functions "sn_k" of
the unknown field "v", the second term in the density should be something
like this [ ... , basis_functions_of {d v} ]. However, since the second
term is always devoted to test functions, the operator "basis_functions_of"
would always be there. It can therefore be made implicit, and, according
to the GetDP syntax, it is omitted. So, one writes simply [ ... , {d v} ].
epsilon[] * {d v} = Sum_k vn_k epsilon[]*{d sn_k}
The first term, on the other hand, can contain a much wider variety of
expressions than the second one. In our case it should be expressed in
terms of the FE expansion of "v" at the present system solution, i.e. when
the coefficients vn_k in the expansion of "v = Sum_k vn_k sn_k" are
unknown. This is indicated by prefixing the braces with "Dof", which leads
to the following density:
which is the eletric displacement vector, up to a sign. Here, we have two
valid syntaxes, with very different meanings.
[ epsilon[] * Dof{d v} , {d v} ],
The first argument can be expressed in terms of the FE expansion of "v" at
the present system solution, i.e. when the coefficients vn_k are unknown.
This is indicated by prefixing the braces with "Dof":
[ epsilon[] * Dof{d v} , {d v} ].
a so-called bilinear term that will contribute to the stiffness matrix of
the electrostatic problem at hand.
Another option, which would not work here, is to evaluate the first
argument with the last available already computed solution, i.e. simply
perform the interpolation with known coefficients vn_k. For this the Dof
prefix operator would be omitted:
prefix operator would be omitted
and we would have
:
[ epsilon[] * {d v} , {d v} ]
.
[ epsilon[] * {d v} , {d v} ]
,
Both choices are commonly us
ed in
different contexts, and we shall com
e
back on this often in subsequent tutorials
.
a so-call
ed
l
in
ear term that will contribute to the right-hand side of th
e
linear system
.
To express the stiffness matrix of the electrostatic problem at hand, we
have to take the first option. Hence the final expression of the density
below. */
Both choices are commonly used in different contexts, and we shall come
back on this often in subsequent tutorials. */
{
Name
Electrostatics_v
;
Type
FemEquation
;
Quantity
{
{
Name
v
;
Type
Local
;
NameOfSpace
Hgrad_v_Ele
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment