Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
w7x-webservices
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Knieps, Alexander
w7x-webservices
Commits
1c9851df
Commit
1c9851df
authored
May 07, 2020
by
Knieps, Alexander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug in loaded_coils (now does not assume 5x symmetry)
parent
2ae0f935
Pipeline
#18216
passed with stage
in 35 seconds
Changes
4
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
617 additions
and
606 deletions
+617
-606
fieldlinetracer/client.py
fieldlinetracer/client.py
+601
-598
fieldlinetracer/w7x.py
fieldlinetracer/w7x.py
+15
-6
fieldlinetracer/w7x_archive.py
fieldlinetracer/w7x_archive.py
+0
-1
setup.py
setup.py
+1
-1
No files found.
fieldlinetracer/client.py
View file @
1c9851df
This diff is collapsed.
Click to expand it.
fieldlinetracer/w7x.py
View file @
1c9851df
...
...
@@ -97,6 +97,12 @@ cylindrical_grid = inputs.CylindricalGrid(
n_sym
=
5
,
n_phi
=
96
);
nonsym_grid
=
inputs
.
CylindricalGrid
(
r_min
=
4.05
,
r_max
=
6.75
,
n_r
=
181
,
z_min
=
-
1.35
,
z_max
=
1.35
,
n_z
=
181
,
n_sym
=
1
,
n_phi
=
96
);
@
stable_api
()
def
base_coils
(
name
,
coils
,
i_12345
=
[
0
]
*
5
,
i_ab
=
[
0
]
*
2
,
desc
=
None
,
grid
=
cylindrical_grid
,
convention
=
'1-AA-R0004.5'
):
if
desc
is
None
:
...
...
@@ -147,7 +153,7 @@ def cad_coils(i_12345 = [0] * 5, i_ab = [0] * 2, name = 'CAD coils', desc = None
return
result
@
unstable_api
()
def
loaded_coils_standard
(
i_12345
=
[
0
]
*
5
,
i_ab
=
[
0
]
*
2
,
name
=
'Loaded coils standard'
,
desc
=
'Loaded coils standard'
,
grid
=
cylindrical
_grid
,
convention
=
'1-AA-R0004.5'
):
def
loaded_coils_standard
(
i_12345
=
[
0
]
*
5
,
i_ab
=
[
0
]
*
2
,
name
=
'Loaded coils standard'
,
desc
=
'Loaded coils standard'
,
grid
=
nonsym
_grid
,
convention
=
'1-AA-R0004.5'
):
assert
len
(
i_12345
)
==
5
;
assert
len
(
i_ab
)
==
2
;
...
...
@@ -171,7 +177,7 @@ def loaded_coils_standard(i_12345 = [0] * 5, i_ab = [0] * 2, name = 'Loaded coil
return
result
;
@
unstable_api
()
def
loaded_coils_high_iota
(
i_12345
=
[
0
]
*
5
,
i_ab
=
[
0
]
*
2
,
name
=
'Loaded coils high-iota'
,
desc
=
'Loaded coils high-iota'
,
grid
=
cylindrical
_grid
,
convention
=
'1-AA-R0004.5'
):
def
loaded_coils_high_iota
(
i_12345
=
[
0
]
*
5
,
i_ab
=
[
0
]
*
2
,
name
=
'Loaded coils high-iota'
,
desc
=
'Loaded coils high-iota'
,
grid
=
nonsym
_grid
,
convention
=
'1-AA-R0004.5'
):
assert
len
(
i_12345
)
==
5
;
assert
len
(
i_ab
)
==
2
;
...
...
@@ -181,7 +187,8 @@ def loaded_coils_high_iota(i_12345 = [0] * 5, i_ab = [0] * 2, name = 'Loaded coi
coils
,
i_12345
=
i_12345
,
i_ab
=
i_ab
,
desc
=
'{} ({:.1f})T'
.
format
(
desc
,
b
)
desc
=
'{} ({:.1f})T'
.
format
(
desc
,
b
),
grid
=
grid
)
config_grid
=
{
...
...
@@ -207,7 +214,7 @@ def loaded_coils_high_iota(i_12345 = [0] * 5, i_ab = [0] * 2, name = 'Loaded coi
return
result
;
@
unstable_api
()
def
loaded_coils_high_mirror
(
i_12345
=
[
0
]
*
5
,
i_ab
=
[
0
]
*
2
,
name
=
'Loaded coils high-mirror'
,
desc
=
'Loaded coils high-mirror'
,
grid
=
cylindrical
_grid
,
convention
=
'1-AA-R0004.5'
):
def
loaded_coils_high_mirror
(
i_12345
=
[
0
]
*
5
,
i_ab
=
[
0
]
*
2
,
name
=
'Loaded coils high-mirror'
,
desc
=
'Loaded coils high-mirror'
,
grid
=
nonsym
_grid
,
convention
=
'1-AA-R0004.5'
):
assert
len
(
i_12345
)
==
5
;
assert
len
(
i_ab
)
==
2
;
...
...
@@ -217,7 +224,8 @@ def loaded_coils_high_mirror(i_12345 = [0] * 5, i_ab = [0] * 2, name = 'Loaded c
coils
,
i_12345
=
i_12345
,
i_ab
=
i_ab
,
desc
=
'{} ({:.1f})T'
.
format
(
desc
,
b
)
desc
=
'{} ({:.1f})T'
.
format
(
desc
,
b
),
grid
=
grid
)
config_grid
=
{
...
...
@@ -376,7 +384,7 @@ def control_coils(
);
@
unstable_api
()
def
config_from_program
(
program_id
,
coil_pack
=
None
,
iota_correct
=
False
,
plasma_current
=
False
):
def
config_from_program
(
program_id
,
coil_pack
=
None
,
iota_correct
=
False
,
plasma_current
=
False
,
**
kwargs
):
if
plasma_current
:
warnings
.
warn
(
'Currently plasma_current = True uses the average plasma current, which makes little sense. Consider adding the wanted axis current manually'
)
...
...
@@ -412,6 +420,7 @@ def config_from_program(program_id, coil_pack = None, iota_correct = False, plas
]
base_config
=
coil_pack
(
i_12345
,
i_ab
)
+
trim_coils
(
i_trim
)
+
control_coils
(
i_control
)
print
(
base_config
.
grid
.
n_sym
)
if
plasma_current
:
base_config
+=
client
.
axis_current
(
base_config
,
currents
[
'I plasma'
])
...
...
fieldlinetracer/w7x_archive.py
View file @
1c9851df
import
osa
import
urllib.request
import
json
import
numpy
...
...
setup.py
View file @
1c9851df
...
...
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup
(
name
=
'fzj-ipp-webservices'
,
version
=
'1.0b
0
'
,
version
=
'1.0b
1
'
,
author
=
'Alexander Knieps'
,
author_email
=
'a.knieps@fz-juelich.de'
,
description
=
'Python Frontend for selected IPP webservices'
,
...
...
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