if 1:
T1=300
P1=1
h1=462
s1=4.42
hf=29
sf=0.42
print("The inlet conditions to compressor are 1atm pressure & 300K")
Wi=(T1*(s1-sf))-(h1-hf)
P2= input("What is the final compression pressure? ")
T2= input("What is the final compression temperature? ")
h2= float(input("From graph, enthalpy at point 2 is "))
s2= float(input("From graph, entropy at point 2 is "))
y= float((h1-h2)/(h1-hf))
W= float((T1*(s1-s2))-(h1-h2))
Wf= float(W/y)
FOM= float(Wi/Wf)
print("")
print("Yield= %f") %(y)
print("Work reqd per unit mass of gas compressed= %f KJ/kg") %(W)
print("Work reqd per unit mass of gas liquified= %f KJ/kg") %(Wf)
print("Figure of Merit= %f") %(FOM)
圧縮機への入口条件は、1気圧の圧力& 300K 最終圧縮圧力は何ですか? 20 最終圧縮温度はどのくらいですか?グラフから300 、点2におけるエンタルピーが点2におけるエントロピー トレースバック(最新のコール最後)F =%2.74TypeError例外:%用のサポートされていないオペランドタイプ:「NoneType」および「フロート」
収量で、グラフから432 ある: 印刷 ファイル ""、ライン19、( 「=%fを収率」)%は、(Y) TypeError例外:%のためのサポートされていないオペランドのタイプ(S):「NoneType」と「フロート」
'print'関数は' NONE'返すようなコードのあなたの最後の4行はなります
print
機能に%
を適用することはできませんし、その後、あなたは '%'演算子を適用します'float'である' y'の値で '%: 'NoneType'と 'float'のサポートされていないオペランドの型を取得します –