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

up

parent 21a36764
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -20,12 +20,10 @@ ...@@ -20,12 +20,10 @@
identical nodal value "v_electrode", a global (non-local) basis function identical nodal value "v_electrode", a global (non-local) basis function
"BF_electrode" is obtained as factor which is the sum of the shape functions "BF_electrode" is obtained as factor which is the sum of the shape functions
of all the nodes in the electrode region. This basis function "BF_electrode" of all the nodes in the electrode region. This basis function "BF_electrode"
- is a continuous function, scalar in this case, - is a continuous function, scalar in this case,
- is equal to 1 at the nodes of the electrode region, and to 0 at all other - is equal to 1 at the nodes of the electrode, and to 0 at all other nodes,
nodes, - decreases from 1 to 0 over the one-element-thick layer of elements sharing
- decreases from 1 to 0 over the one element thick layer of outside finite at least one node with the electrode region.
elements immediately in contact with the electrode region.
One such glabal basis function can be associated with each electrode in the One such glabal basis function can be associated with each electrode in the
system, so that the finite element expansion of the electric scalar potential system, so that the finite element expansion of the electric scalar potential
...@@ -33,6 +31,9 @@ ...@@ -33,6 +31,9 @@
v = Sum_k sn_k vn_k + Sum_electrode v_electrode BF_electrode v = Sum_k sn_k vn_k + Sum_electrode v_electrode BF_electrode
with the the sum_k running over all nodes except those of the electrode
regions.
We show in this tutorial how GetDP takes advantage of global quantities and We show in this tutorial how GetDP takes advantage of global quantities and
the associated global basis functions the associated global basis functions
- to reduce the number of unknowns - to reduce the number of unknowns
...@@ -76,6 +77,7 @@ DisplayGlobalBF = DefineNumber[0, Name "3Options/Display global basis functions" ...@@ -76,6 +77,7 @@ DisplayGlobalBF = DefineNumber[0, Name "3Options/Display global basis functions"
Choices {0,1} ] ; Choices {0,1} ] ;
OverwriteOutput = DefineNumber[1, Name "3Options/Overwrite output.txt file", OverwriteOutput = DefineNumber[1, Name "3Options/Overwrite output.txt file",
Choices {0,1} ] ; Choices {0,1} ] ;
Function { Function {
eps0 = 8.854187818e-12; // permittivity of empty space eps0 = 8.854187818e-12; // permittivity of empty space
epsilon[Air] = eps0; epsilon[Air] = eps0;
...@@ -83,9 +85,9 @@ Function { ...@@ -83,9 +85,9 @@ Function {
} }
Constraint { Constraint {
/* Dirichlet boundary condition on the local electric potential is no longer /* The Dirichlet boundary condition on the local electric potential is no
used. The microstrip and the ground are now treated as electrodes, whose longer used. The microstrip and the ground are now treated as electrodes,
voltage is imposed with the "SetGlobalPotential" constraint below. */ whose voltage is imposed with the "SetGlobalPotential" constraint below. */
{ Name Dirichlet_Ele; Type Assign; { Name Dirichlet_Ele; Type Assign;
Case { Case {
} }
...@@ -94,8 +96,8 @@ Constraint { ...@@ -94,8 +96,8 @@ Constraint {
{ Name SetGlobalPotential; Type Assign; { Name SetGlobalPotential; Type Assign;
Case { Case {
/* Define the imposed potential regionwise on the different parts of /* Define the imposed potential regionwise on the different parts of
"Sur_Electrodes_Ele". No voltage imposed to the Microstrip electrode when "Sur_Electrodes_Ele". No voltage is imposed to the Microstrip electrode
the "Fixed charge" option is enabled (if MicrostripTypeBC != 0). */ when the "Fixed charge" option is enabled (if MicrostripTypeBC != 0). */
{ Region Ground; Value 0; } { Region Ground; Value 0; }
If(!MicrostripTypeBC) If(!MicrostripTypeBC)
{ Region Microstrip; Value MicrostripValueBC; } { Region Microstrip; Value MicrostripValueBC; }
...@@ -135,14 +137,20 @@ FunctionSpace { ...@@ -135,14 +137,20 @@ FunctionSpace {
"Integral" term, but where no integration needs to be performed. The "Integral" term, but where no integration needs to be performed. The
"AssociatedWith" statement manifests the fact that the global potential of "AssociatedWith" statement manifests the fact that the global potential of
an electrode is the (electrostatic) energy dual of the electric charge an electrode is the (electrostatic) energy dual of the electric charge
carried by that electrode. Indeed, in the weak formulation, when the carried by that electrode. Indeed, let us consider the electrostatic weak
test-function v' is BF_electrode, formulation derived in Tutorial 1: find v in Hgradv_Ele such that
(epsilon Grad v, Grad v')_Vol_Ele + (epsilon n.Grad v, v')_Bnd_Vol_Ele = 0
holds for all test functions v'. When the test-function v' is BF_electrode,
the boundary term reduces to
(epsilon n.Grad v, BF_electrode)_Bnd_Vol_Ele = (epsilon n.Grad v, BF_electrode)_Sur_Electrodes_Ele.
(epsilon n.Grad v, BF_electrode)_Sur_Electrodes_Ele =
(epsilon n.Grad v, 1)_Sur_Electrodes_Ele = Q_electrode,
the charge carried by the electrodes. Since BF_electrode == 1 on the electrode, the boundary term is actually
simply equal to the integral of (epsilon n.Grad v) on the electrode,
i.e. the flux of the displacement field, which is by definition the
charge Q_electrode carried by the electrodes.
By checking the "Display global basis functions" checkbox and running the By checking the "Display global basis functions" checkbox and running the
model, you can take a look on how the two "BF_electrode" basis functions in model, you can take a look on how the two "BF_electrode" basis functions in
...@@ -199,13 +207,13 @@ Integration { ...@@ -199,13 +207,13 @@ Integration {
} }
Formulation { Formulation {
/* The formulation only contains minor changes compared to the first tutorial. /* The formulation only contains minor changes compared to formulation from
The global quantities are declared as "Global" in the "Quantity" section, the first tutorial. The global quantities are declared as "Global" in the
and a "GlobalTerm" is added that triggers the assembly of the additional "Quantity" section, and a "GlobalTerm" is added that triggers the assembly
equation per electrode (the "pre-integrated" surface Neumann term) in the of the additional equation per electrode (the "pre-integrated" boundary
system to compute the charge Q_electrode. Considering the equation term) in the system to compute the charge Q_electrode, which
corresponding to the test function BF_electrode leads to the following satisfies (just consider the equation corresponding to the test function
expression for the electrode charge: BF_electrode):
Q_electrode = (-epsilon[] Grad v, Grad BF_electrode)_Vol_Ele */ Q_electrode = (-epsilon[] Grad v, Grad BF_electrode)_Vol_Ele */
{ Name Electrostatics_v; Type FemEquation; { Name Electrostatics_v; Type FemEquation;
...@@ -263,7 +271,7 @@ PostProcessing { ...@@ -263,7 +271,7 @@ PostProcessing {
} }
} }
{ Name energy; Value { { Name energy; Value {
Integral { Type Global; // not per sub-region in Vol_Ele Integral { Type Global; // global integral over Vol_Ele
[ epsilon[] / 2. * SquNorm[{d v}] ]; [ epsilon[] / 2. * SquNorm[{d v}] ];
In Vol_Ele; Jacobian Vol; Integration Int; In Vol_Ele; Jacobian Vol; Integration Int;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment