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
88f1b1c9
There was a problem fetching the pipeline summary.
Commit
88f1b1c9
authored
6 years ago
by
Ruth Sabariego
Browse files
Options
Downloads
Patches
Plain Diff
Update floating.pro
parent
8bfb6e43
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ElectrostaticsFloating/floating.pro
+31
-31
31 additions, 31 deletions
ElectrostaticsFloating/floating.pro
with
31 additions
and
31 deletions
ElectrostaticsFloating/floating.pro
+
31
−
31
View file @
88f1b1c9
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
------------------------------------------------------------------- */
------------------------------------------------------------------- */
/*
A thing
GetDP is pretty good at
is
the management of global (non-local) basis
/* GetDP is pretty good at the management of global (non-local) basis
functions. Finite element expansions typically associate basis functions to
functions. Finite element expansions typically associate basis functions to
individual nodes or edges in the mesh. But consider the situation where a
individual nodes or edges in the mesh. But consider the situation where a
scalar field is set to be uniform over a region of the problem (say a
scalar field is set to be uniform over a region of the problem (say a
...
@@ -20,12 +20,12 @@
...
@@ -20,12 +20,12 @@
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, and to 0 at all other nodes
,
- is equal to 1 at the nodes of the electrode, and to 0 at all other 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 elements sharing
at least one node with the electrode region.
at least one node with the electrode region.
One such gl
a
bal basis function can be associated with each electrode in the
One such gl
o
bal 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
reads:
reads:
...
@@ -34,13 +34,13 @@
...
@@ -34,13 +34,13 @@
with the the sum_k running over all nodes except those of the electrode
with the the sum_k running over all nodes except those of the electrode
regions.
regions.
We show in t
his tutorial how GetDP takes advantage of global quantities and
T
his tutorial
shows
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
;
- to
compute
efficiently the electrode charges "Q_electrode", which are
- to efficiently
compute
the electrode charges "Q_electrode", which are
precisely the energy duals of the global "v_electrode" quantities
precisely the energy duals of the global "v_electrode" quantities
;
- to deal with floating potentials, which are the computed electrode
- to deal with floating potentials, which are the computed electrode
potential when the electrode charge is imposed
potential
s
when the electrode charge is imposed
;
- to provide output quantities (charges, armature voltages, capacitances,
- to provide output quantities (charges, armature voltages, capacitances,
...) that can be immediately used in a external circuit. */
...) that can be immediately used in a external circuit. */
...
@@ -57,8 +57,8 @@ Group {
...
@@ -57,8 +57,8 @@ Group {
/* Abstract regions:
/* Abstract regions:
Vol_Ele : volume where -div(epsilon grad v) = 0 is solved
Vol_Ele : volume where -div(epsilon grad v) = 0 is solved
Sur_Neu_Ele : surface w
here
non homogeneous Neumann boundary conditions
Sur_Neu_Ele : surface w
ith imposed
non homogeneous Neumann boundary conditions
(on n.d = -n . (epsilon grad v))
are imposed
(on n.d = -n . (epsilon grad v))
Sur_Electrodes_Ele : electrode regions */
Sur_Electrodes_Ele : electrode regions */
Vol_Ele
=
Region
[
{
Air
,
Diel1
}
];
Vol_Ele
=
Region
[
{
Air
,
Diel1
}
];
...
@@ -66,7 +66,7 @@ Group {
...
@@ -66,7 +66,7 @@ Group {
Sur_Electrodes_Ele
=
Region
[
{
Ground
,
Microstrip
}
];
Sur_Electrodes_Ele
=
Region
[
{
Ground
,
Microstrip
}
];
}
}
/* A number of ONELAB parameters are defined to
defin
e model parameters or model
/* A number of ONELAB parameters are defined to
provid
e model parameters or model
options interactively. */
options interactively. */
MicrostripTypeBC
=
DefineNumber
[
0
,
Name
"1Microstrip excitation/Type"
,
MicrostripTypeBC
=
DefineNumber
[
0
,
Name
"1Microstrip excitation/Type"
,
...
@@ -86,7 +86,7 @@ Function {
...
@@ -86,7 +86,7 @@ Function {
Constraint
{
Constraint
{
/* The Dirichlet boundary condition on the local electric potential is no
/* The Dirichlet boundary condition on the local electric potential is no
longer used. The microstrip and the ground are
now
treated as electrodes,
longer used. The microstrip and the ground are
herein
treated as electrodes,
whose 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
{
...
@@ -95,12 +95,12 @@ Constraint {
...
@@ -95,12 +95,12 @@ Constraint {
{
Name
SetGlobalPotential
;
Type
Assign
;
{
Name
SetGlobalPotential
;
Type
Assign
;
Case
{
Case
{
/*
Define the i
mpose
d
potential regionwise on the different parts of
/*
I
mpose
the
potential regionwise on the different parts of
"Sur_Electrodes_Ele". No voltage is imposed to the Microstrip electrode
"Sur_Electrodes_Ele". No voltage is imposed to the Microstrip electrode
when 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
;
}
EndIf
EndIf
}
}
}
}
...
@@ -108,26 +108,26 @@ Constraint {
...
@@ -108,26 +108,26 @@ Constraint {
Case
{
Case
{
/* Impose the charge if MicrostripTypeBC != 0 */
/* Impose the charge if MicrostripTypeBC != 0 */
If
(
MicrostripTypeBC
)
If
(
MicrostripTypeBC
)
{
Region
Microstrip
;
Value
MicrostripValueBC
;
}
{
Region
Microstrip
;
Value
MicrostripValueBC
;
}
EndIf
EndIf
}
}
}
}
}
}
Group
{
Group
{
/* The domain of definition
l
is
t
s all regions on which the field "v" is
/* The domain of definition
compr
is
e
s all regions on which the field "v" is
defined.*/
defined.*/
Dom_Hgrad_v_Ele
=
Region
[
{
Vol_Ele
,
Sur_Neu_Ele
,
Sur_Electrodes_Ele
}
];
Dom_Hgrad_v_Ele
=
Region
[
{
Vol_Ele
,
Sur_Neu_Ele
,
Sur_Electrodes_Ele
}
];
}
}
FunctionSpace
{
FunctionSpace
{
/* The magic in the treatment of global quantitities by GetDP
i
s in the fact
/* The magic in the treatment of global quantitities by GetDP
lie
s in the fact
that nearly all the work is done at the level of the FunctionSpace
that nearly all the work is done at the level of the FunctionSpace
definition. The finite element expansion of "v" is
definition. The finite element expansion of "v" is
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
with the sum_k running over all nodes except those of the electrode
regions. This is exactly what one finds in the FunctionSpace definition
regions. This is exactly what one finds in the FunctionSpace definition
below with "sf" standing for "BF_electrode" and "vf" for "v_electrode".
below with "sf" standing for "BF_electrode" and "vf" for "v_electrode".
...
@@ -135,10 +135,10 @@ FunctionSpace {
...
@@ -135,10 +135,10 @@ FunctionSpace {
"GlobalQuantity" section; these names are used in the corresponding
"GlobalQuantity" section; these names are used in the corresponding
"GlobalTerm" in the Formulation. Such global terms are the equivalent of a
"GlobalTerm" in the Formulation. Such global terms are the equivalent of a
"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
refers to
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, let us consider the electrostatic weak
carried by that electrode. Indeed, let us consider the electrostatic weak
formulation derived in Tutorial 1: find v in Hgradv_Ele such that
formulation derived in Tutorial 1: find v in Hgrad
_
v_Ele such that
(epsilon grad v, grad v')_Vol_Ele + (n . (epsilon grad v), v')_Bnd_Vol_Ele = 0
(epsilon grad v, grad v')_Vol_Ele + (n . (epsilon grad v), v')_Bnd_Vol_Ele = 0
...
@@ -153,14 +153,14 @@ FunctionSpace {
...
@@ -153,14 +153,14 @@ FunctionSpace {
charge Q_electrode carried by the electrodes.
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
at
how the two "BF_electrode" basis functions in
this model look like. Constraints can then be set on either component of
this model look like. Constraints can then be set on either component of
the FunctionSpace. Besides the usual Dirichlet boundary condition on the
the FunctionSpace. Besides the usual Dirichlet boundary condition on the
local field
, which is
left here for the sake of completeness but
is
not
local field
(
left here for the sake of completeness but not
used in this model,
there is the possibility to
fix either the
used in this model
)
,
one may
fix either the
GlobalPotential or the ArmatureCharge of each indidual electrode (n
ot
both,
GlobalPotential or the ArmatureCharge of each indidual electrode (n
ever
both,
of course).
When the ArmatureCharge is fixed, the computed GlobalPotential
of course). When the ArmatureCharge is fixed, the computed GlobalPotential
computed
for that electrode is the so-called floating potential. */
for that electrode is the so-called floating potential. */
{
Name
Hgrad_v_Ele
;
Type
Form0
;
{
Name
Hgrad_v_Ele
;
Type
Form0
;
BasisFunction
{
BasisFunction
{
...
@@ -207,8 +207,8 @@ Integration {
...
@@ -207,8 +207,8 @@ Integration {
}
}
Formulation
{
Formulation
{
/* The formulation
only
contains minor changes compared to formulation from
/* The formulation contains
only
minor changes compared to formulation from
the first tutorial.
The global quantities are declared as "Global" in the
the first tutorial. The global quantities are declared as "Global" in the
"Quantity" section, and a "GlobalTerm" is added that triggers the assembly
"Quantity" section, and a "GlobalTerm" is added that triggers the assembly
of the additional equation per electrode (the "pre-integrated" boundary
of the additional equation per electrode (the "pre-integrated" boundary
term) in the system to compute the charge Q_electrode, which
term) in the system to compute the charge Q_electrode, which
...
@@ -290,8 +290,8 @@ PostProcessing {
...
@@ -290,8 +290,8 @@ PostProcessing {
}
}
}
}
/*
Various
output results are generated, which are both displayed in the
/*
Several
output results are generated, which are both displayed in the
graphical user interface, and stored in disk files.
In particular, global
graphical user interface, and stored in disk files. In particular, global
quantities related results are stored in the "output.txt" file. A user option
quantities related results are stored in the "output.txt" file. A user option
allows to chose to not overwrite the "output.txt" file when running a new
allows to chose to not overwrite the "output.txt" file when running a new
simulation. */
simulation. */
...
...
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