Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
getdp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
11
Issues
11
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
getdp
getdp
Commits
654049d6
Commit
654049d6
authored
Apr 01, 2018
by
Christophe Geuzaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nonlin sta + magdyn
parent
bca82325
Pipeline
#1474
passed with stage
in 9 minutes 27 seconds
Changes
4
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
27 deletions
+33
-27
Interactive_Magnetostatics.pro
templates/Interactive_Magnetostatics.pro
+13
-7
Lib_EleSta_v.pro
templates/Lib_EleSta_v.pro
+19
-19
Lib_MagDyn_av_2D_Cir.pro
templates/Lib_MagDyn_av_2D_Cir.pro
+0
-0
Lib_MagSta_a_phi.pro
templates/Lib_MagSta_a_phi.pro
+1
-1
No files found.
templates/Interactive_Magnetostatics.pro
View file @
654049d6
...
...
@@ -289,13 +289,19 @@ Resolution{
EndIf
}
Operation
{
If
(
!
NbrRegions
[
Vol_NL_Mag
])
Generate
[
A
];
Solve
[
A
];
Else
//IterativeLoopN[ NL_max_iter, NL_relax,
// System { {A, NL_reltol, NL_abstol, Solution MeanL2Norm} } ]{
IterativeLoop
[
NL_max_iter
,
NL_tol
,
NL_relax
]{
GenerateJac
[
A
];
SolveJac
[
A
];
InitSolution
[
A
];
Generate
[
A
];
Solve
[
A
];
If
(
NbrRegions
[
Vol_NL_Mag
])
Generate
[
A
];
GetResidual
[
A
,
$
res0
];
Evaluate
[
$
res
=
$
res0
,
$
iter
=
0
];
Print
[{
$
iter
,
$
res
,
$
res
/
$
res0
},
Format
"Residual %03g: abs %14.12e rel %14.12e"
];
While
[
$
res
>
NL_tol_abs
&&
$
res
/
$
res0
>
NL_tol_rel
&&
$
res
/
$
res0
<=
1
&&
$
iter
<
NL_iter_max
]{
Solve
[
A
];
Generate
[
A
];
GetResidual
[
A
,
$
res
];
Evaluate
[
$
iter
=
$
iter
+
1
];
Print
[{
$
iter
,
$
res
,
$
res
/
$
res0
},
Format
"Residual %03g: abs %14.12e rel %14.12e"
];
}
EndIf
SaveSolution
[
A
];
...
...
templates/Lib_EleSta_v.pro
View file @
654049d6
// Lib_EleSta_v.pro
//
// Template library for electrostatics using a scalar electric potential (v)
// formulation, with floating potentials
// formulation, with floating potentials
.
// Default definitions of constants, groups and functions that can/should be
// redefined from outside the template:
...
...
@@ -22,26 +22,26 @@ Group {
// Full dielectric domain:
Vol_Ele
,
//
The following are s
ubsets of Vol_Ele:
Vol_Q_Ele
,
//
domain with imposed volume charge density
Vol_Inf_Ele
,
//
infinite region
//
S
ubsets of Vol_Ele:
Vol_Q_Ele
,
//
region with imposed free charge density rho[]
Vol_Inf_Ele
,
//
annulus where a infinite shell transformation is applied
// Boundaries:
Sur_Neu_Ele
,
//
non-homogeneous Neumann boundary conditions (n.d
)
Sur_C_Ele
// boundary of conductors
Sur_Neu_Ele
,
//
surfaces with Neumann boundary conditions (n . d = dn[]
)
Sur_C_Ele
// boundary of conductors
(constant v)
];
Dom_Ele
=
Region
[
{
Vol_Ele
,
Sur_Neu_Ele
}
];
}
Function
{
DefineFunction
[
epsr
,
// relative permittivity
rho
,
//
charge density in Vol_Q_Ele
dn
// normal displacement
on Sur_Neu_Ele
epsr
,
// relative permittivity
(in Vol_Ele)
rho
,
//
free charge density (in Vol_Q_Ele)
dn
// normal displacement
(on Sur_Neu_Ele)
];
}
// End of def
ault def
initions.
// End of definitions.
Jacobian
{
{
Name
Vol
;
...
...
@@ -59,7 +59,7 @@ Jacobian {
}
Integration
{
{
Name
GradGrad
;
{
Name
Int
;
Case
{
{
Type
Gauss
;
Case
{
...
...
@@ -119,14 +119,14 @@ Formulation {
{
Name
vf
;
Type
Local
;
NameOfSpace
Hgrad_vf_Ele
[
vf
];
}
}
Equation
{
Integral
{
[
epsr
[]
*
eps0
*
Dof
{
Grad
v
}
,
{
Gra
d
v
}
];
In
Vol_Ele
;
Jacobian
Vol
;
Integration
GradGrad
;
}
Integral
{
[
epsr
[]
*
eps0
*
Dof
{
d
v
}
,
{
d
v
}
];
In
Vol_Ele
;
Jacobian
Vol
;
Integration
Int
;
}
Integral
{
[
-
rho
[],
{
v
}
];
In
Vol_Q_Ele
;
Jacobian
Vol
;
Integration
GradGrad
;
}
In
Vol_Q_Ele
;
Jacobian
Vol
;
Integration
Int
;
}
Integral
{
[
dn
[]
,
{
v
}
];
In
Sur_Neu_Ele
;
Jacobian
Sur
;
Integration
GradGrad
;
}
In
Sur_Neu_Ele
;
Jacobian
Sur
;
Integration
Int
;
}
GlobalTerm
{
[
-
Dof
{
Q
},
{
V
}
];
In
Sur_C_Ele
;
}
}
...
...
@@ -176,16 +176,16 @@ PostProcessing {
}
}
{
Name
force
;
Value
{
Integral
{
[
eps0
*
epsr
[]
/
2.
*
VirtualWork
[{
Gra
d
v
}]
];
Integral
{
[
eps0
*
epsr
[]
/
2.
*
VirtualWork
[{
d
v
}]
];
//In Vol_Ele; // restrict support to speed-up search
In
ElementsOf
[
Vol_Ele
,
OnOneSideOf
Sur_C_Ele
];
Jacobian
Vol
;
Integration
GradGrad
;
Jacobian
Vol
;
Integration
Int
;
}
}
}
{
Name
energy
;
Value
{
Integral
{
[
eps0
*
epsr
[]
/
2.
*
SquNorm
[{
Gra
d
v
}]
];
In
Vol_Ele
;
Jacobian
Vol
;
Integration
GradGrad
;
Integral
{
[
eps0
*
epsr
[]
/
2.
*
SquNorm
[{
d
v
}]
];
In
Vol_Ele
;
Jacobian
Vol
;
Integration
Int
;
}
}
}
...
...
templates/Lib_MagDyn_av_2D_Cir.pro
0 → 100644
View file @
654049d6
This diff is collapsed.
Click to expand it.
templates/Lib_MagSta_a_phi.pro
View file @
654049d6
// Lib_MagSta_a_phi.pro
//
// Template library for magnetostatics using a scalar (phi) or a vector (a)
// potential formulation
// potential formulation
.
// Default definitions of constants, groups and functions that can/should be
// redefined from outside the template:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment