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
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
toolbox
WindEnergyToolbox
Commits
7d92064d
Commit
7d92064d
authored
7 years ago
by
Mads M. Pedersen
Browse files
Options
Downloads
Patches
Plain Diff
added Hawc2 algorithm for CL and CD in pc_file
parent
035aba69
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/hawc2/pc_file.py
+24
-0
24 additions, 0 deletions
wetb/hawc2/pc_file.py
with
24 additions
and
0 deletions
wetb/hawc2/pc_file.py
+
24
−
0
View file @
7d92064d
...
...
@@ -74,6 +74,26 @@ class PCFile(AEFile):
Cx1
=
np
.
interp
(
alpha
,
Cx1
[:,
0
],
Cx1
[:,
column
])
th0
,
th1
=
thicknesses
[
index
-
1
:
index
+
1
]
return
Cx0
+
(
Cx1
-
Cx0
)
*
(
thickness
-
th0
)
/
(
th1
-
th0
)
def
_CxxxH2
(
self
,
radius
,
alpha
,
column
,
ae_set_nr
=
1
):
thickness
=
self
.
thickness
(
radius
,
ae_set_nr
)
pc_set_nr
=
self
.
pc_set_nr
(
radius
,
ae_set_nr
)
thicknesses
,
profiles
=
self
.
pc_sets
[
pc_set_nr
]
index
=
np
.
searchsorted
(
thicknesses
,
thickness
)
if
index
==
0
:
index
=
1
Cx0
,
Cx1
=
profiles
[
index
-
1
:
index
+
1
]
Cx0
=
np
.
interp
(
np
.
arange
(
360
),
Cx0
[:,
0
]
+
180
,
Cx0
[:,
column
])
Cx1
=
np
.
interp
(
np
.
arange
(
360
),
Cx1
[:,
0
]
+
180
,
Cx1
[:,
column
])
#Cx0 = np.interp(alpha, Cx0[:, 0], Cx0[:, column])
#Cx1 = np.interp(alpha, Cx1[:, 0], Cx1[:, column])
th0
,
th1
=
thicknesses
[
index
-
1
:
index
+
1
]
cx
=
Cx0
+
(
Cx1
-
Cx0
)
*
(
thickness
-
th0
)
/
(
th1
-
th0
)
return
np
.
interp
(
alpha
+
180
,
np
.
arange
(
360
),
cx
)
def
CL
(
self
,
radius
,
alpha
,
ae_set_nr
=
1
):
"""
Lift coefficient
...
...
@@ -93,6 +113,10 @@ class PCFile(AEFile):
"""
return
self
.
_Cxxx
(
radius
,
alpha
,
1
,
ae_set_nr
)
def
CL_H2
(
self
,
radius
,
alpha
,
ae_set_nr
=
1
):
return
self
.
_CxxxH2
(
radius
,
alpha
,
1
,
ae_set_nr
)
def
CD
(
self
,
radius
,
alpha
,
ae_set_nr
=
1
):
"""
Drag coefficient
...
...
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