eVTOL Tutorial Help - Wings

477 views
Skip to first unread message

Beth

unread,
Mar 9, 2022, 1:34:16 PM3/9/22
to SUAVE FORUM
Hi, 

I'm a beginner at this but I've been watching the eVTOL tutorial for SUAVE and for some reason my wings aren't being completely displayed on OpenVSP. This is what I ended up with versus what the tutorial showed:

Screenshot 2022-03-09 at 17.40.14.pngScreenshot 2022-03-09 at 18.08.33.png
I've looked through and copied over the tutorial code but it's still displaying this error so I'm not really sure what's happened here.  Do you have any ideas of where I might have gone wrong?

Thanks,
Beth

eVTOL_tutorial_official.py

Luuk ten Damme

unread,
Mar 10, 2022, 3:26:11 AM3/10/22
to SUAVE FORUM
I used to have the same problem. I think for me using SUAVE 2.5.0 instead of 2.5.1 solved the problem. Let me know if it worked!

Op woensdag 9 maart 2022 om 19:34:16 UTC+1 schreef Beth:

Emilio

unread,
Mar 11, 2022, 4:11:12 PM3/11/22
to SUAVE FORUM
Hey folks,
I've also run into this problem. For me it changed when I went to the latest version of OpenVSP. We're releasing a new version of SUAVE soon that will address this but provide backwards compatibility.

-Emilio

Daniel E.

unread,
Mar 12, 2022, 4:14:22 PM3/12/22
to SUAVE FORUM
The amount of time I spent trying to sort out this issue is ridiculous. haha. Glad I'm not alone. Can you post a quick fix to this here?

Thanks 
- Daniel 

Beth

unread,
Mar 13, 2022, 10:01:53 AM3/13/22
to SUAVE FORUM
Hi again, 

Yeah it's definitely something to do with how SUAVE and OpenVSP work together. 

My supervisor pointed out to me that this might be to do with how SUAVE defines the wingspan of the aircraft. In the "Wings" section of the vehicle design, there's the property "wing.spans.projected" which if you double to 70 or even 150 it fixes this. Before, the wing span may have referred to a single wing, but I think in this update it's defined as the length from one wing tip to the other. 

Hope this helps everyone else who was confused!
Beth

Daniel E.

unread,
Mar 13, 2022, 1:01:18 PM3/13/22
to SUAVE FORUM
I actually get a slightly different error. When attempting to write the wing, I get several "XSec_N  parameter not found" print outs in the terminal. This only started happening when I switched from VSP 3.25 to 3.26. 

Emilio

unread,
Mar 14, 2022, 5:01:42 PM3/14/22
to SUAVE FORUM
Hmm... I was aware of the "XSec_N  parameter not found" issue. That's been corrected in the develop branch and will soon be in a new release. We tracked it back to a change in OpenVSP that no longer allows for a case of SetParmVal (4 inputs) where the XSec is specified. I'm not sure why. It's now a two step process where the GetXSecParm is used then we can use SetParmVal (2 inputs).

I was unaware of the wing span issue. Is it something to do with wing.symmetric? That could either half or double your span, it's possible something is lost in translation.

-Emilio

rob.a.m...@gmail.com

unread,
Mar 14, 2022, 7:15:49 PM3/14/22
to SUAVE FORUM
Are you sure this used to work?

XSec Parms have always had a few extra hoops to jump through to get at them.

You first have to get the XSecSurf from the Geom.
Then you have to get the XSec.
Then you can get a Parm from the XSec.

The four-argument version of SetParmVal takes (geom_id, name, group, val)

When the OpenVSP API looks up a Parm by name and group, we're actually doing a lookup through a list that has to be maintained.  It is referred to as 'LinkableContainers' as this functionality was first used for setting up Links.  It is much more broadly used now, but the name stuck.

The only way I can think of for this to have worked before would be for the XSec to have been added to the LinkableContainer in a way that is different from now -- but I don't recall (and can't find) any changes made to that stuff.

It certainly seems like I broke something -- but it doesn't make any sense to me.

Rob

Emilio

unread,
Mar 14, 2022, 7:28:13 PM3/14/22
to SUAVE FORUM
I am absolutely sure this used to work. I know of several people, including myself, when they upgraded to 3.26 from earlier versions ran into it. There's even pics above to prove.

I don't think it's worth worrying about since we've already worked around it. The only real downside is that is a little more code than before.

-Emilio

Hemant Sriram

unread,
Mar 15, 2022, 2:25:10 AM3/15/22
to SUAVE FORUM
Hi Emilio,

I am not sure if every one faces this issue too. But depending on the OS that is being used, the way python called openVSP is slightly different. The standard installation of vsp uses import vsp when it is being callled in Linux systems whereas it uses import openvsp on Windows. I haven't tried it on a Mac yet but I assume it is similar to Linux based systems? It would be great if that is also incorporated when the fix is brought about in the new release. Currently if the import vsp fails, it just continues without importing it and that causes issues when trying to writ or read a vsp file.

Best Regards
Hemant

Emilio

unread,
Mar 15, 2022, 2:31:09 AM3/15/22
to SUAVE FORUM
Hi,
We've also addressed this in the upcoming release. Folks who use MacOS (you're correct it is like Linux) call vsp while Windows users seem to use openvsp. We check for both now.

-Emilio

Jon Watts

unread,
Mar 15, 2022, 7:47:13 AM3/15/22
to SUAVE FORUM
This is slightly unrelated to the original issue in this thread but I'm hoping that someone might be able to help me out with something in this tutorial. Also warning, I am still very new to Python and SUAVE so apologies if I miss something that is rather obvious!

I originally tried modifying the Boeing 737-800 Tutorial to a different aircraft and then wanted to use OpenVSP to produce a vehicle model, similar to the eVTOL tutorial. I am having an odd issue where I don't have any errors from the script, and all of the plots are produced but there is zero response regarding the OpenVSP related functions. So I decided to move across to the eVTOL tutorial to see if I could get it to work on there instead and then compare and contrast the scripts. However, for some reason my script is getting stuck over not being able to find any of the NACA 4412 .txt files for the geometry or polars. I have copied them from the regressions folder (as mentioned in the video tutorial) and into the Airfoils directory of the main SUAVE trunk folder, as well as the eVTOL_tutorial.py folder to cover all bases and it still cannot find them. Any ideas what might be causing this?

Any help would be greatly appreciated!

Kind regards,
Jon

Yash Thummar

unread,
Mar 21, 2022, 12:44:40 AM3/21/22
to SUAVE FORUM
Hello,
I have also the same problem. I use SUAVE 2.5.0 and openvsp latest version OpenVSP-3.27.1  but in my case, I found in the terminal that the script does not get the required parameters of the main wing and that is a reason it's not writing in vsp properly.
Screenshot 2022-03-21 100847.jpg

and a code I use is the mostly same as Beth.

Can anyone please help to resolve the issue?
Thank you 

Jon Watts

unread,
Mar 21, 2022, 5:49:19 AM3/21/22
to SUAVE FORUM
Hi Yash,

My issue disappeared after updating to SUAVE 2.5.2 as in that release there was an update relating to the way OpenVSP 3.26 was handled. I had a discussion with the developers over on the OpenVSP problem and they have said that it was an issue at their end at the SUAVE team found a workaround. I'm not sure whether or not this "issue" is still present in OpenVSP 3.27.1, but I'd suggest trying out SUAVE 2.5.2 before troubleshooting any further as it may be as simple as that.

Best of luck!

Kind regards,
Jon

Yash Thummar

unread,
Mar 30, 2022, 1:26:19 AM3/30/22
to SUAVE FORUM
Thank you Jon Watts for your help now it works but I get one more error and which raises an exception as shown in this screenshot :
Screenshot 2022-03-30 105141.jpg

I am not very good with python programming but still, I tried to solve this but unfortunately, I was not able to resolve the problem:
Can anyone please help to resolve the issue?
Thank you.

Emilio

unread,
Mar 30, 2022, 2:34:45 PM3/30/22
to SUAVE FORUM
I just realized you're using the 2.5.0.2 tutorials with the 2.5.2 tutorials. Try grabbing the latest tutorials to match your code.

-Emilio

Yash Thummar

unread,
Mar 31, 2022, 4:23:57 PM3/31/22
to SUAVE FORUM
Yes, You are right I am not aware that  SUAVE 2.5.2 Tutorials were released and this evtol tutorial was given there. Thank you 
But still, I am getting the error after write the vehicle successfully in VSP.
Here is the error and snapshot:

Saving OpenVSP File at C:\Users\ADMIN\OneDrive\capstone_project\Download/our_eVTOL.vsp3
Traceback (most recent call last):
  File "c:\Users\ADMIN\OneDrive\capstone_project\Download\Tutorials-2.5.2\Tutorials-2.5.2\tut_eVTOL.py", line 592,
in <module>
    main()
  File "c:\Users\ADMIN\OneDrive\capstone_project\Download\Tutorials-2.5.2\Tutorials-2.5.2\tut_eVTOL.py", line 48, in main
    results = mission.evaluate()
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python39\lib\site-packages\suave-2.5.2-py3.9.egg\SUAVE\Analyses\Mission\Segments\Segment.py", line 180, in evaluate
    self.process(self)
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python39\lib\site-packages\suave-2.5.2-py3.9.egg\SUAVE\Analyses\Process.py", line 96, in __call__
    return self.evaluate(*args,**kwarg)
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python39\lib\site-packages\suave-2.5.2-py3.9.egg\SUAVE\Analyses\Process.py", line 67, in evaluate
    result = step(*args,**kwarg)
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python39\lib\site-packages\suave-2.5.2-py3.9.egg\SUAVE\Methods\Missions\Segments\Common\Sub_Segments.py", line 137, in sequential_sub_segments
    sub_segment.evaluate()
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python39\lib\site-packages\suave-2.5.2-py3.9.egg\SUAVE\Analyses\Mission\Segments\Segment.py", line 180, in evaluate
    self.process(self)
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python39\lib\site-packages\suave-2.5.2-py3.9.egg\SUAVE\Analyses\Process.py", line 96, in __call__
    return self.evaluate(*args,**kwarg)
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python39\lib\site-packages\suave-2.5.2-py3.9.egg\SUAVE\Analyses\Process.py", line 65, in evaluate
    result = step.evaluate(*args,**kwarg)
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python39\lib\site-packages\suave-2.5.2-py3.9.egg\SUAVE\Analyses\Process.py", line 67, in evaluate
    result = step(*args,**kwarg)
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python39\lib\site-packages\suave-2.5.2-py3.9.egg\SUAVE\Methods\Missions\Segments\converge_root.py", line 50, in converge_root
    unknowns,infodict,ier,msg = root_finder( iterate,
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python39\lib\site-packages\scipy\optimize\minpack.py", line 160, in fsolve
    res = _root_hybr(func, x0, args, jac=fprime, **options)
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python39\lib\site-packages\scipy\optimize\minpack.py", line 226, in _root_hybr
    shape, dtype = _check_func('fsolve', 'func', func, x0, args, n, (n,))
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python39\lib\site-packages\scipy\optimize\minpack.py", line 24, in _check_func
    res = atleast_1d(thefunc(*((x0[:numinputs],) + args)))
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python39\lib\site-packages\suave-2.5.2-py3.9.egg\SUAVE\Methods\Missions\Segments\converge_root.py", line 99, in iterate
    segment.process.iterate(segment)
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python39\lib\site-packages\suave-2.5.2-py3.9.egg\SUAVE\Analyses\Process.py", line 96, in __call__
    return self.evaluate(*args,**kwarg)
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python39\lib\site-packages\suave-2.5.2-py3.9.egg\SUAVE\Analyses\Process.py", line 65, in evaluate
    result = step.evaluate(*args,**kwarg)
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python39\lib\site-packages\suave-2.5.2-py3.9.egg\SUAVE\Analyses\Process.py", line 67, in evaluate
    result = step(*args,**kwarg)
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python39\lib\site-packages\suave-2.5.2-py3.9.egg\SUAVE\Methods\Missions\Segments\Common\Energy.py", line 87, in update_thrust
    results   = energy_model.evaluate_thrust(segment.state)
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python39\lib\site-packages\suave-2.5.2-py3.9.egg\SUAVE\Analyses\Energy\Energy.py", line 65, in evaluate_thrust
    results = network.evaluate_thrust(state)
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python39\lib\site-packages\suave-2.5.2-py3.9.egg\SUAVE\Components\Energy\Networks\Network.py", line 142, in evaluate_thrust
    results_p = net.evaluate_thrust(state)
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python39\lib\site-packages\suave-2.5.2-py3.9.egg\SUAVE\Components\Energy\Networks\Lift_Cruise.py", line 167, in evaluate_thrust
    volts = battery.compute_voltage(state)
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python39\lib\site-packages\suave-2.5.2-py3.9.egg\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\ADMIN\AppData\Local\Programs\Python\Python39\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'

2022-04-01 014927.jpg

Can someone please help me to find the solution to this error?

Thank you,
Yash 

Emilio

unread,
Apr 1, 2022, 4:37:16 PM4/1/22
to SUAVE FORUM
I don't have an obvious fix for this. I'm not sure what's going on. It's like the code is missing something that was supposed to be setup.

Can you try changing out the battery type to a vanilla Lithium Ion battery? Change this line to this.

I'm curious if it will still throw an error.

-Emilio

Sehwan Park

unread,
Apr 3, 2022, 8:24:37 PM4/3/22
to SUAVE FORUM
Yash, from my experince, the error with message "AttributeError: 'NoneType' object has no attribute 'Voltage'" was easily solved by 
copying "NMC_Raw_Data.res" file from where you place SUAVE files
(D:\...\SUAVE\SUAVE-2.5.2\trunk\SUAVE\Components\Energy\Storages\Batteries\Constant_Mass\NMC_Raw_Data.res)
and pasting into the corresponding folder of anaconda library if you use anaconda
(C:\Users\user\anaconda3\Lib\site-packages\SUAVE-2.5.2-py3.9.egg\SUAVE\Components\Energy\Storages\Batteries\Constant_Mass)

and it can be also solved by using another battery model instead of Lithium_Ion_LiNiMnCoO2_18650 as Emilio suggested.

Hope it helps.
Sehwan

2022년 4월 2일 토요일 오전 5시 37분 16초 UTC+9에 Emilio님이 작성:

Yash Thummar

unread,
Apr 4, 2022, 4:25:06 PM4/4/22
to SUAVE FORUM
Thank you so much  Emilio and  Sehwan for your help now that the code is working and got the results. 
Actually, I did not aware about this  https://groups.google.com/g/suave-forum/c/wWD7NvOAap4
but really thank you for this.

Thank you,
Yash 

Reply all
Reply to author
Forward
0 new messages