Skip to content
Snippets Groups Projects
Verified Commit 67225be0 authored by Thomas Lambert's avatar Thomas Lambert :helicopter:
Browse files

refact(config): more generic coax template

parent bd6c21b5
No related branches found
No related tags found
No related merge requests found
% TEMPLATECOAX Template configuration file for Coaxial rotors simulations with Rotare.
% This file extends the regular template configuration by adding a second rotor geometry.
% This file extends the regular template configuration by adding N-1 coaxial rotors.
% -----
%
% See also: template, rotare, validconfig.
......@@ -16,37 +16,44 @@
% Issues: https://gitlab.uliege.be/rotare/rotare/-/issues
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
N_ROTORS = 4; % Total number of rotors in coaxial configuration, [-]
% ==================================================================================================
% ================================== Baseline configuration ========================================
% ==================================================================================================
% 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')
% ==================================================================================================
% ================================= Blade and rotor geometry =======================================
% ==================================================================================================
% 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).spinDir = -Blade(1).spinDir; % Spin in opposite direction from first rotor
Sim.Out.show3D = false; % Disable 3D as it is not supported for coaxial (yet)
% Shift second rotor w.r.t the application type
if strcmp(Sim.Misc.appli, 'heli')
rotorShift = [0, 0, -1] * Blade(1).radius(end);
else
rotorShift = [-1, 0, 0] * Blade(1).radius(end);
end
Blade(2).hubPos = Blade(1).hubPos + rotorShift;
% FIXME: Currently only indvel is supported for coaxial
Mod.solvers = 'indvel'; % BEMT Solver ('leishman', 'indfact', 'indvel', 'stahlhut', 'all')
% ==================================================================================================
% ===================================== Operating points ===========================================
% ====================================== COAXIAL SYSTEM ===========================================
% ==================================================================================================
% Operating points must be set for the two rotors
% We simply extend the collective and rpm fields by adding values for the new rotor
Op.collective = [Op.collective; 1, 4, 7];
Op.rpm = [Op.rpm; 900, 1200];
% Adds a as many rotors as required, based on the initial blade geometry
% First rotor settings for collective and RPM
init_coll = Op.collective;
init_rpm = Op.rpm;
Blade(N_ROTORS - 1) = Blade(1); % Pre-alloc
for i = 2:N_ROTORS
% ================================ Blade and rotor geometry ====================================
Blade(i) = Blade(1); % Make second rotor identical to first one
Blade(i).spinDir = -1 * Blade(i - 1).spinDir; % Invert spin direction for each rotor
% Shift second rotor w.r.t the application type
if strcmp(Sim.Misc.appli, 'heli')
rotorShift = [0, 0, -1] * Blade(i - 1).radius(end);
else
rotorShift = [-1, 0, 0] * Blade(i - 1).radius(end);
end
Blade(i).hubPos = Blade(i - 1).hubPos + rotorShift;
% =================================== Operating points =========================================
Op.collective = [Op.collective; init_coll];
Op.rpm = [Op.rpm; init_rpm];
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment