You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to create an airfoil closely following "Figures of Merit for Airfoil/Aircraft Design Integration" from Prof. Maugmer.
In the formulation CL_max of the airfoil plays a huge role because it essentially limits the possible AR.
I was trying to get the CL_max with the below line
This throws the error Traceback (most recent call last): File "nlf1015_opt.py", line 68, in <module> CL_max = optimized_airfoil.get_aero_from_neuralfoil(alpha=np.arange(-20, 20, 0.2), Re=Re, mach=mach)['CL'].max() File "\Anaconda3\lib\site-packages\casadi\casadi.py", line 13978, in <lambda> __getattr__ = lambda self, name: _swig_getattr(self, MX, name) File "\Anaconda3\lib\site-packages\casadi\casadi.py", line 83, in _swig_getattr raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name)) AttributeError: 'MX' object has no attribute 'max'
Upon searching it seems like aero coefficients Im getting out from Neuralfoil are not numpy array as it usually does but casadi.casadi.MX class in this case
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I am trying to create an airfoil closely following "Figures of Merit for Airfoil/Aircraft Design Integration" from Prof. Maugmer.
In the formulation CL_max of the airfoil plays a huge role because it essentially limits the possible AR.
I was trying to get the CL_max with the below line
CL_max = optimized_airfoil.get_aero_from_neuralfoil(alpha=np.arange(-20, 20, 0.2), Re=Re, mach=mach)['CL'].max()
This throws the error
Traceback (most recent call last): File "nlf1015_opt.py", line 68, in <module> CL_max = optimized_airfoil.get_aero_from_neuralfoil(alpha=np.arange(-20, 20, 0.2), Re=Re, mach=mach)['CL'].max() File "\Anaconda3\lib\site-packages\casadi\casadi.py", line 13978, in <lambda> __getattr__ = lambda self, name: _swig_getattr(self, MX, name) File "\Anaconda3\lib\site-packages\casadi\casadi.py", line 83, in _swig_getattr raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name)) AttributeError: 'MX' object has no attribute 'max'
Upon searching it seems like aero coefficients Im getting out from Neuralfoil are not numpy array as it usually does but casadi.casadi.MX class in this case
Is there a way to remedy this situation ? I'm just trying to get the max_cl of the airfoil by running it through -20 to +20 alpha.
I didn't put the complete code here to keep this simple. but more than happy to provide the complete code if required.
Thanks very much
Kanishka.
Beta Was this translation helpful? Give feedback.
All reactions