Skip to content
Snippets Groups Projects
Commit 6a21d983 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

up

parent c697a7fa
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -53,24 +53,26 @@ Group { ...@@ -53,24 +53,26 @@ Group {
scalar electric potential formulation: scalar electric potential formulation:
Vol_Ele : volume where -Div(epsilon Grad v) = 0 is solved 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 (on n.d == epsilon n.Grad v) are imposed
Vol* groups contain only volume elements of the mesh (triangles here). Vol_xxx groups contain only volume elements of the mesh (triangles here).
Sur* groups contain only surface elements of the mesh (lines 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} ]; Vol_Ele = Region[ {Air, Diel1} ];
SurNeumann_Ele = Region[ {} ]; // empty for this model Sur_Neumann_Ele = Region[ {} ];
} }
Function { 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 /* Material laws (here the dielectric permittivity) are defined as piecewise
functions (note the square brackets), in terms of the above defined functions (note the square brackets), in terms of the above defined
physical regions. */ physical regions. */
eps0 = 8.854187818e-12;
epsilon[Air] = 1. * eps0; epsilon[Air] = 1. * eps0;
epsilon[Diel1] = 9.8 * eps0; epsilon[Diel1] = 9.8 * eps0;
} }
...@@ -79,6 +81,7 @@ Constraint { ...@@ -79,6 +81,7 @@ Constraint {
/* As for material laws, the Dirichlet boundary condition is defined /* As for material laws, the Dirichlet boundary condition is defined
piecewise. The constraint "Dirichlet_Ele" is invoked in the FunctionSpace piecewise. The constraint "Dirichlet_Ele" is invoked in the FunctionSpace
below. */ below. */
{ Name Dirichlet_Ele; Type Assign; { Name Dirichlet_Ele; Type Assign;
Case { Case {
{ Region Ground; Value 0.; } { Region Ground; Value 0.; }
...@@ -96,7 +99,7 @@ Group{ ...@@ -96,7 +99,7 @@ Group{
both volume and surface regions. Hence the use of the prefixes Vol_, Sur_ both volume and surface regions. Hence the use of the prefixes Vol_, Sur_
and Dom_ to avoid confusions.*/ 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 { FunctionSpace {
...@@ -117,8 +120,8 @@ FunctionSpace { ...@@ -117,8 +120,8 @@ FunctionSpace {
nodal basis functions. Not all connectors are unknowns of the FE problem, nodal basis functions. Not all connectors are unknowns of the FE problem,
due to the "Constraint", which assigns particular values to the nodes of due to the "Constraint", which assigns particular values to the nodes of
the Ground and Electrode regions. GetDP deals with that automatically on 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; { Name Hgrad_v_Ele; Type Form0;
BasisFunction { BasisFunction {
{ Name sn; NameOfCoef vn; Function BF_Node; { Name sn; NameOfCoef vn; Function BF_Node;
...@@ -135,13 +138,16 @@ FunctionSpace { ...@@ -135,13 +138,16 @@ FunctionSpace {
Jacobian { Jacobian {
/* Jacobians are used to specify the mapping between elements in the mesh and /* 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 standardized unit cells) over which
integration is performed. "Vol" represents the classical 1-to-1 mapping integration is performed. "Vol" represents the classical 1-to-1 mapping
between elements of identical geometrical dimension, i.e. in this case between elements of identical geometrical dimension, i.e. in this case a
triangles/quadrangles in the plane onto the reference triangle/quadrangle reference triangle/quadrangle onto triangles/quadrangles in the z=0 plane
(2D to 2D). "Sur" would be used to map triangles/quadrangles in a 3D volume (2D <-> 2D). "Sur" would be used to map the reference triangle/quadrangle
onto the reference triangle/quadrangle (3D to 2D). "Lin" would be used to onto triangles/quadrangles in a 3D space (2D <-> 3D), or to map the
map segments in a volume to the unit segment (3D to 1D). */ 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 ; { Name Vol ;
Case { Case {
{ Region All ; Jacobian Vol ; } { Region All ; Jacobian Vol ; }
...@@ -151,6 +157,7 @@ Jacobian { ...@@ -151,6 +157,7 @@ Jacobian {
Integration { Integration {
/* A Gauss quadrature rule with 4 points is used for all integrations below. */ /* A Gauss quadrature rule with 4 points is used for all integrations below. */
{ Name Int ; { Name Int ;
Case { { Type Gauss ; Case { { Type Gauss ;
Case { { GeoElement Triangle ; NumberOfPoints 4 ; } Case { { GeoElement Triangle ; NumberOfPoints 4 ; }
...@@ -170,15 +177,15 @@ Formulation { ...@@ -170,15 +177,15 @@ Formulation {
(-Div(epsilon Grad v) , v')_Vol_Ele = 0 (-Div(epsilon Grad v) , v')_Vol_Ele = 0
holds for all so-called "test-functions" v', where (.,.) denotes an inner holds for all so-called "test-functions" v', where (.,.)_D denotes an inner
product. If the test-functions v' are differentiable, integration by parts product over the domain D. If the test-functions v' are differentiable,
using Green's identity leads to finding v such that 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'. 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 looking for functions v in the function space Hgrad_v_Ele such that
(epsilon Grad v, Grad v')_Vol_Ele = 0 (epsilon Grad v, Grad v')_Vol_Ele = 0
...@@ -187,11 +194,9 @@ Formulation { ...@@ -187,11 +194,9 @@ Formulation {
("sn_k") as the ones used to interpolate the unknown potential v. ("sn_k") as the ones used to interpolate the unknown potential v.
The Galerkin statement in the Formulation is a symbolic representation of The Galerkin statement in the Formulation is a symbolic representation of
this weak formulation. this weak formulation. It has got 4 semicolon separated arguments:
* the density [.,.] to be integrated (note the square brackets instead of
It has got 4 semicolon separated arguments: the parentheses), with the test-functions (always) after the comma
* the density [.,.] to be integrated, with the test-functions (always) on
the right side of the comma
* the domain of integration, * the domain of integration,
* the Jacobian of the transformation reference element <-> real element, * the Jacobian of the transformation reference element <-> real element,
* the integration method to be used. * the integration method to be used.
...@@ -204,43 +209,39 @@ Formulation { ...@@ -204,43 +209,39 @@ Formulation {
What can be a bit confusing is that the two comma-separated terms of the 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 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 detail.
"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}".
The first argument, on the other hand, can contain a much wider variety of As the Galerkin method uses as test functions the basis functions "sn_k" of
expressions than the second one. In this problem, it contains 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 [ epsilon[] * Dof{d v} , {d v} ],
valid syntaxes, with very different meanings.
The first argument can be expressed in terms of the FE expansion of "v" at a so-called bilinear term that will contribute to the stiffness matrix of
the present system solution, i.e. when the coefficients vn_k are unknown. the electrostatic problem at hand.
This is indicated by prefixing the braces with "Dof":
[ epsilon[] * Dof{d v} , {d v} ].
Another option, which would not work here, is to evaluate the first Another option, which would not work here, is to evaluate the first
argument with the last available already computed solution, i.e. simply argument with the last available already computed solution, i.e. simply
perform the interpolation with known coefficients vn_k. For this the Dof 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 used in different contexts, and we shall come a so-called linear term that will contribute to the right-hand side of the
back on this often in subsequent tutorials. linear system.
To express the stiffness matrix of the electrostatic problem at hand, we Both choices are commonly used in different contexts, and we shall come
have to take the first option. Hence the final expression of the density back on this often in subsequent tutorials. */
below. */
{ Name Electrostatics_v; Type FemEquation; { Name Electrostatics_v; Type FemEquation;
Quantity { Quantity {
{ Name v; Type Local; NameOfSpace Hgrad_v_Ele; } { Name v; Type Local; NameOfSpace Hgrad_v_Ele; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment