i am getting the error File "C:/Users/user/tensorEnv/project.py", line 27, in if N <= 100 : ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() how to fix this problem
import matplotlib.pyplot as plt
import numpy as np
r3=np.arange(1.11,10,0.1)
r1=1
r2=1.1
k=5
R1cond=3.36*10**(-3)
R2cond=(1/N)*(0.0727-(0.08/r3))
Rconv=(0.004)/(r3**2)
Rtotal=Rconv+R1cond+R2cond
qloss=975/Rtotal
t=176
Q=qloss*t
L0=[]
L0.append(Q)
L0=[x*10**(-3) for x in L0]
#E is the price of EDL in LBP/NW.h
#Eel is the electric price to pay
#t is the time of working hours of the furnace 22 business days
#E=Eel*qloss*t
L=[]
L1=[]
L2=[]
L3=[]
L4=[]
for N in L0:
if N <= 100 :
L.append(35*N)
if N <= 300 and N > 100:
L1.append( 55*N)
if N <=400 and N > 300:
L2.append(80*N)
if N <= 500 and N > 400:
L3.append(120*N)
if N > 500 :
L4.append(200*N)
plt.plot(L)
plt.plot(L1)
plt.plot(L2)
plt.plot(L3)
plt.plot(L4)
plt.show()