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
0fd62e40
Unverified
Commit
0fd62e40
authored
1 year ago
by
Thomas Lambert
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of gitlab.uliege.be:am-dept/matlab_airfoil_toolbox
parents
e57a7c4a
e98f0aa1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#16447
passed
1 year ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
+af_tools/+utils/spacedvector.m
+11
-1
11 additions, 1 deletion
+af_tools/+utils/spacedvector.m
+af_tools/nacacamber.m
+8
-8
8 additions, 8 deletions
+af_tools/nacacamber.m
with
19 additions
and
9 deletions
+af_tools/+utils/spacedvector.m
+
11
−
1
View file @
0fd62e40
function
vect
=
spacedvector
(
spacing
,
nPoints
)
% SPACEDVECTOR Returns a vector based on chosen spacing and number of points
%
% Spacing:
% - linear : points spaced linearily
% - halfcosine : more dense at beginning and end of vector
% - cosine : more dense at the beginning and more spaced out at the end
% - sine : more dense at the end and more spaced out at the beginning
%
% -----
% (c) Copyright 2022 University of Liege
% (c) Copyright 2022
-2023
University of Liege
% Author: Thomas Lambert <t.lambert@uliege.be>
% ULiege - Aeroelasticity and Experimental Aerodynamics
% Apache 2.0 License
...
...
@@ -18,6 +25,9 @@ function vect = spacedvector(spacing, nPoints)
case
'cosine'
beta
=
linspace
(
0
,
pi
/
2
,
nPoints
);
vect
=
1
-
cos
(
beta
);
case
'sine'
beta
=
linspace
(
0
,
pi
/
2
,
nPoints
);
vect
=
sin
(
beta
);
end
end
This diff is collapsed.
Click to expand it.
+af_tools/nacacamber.m
+
8
−
8
View file @
0fd62e40
...
...
@@ -6,13 +6,13 @@ function [coord, gradY] = nacacamber(varargin)
% -----
%
% Usage:
% [
X,
Y] = NACACAMBER prompts the user for the airfoil digits, then calculates the
coordinates
% of the camberline using 100 points spaced with the half-cosine rule.
% [
coord, grad
Y] = NACACAMBER prompts the user for the airfoil digits, then calculates the
%
coordinates
of the camberline using 100 points spaced with the half-cosine rule.
%
% [
X,
Y] = NACACAMBER(DIGITS) calculates the coordinates of the camberline for the
NACA
% airfoil specified by DIGITS, without further input.
% [
coord, grad
Y] = NACACAMBER(DIGITS) calculates the coordinates of the camberline for the
%
NACA
airfoil specified by DIGITS, without further input.
%
% [
X,
Y] = NACACAMBER(DIGITS, NPOINTS) calculates the coordinates of the NACA airfoil
% [
coord, grad
Y] = NACACAMBER(DIGITS, NPOINTS) calculates the coordinates of the NACA airfoil
% specified by DIGITS, using NPOINTS points spaced with the half-cosine rule.
%
% [...] = NACACAMBER(..., 'spacing', SP) uses the defined spacing rule to determine to
...
...
@@ -20,14 +20,14 @@ function [coord, gradY] = nacacamber(varargin)
% 'linear' - linear
% 'halfcosine' - (default) finer at leading and trailing edges
% 'cosine' - finer at leading edge, coarser at the trailing edge
% 'sine' - finer at trailing edge, coarser at the leading edge
%
% Inputs:
% digits : Character vector representing the NACA airfoil (ex: '0012', '24120', '24012')
% nPoints : Number of output coordinates
%
% Output:
% xc : Camberline X coordinates (0 <= X <= 1)
% yc : Camberline Y coordinates
% coord : Camberline coordinates [nPts x 2]
% gradY : Gradient of Y (required to get the whole airfoil coordinates)
%
% Example:
...
...
@@ -41,7 +41,7 @@ function [coord, gradY] = nacacamber(varargin)
% <a href="https://gitlab.uliege.be/am-dept/matlab_airfoil_toolbox">Documentation (online)</a>
% -------------------------------------------
% (c) Copyright 2022 University of Liege
% (c) Copyright 2022
-2023
University of Liege
% Author: Thomas Lambert <t.lambert@uliege.be>
% ULiege - Aeroelasticity and Experimental Aerodynamics
% MIT License
...
...
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