Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
WindEnergyToolbox
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
shfe1
WindEnergyToolbox
Commits
648fa5da
Commit
648fa5da
authored
7 years ago
by
David Verelst
Browse files
Options
Downloads
Patches
Plain Diff
prepost.dlcdefs: optionally read dtu controller tuning from HS2 output
parent
39630165
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wetb/prepost/dlcdefs.py
+17
-3
17 additions, 3 deletions
wetb/prepost/dlcdefs.py
with
17 additions
and
3 deletions
wetb/prepost/dlcdefs.py
+
17
−
3
View file @
648fa5da
...
...
@@ -21,6 +21,7 @@ import pandas as pd
from
wetb.prepost
import
misc
from
wetb.prepost.GenerateHydro
import
hydro_input
from
wetb.prepost
import
hawcstab2
def
casedict2xlsx
():
...
...
@@ -173,8 +174,8 @@ def vartag_excel_stabcon(master):
mt
[
'
[wdepth]
'
]
=
float
(
mt
[
'
[wdepth]
'
])
mt
[
'
[Hs]
'
]
=
float
(
mt
[
'
[Hs]
'
])
mt
[
'
[Tp]
'
]
=
float
(
mt
[
'
[Tp]
'
])
if
'
[wave_gamma]
'
not
in
mt
or
not
mt
[
'
[wave_gamma]
'
]:
mt
[
'
[wave_gamma]
'
]
=
3.3
else
:
...
...
@@ -194,7 +195,7 @@ def vartag_excel_stabcon(master):
mt
[
'
[wave_seed]
'
]
=
int
(
mt
[
'
[seed]
'
])
else
:
mt
[
'
[wave_seed]
'
]
=
int
(
mt
[
'
[wave_seed]
'
])
try
:
embed_sf
=
float
(
master
.
tags
[
'
[embed_sf]
'
])
embed_sf_t0
=
int
(
master
.
tags
[
'
[t0]
'
])
+
20
...
...
@@ -468,6 +469,19 @@ def excel_stabcon(proot, fext='xlsx', pignore=None, pinclude=None, sheet=0,
t_stop
=
float
(
tags_dict
[
'
[time_stop]
'
])
t0
=
float
(
tags_dict
[
'
[t0]
'
])
tags_dict
[
'
[duration]
'
]
=
str
(
t_stop
-
t0
)
# in case there is a controller input file defined
if
[
'
[controller_tuning_file]
'
]
in
tags_dict
:
hs2
=
hawcstab2
.
ReadControlTuning
()
hs2
.
read_parameters
(
tags_dict
[
'
[controller_tuning_file]
'
])
tags_dict
[
'
[pi_gen_reg1.K]
'
]
=
hs2
.
pi_gen_reg1
.
K
tags_dict
[
'
[pi_gen_reg2.Kp]
'
]
=
hs2
.
pi_gen_reg2
.
Kp
tags_dict
[
'
[pi_gen_reg2.Ki]
'
]
=
hs2
.
pi_gen_reg2
.
Ki
tags_dict
[
'
[pi_gen_reg2.Kd]
'
]
=
0.0
tags_dict
[
'
[pi_pitch_reg3.Kp]
'
]
=
hs2
.
pi_pitch_reg3
.
Kp
tags_dict
[
'
[pi_pitch_reg3.Ki]
'
]
=
hs2
.
pi_pitch_reg3
.
Ki
tags_dict
[
'
[pi_pitch_reg3.K1]
'
]
=
hs2
.
pi_pitch_reg3
.
K1
tags_dict
[
'
[pi_pitch_reg3.K2]
'
]
=
hs2
.
pi_pitch_reg3
.
K2
# save a copy of the current case an one opt_tags entry
opt_tags
.
append
(
tags_dict
.
copy
())
return
opt_tags
...
...
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