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
bd6c21b5
Verified
Commit
bd6c21b5
authored
1 year ago
by
Thomas Lambert
Browse files
Options
Downloads
Patches
Plain Diff
refact(result): improve result tables
parent
4b24a542
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/classes/@Result/Result.m
+22
-25
22 additions, 25 deletions
src/classes/@Result/Result.m
src/configs/templatecoax.m
+2
-1
2 additions, 1 deletion
src/configs/templatecoax.m
with
24 additions
and
26 deletions
src/classes/@Result/Result.m
+
22
−
25
View file @
bd6c21b5
...
...
@@ -5,7 +5,7 @@ classdef Result < handle
%
% Notes:
% - Almost all properties are private to prevent accidental overwriting.
%
%
- Most properties are structured as [nRotor, nOperPoint]
% -----
%
% Result properties:
...
...
@@ -14,11 +14,16 @@ classdef Result < handle
% indvel - Results obtained with the indVel solver
% stahlhut - Results obtained with the stalhlut solver
% operPts - Table with the operating points for each individual result
% ModExt - Modelling enstension options (losses, etc)
%
% ModExt - Modelling extension options (losses, etc)
% cT - Table with all Thrust coefficients
% cP - Table with all Power coefficients
% cQ - Table with all Torque coefficients
%
% Result methods:
% save - Save the Result object to file
% save - Save the Result object to file
% summarize - Output a summary table with the operating points and the performance
% filter - Filter for a specific operating point
% plotperf - Plot and compare rotor performances
%
% Result constructor:
% Result = Result() creates an empty object.
...
...
@@ -73,8 +78,8 @@ classdef Result < handle
% ---------------------------------------------
% Set methods
function
set
.
operPts
(
self
,
val
)
% Note: A bug in Matlab prevents the use
r
of variable names when
size checks are added
% in the property definition. https://stackoverflow.com/q/48423003
% Note: A bug in Matlab prevents the use of variable names when size checks are added
% in the property definition.
See:
https://stackoverflow.com/q/48423003
self
.
operPts
=
val
;
self
.
operPts
.
Properties
.
VariableNames
=
{
'altitude'
,
'speed'
,
'rpm'
,
'collective'
};
...
...
@@ -105,29 +110,21 @@ end
function
resTable
=
maketable
(
self
,
prop
)
% MAKETABLE Gather properties from all solvers and all operating points in a table
resTable
=
table
(
'Size'
,
[
size
(
self
.
operPts
,
1
),
4
],
...
'VariableTypes'
,
{
'double'
,
'double'
,
'double'
,
'double'
});
propName
=
cell
(
1
,
4
);
for
i
=
1
:
length
(
self
.
SOLVERS
)
propName
{
i
}
=
[
prop
,
'_'
,
self
.
SOLVERS
{
i
}];
end
resTable
.
Properties
.
VariableNames
=
propName
;
for
iRotor
=
1
:
size
(
self
.
indvel
,
2
)
for
iSolv
=
1
:
length
(
self
.
SOLVERS
)
for
iOp
=
1
:
size
(
self
.
operPts
,
1
)
resTable
=
table
(
'Size'
,
[
size
(
self
.
operPts
,
1
),
0
]);
solver
=
self
.
SOLVERS
{
iSolv
};
for
iSolv
=
1
:
length
(
self
.
SOLVERS
)
thissolver
=
self
.
SOLVERS
{
iSolv
};
tmpTable
=
[];
if
~
isempty
(
self
.
(
solver
))
resTable
.
(
iSolv
)(
iOp
,
iRotor
)
=
self
.
(
solver
)(
iOp
,
iRotor
)
.
(
prop
);
else
resTable
.
(
iSolv
)(
iOp
,
iRotor
)
=
NaN
;
end
for
iRotor
=
size
(
self
.
(
thissolver
),
2
):
-
1
:
1
for
iOp
=
size
(
self
.
operPts
,
1
):
-
1
:
1
tmpTable
(
iOp
,
iRotor
)
=
self
.
(
thissolver
)(
iOp
,
iRotor
)
.
(
prop
);
end
end
if
~
isempty
(
tmpTable
)
resTable
=
addvars
(
resTable
,
tmpTable
,
'NewVariableNames'
,
[
prop
,
'_'
,
thissolver
]);
end
end
end
This diff is collapsed.
Click to expand it.
src/configs/templatecoax.m
+
2
−
1
View file @
bd6c21b5
...
...
@@ -22,8 +22,9 @@
% Just load exisiting template
template
;
Sim
.
Out
.
show3D
=
false
;
% Show the 3D view of the whole rotor
% Currently only indvel is supported fro coaxial
Mod
.
solvers
=
'indvel'
;
% BEMT Solver ('leishman', 'indfact', 'indvel', 'stahlhut', 'all')
%
Mod.solvers = 'indvel'; % BEMT Solver ('leishman', 'indfact', 'indvel', 'stahlhut', 'all')
% ==================================================================================================
% ================================= Blade and rotor geometry =======================================
...
...
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