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
e41ce151
Commit
e41ce151
authored
Apr 14, 2018
by
Christophe Geuzaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
axi
parent
1b80d5ec
Pipeline
#1498
passed with stage
in 12 minutes 18 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
82 additions
and
30 deletions
+82
-30
Interactive_Electrostatics.pro
templates/Interactive_Electrostatics.pro
+11
-3
Interactive_Magnetostatics.pro
templates/Interactive_Magnetostatics.pro
+16
-10
Lib_EleSta_v.pro
templates/Lib_EleSta_v.pro
+15
-4
Lib_MagDyn_av_2D_Cir.pro
templates/Lib_MagDyn_av_2D_Cir.pro
+20
-4
Lib_MagSta_a_phi.pro
templates/Lib_MagSta_a_phi.pro
+20
-9
No files found.
templates/Interactive_Electrostatics.pro
View file @
e41ce151
...
...
@@ -101,15 +101,23 @@ Group {
EndIf
}
// global definitions
DefineConstant
[
Val_Rint
=
{
1
,
Visible
NbrRegions
[
Vol_Inf_Ele
],
Name
"Model/Geometry/1Internal shell radius"
},
Val_Rext
=
{
2
,
Visible
NbrRegions
[
Vol_Inf_Ele
],
Name
"Model/Geometry/2External shell radius"
}
Flag_Axi
=
{
0
,
Choices
{
0
,
1
},
Visible
(
modelDim
==
2
),
Name
"Model/02Axisymmetric model"
}
];
If
(
export
&&
NbrRegions
[
Vol_Inf_Ele
])
Printf
(
Sprintf
(
"Val_Rint = %g;"
,
Val_Rint
))
>>
Str
[
exportFile
];
Printf
(
Sprintf
(
"Val_Rext = %g;"
,
Val_Rext
))
>>
Str
[
exportFile
];
If
(
export
)
If
(
NbrRegions
[
Vol_Inf_Ele
])
Printf
(
Sprintf
(
"Val_Rint = %g;"
,
Val_Rint
))
>>
Str
[
exportFile
];
Printf
(
Sprintf
(
"Val_Rext = %g;"
,
Val_Rext
))
>>
Str
[
exportFile
];
EndIf
If
(
Flag_Axi
)
Printf
(
Sprintf
(
"Flag_Axi = 1;"
))
>>
Str
[
exportFile
];
EndIf
EndIf
// import material library
...
...
templates/Interactive_Magnetostatics.pro
View file @
e41ce151
...
...
@@ -47,6 +47,7 @@ Group {
If
(
export
)
Printf
(
'
Group
{
'
)
>
Str
[
exportFile
];
EndIf
DefineGroup
[
Vol_Inf_Mag
,
Vol_NL_Mag
];
For
i
In
{
1
:
numPhysicals
}
dim
~
{
i
}
=
GetNumber
[
Sprintf
[
"Gmsh/Physical group %g/Dimension"
,
i
]];
name
~
{
i
}
=
GetString
[
Sprintf
[
"Gmsh/Physical group %g/Name"
,
i
]];
...
...
@@ -103,19 +104,24 @@ Group {
EndIf
}
Group
{
DefineGroup
[
Vol_Inf_Mag
,
Vol_NL_Mag
];
DefineConstant
[
Val_Rint
=
{
1
,
Visible
NbrRegions
[
Vol_Inf_Mag
],
Name
"Model/Geometry/0Internal shell radius"
},
Val_Rext
=
{
2
,
Visible
NbrRegions
[
Vol_Inf_Mag
],
Name
"Model/Geometry/1External shell radius"
}
];
If
(
export
&&
NbrRegions
[
Vol_Inf_Mag
])
// global definitions
DefineConstant
[
Val_Rint
=
{
1
,
Visible
NbrRegions
[
Vol_Inf_Mag
],
Name
"Model/Geometry/0Internal shell radius"
},
Val_Rext
=
{
2
,
Visible
NbrRegions
[
Vol_Inf_Mag
],
Name
"Model/Geometry/1External shell radius"
}
Flag_Axi
=
{
0
,
Choices
{
0
,
1
},
Visible
(
modelDim
==
2
),
Name
"Model/02Axisymmetric model"
}
];
If
(
export
)
If
(
NbrRegions
[
Vol_Inf_Mag
])
Printf
(
Sprintf
(
"Val_Rint = %g;"
,
Val_Rint
))
>>
Str
[
exportFile
];
Printf
(
Sprintf
(
"Val_Rext = %g;"
,
Val_Rext
))
>>
Str
[
exportFile
];
EndIf
}
If
(
Flag_Axi
)
Printf
(
Sprintf
(
"Flag_Axi = 1;"
))
>>
Str
[
exportFile
];
EndIf
EndIf
// import material library
Include
"Lib_Materials.pro"
;
...
...
templates/Lib_EleSta_v.pro
View file @
e41ce151
...
...
@@ -10,6 +10,7 @@ DefineConstant[
modelPath
=
""
,
// default path of the model
resPath
=
StrCat
[
modelPath
,
"res/"
],
// path for post-operation files
eps0
=
8.854187818e-12
,
// permittivity of vacuum
Flag_Axi
=
0
,
// axisymmetric model?
Val_Rint
=
0
,
// internal radius of Vol_Inf_Ele annulus
Val_Rext
=
0
,
// external radius of Vol_Inf_Ele annulus
Val_Cx
=
0
,
// x-coordinate of center of Vol_Inf_Ele
...
...
@@ -46,14 +47,24 @@ Function{
Jacobian
{
{
Name
Vol
;
Case
{
{
Region
Vol_Inf_Ele
;
Jacobian
VolSphShell
{
Val_Rint
,
Val_Rext
,
Val_Cx
,
Val_Cy
,
Val_Cz
};
}
{
Region
All
;
Jacobian
Vol
;
}
If
(
Flag_Axi
&&
modelDim
<
3
)
{
Region
Vol_Inf_Ele
;
Jacobian
VolAxiSquSphShell
{
Val_Rint
,
Val_Rext
,
Val_Cx
,
Val_Cy
,
Val_Cz
};
}
{
Region
All
;
Jacobian
VolAxiSqu
;
}
Else
{
Region
Vol_Inf_Ele
;
Jacobian
VolSphShell
{
Val_Rint
,
Val_Rext
,
Val_Cx
,
Val_Cy
,
Val_Cz
};
}
{
Region
All
;
Jacobian
Vol
;
}
EndIf
}
}
{
Name
Sur
;
Case
{
{
Region
All
;
Jacobian
Sur
;
}
If
(
Flag_Axi
&&
modelDim
<
3
)
{
Region
All
;
Jacobian
SurAxi
;
}
Else
{
Region
All
;
Jacobian
Sur
;
}
EndIf
}
}
}
...
...
templates/Lib_MagDyn_av_2D_Cir.pro
View file @
e41ce151
...
...
@@ -8,6 +8,9 @@
// redefined from outside the template:
DefineConstant
[
modelPath
=
""
,
// default path of the model
resPath
=
StrCat
[
modelPath
,
"res/"
],
// path for post-operation files
Flag_Axi
=
0
,
// axisymmetric model?
Flag_FrequencyDomain
=
1
,
// frequency-domain or time-domain simulation
Flag_CircuitCoupling
=
0
,
// consider coupling with external electric circuit
Flag_NewtonRaphson
=
1
,
// Newton-Raphson or Picard method for nonlinear iterations
...
...
@@ -19,6 +22,9 @@ DefineConstant[
FE_Order
=
1
,
// finite element order
Val_Rint
=
0
,
// interior radius of annulus shell transformation region (Vol_Inf_Mag)
Val_Rext
=
0
// exterior radius of annulus shell transformation region (Vol_Inf_Mag)
Val_Cx
=
0
,
// x-coordinate of center of Vol_Inf_Mag
Val_Cy
=
0
,
// y-coordinate of center of Vol_Inf_Mag
Val_Cz
=
0
,
// z-coordinate of center of Vol_Inf_Mag
NL_tol_abs
=
1e-6
,
// absolute tolerance on residual for noninear iterations
NL_tol_rel
=
1e-6
,
// relative tolerance on residual for noninear iterations
NL_iter_max
=
20
// maximum number of noninear iterations
...
...
@@ -98,14 +104,24 @@ Group{
Jacobian
{
{
Name
Vol
;
Case
{
{
Region
Vol_Inf_Mag
;
Jacobian
VolSphShell
{
Val_Rint
,
Val_Rext
}
;
}
{
Region
All
;
Jacobian
Vol
;
}
If
(
Flag_Axi
)
{
Region
Vol_Inf_Mag
;
Jacobian
VolAxiSquSphShell
{
Val_Rint
,
Val_Rext
,
Val_Cx
,
Val_Cy
,
Val_Cz
};
}
{
Region
All
;
Jacobian
VolAxiSqu
;
}
Else
{
Region
Vol_Inf_Mag
;
Jacobian
VolSphShell
{
Val_Rint
,
Val_Rext
,
Val_Cx
,
Val_Cy
,
Val_Cz
};
}
{
Region
All
;
Jacobian
Vol
;
}
EndIf
}
}
{
Name
Sur
;
Case
{
{
Region
All
;
Jacobian
Sur
;
}
If
(
Flag_Axi
)
{
Region
All
;
Jacobian
SurAxi
;
}
Else
{
Region
All
;
Jacobian
Sur
;
}
EndIf
}
}
}
...
...
templates/Lib_MagSta_a_phi.pro
View file @
e41ce151
...
...
@@ -9,13 +9,14 @@
DefineConstant
[
modelPath
=
""
,
// default path of the model
resPath
=
StrCat
[
modelPath
,
"res/"
],
// path for post-operation files
Flag_NewtonRaphson
=
1
,
// Newton-Raphson or Picard method for nonlinear iterations
modelDim
=
2
,
// default model dimension (2D)
Flag_Axi
=
0
,
// axisymmetric model?
Flag_NewtonRaphson
=
1
,
// Newton-Raphson or Picard method for nonlinear iterations
Val_Rint
=
0
,
// internal radius of Vol_Inf_Ele annulus
Val_Rext
=
0
,
// external radius of Vol_Inf_Ele annulus
Val_Cx
=
0
,
// x-coordinate of center of Vol_Inf_
Ele
Val_Cy
=
0
,
// y-coordinate of center of Vol_Inf_
Ele
Val_Cz
=
0
,
// z-coordinate of center of Vol_Inf_
Ele
Val_Cx
=
0
,
// x-coordinate of center of Vol_Inf_
Mag
Val_Cy
=
0
,
// y-coordinate of center of Vol_Inf_
Mag
Val_Cz
=
0
,
// z-coordinate of center of Vol_Inf_
Mag
NL_tol_abs
=
1e-6
,
// absolute tolerance on residual for noninear iterations
NL_tol_rel
=
1e-6
,
// relative tolerance on residual for noninear iterations
NL_iter_max
=
20
// maximum number of noninear iterations
...
...
@@ -28,7 +29,7 @@ Group {
// Subsets of Vol_Mag:
Vol_NL_Mag
,
// nonlinear magnetic materials
Vol_M_Mag
,
// perm
e
nent magnets
Vol_M_Mag
,
// perm
a
nent magnets
Vol_S0_Mag
,
// imposed current density
Vol_Inf_Mag
,
// infinite domains
...
...
@@ -63,14 +64,24 @@ Group {
Jacobian
{
{
Name
Vol
;
Case
{
{
Region
Vol_Inf_Mag
;
Jacobian
VolSphShell
{
Val_Rint
,
Val_Rext
,
Val_Cx
,
Val_Cy
,
Val_Cz
};
}
{
Region
All
;
Jacobian
Vol
;
}
If
(
Flag_Axi
&&
modelDim
<
3
)
{
Region
Vol_Inf_Mag
;
Jacobian
VolAxiSquSphShell
{
Val_Rint
,
Val_Rext
,
Val_Cx
,
Val_Cy
,
Val_Cz
};
}
{
Region
All
;
Jacobian
VolAxiSqu
;
}
Else
{
Region
Vol_Inf_Mag
;
Jacobian
VolSphShell
{
Val_Rint
,
Val_Rext
,
Val_Cx
,
Val_Cy
,
Val_Cz
};
}
{
Region
All
;
Jacobian
Vol
;
}
EndIf
}
}
{
Name
Sur
;
Case
{
{
Region
All
;
Jacobian
Sur
;
}
If
(
Flag_Axi
&&
modelDim
<
3
)
{
Region
All
;
Jacobian
SurAxi
;
}
Else
{
Region
All
;
Jacobian
Sur
;
}
EndIf
}
}
}
...
...
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