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
40d46b06
Commit
40d46b06
authored
4 years ago
by
Mads M. Pedersen
Browse files
Options
Downloads
Patches
Plain Diff
add default value of yaw, to avoid error in PyWakePark
parent
44aa5099
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
py_wake/wind_turbines.py
+4
-4
4 additions, 4 deletions
py_wake/wind_turbines.py
with
4 additions
and
4 deletions
py_wake/wind_turbines.py
+
4
−
4
View file @
40d46b06
...
...
@@ -465,17 +465,17 @@ class YawModel():
def
__init__
(
self
,
func
):
self
.
func
=
func
def
__call__
(
self
,
ws
,
yaw
):
return
self
.
func
(
np
.
cos
(
yaw
)
*
ws
)
def
__call__
(
self
,
ws
,
yaw
=
0
):
return
self
.
func
(
np
.
cos
(
yaw
)
*
np
.
asarray
(
ws
)
)
class
CTYawModel
(
YawModel
):
def
__call__
(
self
,
ws
,
yaw
):
def
__call__
(
self
,
ws
,
yaw
=
0
):
# ct_n = ct_curve(cos(yaw)*ws)*cos^2(yaw)
# mapping to downwind deficit, i.e. ct_x = ct_n*cos(yaw) = ct_curve(cos(yaw)*ws)*cos^3(yaw),
# handled in deficit model
co
=
np
.
cos
(
yaw
)
return
self
.
func
(
co
*
ws
)
*
co
**
2
return
self
.
func
(
co
*
np
.
asarray
(
ws
)
)
*
co
**
2
class
Interp
(
object
):
...
...
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