Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
PyWake
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
TOPFARM
PyWake
Commits
2045f8c3
Commit
2045f8c3
authored
4 months ago
by
Marcus Binder Nilsen
Committed by
Mads M. Pedersen
4 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Update SWT23 to new turbine class
parent
5d2ecd47
No related branches found
No related tags found
1 merge request
!615
Update SWT23 to new turbine class
Pipeline
#67128
failed
4 months ago
Stage: test
Stage: test_plugins
Stage: deploy
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
py_wake/examples/data/lillgrund.py
+13
-11
13 additions, 11 deletions
py_wake/examples/data/lillgrund.py
with
13 additions
and
11 deletions
py_wake/examples/data/lillgrund.py
+
13
−
11
View file @
2045f8c3
from
py_wake
import
np
from
py_wake
import
np
from
py_wake.site._site
import
UniformWeibullSite
from
py_wake.site._site
import
UniformWeibullSite
from
py_wake.wind_turbines
import
OneTypeWindTurbines
from
py_wake.wind_turbines
import
WindTurbine
from
py_wake.wind_turbines.power_ct_functions
import
PowerCtTabular
wt_x
=
[
361469
,
361203
,
360936
,
360670
,
360404
,
360137
,
wt_x
=
[
361469
,
361203
,
360936
,
360670
,
360404
,
360137
,
359871
,
361203
,
360936
,
360670
,
360404
,
360137
,
359871
,
361203
,
360936
,
360670
,
360404
,
360137
,
...
@@ -68,16 +69,17 @@ ct_curve = np.array([[3.0, 0.0],
...
@@ -68,16 +69,17 @@ ct_curve = np.array([[3.0, 0.0],
[
25.0
,
0.05
]])
[
25.0
,
0.05
]])
class
SWT23
(
OneTypeWindTurbines
):
# Siemens 2.3 MW
class
SWT23
(
WindTurbine
):
# Siemens 2.3 MW
def
__init__
(
self
):
def
__init__
(
self
,
method
=
'
linear
'
):
OneTypeWindTurbines
.
__init__
(
self
,
'
SWT23
'
,
diameter
=
93
,
hub_height
=
65
,
"""
ct_func
=
self
.
_ct
,
power_func
=
self
.
_power
,
power_unit
=
'
kW
'
)
Parameters
----------
def
_ct
(
self
,
u
):
method : {
'
linear
'
,
'
pchip
'
}
return
np
.
interp
(
u
,
ct_curve
[:,
0
],
ct_curve
[:,
1
])
linear(fast) or pchip(smooth and gradient friendly) interpolation
"""
def
_power
(
self
,
u
):
WindTurbine
.
__init__
(
self
,
name
=
'
SWT23
'
,
diameter
=
93
,
hub_height
=
65
,
return
np
.
interp
(
u
,
power_curve
[:,
0
],
power_curve
[:,
1
])
powerCtFunction
=
PowerCtTabular
(
power_curve
[:,
0
],
power_curve
[:,
1
],
'
kw
'
,
ct_curve
[:,
1
],
method
=
method
))
LillgrundSWT23
=
SWT23
LillgrundSWT23
=
SWT23
...
...
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