Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
matlab_airfoil_toolbox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
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
Admin message
Pour rappel, le service sera inaccessible ce lundi 05/05/25 midi pour raison de mise à jour.
Show more breadcrumbs
Aerospace and Mechanical Engineering
matlab_airfoil_toolbox
Commits
be031f9b
Verified
Commit
be031f9b
authored
3 years ago
by
Thomas Lambert
Browse files
Options
Downloads
Patches
Plain Diff
docs(readme): cleanup and reflect latest changes
parent
2b28ac3a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+69
-75
69 additions, 75 deletions
README.md
with
69 additions
and
75 deletions
README.md
+
69
−
75
View file @
be031f9b
...
@@ -77,20 +77,22 @@ af_tools.xf2mat(args)
...
@@ -77,20 +77,22 @@ af_tools.xf2mat(args)
-
All functions can be used as standalone functions and give meaningful output
-
All functions can be used as standalone functions and give meaningful output
on their own (they are not sub-routines used to perform intermediary tasks).
on their own (they are not sub-routines used to perform intermediary tasks).
-
Most
functions can be
run without inp
ut arguments. I
n
that case, the
functions
-
All
functions can be
called witho
ut arguments. I
f
that
is the
case, the
y will
will
prompt the user
for
the few mandatory arguments
while the others will b
e
prompt the user
to manually enter or select
the few mandatory arguments
. Th
e
set to
their
default values.
rest will be
set to default values.
List of functions:
List of functions:
-
[
xf2mat
](
#xf2mat
)
: Aggregates multiple XFOIL or XFLR5 polar results into a single structure.
-
[
xf2mat
](
#xf2mat
)
: Aggregates multiple XFOIL or XFLR5 polar results into a single structure.
-
[
extendpolar
](
#extendpolar
)
: Extends polars to the full range of $
`\alpha`
$ ([-180, 180] deg).
-
[
Airfoil generation
](
#airfoil-generation
)
-
[
nacacamber
](
#nacacamber
)
: Generates the coordinates of the camberline for a NACA 4 or 5 digits airfoil.
-
[
nacacamber
](
#nacacamber
)
: Generates the coordinates of the camberline for a NACA 4 or 5 digits airfoil.
-
[
nacaairfoil
](
#nacaairfoil
)
: Generates the full coordinates of a NACA 4 or 5 digits airfoil.
-
[
nacaairfoil
](
#nacaairfoil
)
: Generates the full coordinates of a NACA 4 or 5 digits airfoil.
-
[
plotpolars
](
#plotpolars
)
: Plot various polars.
-
[
Polar manipulation
](
#polar-manipulation
)
-
[
findstall
](
#findstall
)
: Finds the stall point and returns the corresponding $
`\alpha`
$, $
`C_l`
$ and $
`C_d`
$.
-
[
extendpolar
](
#extendpolar
)
: Extends polars to the full range of $
`\alpha`
$ ([-180, 180] deg).
-
[
findzerolift
](
#findzerolift
)
: Finds the zero-lift angle and the associate $
`C_d`
$.
-
[
findstall
](
#findstall
)
: Finds the stall point and returns the corresponding $
`\alpha`
$, $
`C_l`
$ and $
`C_d`
$.
-
[
findcllinearrange
](
#findcllinearrange
)
: Finds the linear range of the lift coefficient and returns the range and lift slope.
-
[
findzerolift
](
#findzerolift
)
: Finds the zero-lift angle and the associate $
`C_d`
$.
-
[
findcllinearrange
](
#findcllinearrange
)
: Finds the linear range of the lift coefficient and returns the range and lift slope.
-
[
plotpolars
](
#plotpolars
)
: Plot various polars.
### xf2mat
### xf2mat
...
@@ -104,15 +106,18 @@ data into a Matlab-ready structure.
...
@@ -104,15 +106,18 @@ data into a Matlab-ready structure.
```
matlab
```
matlab
import
af_tools
.
xf2mat
import
af_tools
.
xf2mat
Polar
=
xf2mat
Polar
=
xf2mat
Polar
=
xf2mat
(
autosave
,
trimAoas
,
inputDir
,
inputFiles
)
Polar
=
xf2mat
(
inputDir
,
inputFiles
,
'autosave'
,
true
)
Polar
=
xf2mat
(
inputDir
,
inputFiles
,
'trimAoas'
,
true
)
Polar
=
xf2mat
(
inputDir
,
inputFiles
,
'autosave'
,
true
,
'trimAoas'
,
true
)
```
```
| Input | Example | Default |
| Input | Example | Default |
|------------- | ---------------------------------------------- | --------|
|------------- | ---------------------------------------------- | --------|
|
`autosave`
|
`false`
,
`true`
|
`false`
|
|
`trimAoas`
|
`false`
,
`true`
| - |
|
`inputDir`
|
`'.'`
,
`'xf_results'`
| - |
|
`inputDir`
|
`'.'`
,
`'xf_results'`
| - |
|
`inputFiles`
|
`'*'`
,
`'*0012*'`
,
`'{'*0012_1*', '*0012_2*'}`
|
`'*'`
|
|
`inputFiles`
|
`'*'`
,
`'*0012*'`
,
`'{'*0012_1*', '*0012_2*'}`
|
`'*'`
|
| | | |
| 'autosave' |
`false`
,
`true`
|
`false`
|
| 'trimAoas' |
`false`
,
`true`
|
`false`
|
The output is a structure with the following fields, where M is the number of
The output is a structure with the following fields, where M is the number of
angles of attack and N is the number of input files.
angles of attack and N is the number of input files.
...
@@ -129,61 +134,78 @@ angles of attack and N is the number of input files.
...
@@ -129,61 +134,78 @@ angles of attack and N is the number of input files.
|
`cd`
| Drag coefficient | [M x N] |
|
`cd`
| Drag coefficient | [M x N] |
|
`cm`
| Moment coefficient | [M x N] |
|
`cm`
| Moment coefficient | [M x N] |
### extendpolar
### Airfoil generation
This function extends known $
`C_l`
$ and $
`C_d`
$ polars to the full range of
angle of attacks [-180; 180]. This is especially useful when studying rotors and
propellers in off-design configuration (with the Blade Element Momentum Theory
for instance).
```
matlab
The following functions use the same two main input arguments.
import
af_tools
.
extendpolar
[
alphaExt
,
clExt
,
cdExt
]
=
extendpolar
[
alphaExt
,
clExt
,
cdExt
]
=
extendpolar
(
method
,
limit
,
Polar
)
[
alphaExt
,
clExt
,
cdExt
]
=
extendpolar
(
method
,
limit
,
alpha
,
cl
,
cd
)
```
| Input | Example | Default |
| Input | Example | Default |
|-------------- | ---------------------------------- | ----------- |
|---------- | ---------------------------------- | -------------- |
|
`method`
|
`'viterna'`
|
`'viterna'`
|
|
`digits`
|
`'0012'`
,
`'24012'`
| - |
|
`limit`
|
`'stall','limit'`
|
`'last'`
|
|
`nPoints`
|
`100`
,
`130`
|
`100`
|
|
`Polar`
|
`MyPolar`
| - |
|
`alpha`
|
`1:10`
| - |
|
`cl`
|
`1:10`
,
`rand(10,2)`
| - |
|
`cd`
|
`1:10`
,
`rand(10,2)`
| - |
### nacacamber
###
#
nacacamber
Determines the camber line of a NACA 4 or 5 digits airfoil.
Determines the camber line of a NACA 4 or 5 digits airfoil.
```
matlab
```
matlab
import
af_tools
.
nacacamber
import
af_tools
.
nacacamber
[
xc
,
yc
,
gradY
]
=
nacacamber
[
xc
,
yc
,
gradY
]
=
nacacamber
[
xc
,
yc
,
gradY
]
=
nacacamber
(
digits
,
nPoints
,
spacing
)
[
xc
,
yc
,
gradY
]
=
nacacamber
(
digits
)
[
xc
,
yc
,
gradY
]
=
nacacamber
(
digits
,
nPoints
)
[
xc
,
yc
,
gradY
]
=
nacacamber
(
digits
,
nPoints
,
'spacing'
,
'halfcosine'
)
```
```
|
Input
| Example | Default |
|
Options
| Example | Default |
|---------- | ---------------------------------- | -------------- |
|---------- | ---------------------------------- | -------------- |
|
`digits`
|
`'0012'`
,
`'24012'`
| - |
| 'spacing' |
`halfcosine`
,
`cosine`
,
`linear`
|
`'halfcosine'`
|
|
`nPoints`
|
`100`
,
`130`
|
`100`
|
|
`spacing`
|
`halfcosine`
,
`cosine`
,
`linear`
|
`'halfcosine'`
|
### nacaairfoil
###
#
nacaairfoil
Generates the full coordinates of a NACA 4 or 5 digits airfoil.
Generates the full coordinates of a NACA 4 or 5 digits airfoil.
```
matlab
```
matlab
import
af_tools
.
nacaairfoil
import
af_tools
.
nacaairfoil
[
x
,
y
]
=
nacaairfoil
[
x
,
y
]
=
nacaairfoil
[
x
,
y
]
=
nacaairfoil
(
digits
,
nPoints
,
spacing
,
finiteTrail
)
[
x
,
y
]
=
nacaairfoil
(
digits
)
[
x
,
y
]
=
nacaairfoil
(
digits
,
nPoints
)
[
x
,
y
]
=
nacaairfoil
(
digits
,
nPoints
,
'spacing'
,
spacing
,
'zerote'
,
true
)
```
```
| Input | Example | Default |
| Options | Example | Default |
|-------------- | ---------------------------------- | -------------- |
|---------- | ---------------------------------- | -------------- |
|
`digits`
|
`'0012'`
,
`'24012'`
| - |
| 'spacing' |
`halfcosine`
,
`cosine`
,
`linear`
|
`'halfcosine'`
|
|
`nPoints`
|
`100`
,
`130`
|
`100`
|
| 'zerote' |
`true`
,
`false`
|
`true`
|
|
`spacing`
|
`halfcosine`
,
`cosine`
,
`linear`
|
`'halfcosine'`
|
|
`finiteTrail`
|
`true`
,
`false`
|
`false`
|
### Polar manipulation
The following functions all share the same main inputs arguments in the exact
same order. These arguments can be of two types:
1.
`Polar`
: A Polar structure, as the one given by
[
xf2mat
][
xf2mat
]
;
2.
`alpha`
,
`cl`
,
`cd`
,
`cm`
: Arrays representing the different polars. _Some functions only allow the first two or three arrays._
Some functions then extend these inputs by using various optional arguments.
### extendpolar
This function extends known $
`C_l`
$ and $
`C_d`
$ polars to the full range of
angle of attacks [-180; 180]. This is especially useful when studying rotors and
propellers in off-design configuration (with the Blade Element Momentum Theory
for instance).
```
matlab
import
af_tools
.
extendpolar
[
alphaExt
,
clExt
,
cdExt
]
=
extendpolar
[
alphaExt
,
clExt
,
cdExt
]
=
extendpolar
(
Polar
)
[
alphaExt
,
clExt
,
cdExt
]
=
extendpolar
(
Polar
,
'method'
,
'Viterna'
)
[
alphaExt
,
clExt
,
cdExt
]
=
extendpolar
(
Polar
,
'limit'
,
'stall'
)
[
alphaExt
,
clExt
,
cdExt
]
=
extendpolar
(
alpha
,
cl
,
cd
,
'method'
,
'Viterna'
)
```
| Options | Example | Default |
|--------- | ------------------ | ----------- |
| 'method' |
`'Viterna'`
|
`'Viterna'`
|
| 'limit' |
`'stall','limit'`
|
`'last'`
|
### plotpolars
### plotpolars
...
@@ -198,14 +220,6 @@ plotpolars(Polar)
...
@@ -198,14 +220,6 @@ plotpolars(Polar)
plotpolars
(
alpha
,
cl
,
cd
,
cm
)
plotpolars
(
alpha
,
cl
,
cd
,
cm
)
```
```
| Input | Example | Default |
|-------------- | ---------------------------------- | ------- |
|
`Polar`
|
`MyPolar`
| - |
|
`alpha`
|
`1:10`
| - |
|
`cl`
|
`1:10`
,
`rand(10,2)`
| - |
|
`cd`
|
`1:10`
,
`rand(10,2)`
| - |
|
`cm`
|
`1:10`
,
`rand(10,2)`
| - |
### findstall
### findstall
Finds the stall angle of attack and the associated $
`C_l`
$ and $
`C_d`
$.
Finds the stall angle of attack and the associated $
`C_l`
$ and $
`C_d`
$.
...
@@ -217,13 +231,6 @@ import af_tools.findstall
...
@@ -217,13 +231,6 @@ import af_tools.findstall
[
alpha_s
,
cl_s
,
cd_s
]
=
findstall
(
alpha
,
cl
,
cd
)
[
alpha_s
,
cl_s
,
cd_s
]
=
findstall
(
alpha
,
cl
,
cd
)
```
```
| Input | Example | Default |
|-------------- | ---------------------------------- | ------- |
|
`Polar`
|
`MyPolar`
| - |
|
`alpha`
|
`1:10`
| - |
|
`cl`
|
`1:10`
,
`rand(10,2)`
| - |
|
`cd`
|
`1:10`
,
`rand(10,2)`
| - |
### findzerolift
### findzerolift
Finds the zero-lift angle of attack and the associated $
`C_d`
$.
Finds the zero-lift angle of attack and the associated $
`C_d`
$.
...
@@ -235,13 +242,6 @@ import af_tools.findzerolift
...
@@ -235,13 +242,6 @@ import af_tools.findzerolift
[
alpha_zeroL
,
cd_zeroL
]
=
findzerolift
(
alpha
,
cl
,
cd
)
[
alpha_zeroL
,
cd_zeroL
]
=
findzerolift
(
alpha
,
cl
,
cd
)
```
```
| Input | Example | Default |
|-------------- | ---------------------------------- | ------- |
|
`Polar`
|
`MyPolar`
| - |
|
`alpha`
|
`1:10`
| - |
|
`cl`
|
`1:10`
,
`rand(10,2)`
| - |
|
`cd`
|
`1:10`
,
`rand(10,2)`
| - |
### findcllinearrange
### findcllinearrange
Finds the range of angles of attack for which the $
`C_l`
$ can be considered
Finds the range of angles of attack for which the $
`C_l`
$ can be considered
...
@@ -254,12 +254,6 @@ import af_tools.findcllinearrange
...
@@ -254,12 +254,6 @@ import af_tools.findcllinearrange
[
alphaRange
,
clRange
,
clSlope
]
=
findcllinearrange
(
alpha
,
cl
)
[
alphaRange
,
clRange
,
clSlope
]
=
findcllinearrange
(
alpha
,
cl
)
```
```
| Input | Example | Default |
|-------------- | ---------------------------------- | ------- |
|
`Polar`
|
`MyPolar`
| - |
|
`alpha`
|
`1:10`
| - |
|
`cl`
|
`1:10`
,
`rand(10,2)`
| - |
## Licence
## Licence
Copyright (c) 2022
[
Thomas Lambert
][
tlambert
]
, University of Liège.
Copyright (c) 2022
[
Thomas Lambert
][
tlambert
]
, University of Liège.
...
...
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