Skip to content

Commit

Permalink
fixing regressions
Browse files Browse the repository at this point in the history
  • Loading branch information
planes committed Apr 27, 2022
1 parent bf3efb1 commit 7640269
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 1 addition & 3 deletions regression/scripts/VTOL/test_Stopped_Rotor.py
Expand Up @@ -74,7 +74,7 @@ def main():

# RPM of rotor check during hover
RPM = results.segments.climb_1.conditions.propulsion.lift_rotor_rpm[0][0]
RPM_true = 2403.0042142186653
RPM_true = 2403.004214209376
print(RPM)
diff_RPM = np.abs(RPM - RPM_true)
print('RPM difference')
Expand Down Expand Up @@ -266,8 +266,6 @@ def mission_setup(analyses,vehicle):
segment.process.iterate.conditions.stability = SUAVE.Methods.skip
segment.process.finalize.post_process.stability = SUAVE.Methods.skip
segment = vehicle.networks.lift_cruise.add_transition_unknowns_and_residuals_to_segment(segment,
initial_prop_power_coefficient = 0.2,
initial_lift_rotor_power_coefficient = 0.01,
initial_throttle_lift = 0.9,)

# add to misison
Expand Down
1 change: 1 addition & 0 deletions regression/scripts/Vehicles/Tiltrotor.py
Expand Up @@ -412,6 +412,7 @@ def vehicle_setup():
prop.design_thrust = (1.1*Hover_Load)/net.number_of_propeller_engines
prop.origin = [[2.,5.7,0.784]]
prop.rotation = -1
prop.sol_tolerance = 1e-4
prop.symmetry = True
prop.variable_pitch = True
prop.airfoil_geometry = ['../Vehicles/Airfoils/NACA_4412.txt']
Expand Down
8 changes: 4 additions & 4 deletions regression/scripts/segments/transition_segment_test.py
Expand Up @@ -60,10 +60,10 @@ def main():


# Truth values
departure_throttle_truth = np.array([0.65161055, 0.65183868, 0.65231038, 0.65255396])
transition_1_throttle_truth = np.array([0.65403001, 0.64894357, 0.52035828, 0.58035213])
cruise_throttle_truth = np.array([0.46376188, 0.46410014, 0.46477841, 0.46511841])
transition_y_axis_rotations_truth = np.array([1.36961133, 1.34419493, 1.1039408 , 0.06583135])
departure_throttle_truth = np.array([0.65161054, 0.65183868, 0.65231039, 0.65255397])
transition_1_throttle_truth = np.array([0.65434873, 0.64834806, 0.52075861, 0.58035428])
cruise_throttle_truth = np.array([0.46376169, 0.46409995, 0.4647782 , 0.4651182 ])
transition_y_axis_rotations_truth = np.array([1.36961133, 1.34327318, 1.10250854, 0.06580108])

# Store errors
error = Data()
Expand Down
1 change: 1 addition & 0 deletions trunk/SUAVE/Components/Energy/Converters/Rotor.py
Expand Up @@ -83,6 +83,7 @@ def __defaults__(self):
self.vtk_airfoil_points = 40
self.induced_power_factor = 1.48 # accounts for interference effects
self.profile_drag_coefficient = .03
self.sol_tolerance = 1e-8

self.use_2d_analysis = False # True if rotor is at an angle relative to freestream or nonuniform freestream
self.nonuniform_freestream = False
Expand Down
Expand Up @@ -48,9 +48,9 @@ def fidelity_zero_wake_convergence(wake,rotor,wake_inputs):
if wake_inputs.use_2d_analysis:
PSI = np.ones((ctrl_pts,Nr,Na))
else:
PSI = np.ones((ctrl_pts,Nr))
PSI = np.ones((ctrl_pts,Nr))

PSI_final,infodict,ier,msg = sp.optimize.fsolve(iteration,PSI,args=(wake_inputs,rotor),full_output = 1)
PSI_final,infodict,ier,msg = sp.optimize.fsolve(iteration,PSI,args=(wake_inputs,rotor),xtol=rotor.sol_tolerance,full_output = 1,band=(1,0))

if ier!=1:
print("Rotor BEVW did not converge to a solution (Stall)")
Expand Down

0 comments on commit 7640269

Please sign in to comment.