Issue running b737 tutorial

250 views
Skip to first unread message

Taras Yushchenko

unread,
Jul 9, 2024, 7:33:36 PM7/9/24
to SUAVE FORUM
Hello!

Trying to run suave, i was able to fix the issue with all the imports by updating the function calls, but now I run into this error when running the basic 737 case. Any suggestions?

(suave_env) PS C:\Users\tyush\OneDrive\Desktop\SUAVE1> python Tutorials-2.5.2\tut_mission_B737.py
Traceback (most recent call last):
  File "C:\Users\tyush\OneDrive\Desktop\SUAVE1\Tutorials-2.5.2\tut_mission_B737.py", line 967, in <module>
    main()
    ^^^^^^
  File "C:\Users\tyush\OneDrive\Desktop\SUAVE1\Tutorials-2.5.2\tut_mission_B737.py", line 57, in main
    analyses.finalize()
  File "C:\Users\tyush\OneDrive\Desktop\SUAVE1\suave_env\Lib\site-packages\suave-2.5.2-py3.11.egg\SUAVE\Analyses\Analysis.py", line 271, in finalize
    analysis.finalize(*args,**kwarg)
  File "C:\Users\tyush\OneDrive\Desktop\SUAVE1\suave_env\Lib\site-packages\suave-2.5.2-py3.11.egg\SUAVE\Analyses\Analysis.py", line 271, in finalize
    analysis.finalize(*args,**kwarg)
  File "C:\Users\tyush\OneDrive\Desktop\SUAVE1\suave_env\Lib\site-packages\suave-2.5.2-py3.11.egg\SUAVE\Analyses\Analysis.py", line 271, in finalize
    analysis.finalize(*args,**kwarg)
  File "C:\Users\tyush\OneDrive\Desktop\SUAVE1\suave_env\Lib\site-packages\suave-2.5.2-py3.11.egg\SUAVE\Analyses\Aerodynamics\Fidelity_Zero.py", line 145, in initialize
    self.process.compute.lift.inviscid_wings.initialize(use_surrogate,n_sw,n_cw,propeller_wake_model,mf,mn,dcs )
  File "C:\Users\tyush\OneDrive\Desktop\SUAVE1\suave_env\Lib\site-packages\suave-2.5.2-py3.11.egg\SUAVE\Analyses\Aerodynamics\Vortex_Lattice.py", line 167, in initialize
    self.sample_training()
  File "C:\Users\tyush\OneDrive\Desktop\SUAVE1\suave_env\Lib\site-packages\suave-2.5.2-py3.11.egg\SUAVE\Analyses\Aerodynamics\Vortex_Lattice.py", line 430, in sample_training
    total_lift, total_drag, wing_lifts, wing_drags, _, _, _, _, _, _, _ = calculate_VLM(konditions,settings,geometry)

                                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tyush\OneDrive\Desktop\SUAVE1\suave_env\Lib\site-packages\suave-2.5.2-py3.11.egg\SUAVE\Analyses\Aerodynamics\Vortex_Lattice.py", line 663, in calculate_VLM
    results = VLM(conditions,settings,geometry)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tyush\OneDrive\Desktop\SUAVE1\suave_env\Lib\site-packages\suave-2.5.2-py3.11.egg\SUAVE\Methods\Aerodynamics\Common\Fidelity_Zero\Lift\VLM.py", line 267, in VLM
    GAMMA  = np.linalg.solve(A,RHS)
             ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tyush\OneDrive\Desktop\SUAVE1\suave_env\Lib\site-packages\numpy\linalg\_linalg.py", line 396, in solve
    _assert_stacked_square(a)
  File "C:\Users\tyush\OneDrive\Desktop\SUAVE1\suave_env\Lib\site-packages\numpy\linalg\_linalg.py", line 202, in _assert_stacked_square
    raise LinAlgError('Last 2 dimensions of the array must be square')
numpy.linalg.LinAlgError: Last 2 dimensions of the array must be square

Kilian Zimmer

unread,
Oct 7, 2024, 5:25:33 AM10/7/24
to SUAVE FORUM
The tutorial seems to be outdated.

Grant Hiller

unread,
Nov 25, 2024, 2:18:28 AM11/25/24
to SUAVE FORUM
I get the same error when I run any of the tutorials. I think it might be an issue with what version of numpy is being used...? Am looking into it, but if anyone has any ideas, let us know!

Haoliang Yu

unread,
Nov 25, 2024, 2:50:41 AM11/25/24
to SUAVE FORUM

Because SUAVE hasn't been updated for a while, I suggest using an earlier version of Python, specifically Python 3.9. Here are some package versions that you might find useful:

  • numpy==1.22.3
  • scipy==1.8.0
  • matplotlib==3.5.1
  • scikit-learn==1.0.2
  • plotly==5.6.0

These should be sufficient to help you solve the problem. Although I have produced a complete video tutorial, it's presented in Chinese, which might not be very helpful to you.

Knight

Grant Hiller

unread,
Nov 25, 2024, 10:00:04 PM11/25/24
to SUAVE FORUM
Thanks for the advice Knight, that seemed to do the trick. I am now able to get (some) of the tutorials running.

The evtol tutorial gives me a different error, but I'll look into that separately.

  File "C:\Users\grant\.conda\envs\py39\lib\site-packages\suave-2.5.2-py3.9.egg\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
AttributeError: 'NoneType' object has no attribute 'Voltage'

Haoliang Yu

unread,
Nov 26, 2024, 1:21:10 AM11/26/24
to SUAVE FORUM

Hello, regarding this issue, there are two solutions. 

The first one is to switch the lithium battery model used for the eVTOL to the basic model, Lithium_Ion

Another method is because a file was not installed during the package installation, as shown in the red box in the image. 

You need to copy the NMC_Raw_Data.res file from the download package to the specified package library. 

7825e50b81f775cd9a7ceb8179d4a112.png

Wish you success!

Knight

Rohan Sharma

unread,
Mar 5, 2025, 8:03:04 PMMar 5
to SUAVE FORUM
Hi Knight, 

If it's not too much to ask, do you mind sending over a link to that video tutorial? Even if it is presented in Chinese, I'd like to do my best to follow. 

Thanks!
-Rohan
Reply all
Reply to author
Forward
0 new messages