Multicopter cruise analysis

162 views
Skip to first unread message

Kai sheng

unread,
Mar 2, 2023, 5:52:06 AM3/2/23
to SUAVE FORUM
Hello,

I'm new to SUAVE and I am currently using SUAVE to design a multicopter. I have gone through the eVTOL tutorial and used the test_Multicopter.py from the regression script as reference codes. When I try adding a cruise segment into the mission setup in test_Multicopter.py, it doesn't seem to work. I would like to ask, what would be the correct way to add cruise in the mission setup?

Thanks,
Kai Sheng 

Emilio

unread,
Mar 15, 2023, 2:39:40 AM3/15/23
to SUAVE FORUM
What errors are you getting? Multicopters should have no problem cruising.

-Emilio

Kai sheng

unread,
Mar 15, 2023, 5:02:09 AM3/15/23
to SUAVE FORUM
Hi Emilio,

when i input this cruise segment into the code:

    segment = SUAVE.Analyses.Mission.Segments.Cruise.Constant_Speed_Constant_Altitude(base_segment)
    segment.tag = "Cruise"
   
    # connect vehicle configuration
    segment.analyses.extend(analyses.base)
   
    # segment attributes    
    segment.distance  = 3.  * Units.km
    segment.air_speed = 15. * Units.m/Units.s
    segment.altitude  = 100. * Units.m
    segment.process.iterate.conditions.stability            = SUAVE.Methods.skip
    segment.process.finalize.post_process.stability         = SUAVE.Methods.skip  
    segment = vehicle.networks.battery_propeller.add_unknowns_and_residuals_to_segment(segment,\
                                                                                       initial_power_coefficient = 0.04)

    mission.append_segment(segment)    

it will produce an error of: 

  File "c:\users\kai\documents\suave-2.5.2\trunk\SUAVE\Methods\Missions\Segments\Common\Aerodynamics.py", line 185, in update_aerodynamics
    Sref               = aerodynamics_model.geometry.reference_area

AttributeError: 'NoneType' object has no attribute 'geometry'


would this be because I'm missing some input in the cruise segment? 

Emilio

unread,
Mar 15, 2023, 1:58:39 PM3/15/23
to SUAVE FORUM
Hi,
Ahh, since this is a pure multicopter there's no aerodynamic surfaces assigned and no reference areas.

You can get this to run by adding this line:
segment.process.iterate.conditions.aerodynamics = SUAVE.Methods.skip

However, keep in mind there will be no drag.

-Emilio

Kai sheng

unread,
Mar 15, 2023, 2:19:42 PM3/15/23
to SUAVE FORUM
Hi Emilio,
it seems that after adding in that line, another error has occurred:

  File "C:\Users\kai\anaconda3\envs\OpenVSPAPI\lib\site-packages\scipy\interpolate\_rgi.py", line 320, in __call__
    raise ValueError("One of the requested xi is out of bounds "

ValueError: One of the requested xi is out of bounds in dimension 0

Would it be possible for you to explain what does this error indicate? thank you.

Best,
Kai Sheng

Kai sheng

unread,
Mar 16, 2023, 9:07:02 PM3/16/23
to SUAVE FORUM
Here is the Traceback of the error. when I tried using the basic eVTOL tutorial code, this error appears as well, I am unsure why. 

  File "C:\Users\kai\anaconda3\envs\OpenVSPAPI\lib\site-packages\spyder_kernels\py3compat.py", line 356, in compat_exec
    exec(code, globals, locals)

  File "c:\users\kai\documents\suave-2.5.2\regression\scripts\vtol\test_multicopter.py", line 311, in <module>
    main()

  File "c:\users\kai\documents\suave-2.5.2\regression\scripts\vtol\test_multicopter.py", line 41, in main
    results      = mission.evaluate()

  File "c:\users\kai\documents\suave-2.5.2\trunk\SUAVE\Analyses\Mission\Segments\Segment.py", line 180, in evaluate
    self.process(self)

  File "c:\users\kai\documents\suave-2.5.2\trunk\SUAVE\Analyses\Process.py", line 96, in __call__
    return self.evaluate(*args,**kwarg)

  File "c:\users\kai\documents\suave-2.5.2\trunk\SUAVE\Analyses\Process.py", line 67, in evaluate
    result = step(*args,**kwarg)

  File "c:\users\kai\documents\suave-2.5.2\trunk\SUAVE\Methods\Missions\Segments\Common\Sub_Segments.py", line 137, in sequential_sub_segments
    sub_segment.evaluate()

  File "c:\users\kai\documents\suave-2.5.2\trunk\SUAVE\Analyses\Mission\Segments\Segment.py", line 180, in evaluate
    self.process(self)

  File "c:\users\kai\documents\suave-2.5.2\trunk\SUAVE\Analyses\Process.py", line 96, in __call__
    return self.evaluate(*args,**kwarg)

  File "c:\users\kai\documents\suave-2.5.2\trunk\SUAVE\Analyses\Process.py", line 65, in evaluate
    result = step.evaluate(*args,**kwarg)

  File "c:\users\kai\documents\suave-2.5.2\trunk\SUAVE\Analyses\Process.py", line 67, in evaluate
    result = step(*args,**kwarg)

  File "c:\users\kai\documents\suave-2.5.2\trunk\SUAVE\Methods\Missions\Segments\converge_root.py", line 50, in converge_root
    unknowns,infodict,ier,msg = root_finder( iterate,

  File "C:\Users\kai\anaconda3\envs\OpenVSPAPI\lib\site-packages\scipy\optimize\_minpack_py.py", line 160, in fsolve
    res = _root_hybr(func, x0, args, jac=fprime, **options)

  File "C:\Users\kai\anaconda3\envs\OpenVSPAPI\lib\site-packages\scipy\optimize\_minpack_py.py", line 237, in _root_hybr
    retval = _minpack._hybrd(func, x0, args, 1, xtol, maxfev,

  File "c:\users\kai\documents\suave-2.5.2\trunk\SUAVE\Methods\Missions\Segments\converge_root.py", line 99, in iterate
    segment.process.iterate(segment)

  File "c:\users\kai\documents\suave-2.5.2\trunk\SUAVE\Analyses\Process.py", line 96, in __call__
    return self.evaluate(*args,**kwarg)

  File "c:\users\kai\documents\suave-2.5.2\trunk\SUAVE\Analyses\Process.py", line 65, in evaluate
    result = step.evaluate(*args,**kwarg)

  File "c:\users\kai\documents\suave-2.5.2\trunk\SUAVE\Analyses\Process.py", line 67, in evaluate
    result = step(*args,**kwarg)

  File "c:\users\kai\documents\suave-2.5.2\trunk\SUAVE\Methods\Missions\Segments\Common\Energy.py", line 87, in update_thrust
    results   = energy_model.evaluate_thrust(segment.state)

  File "c:\users\kai\documents\suave-2.5.2\trunk\SUAVE\Analyses\Energy\Energy.py", line 65, in evaluate_thrust
    results = network.evaluate_thrust(state)

  File "c:\users\kai\documents\suave-2.5.2\trunk\SUAVE\Components\Energy\Networks\Network.py", line 142, in evaluate_thrust
    results_p = net.evaluate_thrust(state)

  File "c:\users\kai\documents\suave-2.5.2\trunk\SUAVE\Components\Energy\Networks\Battery_Propeller.py", line 155, in evaluate_thrust
    volts = battery.compute_voltage(state)

  File "c:\users\kai\documents\suave-2.5.2\trunk\SUAVE\Components\Energy\Storages\Batteries\Constant_Mass\Lithium_Ion_LiNiMnCoO2_18650.py", line 432, in compute_voltage
    V_ul_cell = compute_NMC_cell_state_variables(battery_data,SOC,T_cell,I_cell)

  File "c:\users\kai\documents\suave-2.5.2\trunk\SUAVE\Methods\Power\Battery\Cell_Cycle_Models\LiNiMnCoO2_cell_cycle_model.py", line 51, in compute_NMC_cell_state_variables
    V_ul           = np.atleast_2d(battery_data.Voltage(pts)[:,1]).T


  File "C:\Users\kai\anaconda3\envs\OpenVSPAPI\lib\site-packages\scipy\interpolate\_rgi.py", line 320, in __call__
    raise ValueError("One of the requested xi is out of bounds "

ValueError: One of the requested xi is out of bounds in dimension 0


Emilio

unread,
Apr 20, 2023, 11:31:20 PM4/20/23
to SUAVE FORUM
Do you need to use the LiNiMnCoO2 cell? It is extrapolating out of bounds for the data we have. I suggest you use a different chemistry to be sure you're getting the results you expect before trying this "higher fidelity" battery.

-Emilio

Reply all
Reply to author
Forward
0 new messages