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
Show more breadcrumbs
Aerospace and Mechanical Engineering
matlab_airfoil_toolbox
Commits
c067c551
Verified
Commit
c067c551
authored
3 years ago
by
Thomas Lambert
Browse files
Options
Downloads
Patches
Plain Diff
refactor(nacacamber): use spacedvector
parent
d80f2a93
No related branches found
Branches containing commit
Tags
v1.2.0
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
+af_tools/nacacamber.m
+6
-20
6 additions, 20 deletions
+af_tools/nacacamber.m
CHANGELOG.md
+21
-5
21 additions, 5 deletions
CHANGELOG.md
with
27 additions
and
25 deletions
+af_tools/nacacamber.m
+
6
−
20
View file @
c067c551
...
...
@@ -107,12 +107,14 @@ function [xc, yc, gradY] = camber4digits(digits, nPoints, spacing)
% P = Position of the max camber divided by 10
% XX = Maximum thickness divided by 100
import
af_tools
.
utils
.
spacedvector
;
% Airfoil parameters
m
=
str2double
(
digits
(
1
))
/
100
;
p
=
str2double
(
digits
(
2
))
/
10
;
% Camberline
xc
=
getxc
(
spacing
,
nPoints
);
xc
=
spacedvector
(
spacing
,
nPoints
);
yc
=
zeros
(
size
(
xc
));
gradY
=
zeros
(
size
(
xc
));
...
...
@@ -139,13 +141,15 @@ function [xc, yc, gradY] = camber5digits(digits, nPoints, spacing)
% Q = Camber line (0=standard, 1=reflex)
% XX = Maximum thickness divided by 100
import
af_tools
.
utils
.
spacedvector
;
% Airfoil parameters
cld
=
str2double
(
digits
(
1
))
*
3
/
20
;
p
=
str2double
(
digits
(
2
))
/
20
;
q
=
str2double
(
digits
(
3
));
% Camberline
xc
=
getxc
(
spacing
,
nPoints
);
xc
=
spacedvector
(
spacing
,
nPoints
);
yc
=
zeros
(
size
(
xc
));
gradY
=
zeros
(
size
(
xc
));
...
...
@@ -177,24 +181,6 @@ yc = (cld/0.3) * yc;
end
% ------------------------------------------------------------------------------
function
xc
=
getxc
(
spacing
,
nPoints
)
% GETXC Returns xc vector based on chosen spacing and number of points
switch
spacing
case
'linear'
xc
=
linspace
(
0
,
1
,
(
nPoints
));
case
'halfcosine'
beta
=
linspace
(
0
,
pi
,
(
nPoints
));
xc
=
(
1
-
cos
(
beta
))/
2
;
case
'cosine'
beta
=
linspace
(
0
,
pi
/
2
,
(
nPoints
));
xc
=
1
-
cos
(
beta
);
end
end
% ------------------------------------------------------------------------------
function
[
r
,
k1
,
k2k1
]
=
getcoeffs5digits
(
q
,
p
)
% GETCOEFFS5DIGITS Outputs the value of the various coefficients used in the NACA 5digits formula.
...
...
This diff is collapsed.
Click to expand it.
CHANGELOG.md
+
21
−
5
View file @
c067c551
...
...
@@ -19,23 +19,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Security
## [1.2.0] - 2022-04-10
### Added
-
**uiuccleaner**
: Add
`refine`
option to allow the refining of the original
datafile (spline interpolation to add more points).
### Changed
-
Refactor of spacing function (
**nacacamber**
,
**uiuccleaner**
).
### Fixed
-
**utils.parsefileinputs**
: minor fix in case inputFiles is a cell array
## [1.1.0] - 2022-04-10
### Added
-
Added
`savedat`
option
for _nacaairfoil_
-
**Added uiuccleaner function**
-
**nacaairfoil**
:
Added
`savedat`
option
-
**Added uiuccleaner function**
.
### Changed
-
Coordinates outputted
by _nacaairfoil_
now start at TE, go along upper side to
LE, then go along lower side back to TE
-
Refactor input parsing
for xf2mat
-
**nacaairfoil**
:
Coordinates outputted now start at TE, go along upper side to
LE, then go along lower side back to TE
.
-
**xf2mat**
:
Refactor input parsing
.
## [1.0.0] - 2022-04-08
-
Initial release
[
Unreleased
]:
https://gitlab.uliege.be/am-dept/matlab_airfoil_toolbox/-/compare/v1.0.0...master
[
1.2.0
]:
https://gitlab.uliege.be/am-dept/matlab_airfoil_toolbox/-/compare/v1.1.0...v1.2.0
[
1.1.0
]:
https://gitlab.uliege.be/am-dept/matlab_airfoil_toolbox/-/compare/v1.0.0...v1.1.0
[
1.0.0
]:
https://gitlab.uliege.be/am-dept/matlab_airfoil_toolbox/-/releases/v1.0.0
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