Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
models
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
models
Commits
bab75432
Commit
bab75432
authored
5 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
comments + explain how to force getdp location (fixes #3 and
#4
)
parent
b3257b60
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
Antennas/dipole.pro
+1
-0
1 addition, 0 deletions
Antennas/dipole.pro
ElectricMachines/driver.py
+19
-15
19 additions, 15 deletions
ElectricMachines/driver.py
GetDDM/waveguide2d.pro
+19
-19
19 additions, 19 deletions
GetDDM/waveguide2d.pro
with
39 additions
and
34 deletions
Antennas/dipole.pro
+
1
−
0
View file @
bab75432
...
...
@@ -130,6 +130,7 @@ Function {
eta0
=
120
*
Pi
;
// eta0 = Sqrt(mu0/eps0)
// FIXME: CG "Y[]" should be 0 in 3D !?
dR
[]
=
(
Flag_3Dmodel
)
?
Unit
[
Vector
[
Sin
[
Atan2
[
Z
[],
X
[]]
#
1
],
Y
[],
-
Cos
[
#
1
]]
]
:
Vector
[
0
,
0
,
-
1
]
;
...
...
This diff is collapsed.
Click to expand it.
ElectricMachines/driver.py
+
19
−
15
View file @
bab75432
...
...
@@ -13,9 +13,13 @@ import onelab
# create a new onelab client
c
=
onelab
.
client
(
__file__
)
# get Gmsh
and GetDP
location
s
from Gmsh options
# get Gmsh location from Gmsh options
mygmsh
=
c
.
getString
(
'
General.ExecutableFileName
'
)
mygetdp
=
''
# Either force GetDP location, or also get it from Gmsh options: adapt the
# following line if you want to force the value:
mygetdp
=
''
# '/usr/local/bin/getdp'
if
(
not
len
(
mygetdp
)):
for
s
in
range
(
9
):
n
=
c
.
getString
(
'
Solver.Name
'
+
str
(
s
))
if
(
n
==
'
GetDP
'
):
...
...
@@ -24,7 +28,8 @@ for s in range(9):
if
(
not
len
(
mygetdp
)):
c
.
sendError
(
'
This appears to be the first time you are trying to run GetDP
'
)
c
.
sendError
(
'
Please run a GetDP model interactively once with Gmsh to
'
+
'
initialize the solver location
'
)
'
initialize the solver location; or set the location by by hand
'
+
'
in the python script
'
)
exit
(
0
)
c
.
sendInfo
(
'
Will use gmsh={0} and getdp={1}
'
.
format
(
mygmsh
,
mygetdp
))
...
...
@@ -58,4 +63,3 @@ for angle in angles:
torque
=
c
.
getNumber
(
'
Output - Mechanics/0Torque [Nm]/rotor
'
)
c
.
sendInfo
(
'
Torque={0} for angle={1}
'
.
format
(
torque
,
angle
))
This diff is collapsed.
Click to expand it.
GetDDM/waveguide2d.pro
+
19
−
19
View file @
bab75432
...
...
@@ -48,7 +48,7 @@ Function {
// OO2 Gander 2002, pp. 46-47
xsimin
=
0
;
xsimax
=
Pi
/
LC
;
deltak
[]
=
Pi
;
deltak
[]
=
Pi
;
// Ruyiang+Nicolas test Pi/0.06
alphastar
[]
=
I
[]
*
((
k
[]
^
2
-
xsimin
^
2
)
*
(
k
[]
^
2
-
(
k
[]
-
deltak
[])
^
2
))
^
(
1
/
4
);
betastar
[]
=
((
xsimax
^
2
-
k
[]
^
2
)
*
((
k
[]
+
deltak
[])
^
2
-
k
[]
^
2
))
^
(
1
/
4
);
a
[]
=
-
(
alphastar
[]
*
betastar
[]
-
k
[]
^
2
)
/
(
alphastar
[]
+
betastar
[]);
...
...
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