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
Bought new laptop and when I tried to run a code, got runtime errors which never existed on my desktop. File is attached TBMP.py.txt
TBM-Plot> python.exe .\TBMplts.py
Working on Mach Number: 1.5
Working on Mach Number: 2.0
Working on Mach Number: 2.5
Working on Mach Number: 3.0
Working on Mach Number: 3.5
Working on Mach Number: 4.0
Working on Mach Number: 4.5
Working on Mach Number: 5.0
Working on Mach Number: 5.5
Working on Mach Number: 6.0
Working on Mach Number: 6.5
Working on Mach Number: 7.0
Working on Mach Number: 8.0
Working on Mach Number: inf
Traceback (most recent call last):
File ".\TBMplts.py", line 84, in
plot_max_line(gamma=gamma, color='k', linestyle='--')
File ".\TBMplts.py", line 41, in plot_max_line
theta_max[i], beta_max[i] = shocks.max_deflection(M[i], gamma)
File "C:\Users\Charles\Google Drive\Teaching\Codes\Projects_CAL\TBM-Plot\skaero\gasdynamics\shocks.py", line 62, in max_deflection
eq, mu, np.pi / 2, args=(M_1, gamma), disp=0)
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\site-packages\scipy\optimize\optimize.py", line 1736, in fminbound
res = _minimize_scalar_bounded(func, (x1, x2), args, **options)
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\site-packages\scipy\optimize\optimize.py", line 1870, in _minimize_scalar_bounded
if np.isnan(xf) or np.isnan(fx) or np.isnan(fu):
UnboundLocalError: local variable 'fu' referenced before assignment
Thoughts or suggestions would be appreciated.
Charles
The text was updated successfully, but these errors were encountered:
Bought new laptop and when I tried to run a code, got runtime errors which never existed on my desktop. File is attached
TBMP.py.txt
TBM-Plot> python.exe .\TBMplts.py
Working on Mach Number: 1.5
Working on Mach Number: 2.0
Working on Mach Number: 2.5
Working on Mach Number: 3.0
Working on Mach Number: 3.5
Working on Mach Number: 4.0
Working on Mach Number: 4.5
Working on Mach Number: 5.0
Working on Mach Number: 5.5
Working on Mach Number: 6.0
Working on Mach Number: 6.5
Working on Mach Number: 7.0
Working on Mach Number: 8.0
Working on Mach Number: inf
Traceback (most recent call last):
File ".\TBMplts.py", line 84, in
plot_max_line(gamma=gamma, color='k', linestyle='--')
File ".\TBMplts.py", line 41, in plot_max_line
theta_max[i], beta_max[i] = shocks.max_deflection(M[i], gamma)
File "C:\Users\Charles\Google Drive\Teaching\Codes\Projects_CAL\TBM-Plot\skaero\gasdynamics\shocks.py", line 62, in max_deflection
eq, mu, np.pi / 2, args=(M_1, gamma), disp=0)
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\site-packages\scipy\optimize\optimize.py", line 1736, in fminbound
res = _minimize_scalar_bounded(func, (x1, x2), args, **options)
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\site-packages\scipy\optimize\optimize.py", line 1870, in _minimize_scalar_bounded
if np.isnan(xf) or np.isnan(fx) or np.isnan(fu):
UnboundLocalError: local variable 'fu' referenced before assignment
Thoughts or suggestions would be appreciated.
Charles
The text was updated successfully, but these errors were encountered: