Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Rotare
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Rouma Alexandre
Rotare
Commits
867c939c
Verified
Commit
867c939c
authored
1 year ago
by
Thomas Lambert
Browse files
Options
Downloads
Patches
Plain Diff
refact(polargen): tweak polar generator script
parent
73690b78
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
src/airfoil_data/polargenerator.py
+13
-6
13 additions, 6 deletions
src/airfoil_data/polargenerator.py
with
13 additions
and
6 deletions
src/airfoil_data/polargenerator.py
+
13
−
6
View file @
867c939c
#!/usr/bin/python3
"""
Generate airfoil polars automatically using XFOIL
Rotare requires the input of airfoil polars to interpolate properly the lift
...
...
@@ -27,25 +28,30 @@ import os
import
numpy
as
np
import
aeropy.xfoil_module
as
xf
# Defaults for polar generation
# AOA
REYNOLDS
=
[
re
*
1000000
for
re
in
[
0.02
,
0.1
,
0.2
,
0.5
,
1
,
2
,
5
,
10
]]
AOA
=
list
(
np
.
arange
(
-
16
,
22
,
0.5
))
MACH
=
0.1
def
main
():
"""
Creates polar files for each reynolds
"""
airfoil
=
parse_inputs
()
reynolds
=
[
re
*
1000000
for
re
in
[
0.2
,
0.5
,
1
,
1.5
,
2
,
5
,
10
]]
aoa
=
list
(
np
.
arange
(
-
18
,
25
,
0.5
))
i
=
1
for
re
in
reynolds
:
print
(
"
%d/%d - Calculating polar for Re=%ge6
"
%
(
i
,
len
(
reynolds
),
re
/
1e6
))
for
re
in
REYNOLDS
:
print
(
"
%d/%d - Calculating polar for Re=%ge6
"
%
(
i
,
len
(
REYNOLDS
),
re
/
1e6
))
i
=
i
+
1
if
airfoil
.
startswith
(
"
naca
"
):
xf
.
call
(
airfoil
,
alfas
=
aoa
,
alfas
=
AOA
,
output
=
"
Polar
"
,
Reynolds
=
re
,
Mach
=
MACH
,
plots
=
False
,
NACA
=
True
,
iteration
=
500
,
...
...
@@ -54,9 +60,10 @@ def main():
if
os
.
path
.
exists
(
airfoil
)
or
os
.
path
.
exists
(
airfoil
+
"
.dat
"
):
xf
.
call
(
airfoil
,
alfas
=
aoa
,
alfas
=
AOA
,
output
=
"
Polar
"
,
Reynolds
=
re
,
Mach
=
MACH
,
plots
=
False
,
NACA
=
False
,
iteration
=
500
,
...
...
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