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
76f8791d
Verified
Commit
76f8791d
authored
1 year ago
by
Thomas Lambert
Browse files
Options
Downloads
Patches
Plain Diff
chore(valid): add checks for spindir and hubpos
parent
510808d0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/configs/templatecoax.m
+5
-4
5 additions, 4 deletions
src/configs/templatecoax.m
src/utils/preproc/validateconfig.m
+10
-0
10 additions, 0 deletions
src/utils/preproc/validateconfig.m
with
15 additions
and
4 deletions
src/configs/templatecoax.m
+
5
−
4
View file @
76f8791d
...
@@ -27,14 +27,15 @@ template; % Just load exisiting template
...
@@ -27,14 +27,15 @@ template; % Just load exisiting template
% Adds a second element to the blade structure to represent the second rotor
% Adds a second element to the blade structure to represent the second rotor
Blade
(
2
)
=
Blade
(
1
);
% Make second rotor identical to first one
Blade
(
2
)
=
Blade
(
1
);
% Make second rotor identical to first one
Blade
(
2
)
.
spinDir
=
-
Blade
(
1
)
.
spinDir
;
% Spin in opposite direction from first rotor
% Shift second rotor w.r.t the application type
if
strcmp
(
Sim
.
Misc
.
appli
,
'heli'
)
if
strcmp
(
Sim
.
Misc
.
appli
,
'heli'
)
rotorShift
=
[
0
,
0
,
-
1
];
rotorShift
=
[
0
,
0
,
-
1
]
*
Blade
(
1
)
.
radius
(
end
)
;
else
else
rotorShift
=
[
-
1
,
0
,
0
];
rotorShift
=
[
-
1
,
0
,
0
]
*
Blade
(
1
)
.
radius
(
end
)
;
end
end
Blade
(
2
)
.
hubPos
=
Blade
(
1
)
.
hubPos
+
rotorShift
;
% Shift second rotor w.r.t the application type
Blade
(
2
)
.
hubPos
=
Blade
(
1
)
.
hubPos
+
rotorShift
;
Blade
(
2
)
.
spinDir
=
-
Blade
(
1
)
.
spinDir
;
% Spin in opposite direction from first rotor
% ==================================================================================================
% ==================================================================================================
% ===================================== Operating points ===========================================
% ===================================== Operating points ===========================================
...
...
This diff is collapsed.
Click to expand it.
src/utils/preproc/validateconfig.m
+
10
−
0
View file @
76f8791d
...
@@ -345,6 +345,16 @@ function Blade = checkblade(Blade, configFile, nAirfoils, DEF)
...
@@ -345,6 +345,16 @@ function Blade = checkblade(Blade, configFile, nAirfoils, DEF)
'<='
,
nAirfoils
},
...
'<='
,
nAirfoils
},
...
configFile
,
'Blade.iAirfoil'
);
configFile
,
'Blade.iAirfoil'
);
validateattributes
(
Blade
(
i
)
.
hubPos
,
...
{
'numeric'
},
...
{
'vector'
,
'finite'
,
'nonnan'
,
'numel'
,
3
},
...
configFile
,
'Blade.hubPos'
);
validateattributes
(
Blade
(
i
)
.
spinDir
,
...
{
'numeric'
},
...
{
'scalar'
,
'integer'
,
'nonzero'
,
...
'<='
,
1
,
'>='
,
-
1
},
...
configFile
,
'Blade.spinDir'
);
end
end
% Discretization
% Discretization
...
...
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