From 608127c4729528d1ccff3a29e67c8fc9f642201f Mon Sep 17 00:00:00 2001 From: EdoAlvarezR Date: Fri, 21 Aug 2020 19:58:47 -0600 Subject: [PATCH] Fix bugs in FLOWUnsteady v1.4.2 integration --- src/FLOWVLM_rotor.jl | 5 ++++- src/FLOWVLM_wingsystem.jl | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/FLOWVLM_rotor.jl b/src/FLOWVLM_rotor.jl index c40d2be..1d48d6c 100755 --- a/src/FLOWVLM_rotor.jl +++ b/src/FLOWVLM_rotor.jl @@ -1157,7 +1157,10 @@ function calc_distributedloads(self::Rotor, Vinf, RPM, rho::FWrap; occbinflow, turbine_flag; tiploss_correction=tiploss_correction) push!(gammas, gamma) - ccbouputs = ccb.Outputs(Np, Tp, 0.0, 0.0, uvec, vvec, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) + zeroarr = zeros(size(Np)) + ccbouputs = ccb.Outputs(Np, Tp, zeroarr, zeroarr, uvec, vvec, + zeroarr, zeroarr, zeroarr, zeroarr, + zeroarr, zeroarr, zeroarr, zeroarr, zeroarr) else # Calls CCBlade # NOTE TO SELF: Forces normal and tangential to the plane of rotation diff --git a/src/FLOWVLM_wingsystem.jl b/src/FLOWVLM_wingsystem.jl index 926d4cf..52e67a7 100755 --- a/src/FLOWVLM_wingsystem.jl +++ b/src/FLOWVLM_wingsystem.jl @@ -38,7 +38,7 @@ Adds a wing to the system with the position and orientation of local reference being interpreted in relation to the local reference frame of the system. """ function addwing(self::WingSystem, wing_name::String, wing; - overwrite=false) + overwrite=false, reset=true) # Error case if wing_name in self.wing_names if overwrite @@ -59,7 +59,9 @@ function addwing(self::WingSystem, wing_name::String, wing; new_O, new_Oaxis = _interpret(_get_O(wing), _get_Oaxis(wing), self.O, self.invOaxis) setcoordsystem(wing, new_O, new_Oaxis) - _reset(self) + if reset + _reset(self) + end end """