diff --git a/src/classes/@ElemPerf/ElemPerf.m b/src/classes/@ElemPerf/ElemPerf.m index c700032a2e7541daa1f93bc22e085275d738295e..4c4d7dfef27d3c5c92162167ac82b45421989124 100644 --- a/src/classes/@ElemPerf/ElemPerf.m +++ b/src/classes/@ElemPerf/ElemPerf.m @@ -290,7 +290,7 @@ classdef ElemPerf < handle calcforces(self) % Calculate forces, torque and power [cl, cd] = getclcd(self, aoaVect, reyVect, i) % Get values of cl and cd plotveltriangles(self, nTriangles, varargin) - updateupstreamvel(self, PrevOpRot) + updateupstreamvel(self, PrevOpRot, Mod) end end diff --git a/src/configs/caradonna1981.m b/src/configs/caradonna1981.m index 48410f26923a8239b7bc8cf3c061f713c0d50272..bc082d9173ee18fb59120ec54773c90b22655502 100644 --- a/src/configs/caradonna1981.m +++ b/src/configs/caradonna1981.m @@ -53,6 +53,11 @@ Mod.solvers = {'all'}; % BEMT Solver ('leishman', 'indfact', 'indvel', 'stahlh % Extensions/corrections Mod.Ext.losses = 'all'; % Include losses using Prandtl formula ('none', 'hub', 'tip', 'both') +% [COAXIAL ONLY] Contraction model +Mod.coax.model = 'mst'; % Type of contraction ('none', 'sst', 'smst', 'mst') +Mod.coax.contraType = 'farfield'; % (opt) Type of contraction ('farfield', 'value') +Mod.coax.contraVal = 1 / 2; % (opt) Contraction ratio between upper disk and lower rotor, [-] + % Numerical parameters Mod.Num.convCrit = 1e-4; % Convergence criterion value, Mod.Num.maxIter = 500; % Maximum number of iterations for convergence calculations diff --git a/src/configs/knight1937.m b/src/configs/knight1937.m index 7e6ee22a216c6e7df86170667906f56ac14785f7..a328fa7c36bb43d6ec8bb5fab2295d5f1d05c59d 100644 --- a/src/configs/knight1937.m +++ b/src/configs/knight1937.m @@ -48,6 +48,11 @@ Mod.solvers = {'indvel'}; % BEMT Solver ('leishman', 'indfact', 'indvel', 'sta % Extensions/corrections Mod.Ext.losses = 'all'; % Include losses using Prandtl formula ('none', 'hub', 'tip', 'both') +% [COAXIAL ONLY] Contraction model +Mod.coax.model = 'mst'; % Type of contraction ('none', 'sst', 'smst', 'mst') +Mod.coax.contraType = 'farfield'; % (opt) Type of contraction ('farfield', 'value') +Mod.coax.contraVal = 1 / 2; % (opt) Contraction ratio between upper disk and lower rotor, [-] + % Numerical parameters Mod.Num.convCrit = 1e-4; % Convergence criterion value, Mod.Num.maxIter = 500; % Maximum number of iterations for convergence calculations diff --git a/src/configs/template.m b/src/configs/template.m index 3e471b302e990a4bc2b22cbdb755917e5ebfe967..6df35d0a42c169f7b51cafe69b8c65d1a95a7b91 100644 --- a/src/configs/template.m +++ b/src/configs/template.m @@ -85,6 +85,11 @@ Mod.solvers = 'all'; % BEMT Solver ('leishman', 'indfact', 'indvel', 'stahlhut' % Extensions/corrections Mod.Ext.losses = 'none'; % Include losses using Prandtl formula ('none', 'hub', 'tip', 'both') +% [COAXIAL ONLY] Contraction model +Mod.coax.model = 'mst'; % Type of contraction ('none', 'sst', 'smst', 'mst') +Mod.coax.contraType = 'farfield'; % Type of contraction ('farfield', 'value') +Mod.coax.contraVal = 1 / 2; % (opt) Contraction ratio between upper disk and lower rotor, [-] + % Numerical parameters Mod.Num.convCrit = 1e-4; % Convergence criterion value, Mod.Num.maxIter = 500; % Maximum number of iterations for convergence calculations diff --git a/src/configs/templatecoax.m b/src/configs/templatecoax.m index 978dfcda4d1393630728421b8512221aa3afc07a..aae4f71b77149ea2c5c54ae7de10eacb2d9ba678 100644 --- a/src/configs/templatecoax.m +++ b/src/configs/templatecoax.m @@ -41,6 +41,7 @@ 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 + Blade(i).nElem = round(Blade(i - 1).nElem * 1); % Shift second rotor w.r.t the application type if strcmp(Sim.Misc.appli, 'heli') diff --git a/src/solvers/bemt.m b/src/solvers/bemt.m index 7de504be53cf3cf57e6dbc1ac4846f7cc9262815..8924ea437b70ab862021e0b3b5f92050ea72e4c6 100644 --- a/src/solvers/bemt.m +++ b/src/solvers/bemt.m @@ -39,7 +39,7 @@ function bemt(OpRot, Mod) bemtsinglerot(OpRot(1), Mod); for i = 2:length(OpRot) - OpRot(i).ElPerf.updateupstreamvel(OpRot(i - 1)); % Update upstream velocity + OpRot(i).ElPerf.updateupstreamvel(OpRot(i - 1), Mod); % Update upstream velocity bemtsinglerot(OpRot(i), Mod); % Calculate BEMT as usual, with new upstream vel distribution end diff --git a/src/utils/preproc/validateconfig.m b/src/utils/preproc/validateconfig.m index 57fdc42ed1f4ff42a17390f9fa0fbd1ede6b9e40..413ac3081e497fe25bc34f842a607b9343ca85a2 100644 --- a/src/utils/preproc/validateconfig.m +++ b/src/utils/preproc/validateconfig.m @@ -74,6 +74,8 @@ function [Sim, Mod, Flow, Op, Airfoil, Blade] = validateconfig(configFile) DEF.NONDIM = {'US', 'EU'}; DEF.VERBOSITY = {'min', 'all'}; DEF.SOLVERS = {'leishman', 'indfact', 'indvel', 'stahlhut', 'all'}; + DEF.CONTRACTION_TYPE = {'farfield', 'value'}; + DEF.CONTRACTION_MODEL = {'none', 'sst', 'smst', 'mst'}; DEF.FLUID = {'air', 'seawater', 'freshwater'}; DEF.LOSSES = {'none', 'hub', 'tip', 'both', 'all'}; DEF.POLARS = {'polynomial', 'file'}; @@ -88,12 +90,12 @@ function [Sim, Mod, Flow, Op, Airfoil, Blade] = validateconfig(configFile) % Input checks Sim = checksim(Sim, configFile, DEF); % Simulation parameters - Mod = checkmod(Mod, configFile, DEF); % Models, solvers, etc. Flow.fluid = validatestring(Flow.fluid, DEF.FLUID, configFile, 'Flow.fluid'); % Fluid Airfoil = checkairfoil(Airfoil, configFile, DEF); % Airfoils data Blade = checkblade(Blade, configFile, length(Airfoil), DEF); % Blade Op = checkop(Op, configFile, DEF, numel(Blade), Flow.fluid); % Operating points + Mod = checkmod(Mod, configFile, numel(Blade), DEF); % Models, solvers, etc. % =========================================== % Extra warnings @@ -169,7 +171,7 @@ end % ================================================================================================== % ==================================== Models and solvers ========================================== % ================================================================================================== -function Mod = checkmod(Mod, configFile, DEF) +function Mod = checkmod(Mod, configFile, nRotors, DEF) % Solvers Mod.solvers = cellstr(Mod.solvers); @@ -195,6 +197,21 @@ function Mod = checkmod(Mod, configFile, DEF) {'scalar', 'positive'}, ... configFile, 'Mod.Num.maxIter'); + if nRotors > 1 + Mod.coax.model = validatestring(Mod.coax.model, DEF.CONTRACTION_MODEL, ... + configFile, 'Mod.coax.model'); + if ~strcmpi(Mod.coax.model, 'none') + Mod.coax.contraType = validatestring(Mod.coax.contraType, DEF.CONTRACTION_TYPE, ... + configFile, 'Mod.coax.contraType'); + end + if strcmp(Mod.coax.contraType, 'value') + validateattributes(Mod.coax.contraVal, ... + {'double'}, ... + {'scalar', 'positive'}, ... + configFile, 'Mod.Num.convCrit'); + end + end + end % ==================================================================================================