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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
documentation
tutorials
Commits
0f2f3dcc
Commit
0f2f3dcc
authored
7 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
up
parent
282c890a
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Magnetodynamics/Lib_MagStaDyn_av_2D_Cir.pro
+3
-3
3 additions, 3 deletions
Magnetodynamics/Lib_MagStaDyn_av_2D_Cir.pro
Magnetodynamics/electromagnet.pro
+21
-9
21 additions, 9 deletions
Magnetodynamics/electromagnet.pro
Magnetodynamics/transfo.pro
+5
-6
5 additions, 6 deletions
Magnetodynamics/transfo.pro
with
29 additions
and
18 deletions
Magnetodynamics/Lib_MagStaDyn_av_2D_Cir.pro
+
3
−
3
View file @
0f2f3dcc
...
@@ -13,8 +13,8 @@ DefineConstant[
...
@@ -13,8 +13,8 @@ DefineConstant[
CoefPower
=
0.5
,
// coefficient for power calculations
CoefPower
=
0.5
,
// coefficient for power calculations
Freq
=
50
,
// frequency (for harmonic simulations)
Freq
=
50
,
// frequency (for harmonic simulations)
TimeInit
=
0
,
// intial time (for time-domain simulations)
TimeInit
=
0
,
// intial time (for time-domain simulations)
TimeFinal
=
1
,
// final time (for time-domain simulations)
TimeFinal
=
1
/
50
,
// final time (for time-domain simulations)
DeltaTime
=
0.01
,
// time step (for time-domain simulations)
DeltaTime
=
1
/
500
,
// time step (for time-domain simulations)
InterpolationOrder
=
1
// finite element order
InterpolationOrder
=
1
// finite element order
Val_Rint
=
0
,
// interior radius of annulus shell transformation region (VolInf_Mag)
Val_Rint
=
0
,
// interior radius of annulus shell transformation region (VolInf_Mag)
Val_Rext
=
0
// exterior radius of annulus shell transformation region (VolInf_Mag)
Val_Rext
=
0
// exterior radius of annulus shell transformation region (VolInf_Mag)
...
@@ -363,7 +363,7 @@ Resolution {
...
@@ -363,7 +363,7 @@ Resolution {
Generate
[
Sys
];
Solve
[
Sys
];
SaveSolution
[
Sys
];
Generate
[
Sys
];
Solve
[
Sys
];
SaveSolution
[
Sys
];
Else
Else
InitSolution
[
Sys
];
// provide initial condition
InitSolution
[
Sys
];
// provide initial condition
TimeLoopTheta
[
Time
0
,
Time
Max
,
DeltaTime
,
1.
]{
TimeLoopTheta
[
Time
Init
,
Time
Final
,
DeltaTime
,
1.
]{
// Euler implicit (1) -- Crank-Nicolson (0.5)
// Euler implicit (1) -- Crank-Nicolson (0.5)
Generate
[
Sys
];
Solve
[
Sys
];
SaveSolution
[
Sys
];
Generate
[
Sys
];
Solve
[
Sys
];
SaveSolution
[
Sys
];
}
}
...
...
This diff is collapsed.
Click to expand it.
Magnetodynamics/electromagnet.pro
+
21
−
9
View file @
0f2f3dcc
/* -------------------------------------------------------------------
/* -------------------------------------------------------------------
Tutorial 7a : magnet
ostat
ic field of an electromagnet
, bis
Tutorial 7a : magnetic field
s
of an electromagnet
Features:
Features:
- Same as Tutorial 2, but using a generic template formulation library
- Use of a template formulation library
- Identical to Tutorial 2 for a static current source
- Frequency-domain solution for a dynamic current source
To compute the solution in a terminal:
To compute the static solution in a terminal:
getdp electromagnet -solve MagSta_a_2D
getdp electromagnet -solve MagSta_a_2D -pos Map_a
getdp electromagnet -pos Map_a
To compute the time-harmonic dynamic solution in a terminal:
getdp electromagnet -solve MagDyn_a_2D -pos Map_a
To compute the solution interactively from the Gmsh GUI:
To compute the solution interactively from the Gmsh GUI:
File > Open > electromagnet.pro
File > Open > electromagnet.pro
...
@@ -25,10 +29,11 @@ Group {
...
@@ -25,10 +29,11 @@ Group {
// Abstract regions used in the "Lib_MagStaDyn_av_2D_Cir.pro" template file
// Abstract regions used in the "Lib_MagStaDyn_av_2D_Cir.pro" template file
// that is included below:
// that is included below:
VolCC_Mag
=
Region
[{
Air
,
Core
,
AirInf
}];
// Non-conducting regions
VolCC_Mag
=
Region
[{
Air
,
AirInf
}];
// Non-conducting regions
VolC_Mag
=
Region
[{
Core
}];
// Massive conducting regions
VolS_Mag
=
Region
[{
Ind
}];
// Stranded conductors, i.e., coils
VolS_Mag
=
Region
[{
Ind
}];
// Stranded conductors, i.e., coils
VolInf_Mag
=
Region
[{
AirInf
}];
//
a
nnulus for infinite shell transformation
VolInf_Mag
=
Region
[{
AirInf
}];
//
A
nnulus for infinite shell transformation
Val_Rint
=
rInt
;
Val_Rext
=
rExt
;
//
i
nterior and exterior radii of annulus
Val_Rint
=
rInt
;
Val_Rext
=
rExt
;
//
I
nterior and exterior radii of annulus
}
}
Function
{
Function
{
...
@@ -41,11 +46,15 @@ Function {
...
@@ -41,11 +46,15 @@ Function {
nu
[
Region
[{
Air
,
Ind
,
AirInf
}]
]
=
1.
/
mu0
;
nu
[
Region
[{
Air
,
Ind
,
AirInf
}]
]
=
1.
/
mu0
;
nu
[
Core
]
=
1.
/
(
murCore
*
mu0
);
nu
[
Core
]
=
1.
/
(
murCore
*
mu0
);
sigma
[
Core
]
=
1e6
/
10
;
sigma
[
Ind
]
=
5e7
;
Ns
[
Ind
]
=
1000
;
// number of turns in coil
Ns
[
Ind
]
=
1000
;
// number of turns in coil
Sc
[
Ind
]
=
SurfaceArea
[]
;
// surface (cross section) of coil
Sc
[
Ind
]
=
SurfaceArea
[]
;
// surface (cross section) of coil
// Current density in each coil portion for a unit current (will be multiplied
// Current density in each coil portion for a unit current (will be multiplied
// by the actual total current in the coil)
// by the actual total current in the coil)
js0
[
Ind
]
=
Ns
[]
/
Sc
[]
*
Vector
[
0
,
0
,
-
1
];
js0
[
Ind
]
=
Ns
[]
/
Sc
[]
*
Vector
[
0
,
0
,
-
1
];
CoefGeos
[]
=
1
;
}
}
Constraint
{
Constraint
{
...
@@ -57,11 +66,13 @@ Constraint {
...
@@ -57,11 +66,13 @@ Constraint {
}
}
{
Name
Current_2D
;
{
Name
Current_2D
;
Case
{
Case
{
// represents the phasor amplitude for a dynamic analysis
{
Region
Ind
;
Value
Current
;
}
{
Region
Ind
;
Value
Current
;
}
}
}
}
}
{
Name
Voltage_2D
;
{
Name
Voltage_2D
;
Case
{
Case
{
{
Region
Core
;
Value
0
;
}
}
}
}
}
}
}
...
@@ -69,9 +80,10 @@ Constraint {
...
@@ -69,9 +80,10 @@ Constraint {
Include
"Lib_MagStaDyn_av_2D_Cir.pro"
;
Include
"Lib_MagStaDyn_av_2D_Cir.pro"
;
PostOperation
{
PostOperation
{
{
Name
Map_a
;
NameOfPostProcessing
Mag
Sta
_a_2D
;
{
Name
Map_a
;
NameOfPostProcessing
Mag
Dyn
_a_2D
;
Operation
{
Operation
{
Print
[
a
,
OnElementsOf
Vol_Mag
,
File
"a.pos"
];
Print
[
a
,
OnElementsOf
Vol_Mag
,
File
"a.pos"
];
Print
[
b
,
OnElementsOf
Vol_Mag
,
File
"b.pos"
];
}
}
}
}
}
}
This diff is collapsed.
Click to expand it.
Magnetodynamics/transfo.pro
+
5
−
6
View file @
0f2f3dcc
...
@@ -2,13 +2,12 @@
...
@@ -2,13 +2,12 @@
Tutorial 7b : magnetodyamic model of a single-phase transformer
Tutorial 7b : magnetodyamic model of a single-phase transformer
Features:
Features:
- Time-domain and frequency-domain dynamical problems
- Use of a generic template formulation library
- Use of a generic template formulation library
- Circuit coupling used as a black-box (see Tutorial 8 for more)
- Frequency- and time-domain dynamic solutions
- Circuit coupling used as a black-box (see Tutorial 8 for details)
To compute the solution in a terminal:
To compute the solution in a terminal:
getdp transfo -solve MagDyn_a_2D
getdp transfo -solve MagDyn_a_2D -pos Map_a
getdp electromagnet -pos Map
To compute the solution interactively from the Gmsh GUI:
To compute the solution interactively from the Gmsh GUI:
File > Open > transfo.pro
File > Open > transfo.pro
...
@@ -204,7 +203,7 @@ Constraint {
...
@@ -204,7 +203,7 @@ Constraint {
Case
{
Case
{
If
(
type_Source
==
1
)
If
(
type_Source
==
1
)
// Current in each coil (same for PLUS and MINUS portions)
// Current in each coil (same for PLUS and MINUS portions)
{
Region
Coil_1
;
Value
1
;
}
{
Region
Coil_1
;
Value
1
;
TimeFunction
F_Sin_wt_p
[]{
2
*
Pi
*
Freq
,
0
};
}
{
Region
Coil_2
;
Value
0
;
}
{
Region
Coil_2
;
Value
0
;
}
EndIf
EndIf
}
}
...
...
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