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
ac3abe44
Commit
ac3abe44
authored
5 years ago
by
François Henrotte
Browse files
Options
Downloads
Patches
Plain Diff
added comments, removed transfinite feature for AirRing and all its surfaces, except SlidingMaster
parent
6ad6df83
No related branches found
No related tags found
No related merge requests found
Pipeline
#5220
passed
5 years ago
Stage: test
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
SlidingSurface3D/rfpm.geo
+2
-2
2 additions, 2 deletions
SlidingSurface3D/rfpm.geo
SlidingSurface3D/rfpm.pro
+40
-39
40 additions, 39 deletions
SlidingSurface3D/rfpm.pro
SlidingSurface3D/rfpm_common.pro
+0
-2
0 additions, 2 deletions
SlidingSurface3D/rfpm_common.pro
with
42 additions
and
43 deletions
SlidingSurface3D/rfpm.geo
+
2
−
2
View file @
ac3abe44
...
@@ -235,9 +235,9 @@ For num In { 0:#lines()-1 }
...
@@ -235,9 +235,9 @@ For num In { 0:#lines()-1 }
EndIf
EndIf
EndFor
EndFor
Transfinite
Surface
{
surfaces
()
}
;
// Transfinite Surface{ surfaces() } ;
Transfinite
Surface
{
SlidingMaster
()
}
;
Transfinite
Surface
{
SlidingSlave
()
};
Transfinite
Surface
{
SlidingSlave
()
};
Transfinite
Volume
{
10
};
// Identify 'SlidingSubmaster' Curve
// Identify 'SlidingSubmaster' Curve
...
...
This diff is collapsed.
Click to expand it.
SlidingSurface3D/rfpm.pro
+
40
−
39
View file @
ac3abe44
/*
/*
3D Magnetostatics with
Tutorial: 3D Magnetostatics with rotation and periodic boundary conditions
Features:
- OpenCascade solid modelling
- OpenCascade solid modelling
- geometrical identfication of faces
- geometrical ident
i
fication of faces
- antiperiodic boundary conditions
- antiperiodic boundary conditions
- sliding surface
- sliding surface to account for rotor rotation
To compute the solution interactively from the Gmsh GUI:
File > Open > microstrip.pro
Run (button at the bottom of the left panel)
*/
*/
Include
"rfpm_common.pro"
;
Include
"rfpm_common.pro"
;
...
@@ -25,6 +31,8 @@ AngularStep = deg * DefineNumber[2, Name "Options/1Angular step [deg]",
...
@@ -25,6 +31,8 @@ AngularStep = deg * DefineNumber[2, Name "Options/1Angular step [deg]",
Visible
Flag_QuasiStatic
];
Visible
Flag_QuasiStatic
];
NumStep
=
DefineNumber
[
20
,
Name
"Options/1Number of steps"
,
NumStep
=
DefineNumber
[
20
,
Name
"Options/1Number of steps"
,
Visible
Flag_QuasiStatic
];
Visible
Flag_QuasiStatic
];
Gauge
=
DefineNumber
[
1
,
Name
"Options/Gauging"
,
Choices
{
0
=
"MUMPS"
,
1
=
"Tree"
}];
rpm
=
2.
*
Pi
/
60.
;
rpm
=
2.
*
Pi
/
60.
;
w1
=
1000
*
rpm
;
w1
=
1000
*
rpm
;
...
@@ -90,20 +98,24 @@ Function{
...
@@ -90,20 +98,24 @@ Function{
}
}
Function
{
Function
{
// Sliding surface:
// Functions for the Sliding surface technique:
// a1 is the angular span of Region and RegionRef.
// - a1 is the angular span (in radian) of the sliding regions SlidingMaster
// a0 is the mesh step of the meshes of
// and SlidingSlave.
// a2[] is the angular position (in radian) of the rotor
// - a0 is the mesh step of the sliding region in the direction of rotation.
// relative to its reference position (as in the msh file)
// - a2[] is the angular position (in radian) of the rotor relative to its
// assumed to be aligned with the stator.
// reference position (that in the msh file) assumed to be aligned with the
// a3[] is the shear angle of region AIRBM
// stator.
// (smaller than half the discretization step of the sliding surface
// - a3[] is the shear angle of the AirRing region to adapt to a2[] values
// to adapt to a2[] values that are not multiple of this step).
// that are not multiple of a0. On has fabs(a3[]) < a0/2.
// AlignWithMaster[] maps a point of coordinates {X[], Y[], Z[]} onto
// - AlignWithMaster[] maps a point of coordinates {X[], Y[], Z[]} onto its
// its image in the open set RegionRef-SubRegionRef by the symmetry mapping.
// image by periodicity in the open set SlidingMaster - SlidingSubMaster.
// Coef[] is evaluated on Master nodes
// - Coef[] = -1 or 1 is the coefficient of (anti-)periodicity condition.
// fFloor[] is a safe version of Floor[] for real represented int variables
// This function is evaluated on SlidingMaster nodes
// fRem[a,b] substracts from a multiple of b so that the result is in [0,1[
// - fFloor[] is a robust version of Floor[] for float-represented integer
// variables.
// - fRem[a,b] substracts from a multiple of b so that the result is in [0,b[
// It is a robust version of the remainder of the integer division for
// float-represented integer variables.
Periodicity
=
-
1.
;
// -1 for antiperiodicity, 1 for periodicity
Periodicity
=
-
1.
;
// -1 for antiperiodicity, 1 for periodicity
RotatePZ
[]
=
Rotate
[
XYZ
[],
0
,
0
,
$
1
]
;
RotatePZ
[]
=
Rotate
[
XYZ
[],
0
,
0
,
$
1
]
;
...
@@ -174,6 +186,11 @@ Constraint {
...
@@ -174,6 +186,11 @@ Constraint {
}
}
}
}
}
}
// A correct spanning-tree is essential to the validity of the model.
// The spanning-tree must be autosimilar by rotation on the sliding surfaces
// (SubRegion2 clause, only the edges aligned with the Z axis are placed in
// the tree), and be also a spanning-tree and Dirichlet and Link surfaces and
// their boundaries (SubRegion clause).
{
Name
GaugeCondition_a
;
Type
Assign
;
{
Name
GaugeCondition_a
;
Type
Assign
;
Case
{
Case
{
{
Region
Vol_Tree
;
Value
0.
;
{
Region
Vol_Tree
;
Value
0.
;
...
@@ -296,22 +313,12 @@ PostOperation Fields UsingPost MagSta_a {
...
@@ -296,22 +313,12 @@ PostOperation Fields UsingPost MagSta_a {
File
"tmp.geo"
,
LastTimeStepOnly
]
;
File
"tmp.geo"
,
LastTimeStepOnly
]
;
}
}
PostOperation
{
{
Name
pos
;
NameOfPostProcessing
MagSta_a
;
Operation
{
Print
[
b
,
OnElementsOf
Dom_Hcurl_a
,
File
"b.pos"
];
// Print[W_mag_Airgap[AIRGAP], OnGlobal, Format TimeTable,
// File StrCat[resPath, "Energy_airgap.pos"]];
// Print[Flux[PM], OnGlobal, Format TimeTable,
// File >> StrCat[resPath, "Flux.pos"]];
}
}
}
PostOperation
Check_Periodicity
UsingPost
MagSta_a
{
PostOperation
Check_Periodicity
UsingPost
MagSta_a
{
If
(
Gauge
==
1
)
If
(
Gauge
==
1
)
// Print the tree for debugging purposes (the group name
// Print the tree for debugging purposes.
// The group to print is the ExtendedGroup of type EdgesOfTreeIn
// automatically generated by getDP at Pre-Processing.
// The group name name (here '_CO_Entity_39') is indicated in the message console.
PrintGroup
[
_CO_Entity_39
,
In
Vol_Tree
,
File
"Tree.pos"
];
PrintGroup
[
_CO_Entity_39
,
In
Vol_Tree
,
File
"Tree.pos"
];
Echo
[
Str
[
"l=PostProcessing.NbViews-1;"
,
Echo
[
Str
[
"l=PostProcessing.NbViews-1;"
,
...
@@ -326,10 +333,6 @@ PostOperation Check_Periodicity UsingPost MagSta_a {
...
@@ -326,10 +333,6 @@ PostOperation Check_Periodicity UsingPost MagSta_a {
"View[l].ArrowSizeMax = 100;"
,
"View[l].ArrowSizeMax = 100;"
,
"View[l].CenterGlyphs = 0;"
,
"View[l].CenterGlyphs = 0;"
,
"View[l].GlyphLocation = 1;"
,
"View[l].GlyphLocation = 1;"
,
"View[l].RangeType = 1;"
,
"View[l].SaturateValues = 1;"
,
"View[l].CustomMax = 2;"
,
"View[l].CustomMin = 0;"
,
"View[l].ScaleType = 1;"
,
"View[l].ScaleType = 1;"
,
"View[l].LineWidth = 3;"
,
"View[l].LineWidth = 3;"
,
"View[l].VectorType = 4;"
]
,
"View[l].VectorType = 4;"
]
,
...
@@ -341,10 +344,6 @@ PostOperation Check_Periodicity UsingPost MagSta_a {
...
@@ -341,10 +344,6 @@ PostOperation Check_Periodicity UsingPost MagSta_a {
"View[l].ArrowSizeMax = 100;"
,
"View[l].ArrowSizeMax = 100;"
,
"View[l].CenterGlyphs = 0;"
,
"View[l].CenterGlyphs = 0;"
,
"View[l].GlyphLocation = 1;"
,
"View[l].GlyphLocation = 1;"
,
"View[l].RangeType = 1;"
,
"View[l].SaturateValues = 1;"
,
"View[l].CustomMax = 2;"
,
"View[l].CustomMin = 0;"
,
"View[l].ScaleType = 1;"
,
"View[l].ScaleType = 1;"
,
"View[l].LineWidth = 3;"
,
"View[l].LineWidth = 3;"
,
"View[l].VectorType = 4;"
]
,
"View[l].VectorType = 4;"
]
,
...
@@ -361,3 +360,5 @@ PostOperation Check_Periodicity UsingPost MagSta_a {
...
@@ -361,3 +360,5 @@ PostOperation Check_Periodicity UsingPost MagSta_a {
"View[l].VectorType = 4;"
]
,
"View[l].VectorType = 4;"
]
,
File
"tmp.geo"
,
LastTimeStepOnly
]
;
File
"tmp.geo"
,
LastTimeStepOnly
]
;
}
}
This diff is collapsed.
Click to expand it.
SlidingSurface3D/rfpm_common.pro
+
0
−
2
View file @
ac3abe44
...
@@ -10,8 +10,6 @@ EndIf
...
@@ -10,8 +10,6 @@ EndIf
// Number of elements on the sliding surface in rotation direction
// Number of elements on the sliding surface in rotation direction
NbrDiv
=
50
*
mm
/
lc
;
NbrDiv
=
50
*
mm
/
lc
;
Gauge
=
DefineNumber
[
1
,
Name
"Options/Gauging"
,
Choices
{
0
=
"MUMPS"
,
1
=
"Tree"
}];
ModelAngleMin
=
0.
;
ModelAngleMin
=
0.
;
ModelAngleMax
=
60.
;
ModelAngleMax
=
60.
;
...
...
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