Documentos de Académico
Documentos de Profesional
Documentos de Cultura
1:PythonPackageIndex
PackageIndex>iapws>1.1.1
iapws1.1.1
PythonimplementationofstandardfromTheInternationalAssociationforthe Download
i a pws1.1.1.t a r .gz
PropertiesofWaterandSteam
PythonimplementationofstandardfromIAPWS(http://www.iapws.org/release.html).The
availablestandardare:
IAPWSIF97
IAPWS95
IAPWS06forIce
IAPWS08forseawater
IAPWS05forHeavywater
dependences
python2x,3x,compatiblewithbothversions
Numpyscipy:librarywithmathematicandscientifictools
install
Indebianyoucanfindinofficialrepositoriesintestingandsid.Instableyoucaninstallusingpip:
pipinstalliapws
Inubuntuit'sinofficialrepositoriesfromubuntusaucy(13.10)
InotherSOyoucandownloadfromitswebpageinpypiandunzippedinpythonfolderdist
packages.Thisistherecommendedoptionstohavethelatestversion.
TODO
ImproveconvergenceintwophaseregionforIAPWS95andD2Oclass
IAPWSIF97
ClasstomodelastateforliquidwaterorsteamwiththeIndustrialFormulationIAPWSIF97
Incomingproperties:
T,Temperature,K
P,Pressure,MPa
h,Specificenthalpy,kJ/kg
s,Specificentropy,kJ/kgK
x,Quality,[]
Definitionsoptions:
T,P(Notvalidfortwophasesregion)
P,h
P,s
h,s
T,x(Onlyfortwophasesregion)
P,x(Onlyfortwophasesregion)
https://pypi.python.org/pypi/iapws/ 1/7
07.01.2015 iapws1.1.1:PythonPackageIndex
Properties:
P,Pressure,MPa
T,Temperature,K
g,SpecificGibbsfreeenergy,kJ/kg
a,SpecificHelmholtzfreeenergy,kJ/kg
v,Specificvolume,m/kg
rho,Density,kg/m
x,quality,[]
h,Specificenthalpy,kJ/kg
u,Specificinternalenergy,kJ/kg
s,Specificentropy,kJ/kgK
cp,Specificisobaricheatcapacity,kJ/kgK
cv,Specificisochoricheatcapacity,kJ/kgK
Z,Compressionfactor.[]
gamma,Isoentropicexponent,[]
alfav,Isobariccubicexpansioncoefficient,1/K
kt,Isothermalcompressibility,1/MPa
alfap,Relativepressurecoefficient,1/K
betap,Isothermalstresscoefficient,kg/m
joule,JouleThomsoncoefficient,K/MPa
deltat,Isothermalthrottlingcoefficient,kJ/kgMPa
region,Region
v0,Idealspecificvolume,m/kg
u0,Idealspecificinternalenergy,kJ/kg
h0,Idealspecificenthalpy,kJ/kg
s0,Idealspecificentropy,kJ/kgK
a0,IdealspecificHelmholtzfreeenergy,kJ/kg
g0,IdealspecificGibbsfreeenergy,kJ/kg
cp0,Idealspecificisobaricheatcapacity,kJ/kgK
cv0,Idealspecificisochoricheatcapacity,kJ/kgK
w0,Idealspeedofsound,m/s
gamma0,Idealisoentropicexponent[]
w,Speedofsound,m/s
mu,Dynamicviscosity,Pas
nu,Kinematicviscosity,m/s
k,Thermalconductivity,W/mK
alfa,Thermaldiffusivity,m/s
sigma,Surfacetension,N/m
epsilon,Dielectricconstant,[]
n,Refractiveindex,[]
Prandt,Prandtlnumber,[]
Tr,Reducedtemperature,[]
Pr,Reducedpressure,[]
Usage:
fromiapwsimportIAPWS97
sat_steam=IAPWS97(P=1,x=1)#saturatedsteamwithknownP
sat_liquid=IAPWS97(T=370,x=0)#saturatedliquidwithknownT
steam=IAPWS97(P=2.5,T=500)#steamwithknownPandT
print(sat_steam.h,sat_liquid.h,steam.h)#calculatedenthalpies
IAPWS95
https://pypi.python.org/pypi/iapws/ 2/7
07.01.2015 iapws1.1.1:PythonPackageIndex
ClasstomodelastateforliquidwaterorsteamwiththegeneralandscientificformulationIAPWS
95
Incomingproperties:
T,Temperature,K
P,Pressure,MPa
rho,Density,kg/m3
v,Specificvolume,m3/kg
h,Specificenthalpy,kJ/kg
s,Specificentropy,kJ/kgK
x,Quality,[]
l,OptionalparametertolightwavelengthforRefractiveindex,mm
rhoandvareequivalent,onlyonecanbedefinedDefinitionsoptions:
T,P(Notvalidfortwophasesregion)
T,rho
T,h
T,s
T,u
P,rho
P,h
P,s
P,u
rho,h
rho,s
rho,u
h,s
h,u
s,u
T,x(Onlyfortwophasesregion)
P,x(Onlyfortwophasesregion)Veryslow
Properties:
P,Pressure,MPa
Pr,Reducedpressure,[]
T,Temperature,K
Tr,Reducedtemperature,[]
x,Quality,[]
v,Specificvolume,m/kg
rho,Density,kg/m
h,Specificenthalpy,kJ/kg
s,Specificentropy,kJ/kgK
u,Specificinternalenergy,kJ/kg
g,SpecificGibbsfreeenergy,kJ/kg
a,SpecificHelmholtzfreeenergy,kJ/kg
cp,Specificisobaricheatcapacity,kJ/kgK
cv,Specificisochoricheatcapacity,kJ/kgK
cp_cv,Heatcapacityratio,[]
w,Speedofsound,m/s
Z,Compressionfactor,[]
fi,Fugacitycoefficient,[]
f,Fugacity,MPa
https://pypi.python.org/pypi/iapws/ 3/7
07.01.2015 iapws1.1.1:PythonPackageIndex
gamma,Isoentropicexponent,[]
alfav,Thermalexpansioncoefficient(Volumeexpansivity),1/K
kappa,Isothermalcompressibility,1/MPa
alfap,Relativepressurecoefficient,1/K
betap,Isothermalstresscoefficient,kg/m
betas,Isoentropictemperaturepressurecoefficient,[]
joule,JouleThomsoncoefficient,K/MPa
Gruneisen,Gruneisenparameter,[]
virialB,Secondvirialcoefficient,m/kg
virialC,Thirdvirialcoefficient,m/kg
dpdT_rho,Derivatives,dp/dTatconstantrho,MPa/K
dpdrho_T,Derivatives,dp/drhoatconstantT,MPam/kg
drhodT_P,Derivatives,drho/dTatconstantP,kg/mK
drhodP_T,Derivatives,drho/dPatconstantT,kg/mMPa
dhdT_rho,Derivatives,dh/dTatconstantrho,kJ/kgK
dhdP_T,Isothermalthrottlingcoefficient,kJ/kgMPa
dhdT_P,Derivatives,dh/dTatconstantP,kJ/kgK
dhdrho_T,Derivatives,dh/drhoatconstantT,kJm/kg
dhdrho_P,Derivatives,dh/drhoatconstantP,kJm/kg
dhdP_rho,Derivatives,dh/dPatconstantrho,kJ/kgMPa
kt,IsothermalExpansionCoefficient,[]
ks,AdiabaticCompressibility,1/MPa
Ks,Adiabaticbulkmodulus,MPa
Kt,Isothermalbulkmodulus,MPa
Hvap,Vaporizationheat,kJ/kg
Z_rho,(Z1)overthedensity,m/kg
IntP,Internalpressure,MPa
invT,Negativereciprocaltemperature,1/K
hInput,Specificheatinput,kJ/kg
mu,Dynamicviscosity,Pas
nu,Kinematicviscosity,m/s
k,Thermalconductivity,W/mK
sigma,Surfacetension,N/m
alfa,Thermaldiffusivity,m/s
Pramdt,Prandtlnumber,[]
epsilon,Dielectricconstant,[]
n,Refractiveindex,[]
v0,IdealgasSpecificvolume,m/kg
rho0,IdealgasDensity,kg/m
h0,IdealgasSpecificenthalpy,kJ/kg
u0,IdealgasSpecificinternalenergy,kJ/kg
s0,IdealgasSpecificentropy,kJ/kgK
a0,IdealgasSpecificHelmholtzfreeenergy,kJ/kg
g0,IdealgasSpecificGibbsfreeenergy,kJ/kg
cp0,IdealgasSpecificisobaricheatcapacity,kJ/kgK
cv0,IdealgasSpecificisochoricheatcapacity,kJ/kgK
cp0_cv,IdealgasHeatcapacityratio,[]
gamma0,IdealgasIsoentropicexponent,[]
Usage:
fromiapwsimportIAPWS95
sat_steam=IAPWS95(P=1,x=1)#saturatedsteamwithknownP
sat_liquid=IAPWS95(T=370,x=0)#saturatedliquidwithknownT
steam=IAPWS95(P=2.5,T=500)#steamwithknownPandT
https://pypi.python.org/pypi/iapws/ 4/7
07.01.2015 iapws1.1.1:PythonPackageIndex
print(sat_steam.h,sat_liquid.h,steam.h)#calculatedenthalpies
IAPWS06forIceIh
ThereistooimplementedafunctiontocalculatepropertiesoficeIhfrom2009revision,inthis
caseonlylettemperatureandpressureasinputforcalculateproperties,thefunctionreturnadict
withpropertiesavailable:
P,Pressure,MPa
T,Temperature,K
v,Specificvolume,m/kg
rho,Density,kg/m
g,SpecificGibbsfreeenergy,kJ/kg
a,SpecificHelmholtzfreeenergy,kJ/kg
h,Specificenthalpy,kJ/kg
u,Specificinternalenergy,kJ/kg
s,Specificentropy,kJ/kgK
cp,Specificisobaricheatcapacity,kJ/kgK
alfa,Cubicexpansioncoefficient,1/K
beta,Pressurecoefficient,MPa/K
kt,Isothermalcompressibility,MPa
ks,Isentropiccompressibility,MPa
Usage:
fromiapwsimport_Ice
ice=_Ice(273.15,0.101325)#Iceatnormalmeltingpoint
print(ice["rho"])#Calculateddensity
IAPWS05forHeavywater
SamepropertiesasforIAPWS95Referencestatesetatliquidatnormalboilingpoint(1atm)
Usage:
fromiapwsimportD2O
sat_liquid=D2O(T=370,x=0)#saturatedliquidwithknownT
print(sat_liquid.h)#calculatedenthalpy
IAPWS08forseawater
Incomingproperties:
T:Temperature,K
P:Pressure,MPa
S:Salinity,kg/kg
SistheReferenceCompositionSalinityasdefinedinMillero,F.J.,R.Feistel,D.G.WrightandT.J.
McDougall,"ThecompositionofStandardSeawaterandthedefinitionoftheReference
CompositionSalinityScale",DeepSeaRes.I55,50(2008).
Calculatedproperties:
T:Temperature,K
P:Pressure,MPa
rho:Density,kg/m
v:Specificvolume,m/kg
https://pypi.python.org/pypi/iapws/ 5/7
07.01.2015 iapws1.1.1:PythonPackageIndex
h:Specificenthalpy,kJ/kg
s:Specificentropy,kJ/kgK
u:Specificinternalenergy,kJ/kg
g:SpecificGibbsfreeenergy,kJ/kg
a:SpecificHelmholtzfreeenergy,kJ/kg
cp:Specificisobaricheatcapacity,kJ/kgK
gt:DerivativeGibbsenergywithtemperature,kJ/kgK
gp:DerivativeGibbsenergywithpressure,m/kg
gtt:DerivativeGibbsenergywithtemperaturesquare,kJ/kgK
gtp:DerivativeGibbsenergywithpressureandtemperature,m/kgK
gpp:DerivativeGibbsenergywithtemperaturesquare,m/kgMPa
gs:DerivativeGibbsenergywithsalinity,kJ/kg
gsp:DerivativeGibbsenergywithsalinityandpressure,m/kg
alfa:Thermalexpansioncoefficient,1/K
betas:Isentropictemperaturepressurecoefficient,K/MPa
kt:Isothermalcompressibility,1/MPa
ks:Isentropiccompressibility,1/MPa
w:SoundSpeed,m/s
mu:Relativechemicalpotential,kJ/kg
muw:ChemicalpotentialofH2O,kJ/kg
mus:Chemicalpotentialofseasalt,kJ/kg
osm:Osmoticcoefficient,[]
haline:Halinecontractioncoefficient,kg/kg
Usage:
fromiapwsimportSeaWater
state=SeaWater(T=300,P=0.101325,S=0.001)#Seawaterwith0.1%Salinity
print(state.cp)#Getcp
File Type PyVersion Uploadedon Size
iapws1.1.1.tar.gz(md5) Source 20141114 83KB
Downloads(AllVersions):
31downloadsinthelastday
135downloadsinthelastweek
634downloadsinthelastmonth
Author:jjgomera
HomePage:https://github.com/jjgomera/iapws
License:gplv3
Categories
DevelopmentStatus::5Production/Stable
IntendedAudience::Education
IntendedAudience::Science/Research
License::OSIApproved::GNUGeneralPublicLicensev3(GPLv3)
NaturalLanguage::English
OperatingSystem::OSIndependent
ProgrammingLanguage::Python
Topic::Scientific/Engineering
Topic::Scientific/Engineering::Chemistry
Topic::Scientific/Engineering::Physics
Topic::SoftwareDevelopment::Libraries::PythonModules
https://pypi.python.org/pypi/iapws/ 6/7
07.01.2015 iapws1.1.1:PythonPackageIndex
PackageIndexOwner:jjgomera
DOAPrecord:iapws1.1.1.xml
https://pypi.python.org/pypi/iapws/ 7/7