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)
Die Einlassbedingungen Verdichter sind 1atm Druck & 300K Was ist der endgültige Kompressionsdruck? 20 Wie ist die endgültige Kompressionstemperatur? 300 Aus Diagramm, Enthalpie am Punkt 2 432 Aus Graph ist, Entropie am Punkt 2 ist 2,74Typeerror: Nicht unterstützte Operandentyp (e) für%: ‚NoneType‘ und ‚float‘
Ausbeute =% f Traceback (jüngste Aufforderung zuletzt): Datei "", Zeile 19, in print („Ausbeute =% f“)% (y) Typeerror: nicht unterstützte Operandtyp (e) für%: ‚NoneType‘ und ‚float‘
Die 'print' Funktion gibt' None' und dann wenden Sie die '%' Betreiber dazu mit dem Wert von 'y', was ein' float' ist, so erhalten Sie den Fehler 'nicht unterstützten Operandentyp (en) für%: 'NoneType' und 'float' –