Você está na página 1de 95

ProdeProperties

Propertiesofpurefluidsandmixtures

UsersManualrel.1.2

PRODE

www.prode.com

Contents
Licenseagreement .......................................................................................................................................................................... 3 Customersupport ............................................................................................................................................................................ 3 Introduction ...................................................................................................................................................................................... 4 Whatsnew ...................................................................................................................................................................................... 5 Installingtheprogram ....................................................................................................................................................................... 7 ProdePropertiesQuickStart ........................................................................................................................................................... 8 Datafilesfolder ................................................................................................................................................................................ 8 GettingStartedfromMicrosoftExcel ................................................................................................................................................ 9 GettingstartedfromMATLAB ......................................................................................................................................................... 34 GettingstartedwithMicrosoftNET(VB,C)applications ................................................................................................................ 37 Solvingproblems(introduction) ...................................................................................................................................................... 39 Workingwitharchives,saveandloaddata,defaultsettings ........................................................................................................... 40 Propertieseditor ............................................................................................................................................................................ 40 Streamoperating ........................................................................................................................................................................... 41 PredefinedFlashOperations ......................................................................................................................................................... 42 StreamComposition ...................................................................................................................................................................... 43 StreamModels ............................................................................................................................................................................... 44 BIPs ............................................................................................................................................................................................... 45 ConfigUnits .................................................................................................................................................................................. 46 ConfigSettings .............................................................................................................................................................................. 47 Chemicalsdata .............................................................................................................................................................................. 48 ChemicalsSettings ........................................................................................................................................................................ 49 Regressrawdata .......................................................................................................................................................................... 50 BinaryInteractionParameters(BIP) ............................................................................................................................................... 51 RegressVLE-LLE-SLEdata .......................................................................................................................................................... 52 AccessingProdePropertieslibrary ............................................................................................................................................... 55 Translateresourcestodifferentlanguages ..................................................................................................................................... 56 MicrosoftApplicationsandStrings .................................................................................................................................................. 56 Definemodels,compatibilitywitholdverions ................................................................................................................................. 56 Unitsofmeasurement .................................................................................................................................................................... 57 IntroducingProdePropertieslibrarymethods ................................................................................................................................. 58 Methodsforthermodynamiccalcs ................................................................................................................................................ 58 Methodsforstreamsdataaccess ................................................................................................................................................ 60 Methodsforstreamsdefinition ...................................................................................................................................................... 64 Methodstodefinestreamsoperatingconditions ............................................................................................................................ 66 Copyofstreams ............................................................................................................................................................................ 66 Methodsforsolvingstagedcolumns .............................................................................................................................................. 67 MethodsforReactors .................................................................................................................................................................... 69 Methodsforfluidflowproblems ...................................................................................................................................................... 70 MethodsforHydratesphaseequilibria ............................................................................................................................................ 70 MethodsforsolvingaPolytropicoperation ...................................................................................................................................... 70 Methodsforreliefvalvesdesign/rating .......................................................................................................................................... 71 Methodsforcalculatingequilibriumlinesinphasediagrams ........................................................................................................... 72 Methodsfordirectaccesstoproperties(F,H,S,V)andderivatives(T,P,W) ...................................................................................... 73 Extendedmethodsforaccessingstreamsproperties .................................................................................................................... 74 Methodsforchemicalsfileaccess ................................................................................................................................................ 76 Methodstoset/accessstreamsnames ...................................................................................................................................... 78 Methodstoset/accessdifferentoptions ....................................................................................................................................... 79 CodesusedinProdelibrary ........................................................................................................................................................... 79 Methodstodefinethermodynamicmodels .................................................................................................................................... 81 Methodstocontrolerrorsmessages ............................................................................................................................................. 82 Methodsforaccessingdata-editingwindows ................................................................................................................................. 82 Methodstoload/savearchives ..................................................................................................................................................... 82 Methodsforaccessing/definingtheunitsofmeasurement ........................................................................................................... 83 Additionalmethods ......................................................................................................................................................................... 83 Applicationexamples ..................................................................................................................................................................... 84 Howtodefinedirectlyastream(withoutaccessingthePropertiesEditor) ...................................................................................... 85 Howtosaveandrestorestreamsto/fromafile ............................................................................................................................ 86 Errormessages ............................................................................................................................................................................. 87 Calculationbasis ........................................................................................................................................................................... 88 Limitsinthermodynamiccalcs ...................................................................................................................................................... 88 ChemicalsFileformat ................................................................................................................................................................... 89 Sourcesofdata ............................................................................................................................................................................. 92 ComparingProdePropertiesresultsagainstthoseofdifferentprocesssimulators ........................................................................ 92 Models ........................................................................................................................................................................................... 93 UNIFACfunctionalgroups .............................................................................................................................................................. 94

Licenseagreement
AgreementmadebetweenProde"Prode"and"User". Prodeistheowneroftheproduct"ProdeProperties"including,butnotlimitedto,dynamiclinklibraries,staticlibraries,header files,sampleprograms,utilityprograms,togetherwiththeaccompanyingdocumentationcollectivelyknownasthe"software", Userdesirestoobtaintherighttoutilizethesoftware,thepartiesherebyagreeasfollows Personallicense Aversionwithlimitedfeaturesisavailableforpersonaluseathomeorineducationalestablishmentsforteachingpurposes,allother applications,withoutfirstobtainingacommerciallicensefromProde,areexpresslyprohibited. Commerciallicense UponfullpaymentofthelicensefeetheUserhasfullrighttoutilizethepurchasednumberofunitsofthesoftware,aunitisdefinedas onecopyofthesoftwareoranyportionthereofinstalledononestand-alonecomputer,fornetworkedcomputersoneunitshallbe appliedforeachuserhavingconcurrentaccessandoneunitshallbeappliedfortheserver. Forallapplications Prodegrantsthenonexclusive,nontransferablerighttousethesoftware. UserhasaroyaltyfreerighttoreproduceanddistributethesoftwareasavailablefromProdeInternetserver(personallicence) providedthatUserdoesntremoveoralteranypartofthesoftwareorofthelicensingcodesandthreatthesoftwareasawholeunit. Youcannotdecompile,disassembleorreverseengineerthefilescontainingthelicensedsoftware,oranybackupcopy,in wholeorinpart. Youcannotrent,leaseorsublicensetheLicensedSoftwarewithoutexpressagreementbyProde. Thesoftwareisprovidedasis,whereis,Prodedoesnotwarrantthatsoftwareisfreefromdefects,orthatanytechnicalor supportservicesprovidedbyProdewillcorrectanydefectswhichmightexist. Prode shall not be liable for any damages that may result directly or indirectly from the use of these software programs includinganylossofprofits,lossofrevenues,lossofdata,oranyincidentalorconsequentialdamagesthatmayariseoutofuseof thesesoftware. YourlicenseiseffectiveuponyouracceptanceofthisagreementandinstallingtheLicensedSoftware. ThislicenseagreementshallremainineffectuntiltheLicensedSoftwarewillbeinuse. YoumayterminateitatanytimebydestroyingtheLicensedSoftwaretogetherwithallcopies.Itwillalsoterminateifyoufailto complywithanytermorconditionofthisAgreement.YouagreeuponsuchterminationtodestroyallcopiesoftheLicensedSoftware inanyforminyourpossessionorunderyourcontrol.

Customersupport
Prodewillprovidethelicenseewithlimitedtechnicalsupportbytelephone,orbyelectronicmediaforaperiodof60daysafter deliveryoftheproduct.

HowtocontactProde
youcancontactProdebyphone,webpageoremail,thedetailsareavailableathttp://www.prode.com

Howtoobtaintechnicalsupport
wewelcomeyourcommentsorsuggestionsaboutourprogram.Onrequestwewillalsoprovideinformationontheinternalmethods used.Whiletheprogramhasbeentestedcarefullytoensureproperoperation,itstillmaybepossibleforanunusualsituationto resultinanerror.Wewillhaveamuchgreaterchanceoffixingorassistingwitherrorsandproblemsiftheyareprovidedtousina formthatisrepeatable. Inreportingaproblemtous,thefollowinginformationshouldbegiven: customerreference theversionofthesoftware acopyoftheprocedureyouarerunningandifpossibletheinputdata adetaileddescriptionofwhatyouweredoing(sequenceofoperations)whentheproblemoccurred anyadditionalinformationyouthinkmaydescribetheproblem

Introduction
ProdePropertiesincludesacomprehensivecollectionofprocedurestosolveproblemssuchas: PhysicalPropertiesData Heat/MaterialBalance ProcessSimulation ProcessControl EquipmentDesign Separations InstrumentDesign Andmore....

Technicalfeaturesoverview
Entirely written in C++ from the origin Properties for Windows (different versions for Android, Linux etc. are available) is releasedinformofDynamicLibrary(DLL,ActiveX)fordirectaccessfromWindowsapplications(MicrosoftExcel,,VisualStudio applicationsincludingNET,Borlandapplications,MATLAB,MathCadetc.). WindowsXP,WndowsVista,Wndows7etc. supportforupto500differentstreamswithupto100componentsperstream(usercanredefine) SeveralcompilationsofchemicaldataandBIPsareavailable,theusercanaddnewcomponentsandBIPs Comprehensivesetofthermodynamicmodels:Regular,Wilson,NRTL,UNIQUAC,UNIFAC,Soave-Redlich-Kwong,PengRobinson,BWRS,SteamTables(IAPWS1995),LeeKeslerPlocker,AGA(ISO20765);GERG(ISO18453);GERG(2008);Hydrates (VDW-Platteeuw),modelswhichincludeassociationcontributeCPASRK,CPAPR,PC-SAFT,EOSmodelswithdifferentmixing rules(vanderWaals,HuronVidal,WongSandleretc.) Functionsforthermodynamiccalcs(enthalpy,entropy) Acompletesetofflashoperations:isothermal(specifiedtemperatureandpressure)isentropic(specifiedpressureortemperature andentropy)adiabatic(specifiedpressureortemperatureandenthalpy)isochoric(specifiedpressureortemperatureandvolume) constantenergy,phase-fraction... Functionsforcalculatingspecificpropertiesofmixtures(criticalpoint,Cricodentherm,Cricondenbar,cloudpointetc.) Functionswhichcalculatesvaluesandderivativesoffugacities,enthalpy,entropy,volumevs.temperature,pressure, composition Functionswhichreturnequilibriumlinesatspecifiedphasefractions(generationofphasediagrams) Functionsforsimulatingoperatingblocksasmixer,gasseparator,liquidseparator,distillationcolumn,compressor,pipe Functionsforcomponentpropertyaccess(fromdatabase) Functionsforstreampropertycalcs(density,conductivityandviscosityforbothgaseousandliquidphase,surfacetension, speedofsound,JouleThomsonetc.)

DynamicLinkLibraries
Adynamic-linklibraryisabinaryfilethatactsasasharedlibraryoffunctionsthatcanbeusedsimultaneouslybymultipleapplications. theselibrariesarecompatiblewithalmostallMicrosoftWindowsapplicationsandbeingcompiledcodetheyrunveryfast.Theyalso integratetightlywithyourapplication,allowingittorunasanautonomousprogramunitratherthanbeingdependentonexternal modulesofadifferentapplication. ProdePropertiesincludesfileI/O,graphicalinterfacesetc.foratotalofabout180000linesofcode,allthecode(compiledwithlast versionofMicrosoftC++compiler)residesinalibrary,ppp.dllofabout7Mbytes,itsaverycompactandefficientcode,easyto distributewithyourapplication.

ReferenceLiterature
AlthoughProdePropertiesmayappeareasytoutilizealsotopeoplewithoutabackgroundinchemicalengineeringabasicknowledge inthisareaisusefulforselectingthepropermethodsandcriticallyevaluatetheresults.Therearegoodbooksavailable,wewould suggestsometitles: IntroductiontoChemicalEngineeringThermodynamics,Smith,VanNess,Abbott,McGraw-Hill ChemicalandEngineeringThermodynamics,Sandler,Wiley ThePropertiesofGases&Liquids,Reid,Prausnitz,Poling,McGraw-Hill

Whats new
Release1.1 [1994] FirstversionofProdeProperties(authorRobertoParon)aspartofProdeCalculator,atooldistributedsince1994 Release1.1f [1995] UpdatedtheUNIFACmodel,includeddifferentoptionsforcalculatinggasfugacitywithliquidactivitymodels. Release1.1g [1996] UsercandefineunitsofmeasurementviaedCS()method. Release1.1g1 [1996] Addedasetofextendedfunctionsfordirectaccessfromspreadsheets,readtheparagraphAccessingPropertiesfromspreadsheets cellsforadditionalinformation. Release1.1h [1996] Includedaprocedurefordefiningthepathtotheworkingdirectoryofprogram,nowthefileProperties.dllcanresideinthesystem directoryofWindowswhiletheotherfilesonadifferentdirectory.Modifiedthelicensingscheme,theuserreceivesasignaturefile, thispermitstodistributethesoftwareviainternet. Release1.1h1 [1997] Revisedthebaseclassformanagingmemory,nowtheuserscanspecifythenumberofstreams,thenumberofcomponentsper stream,thenumberofcomponentsindatabaseetc.,additionalinformationonparagraphConfigureProperties. Release1.1h2 [1997] IncludedtheprocedureedST()whichpermitstodefinethetitlewhenaccessingtheStreamsdialog,includedproceduresfordefining viasoftwaretheunitsofmeasurement,modifiedmethodssetKM(),getKM(). Release1.1i [1998] Newinstallationprocedure. Release1.12 [1999] NewmethodsStrSGH(),StrSLH(),StrSGS(),StrSLS(),StrmCopy(). Release1.13 [2002] NewmethodsAOpen,ASave,editSS,StrN,MStrN,putN,MputN,getSUMS(),MgetSUMS() Release1.14 [2002] NewmethodsStrHC,StrFML,StrFMH,EStrHC,EStrFML,EStrFMH Release1.15 [2005] NewmethodsgetOM,setOM Release1.161-5[2009] upgradeddialoginterface Release1.17[2010] includedmethodPIPE Release1.18[2010] includedmethodsHPFORM,HTFORM Release1.2[2012] maintenanceversionforportingindifferentplatforms

Featuresavailablevs.Versions
Databasewithmorethan1600chemicals Databasewithmorethan25000BIPs SRK,PR(vdWmixingrules) SRK,PR(WSmixingrules) LKP,BWRS,GERG,AGA,SteamTables UNIFAC,UNIQUAC,NRTL,Wilson CPA(withassociation) SolidSolutionModel SRK,PR(HVmixingrules) SRK,PR(MHVmixingrules) SAFT(withassociation) GERG(2008) BWR Pitzer,NRTL(electrolytes) Derivativesvs.P,T,WofFg,H,S,V Propertiesoffluidsandmixtures VaporLiquidsolidisothermalflashoperation VaporLiquidPf-T,Pf-Pflashoperations VaporLiquidsolidH-P,S-P,V-Pflashoperations VaporLiquidsolidH-T,S-T,V-Tflashoperations Vapor-Liquidphasediagram Vapor-Liquid-Liquidphasediagram Vapor-Liquid-Solidphasediagram VLE-LLE-SLEdataregression Rawdataregressionutility Characterizationofpetroleumfractions Hydrateformation(basic) Hydrateformation(multiphase) Multiphase(gas,liquid)pipelinewithheattransfer IsentropicnozzleHEM.HNE IsentropicnozzleHNE-DS,NHNE Polytropicstage,singlephase(gas) Polytropicstage,multiphase(gas+liquid) Distillationcolumn(gas-liquid) Distillationcolumn(gas-liquid-liquidandliquid-liquid) Depressuringunit(blow-down) Reactions (*)simplifiedprocedureswithlimitedfeatures
6

Personal

Base
x x

Extended
x x x x x x x x E1 E1 E1 E1 E1 E1

x x x x x x

x x x x x x

x x x x x x x x x x x x(*) x x

x x x x x x x x E2

x x

x x

x x E2

x(*)

x E2 E2

x E2

x x

x x x E3 E3 E3

x(*)

Installing the program


thisparaghaphprovidesinformationaboutsystemrequirements,proceduresoninstallingProdePropertiessoftwareand upgradingfrompreviousversions.

Sistemrequirements
MicrosoftWindows2000,XP,Vistaorlatercompatiblesystem 100MBofRAMinstalled(ifusedinunionwithMicrosoftExcelorotherapplicationsconsider200MBormore) 8MBofavailablehard-diskspace

Installationprocedure
1)downloadthelastversionoftheprogramfromProdeserver: http://www.prode.com 2)iftherearepreviousinstallationsofProdePropertiesuninstallthepreviousversion 3)runtheprogram,theautomaticinstallationprocedurewilldotheworkforyou,followtheon-screeninstallationinstructions note:insomeoperatingsystemyoumustbeloggedasauserwithadministrativeprivilegestomakethenecessarychanges,ifyou donothaveadministrativeprivileges,contactyoursystemadministratorforassistance.

TouninstallaProdePropertiesinstallation
UsetheAdd/RemoveProgramsutilityintheWindowsControlPanel,theproceduredoesalltheworkforyou.

Obtainthelicence
ProdePropertiesiscopy-protected,yourpersonalcopyhaslimitedfeaturesandtoaccessallthefeaturesyoumustobtainalicence fromProde,thereareseveraltypesoflicence softwarecopyprotection(distributionviaemail,installationonasinglecomputeridentifiedbyaninstallationcode)

hardware(dongle)copyprotection(weshipthedongle,installationonsingleormultiplecomputers) networkinstallation

Order a software copy protection licence thelicencefileisbasedontheinstallationcodewhichtheprogramgeneratesautomatically. RunanapplicationswhichdoesaccessProdePROPERTIES,onceinthePropertieseditorthelicencepage willshowtheinstallationcodeID(seebelow,itsthestringIGSGH2) whenplacingtheorder,specifytheinstallationcode

Orderahardwarecopyprotectionlicence
Thereareversionsforstand-alonecomputerandnetwork-connectedcomputers,pleasecontactProdefordetails 7

ProdePropertiesQuickStart
WithProdePropertiesyoucansolvecomplexproblemswithonlyminorprogrammingeffort.Muchofthefunctionalityisprovidedby thelibrary.InthischapteryouwilllearnstepbystephowtoaccessPropertiesfromyourfavouriteapplication.Thischapterisfor thoseofyouthatwanttoskipthetutorialandimmediatelystartusingProperties.Inthefollowingsections,youwilllearnhowto utilizethesamplesprovidedwithProperties.Whenyourunthesamplesyouwillgetabroadoverviewofthepossibilitiesavailable fromusingProperties,youwillnoticethefollowingfeatures: ThePropertieseditorpermitsasimpleandquickaccessandeditingofalldataincludingstreams,units,databases. Theusercandefineoneachdifferentstream:compositions,operatingconditions,BIPs,thermodynamicmodelsperproperty (fugacity,enthalpy,entropy,volume) ThePropertieslibrarysolvesproblemsasmultiphaseequilibrium,criticalpointsetc. Specificmethodsareprovidedfordiagnostic/errormessages Resultsofflashoperations,transportpropertiesetc.canberetrievedeasilyintoyourapplication

Locatingandtestingthesamplefiles
Asdefaultthesamplefiles,includingdatafiles,projectfiles,andotherassociatedfilesaresuppliedwiththeprogramandplacedin subdirectoriesunderProdemaindirectory. MPORTANT Theinstallationprocedurecreatesadirectory\Prode\anddifferentsubdirectories \Prode\C \Prode\Excel \Prode\MATLAB \Prode\Fortran \Prode\NET\VBprops \Prode\NET\C#-props includesdefinitionsandcodeforC/C++applications includessamplesforMicrosoftExcel includesdefinitionsandcodeforMATLABapplications includesdefinitionsandsamplecodeforFortranapplications includesdefinitionsandsamplesforMicrosoftNETVBapplications includesdefinitionsandsamplesforMicrosoftNETC#applications

Datafilesfolder
IMPORTANT WhenrunningPropertiesrequirestoaccessseveralfiles,theseareplacedinadirectory\Prode\inuserspacetoavoidpossible conflictswithcodereservedareas,theexactpathdependsfromWindowsversionandsettings,forexampleinWindowsXPthey couldbeplacedinC:\DocumentsandSettings\AllUsers\ApplicationData,thelistoffilesincludes chem.dat bips.dat def.ppp res.lan lic.dat ......... donotremoveorrenamethesefiles,ifProdePropertiescannotaccessthesefiles(forexamplebecausetheyhavebeendisseminated indifferentdirectories)anerrormessageCorruptedfile,errorreadingdatafilewillbegenerated.

GettingStartedfromMicrosoftExcel
IMPORTANTMicrosoftExcel32or64bitsrequiredifferentversionsofProdelibrary,theinstallationprocedureinstalls automaticallythe32bitsversionoflibraryinWindows32andthe64bitsversioninWindows64, forExcel32bitsworkingonWindows64bitsyoumustreplacethefileppp.dllinWindows\System withthe32bitsversionincludedwithdistributionfilesinfolder\Prode\LIB\32. IMPORTANTMicrosoftExcelsupportfilesarelocatedinthedirectory\Prode\Excel IMPORTANTasfirststepyoumustloadtheadd-in(fileproperties.xla)whichinstructsExcelaboutProdePropertieslibrary,you needtogothroughthisprocedureonlyonce,toloadtheadd-in Excel2003 open Excel and choose theTools/Add-ins menu item, youll see a list of add-ins, some checked, some not checked. If Prode Propertiesisntlisted(anditwontbeunlessyouwentthroughthisprocedureearlier)browsefortheproperties.xlafileinExcelfolder thenbackyourwayout.NowProdePropertiesshouldbelistedinthelistofadd-ins,itsboxshouldbechecked,andyoushouldsee aProdePropertiesmenuinExcel.IfyoucloseExcelandthenreopenitProdePropertiesmenumuststillbethere.Onceyou installedtheadd-inyou'llbeabletoaccessProdePropertiesfromwithinExcel(seebelow) Excel 2007 and more recent versions openExcelandchooseExcelOptionsitem,thenAdd-Ins,onthebottomselectManageExcelAdd-InsandclickGo,youllseealist ofadd-ins,somechecked,somenotchecked.IfProdePropertiesisntlisted(anditwontbeunlessyouwentthroughthisprocedure earlier)browsefortheproperties.xlafileinExcelfolderthenbackyourwayout.NowProdePropertiesshouldbelistedinthelistof add-ins,itsboxshouldbechecked.IfyouclickonAdd-InsyoushouldseethePropertiesmenu(seebelow). WorkingwithExcel ThePropertiesAdd-IncreatesamenuwhichpermitsdirectaccesstoPropertiesEditor,saveandloadarchives. InExcel2003Propertiesaddsanewiteminmainmenu

InExcel2007toaccessPropertiesmenuclickonAdd-InsandthenProperties

MPORTANT Excel2003,SecurityAlertMacro whenopeningPropertiesfilesinExcel2003youmayberequestedtofixa(Macro)SecurityWarning(seebelow)issuedbyExcel

TofixtheSecurityWarningclickEnableMacroinSecurityAlertdialog Excel2007,SecurityAlertMacro whenopeningPropertiesfilesinExcel2007youmayberequestedtofixa(Macro)SecurityWarning(seebelowSecurityWarning Macroshavebeendisabled)issuedbyExcel

TofixtheSecurityWarningclicktheOptionsbuttonandselectEnablethiscontentinSecurityAlertdialog

10

IMPORTANT beforetoevaluatethesamplefilesreadtheparagraphWorkingwitharchives,saveandloaddata,defaultsettings whileworkinginMicrosoftExcelusethecommandsOpenArchiveandSaveaArchivetosaveandrestoredata AsimplewayforaccessingProdePropertiesfromExcelistousethemethodsasmacroswithinthecells,supposingwehave createdaworksheetforsolvingsomeproblemandweneedthevaluesofgasandliquiddensitiesatsomespecifiedtemperature andpressure,firstweneedtodefinethestreamandtheunits,fromPropertiesmenuselectEditPropertiestodefinecompositions andtheunitsofmeasurement.

Notice that for the first stream (for editing the different streams use the Select edit stream combo) there is a mixture of three componentsalreadydefined,youcanchangethelistofcomponentsandcompositionsfromStream->componentsandmodels fromStream->models. MPORTANT OnceyoumodifyalistofcomponentsitisrecommendedtoeditalsoModelsandBIPsdialogs,differentlyPropertiesadoptsdefault values. IfyoumodifysomethingdonotforgettoclicktheSavebuttonbeforetoeditadifferentstreamorleavingthedialog!Differently changeswillbelost.

11

oncedefinedthestreamweneedtodefinetheunitswhichwewishtoutilizeinourproblem,forthepressure(firstrow)select Bar.a,noticethatunitfortemperatureisKanddensityKg/m3(butyoucansettheunitswhichyouprefer)thenclickonOkfor acceptchangesandleavingthePropertieseditor

finallywecancalculatethedensitiesforthespecifiedmixturedirectlyinthecells,inB3weenterthemacro=EStrLD(1,B1,B2),for calculating liquid density of stream 1 at temperature specified in B1 and pressure specified in B2 ,in B4 we enter the macro =EStrGD(1,B1,B2)forcalculatingthegasdensityandinB5themacro=EStrLf(1,B1,B2)forcalculatingtheliquidfraction

InB1weenter200astemperature(rememberwehaveKasunit)andinB2weenter5aspressure(rememberwehavesetBar.a asunit),densitiesareinKg/m3,noticethatwhenyouchangeB1orB2ProdePropertiesrecalculatesthesevalues. Nowyoucanmodifythestream1(changingthelistofcomponents,thecompositionsormodels)ortheunitsofmeasurementand ProdePropertieswillcalculatethevalueofldensitiesandiquidfractionaccordingly,inthiswayisveryeasywithExceltosolvemany differentproblemsleavingtoProdePropertiesthetasktocalculateallpropertiesforpurefluidsandmixtures.

12

Nextexamplepermitstocalculatethephasefractionsandcompositionsinmultiphaseequilibria,toshowtheresultinExcelwell useapredefinedExcelpage,fromExcelmenuFile->open,inExcelfolder(inProdePropertiesinstallation)selectthefilemultiphase.xls andclickOktoloadthefile Weneedtodefineanewmixture: a)fromPropertiesmenuselectEditProperties b)inStream->Operatingdialogweselectthestreamnumber2anddefinethenameMIxture2

c)thenweselecttStream->ComponentsdialoganddefineacompositionoftwocomponentswithfollowingmolarfractionsMethane 0.9n-Hexane0.1

IMPORTANTwhenaccessingthelibraryfromanexternalprogramyoumustdefinethepropersettingsinstreamsoptionsfor multiphaseflashoperation

13

d)inStfream->ModelsdialogwedefineAPISRK(selectinpredefinedpackages)forbothgasandliquid e)wesetMultiphaseequilibriatoMultiphasevapor-liquidandMultiphaseinitializationtoStandardtests

f)thenwecaneditBIPs,wecaninputdataorloadfromdatabase

g)andfinallyinStream->OperatingdialogweclickonSavebuttontosavethestreamdata

Noticethatoncesavedthedialogshowsthefeedcompositionofthestream. Nowyoucandefine/accessdiferentstreamsastheprogramremembersyourdataforstream2 MPORTANT beforetoleavetheapplicationremembertosavealldataintothearchiveotherwaysyourchangeswillbelostreadtheparagraph Workingwitharchives,saveandloaddata,defaultsettingsforadditionalinformation

14

From the dialog Stream->Operating you can calculate a isothermal multiphase flash, select stream 2 as feed, then T-P VLL (isothermal Vapor Liquid Liquid) , enter 187 K as temperature and 40 atm.g as pressure (this is the example provided by MichelseninCalculationofmultiphaseequilibrium)thenclickonCompute,theprocedurewillcalculatetwoliquidphasesand showthecompositions

IfyouwishyoucanmodifytheunitsfromConfig->Unitsdialog,defineBar.aasunitforpressure. Noticethatwhenchangingunitsyoumustcloseandreopentheeditortoseethechanges(ineditor). TheresultsareavailabledirectlyinExcel,setstreamas2,temperatureas187Kandpressureas4154420Pa.a(40atm.g)the nclickonComputeisothermalFlashatp,t

Nowyouareabletocalculateresultsatdifferentoperatingconditions.

15

Altoughaslowprocessmultiphaseanalysispermitstodiscoverinstabilitiesandformationofnewphases,examinetheisothermal flashat150K10Bar.awithAPISRKasmodelandamixtureofMethane0.7CarbonDioxide0.15HydrogenSulfide0.15,thisisthe Mixture1providedasexample. a)fromPropertiesmenuselectEditProperties, b)inStream->Operatingdialogselectthestreamnumber1,labelMIxture1 c)InStream->Componentsverifythecomposition(Methane0.7CarbonDioxide0.15HydrogenSulfide0.15) d)InStream->Modelsweverifythatmodel(fugacity)isAPISRKforgasandliquid e)InStream->BIPsweinputBIPsorverifythatprocedureloadsBIPsfromdatabase f)inStream->ComponentsSavethestream g) set as feed stream the first (Mixture 1), as operation T-P VL (isothermal, two phases flash), as specifications 150 K for temperatureand10Bar.aforpressure,thenselectCompute

Theproceduredetectsoneliquidphase, a)defineTP-VLL(isothermalvapor-liquid-liquid)andselectCompute Nowtheproceduredetectsthreeliquidphases

16

Next example permits to calculate and graph tables of values in a range of temperatures for many different properties (liquid fraction,cp,cv,density,viscosity,thermalconductivity,speedofsound)andforbothgasandliquidphases,fordoingthiswell use a predefined Excel page, from Excel menu File->open , in Excel folder (in Prode Properties installation) select the file props.xls Ifyouwishyoucanmodifythestreamcompositionortheunitsofmeasurement,inthatcase,asbeforefromPropertiesmenu accessthePropertieseditorandmodifythepreviousdata. Thenenter(intheproperunits)thedesiredrangeoftemperatures(cellsB2-B3)andtheoperatingpressure(cellB4)andclickon computebuttontocalculatethedata,ProdePropertieswillprintthevalueswiththedesiredunitsofmeasuremebt.

17

Nextexamplewillpermitstocalculateandgraphaphasediagram(phaseenvelope),todothiswelluseapredefinedExcel page,fromExcelmenuFile->open,inExcelfolder(inProdePropertiesinstallation)selectthefilephasenv.xls Ifyouwishyoucanmodifythestreamcompositionortheunitsofmeasurement,inthatcase,fromPropertiesmenuaccessthe Propertieseditorandmodifythepreviousdata,remembertosetthesameequationofstateforgasandliquidfugacityanddont forgettosavethestream(buttonSaveinfirstdialog)beforetoclickOkandexit.Thenenterthedesiredliquidfractionforequilibrium line(cellC6)andclickoncomputebuttontocalculatethedata,ProdePropertieswillprintthecalculatedvalueswiththedesired unitsofmeasurement,herebelowanexamplewith3components

MPORTANT Theprocedureforcalculatingaphasediagramallowsdifferentsettings,youcanmodifythesesettingsfromthedialogStream>Models(inPropertieseditor)

Checkstabilityagainstfeedoptionpermitstoteststabilityofcalculatedpointsagainstfeed,unstablepointsarenotprinted,toshow allcalculatedpointschangethesettings. Phasediagram,specifiedphasefractionlines,allowstoend(orcontinue)linesaftercrossingaphaseboundary,settoend(when crossingphaseboundarylines)toavoidgeneratinglinescontaininginconsistentdata. PhasediagramcalculationoptionallowstoselecttheEOSrootforminimumGibbsenergyoraccordingthestate. Hpweverthemostimportantsettingisthemultiphaseequilibriaoprionwhichallowstocalculate 1)vapor-liquidphasediagrams(seeabove) 2)vapor-liquid-liquidphasediagrams 3)vapor-liquid-solidphasediagrams

18

Nextexamplewillshowavapor-liquid-liquidphasediagram a)InExcelloadthefilephasenv.xls b)selectthestream4,apredefinedtestcasewithanaturalgasmixtureincludingwater c)clickoncomputebuttontocalculatethedata

Noticethewaterdewpointline,theredlineontheright Nextexamplewillshowaphasedigramwithuptothreedewpointsatthesametemperature, a)InExcelloadthefilephasenv.xls b)fromPropertiesmenuselectEditProperties, c)inStream->Operatingdialogweselectthestreamnumber2,apredefinedtestcase

19

wecaneditthelistofcomponentsandthefractionofeachcomponentselectingtheStream->Componentsdialog, thismixtureincludestwocomponentswithmolarfractionsMethane0.999n-Butane0.001

wecanmodifymodelsandoptionsinStream->Modelsdialog, inthistestcaseweadoptPengRobinson(PR-VDW)forbothgasandliquidandstandardparametersforAlphafunction(SetEOS parameters)

wecaneditBIPsfromStream->BIPsdialog

Remember,ifyouhavechangedsomevalues,inStream->OperatingdialogclickonSavebuttontosavethestreamdata

20

forcanculatingthephaseenvelopefortestcase3fromExcelpagephasenv.xls enter3asstreamand0.001asliquidfractionandclickonbuttonComputephasediagram

Observethatforthismixturethedewline,theredlinebelowthecriticalpoint,showsuptothreedifferentequilibriumpointsatthe sametemperature(theareaaround190K),ifyouaddthesaturationpointonthebubbleline(blackline)wehaveatotaloffour saturationpointpressuresatagiventemperature,ProdePropertiescancalculateaccuratelyallthesepoints.

21

Prode Properties includes methods for calculating equilibrium points at specified conditions, see the paragraph Methods for thermodynamiccalcsfordetails,methodsLfPF(),LfTF()asthenamesaysarebasedonaliquidfractionspecification,they returnsthefirstpoint(alongthespecifiedliquidfractionline)atthespecifiedpressure(ortemperature).MethodsPfPF()andPfTF() can accept a gas or liquid fraction (solid fractions in extended edition) as specification, they can calculate up to 5 points (at specifiedpressureortemperature)alongthelinewithspecifiedphasefraction

doublep=PfTF(integerstream,doublet,doublepf,intstate,intn)
whichrequiresthestream,theequilibriumtemperature,thephasefraction(range0-1),thestate(gas,liquid,solid)andtheposition (1-5)oftheequilibriumpoint IncellB39wedefinethetemperatureas190.208K,thenincellsB40,B41,B42weenterthemacros =PfTF(3,B39,0,1,1) incellB40 =PfTF(3,B39,0,1,2) incellB41 =PfTF(3,B39,0,1,3) incellB42 wherethefirstvalue(3)isthestream,thesecond(cellB39)representsthetemperature,thethird(1)isthephasefraction(with1 wespecify100%gasorapointondewline,thesamewouldbebysettingthestateasliquidandphasefractionas0.0)thefourth(0) isthestate(inProperties0=gas,1=liquid,2=solid)andthelastistherequiredposition(werequirethepoints1-3alongthedew line)

theprocedurecalculatesthethreeequilibriumpoints,ifwechangethetemperatureto190.1Kwegetdifferentequilibriumpressures:

youmaywishtotestthemethodLfTF(),enterthemacro =LfTF(3,B39,0) where3isthestream,B39representsthetemperatureand0isthe(liquid)phasefraction,noticethatyoullgetthesamevaluesas forthefirstequilibriumpointinPfTF() FinallywecancalculatethepointonbubblelinewiththemethodLfTF() =LfTF(3,B39,1) where1isthespecification(100%liquid)forapointonthebubbleline, ofcourseyougetthesameresultwiththemethod =PfTF(3,B39,1,1,1) wherethethirdvalue(1)isthephasefraction(with1wespecifya100%fraction)thefourth(1)isthestate(inProperties0=gas, 1=liquid,2=solid)andthelastistherequiredpositionforthepoint

22

ProdePropertiesincludesseveralmethodsforsolvingmultiphase(vapor-liquid-solid)phaseequilibriaplusenthalpy,entropyor volumespecifications -specifiedenthalpyorentropyorvolumeandpressure -specifiedenthalpyorentropyorvolumeandtemperature -constantenergyandpressure theparagraphMethodsforthermodynamiccalcsprovidesadditionalinformation. inthisexamplewewillexaminethemethodsHPF()andSPF()whichpermittosolvetheenthalpy(HPF)orentropy(SPF)and pressurespecifications,theyreturnthetemperatureatwhichthecalculatedvalueofenthalpy(orentropy)equalsthespecified value. Thesemethodspermittosolvemanyproblems,forexample -modelheatexchangerswhereyouknowinletandoutletpressuresandheatduty -simulatevalveswhereyouknowinletandoutletpressures,usuallyvalvesaremodeledasadiabaticprocesses(dh=0) -simulatepipelineswhereyouknowinletandoutletpressuresandheatexchangedwithsurroundingenvironment -modelpumpsandcompressors,whenyouknowinletandoutletpressures Supposingwewishtosimulateaprocesstocooldownthemixturealreadyexaminedinpreviousexamples Methane CarbonDioxide HydrogenSulfide 0.15 0.7 0.15

withSoaveRedlickKwongmodel,fromthepointAinretrograderegionandnearthedewline(89Bar.aand246K tothepointBlocatedclosetothecriticalpoint

thisexamplecanrepresentagoodtestforevaluatingthestabilityandreliabilityofconvergenceinretrograderegion

23

theproblemcanbesolveddirectlyfromthefirstpageofstreamseditor

selectingtheHP-VLflashoperationonsecondgrid,thensetting89Bar.aand246Kasinletconditions,79.4Bar.aasoutletcondition and-70.553KW(-60705.3Kcal/h)asheatduty,thenegativesignmeansthatenergyissubtracted Pleasenotethatyoumustspecifythevalueofenergy(toaddorsubtract)tothetotalvalueofstreamdeterminedas specificenthalpy*massflow themassflowinthiscasehasbeenspecifiedas1.0Kg/s(seethesecondrow) ClickonComputebuttomtosolvetheproblem,theprocedurecalculatesanoutlettemperature(seethesecondrow)of232.5K Thispointisveryclosetothecritical,locatedat79.396Bar.aand232.39K AsalternativeyoucansolvetheprobleminExcelwithtwooperations, asfirstoperationincellB5enterEstrH(stream,p,t)todefinetheinitialconditionsforstream1at89Bar.aand246Kandcalculate theenthalpy =EstrH(1,$B2,$B1)+$B4 where1isthestream,B2istheoperatingtemperature,B1theoperatingpressureandB4representstheadditionalduty

thenwithHPF()youcalculatethefinaltemperatureatspecifiedenthalpy(theinitialenthalpycalculatedat89Bar.aand246Kplusorminus-thespecifiedheatduty) =HPF(1,$B3,$B5,0.0) where1isthestream,B3istheoutletpressure,B5therequiredheatdutyand0.0istheestimatedfinaltemperature(setto0.0for automaticinitialization)

thecalculated(outlet)temperatureisthesame(232.5K)ofthatcalculatedonfirstpageofstreamseditorbutadistinctadvantage ofHPF()methodisthepossibilitytospecifyainitialtemperatureasestimate,thiscanbeusefultoselectthedesiredsolutionwhen asetofmultiplesolutionsispossible(forexampleinretrograderegion). ProdePropertiescansolvemultiphaseequilibria(vapor,liquid,solid)atspecifiedvalueofenthalpy,entropy,volumeandpressure(or temperature) innextexamplewemodelapressurereducingvalve(adiabatic24 process),thestreamhascomposition0.982Methane0.018CO2, thevalvereducesthepressurefrom200K37Bar.a(inletconditions)downto1.72Bar.a. Wewishtoinvestigateifatoutletconditionsasolidphaseispresent.

Asfirststepwedefineanewstreamwithcomposition0.982Methane0.018CO2, Onfirstpage(Operating)weselect(firstrow)thestreamnr.10

Onsecondpage(Composition)wedefinethecomposition 0.982Methane 0.018CO2,

Onthirdpage(Models)weselectthepredefinedpackageSoaveRedlichKwongExtended theextendedmodelsavailableinProdePropertiesincludeparameterscalculated(dataregression)forbestfittingofvaporpressure, enthalpyandliquidvolumeofpurefluids.

infourthpage(BIPS)clickonbuttonGetBIPsfromdatabasetoloadBIPs

25

WecanmodelthepressurereducerwiththepredefinedH-PVLSoperation,thisopetrationsolvesamultiphaseflashatspecified pressureandenthalpy. Onfirstpage -clickonbuttonSavetodefinethenewstream10 -insecondgridselectthestream10 -selecttheH-PVLSoperation -define200Kand37Bar.aasinletconditions -define1.72Bar.aasoutletpressure -define0asdh(adiabaticflash) -clickonbuttonComputetogettheresults

theprocedurecalculatesanoutlettemperatureof157.45Kat1.72Bar.a,thereisasolidphase(mainlycomposedbyCO2) Wecancomparetheseresultsagainstvapor-solidequilibriadata Experimentaldata(vapor-solidequilibria) 158.12K,1.72Bar.a Calculatedvalues 157.45K,1.72Bar.a Wecanexamineadifferentcase -define15.72Bar.aasoutletpressure -clickonbuttonComputetogettheresults

theprocedurecalculatesanoutlettemperatureof175.6Kat15.72Bar.a,thereisasolidphase(mainlycomposedbyCO2) Wecancomparetheseresultsagainstvapor-solidequilibriadata Experimentaldata(vapor-solidequilibria) 176.04K,15.72Bar.a Calculatedvalues 175.6K,15.72Bar.a

26

Innextexampleweestimatethe(initial)dischargingtemperatureofafluidcontainedinavesselprotectedbyasafetyvalve,the blockvalveshavebeenclosedandthefluidheated(atconstantvolume), themixtureisthatalreadyexaminedinpreviousexamples Methane CarbonDioxide HydrogenSulfide 0.15 0.7 0.15

withSoaveRedlickKwongmodel,theoperatingconditionsare60Bar.aand225K thedischargingpressureis78Bar.a themethodEStrV()incellB3allowstodefinetheoperatingconditionsandtocalculatethespecificvolume =EStrV(1,$B2,$B1) where1isthestream,B2istheinlettemperatureandB1istheinletpressure

tocalculatetheOutlettemperaturefortheisochoricprocessincelllB5weenter =VPF(1,$B4,$B3,0) where1isthestream,B4isthefinalpressure,B3therequiredspecificvolume(equaltoinletvolume)and0.0theestimatedfinal temperature(thevalue0.0meanswerequiretheautomaticinitialization)

IMPORTANTduetothecallingmechanismofMicrosoftExcelinsomecasesProdePropertiesmayreturna0.0valueevenwhen asolutionisavailable,inthosecasesyoucangetthecorrectresultsbyforcingthecellrecalcwiththeEnterkey

27

Innextexampleweestimatethedischargetemperatureandthepowerabsorbedbyasinglestagecompressorwithdetermined adiabaticefficiency,thetheoreticalpowerrequirementscanbecalculatedas (enthalpyatoutletconditions-enthalpyatinletconditions)/mechanicalefficiency Theoutlettemperatureiscalculatedwithfoursteps, a)modelthecompressorasisentropicprocessandcalculatethefinaltemperature b)calculatethefinalenthalpyfortheisentropicprocess c)calculatetheoutletenthalpyas outletenthalpyfortheisentropicprocess-enthalpyatinletconditions outletenthalpy= enthalpyatinletconditions+-----------------------------------------------------------------------------------------------adiabaticefficiency d)calculatetheoutlettemperatureatgivenoutletenthalpy Thespecificationsaremassflow1Kg/s,fluidMethane0.999,n-Butane0.001(thisistheTestcase2)tocompressfrom10Bar.a, 203Kto20Bar.a,weassume0.75asadibaticefficiencyand0.98asmechanicalefficiency InExcelwedefinetheinletconditionswithmacroEStrH()whichforcesaisothermalflashatspecifiedpressureandtemperature =EStrH(2,$B2,$B1) where2isthestream,B2istheinlettemperatureandB1istheinletpressure

incellB4wecalculatetheinitialentropyas =EstrS(2,$B2,$B1)tocalculatetheoutlettemperaturefortheisentropicprocessincelllB6weenter =SPF(2,$B5,$B4,0) where2isthestream,B5istheoutletpressure,B4therequiredentropy(equaltoinletentropybeingaisentropicprocess)and0.0 asestimatedfinaltemperature

tocalculatetheoutletenthalpyenterincellB7 =EstrH(2,$B6,$B5) andincellB9enter =$B3+($B7-$B3)/$B8 tocalculatethefinalenthapy(withtheadiabaticefficiencyspecifiedincellB7), toestimatetheabsorbedpowerincellB11enter =($B9-$B3)/$B10 SinceweknowtheenthalpyandpressureatoutletconditionswecancalculatethetemperaturewithHPF()method =HPF(2,$B5,$B9,0) where2isthestream,B4istheoutletpressure,$B8-$B6representstheheatduty(thedifferencefrominitialconditionscalculated incellB6)and0.0theestimatedfinaltemperature 28

Nextexampleshowshowtosimulateacompressionstage(aspolytropicprocess)wheretheinletstreamcanbevapororvapor +liquid(mixed),comparingtheresultsofdifferentmethods,seetheparagraphMethodsforsolvingaPolytropicoperation.for additionalinformation. WeuseapredefinedExcelpageasinterfacetoProdeProperties. FromExcelmenuFile->open,inExcelfolder(inProdePropertiesinstallation)selectthefilecompressor.xls

thepagecontainstwosections,thefirstpermitstocalculatethepolytropicefficiencyofasinglecompressionstagegiventheinlet temperatureandpressure. The second section allows to estimate the discharging temperature given inlet temperature and pressure, outlet pressure and polytropicefficiency. NoticethatProdePropertiesincludesaspecificmethofforsolvingapolytropicstagewithphaseequilibria,thismethodpermitsto simulatebothsinglephase(vapor)andmixed(vapor+liquid)processes. ThemixtureMethane0.999,n-Butane0.001(predefinedstream2)at10Bar.ashowsadewpointof187.5K,bysettingainlet temperatureof180Kwespecifyvapor+liquidasinletcondition,thestandardmethodcansimulateonlygasstreams,howeverthe Polytropicsolutionwithphaseequilibriamethodallowstosolvethiscase.

29

Next example allows to size a relief valve comparing the results of different methods for critical and two-phase flow, see the paragraphMethodsforsolvingaIsentropicoperationforadditionalinformation. WeuseapredefinedExcelpageasinterfacetoProdeProperties. FromExcelmenuFile->open,inExcelfolder(inProdePropertiesinstallation)selectthefilenozzle.xls

Thestepstosizeareliefvalveareeasytofollow: 1)fromPropertieseditordefinethecomposition,models,BIPs(formixtures) 2)enterthedischargingtemperature,pressure,flow,model,outletpressure 3)clickonbuttonCalculateSolution theprocedurecalculatestherequiredareaandtheoutlettemperatureforcriticalandtwo-phaseflow, youmayutilizetheproceduretoverifytheresultsfromadifferentsoftwareinapplicationsasfluidsincriticalarea,two-phasesflow etc. ThesamepageincludesaproceduretocomparetheresultsfromHEM(HomogeneousEquilibrium)anddifferentNonEquilibrium modelsforaspecifiedpressureinarangeofinletvaporqualities Pleasefollowfhesestepstocompare:twomodels, 1)fromPropertieseditordefinethecomposition,models,BIPs(formixtures) 2)enterthepressure,modelandparameter 3)clickonbuttonCompareModels

TheNonEqulibriummodelsaremainlyofinterestforshortnozzleswherethefinalequilibriumcondition(predictedbyHEMmodels) isnotreachedcausetheresidencetimeofthefluidistooshort. TheHNEmodelsrequirespecificparameters,forProdeHNEmodelavalueof0.75issuggestedforshortnozzlesbutdifferent valuesmaybedefinedtofitspecificdatasets.

30

Next example permits to solve a distillation column, refer to paragraph Methods for solving staged columns for additional information,hereweuseapredefinedExcelpageasinterfacetoProdePropertiesmethods. FromExcelmenuFile->open,inExcelfolder(inProdePropertiesinstallation)selectthefilecolumn.xls Inthispageyoucandefinedifferentkindofcolumnswithreboiler,condenser,oneormorefeedsandoneormoresidestreams.

Thestepstodefineacolumnareeasytofollow: 1)definethenumberofstages 2)definepressuredistribution(bottomandtopstage) 3)definestageefficiency 4)definethenumberoffeeds,eachfeedflowrateandcompositions(clickontheproperFeedbuttontoaccessthestreameditor), eachfeedstage(rememberthatreboiler(ifpresent)isstage1andcondenser(ifpresent)isstageN,andtheliquidfraction(orthe temperature)ofeachfeed. 5)Definethenumberofsidestreams(ifany),thestage,thetype(vapororliquidflow)andtheflowspecification 6)Definevariablesascondenserandreboilerandtherelatedspecifications,theprocedureallowsdifferentspecificationsincluding molarfractions(andrecovery)ofacomponentintoporbottomstage Notes: InStreamEditor(Config->Units)youcandefinealltheunitsforthisproject inStreamEditor(Config->Settigs)youcandefinemassunitsormolarunitsforflowsinStreamEditor

31

Oncethecolumnhasbeendefineditissuggestedtoverifytheinputdataforinconsistentspecifications,ifyouaresurethat allisOkrunthesolver(buttonSolveColumn)

thereportincludes 1)theverifiederrorsinmassandenergybalance 2)reboilerandcondenserduties 3)temperatureandpressureineachstage 4)totalandcomponentvaporflowsineachstage 5)totalandcomponentliquidflowsineachstage

32

nextexampleallowstocalculatethehydrateformationcurve(temperatureandpressureconditions)foragivenmixture. FromExcelmenuFile->open,inExcelfolder(inProdePropertiesinstallation)selectthefilehydrate.xls Inthispageyoucandefineamixtureincludingoneormorehydrateformerspluswaterandinhibitors

Allthecommonhydrateformers(C1,C2,C3,IC4,nC4,N2,CO2,H2S)pluswaterandseveralinhibitorsarepermitted,Methanol, Ethanol,Ethyleneglycolplussaltsinversionsincludingtheelectrolytemodel. Theprocedureallowstospecifythepresenceofwaterinliquidphase,calculatetherelativeamountorsolveasmultiphaseequilibria

33

GettingstartedfromMATLAB
IMPORTANTMicrosoftMATLABsupportfilesarelocatedinthedirectory\Prode\MATLAB

MATLABprovidestwowaystoaccessexternallibrariesasProdeProperties -direct access -accessthroughscriptsandmexfiles

DirectAccess
Direct access is through the command-line interface, this interface lets you load an external library into MATLAB memoryandaccessfunctionsinthelibrary,toloadProdePropertiesinMATLABenter >ifnot(libisloaded('ppp')) hfile=['C:\ProgramFiles\Prode\MATLAB\ppp.h']; loadlibrary('ppp.dll',hfile); end libfunctionsppp thiscommandwillloadProdePropertiesinmemoryandprintthelistofmethodsavaliable,youmaywishtomodify C:\ProgramFiles\Prode\MATLAB\ppp.h'toreflectyourinstallationssettings
Functions in library ppp: AFOpen AFSave AOpen ASave BFsave BPF BPLine BRegr CompAc CompCID CompDm CompF CompGC CompGV CompGf CompHG CompHL CompHS CompHV CompHf CompID CompLC CompLD CompLV CompMp CompMw CompN CompNb CompPc CompRg CompSC CompSD CompSG CompSL CompSS CompST CompSf CompSol CompTc CompVP CompVc DCOL DPF DPLine Divi EStrFMH EStrFML EStrGC EStrGCp EStrGCv EStrGD EStrGIC EStrGJT EStrGMw EStrGSS EStrGV EStrGVE EStrH EStrHC EStrLC EStrLCp EStrLCv EStrLD EStrLIC EStrLJT EStrLMw EStrLSS EStrLV EStrLVE EStrLf EStrPf EStrS EStrSCp EStrSD EStrST EStrZv ErrMsg GSep HPF HPFORM HTF HTFORM LFLine LSep LfPF LfTF MixF PIPE PSep PfPF PfTF SPF STF StrAc StrCBp StrCBt StrCPnr StrCTp StrCTt StrCopy StrFMH StrFML StrFv StrFvd StrFvdv StrGC StrGCp StrGCv StrGD StrGH StrGIC StrGICp StrGJT StrGMw StrGS StrGSS StrGV StrGVE StrH StrHC StrHv StrHvd StrLC StrLCp StrLCv StrLD StrLH StrLIC StrLJT StrLMw StrLS StrLSS StrLV StrLVE StrLf StrMDt StrMw StrN StrPc StrPcm StrPf StrPt StrPts StrS StrSCp StrSD StrSGH StrSGS StrSH StrSLH StrSLS StrSS StrSSH StrSSS StrST StrSv StrSvd StrTc StrTcm StrVv StrVvd StrZv StrlnFv StrlnFvd StrlnFvdv UMAU UMCR UMCS UMRAU VLLSep defErrMsg edCF edCS edS edSS edST getAji getCC getCNr getCi getCj getErrFlag getFCNr getFPNr getGij getGji getKji getMBPNr getMCNr getMFg getMH getMS getMSNr getMV getMod getOM getP getPNr getPatm getSUMS getT getUMC getUMN getUMS getW getWm getX getY getZ initS isSDef loadSB putAji putBIP putCC putCi putCj putGij putGji putKji putMod putN putZ setAc setErrFlag setKM setMFg setMH setMS setMV setMw setOM setOp setPc setS setSOp setTc setUMC setVc setWm

toaccessamethodinasharedlibraryMATLABprovidesthecommandcalllibtocallfunctionsinthelibrary,thesyntax forcalllibis: calllib('ppp','FunctionName',arg1,...,argN) theFunctionNameandargumentsaredetailedinProdePropertiesmanual,forexamplewecancallthemethodedSS() toeditstreamswiththecommand >calllib('ppp','edSS') inthesamewayyoucanaccessothermethodsinProdeProperties,forexampletocalculatecp/cvandspeedof soundforvaporfractionofstream1at300Kand5Bar >>calllib(ppp,EstrGCp1,300,500000)/calllib(ppp,EstrGCv1,300,500000) >>ans=1.3211 >>calllib(ppp,EstrGSS1,300,500000) >>ans=374.1625 you can call even complex functions as those to plot a phase envelope or calculate a column, for these remember beforetopassanarrayfromMatlabtoProdePropertiesthatyoumustallocatethememorytoavoidsystemerrors. FinallyyoucanusetheunloadlibraryfunctiontounloadProdePropertieslibraryfromMatlabandfreeupmemory. >unloadlibraryppp

34

AccessfromMatlabthroughscripts
Inadditiontodirectaccess,youcanutilizeProdePropertiesfromMatlabwithscriptsormexfiles(compiledscripts) In many cases this way is more immediate since you use the original names of the functions in Prode Properties withoutneedtowriteadditionalcode. ProdePropertiesincludesalargenumberofMatlabscriptsinstalledindirectory\Prode\MATLAB\m Beforetoutilizethescriptsyoumust -movethefilesintoaMatlabdirectory(i.e.adirectorywhereMatlabcanaccessthescripts),readMatlabdocumentationforadditionalinformation. -editthefilepppdir.txt,thisfilecontainsastringwithpathandnameoftheheaderfilerequiredtoinstructMatlababout themethodsavalialableinProdePropertieslibrary,onceyouhaveeditedmovethefileonthesamelocationofscript files. Howthescriptswork Scripts act as interface between Matlab and Prode Properties, scripts have names identical to Prode Properties methods,thenwhenyouinvokethescriptStrGD(whichisthemethodinProdePropertiestocalculatedensityofvapor phase) MATLAB simply executes the commands found in the file, calls the method StrGD in Prode Properties and returnstheresult,bythewaythescriptStrGD.mcontainstheseMATLABcommands function[]=StrGD(stream) ifnot(libisloaded('ppp')) fid=fopen('pppdir.txt');hfile=fgetl(fid);fclose(fid); loadlibrary('ppp.dll',hfile); h=uimenu('Label','Properties'); h1=uimenu(h,'Label','EditProperties','Callback','edSS'); h2=uimenu(h,'Label','OpenArchive','Callback','AOpen'); h3=uimenu(h,'Label','SaveaArchive','Callback','ASave'); end d=calllib('ppp','StrGD',stream) end BytypinginMatlabthecommand >>StrGD(1) Matlabexecutesthecodewithinthescript,itloadsppp.dll(ifnotinmemory),createsamenubar(withthestandard ProdePropertiescommands)andthenexecutesthemethodStrGD,tocalculatethedensity. NoticethatthescriptcreatesamenubarwhichpermitstoaccessdirectlyProdePropertiesfromMatlabGUI, therearethreecommands -editStreams -openaarchive -saveaarchive Importantfeaturesofmenubar -thecharacteristicsmaydependfromMatlabversion -ifyoudeletetheassociatedfigurethemenubarisdeleted,torecreatethemenuyoumustreenterthecommands h=uimenu('Label','Properties'); h1=uimenu(h,'Label','EditProperties','Callback','edSS'); h2=uimenu(h,'Label','OpenArchive','Callback','AOpen'); h3=uimenu(h,'Label','SaveaArchive','Callback','ASave');

35

Youcanwritescriptstosolvemorecomplexproblems,anexampleisthescriptphaseenvelope.mwhichprintsaphase envelope,totestthescripttypeinMatlabthecommand >>phaseenvelope(1) MatlabwillinvokeProdePropertiestocalculatethephaseenvelopeforthestream1,thenitplotstheresult

NoticethatfromPropertiesmenubaryoucanaccessPropertieseditorandmodifythelistofcomponentsormodelsof eachstream

36

GettingstartedwithMicrosoftNET(VB,C)applications
IMPORTANTMicrosoftNETsupportfilesarelocatedinthedirectory\Prode\NET ProdePropertiescanbeeasilyincludedasunmanagedcodeineveryMicrosoftNETapplication,forcompilingthesamplecode providedwithProdePropertiesarecentversionofMicrosoftVisualStudioisrequired. FromMicrosoftVisualStudiocompilermenuFile->Open->Project/Solution,inNETfolder(inProdePropertiesinstallation)select thefilevba.sln

thenfrommenuBuild-selectBuildSolution. Note:ifdesiredyoucaneditthesettingsfromProject->vbaProperties

37

As next step you can test the application, from Visual Studio menu Debug->Start Debugging, then once the application is running: 1) clickonthebuttonProdePropertieseditortoaccesstheeditor,definethestreamsandunitsofmeasurement 2) defineasuitabletemperatureandpressure(withproperunits) 3) clickonbuttonComputePropertiestoprinttheproperties

youcanthenmodifythecodeaccordingyourrequirements.

38

Solving problems (introduction)


ThereareseveraldifferentclassesofproblemswhichProdePropertiescanhelptosolvebutthemostcommonareprobably: physicalpropertiesofpurefluidsandmixtures equipmentdesign systemsimulation ProdePropertiesprovidesmanymethodsforthepredictionofphysicalproperties,ingeneralasingleinstructionisrequiredfor calculatingaproperty. The design and rating of unit operations as distillation columns, towers, pumps, compressors, valves, heat exchangers etc. is anotherareawhereProdePropertiescanresultuseful,theuseofprogramminglanguagesisgenerallysuggestedwhendealing withcomplexproblemswhilesomeformulainaworksheetcansolvetheusualwork. Thesystemsimulationmaybeusedinthedesignstagetoevaluateparameters,tohelpachieveanimproveddesignorappliedto existingsystemsforoptimizingoperatingconditions.Generallytherequiredsolutionisthelistofoperatingconditionsattheinputand outputoftheoperatingblocksinthesimulationblockdiagram.Whentherearenorecyclestreamsorcontrolsthemethodforsolving thesystemisverysimple:theoutputinformationfromthefirstoperatingblockisutilizedasinputforthesecondoperatingblockand soon.Howeverwhenthereareoutputconditionswhichmayinterferewithinputconditionssomesortofiterationisrequiredsince someoralltheequationsgoverningthesystemmaybenonlinear.Therearetwowellknownmethodsforsolvingsuchasystemof nonlinearequations,themethodofsuccessivesubstitutionsandNewton-Raphson,refertogoodbooksofnumericalanalysisfor additionalinformation. Streams MostthermodynamiccalcsinProdePropertieslibrarytakeasreferenceastreamentity.Forexamplewhensimulatingaplantit makessensetodefinedifferentstreamstorepresentflowsindifferentsections,astreamusuallydefinescompositionsand operatingconditions,ProdePropertiessupportsavariablenumberofstreamsandmostmethodsinProdePropertiesrequirea referencetoastream,thereferenceisanumericcode(aprogressiveintegerstartingfrom1forfirststream).

Streamsattributes
Asinprocesssimulatorseachstreammayincludefollowinginformation alistofcomponentsandrelativeweights avaluefortheoperatingpressure avaluefortheoperatingtemperature avaluefortheoperatingflow thermodynamicmodelsfordifferentproperties alistofBIPs

Workingwithstreams
ProdePropertiespermitstodefinecomplextopologiesasthereisnolimittothenumberofoperatingblocksrequiredfor simulatingaplant,withProdePropertiesforsimulatingaplantyouconvertthedifferentsectionsintopiecesofcode,todoso youcanusethebasicblocksavailableinallprocesssimulators,foresample isothermalflash,forcalculatingmultiphaseequilibriaatthespecifiedtemperatureadpressure flashunit(enthalpy,entropyorvolumebasis),calculatesoutputtemperatureorpressure,withthisunityoucansimulate pipelines,valves,heatexchangers,pumps,compressorsandmanyothersoperations. fixedvaporfractionflash,forconstructingphaseenvelopes,calculatingbubbleanddewpointsetc. mixertoaddthecontentsoftwostreams dividertosubtractapartofflowfromastream byputtingtogethertheseblocksitispossibletosimulatealsocomplexplants.

Simulatingaplant
transformtheflowsheetinasimulationblockdiagram,fluidandenergyflowdiagramsarestandardengineeringtools,you assignanumbertothedifferentstreamsandidentifythebasicblockswhichwillbesolvedbyProdeProperties.

Noticethenumberwhichidentifieseachstream,inthiscasedifferentnumbersmean(possible)differentcompositions(wedo notconsiderchemicalreactionshere),theoutputofeachblockcanbeeasilycalculatedprovidingtheinputhasbeendefined

39

Workingwitharchives,saveandloaddata,defaultsettings
Loadandsavearchives ArchivesarefileswhichcontainthedatarequiredbyProdePropertiestoworkwithstream'sandunitsofmeasurement,whenyou openanarchivethestream'sdataandunitsareloaded,whenyouchoosetosaveanarchivethesedataarestoredinafile,inthis wayyoucanworkwithmanydifferentprojetcs. ProdePropertiesincludesseveralmethodstosaveandloaddataasarchives. Thedefaultsettings WhenProdePropertiesstartsitloadsdatafromthearchivenamed"def.ppp"soifyouwishtouseyourownlistofstreams,unitsetc. justsaveyourpreferredsettingsunderthename"def.ppp".

Propertieseditor
ProdePropertiesincludesPropertieseditor,fromtheeditoryouhaveaccessto Streams editoperatingconditions,flow,compositions,models,BIPsforallstreams Config editallunitsofmeasurementandsettings Chemicals editallchemicalsdata,regressdata,addnewchemicals BIPs editBIPs,regressdata,addnewBIPs

HowtoactivatethePropertieseditor
calloneofthemethodsedS(stream),edSS()rememberthatinProdePropertieseachstreamisreferencedwithacode(integer value)intherange(1...maxnumberofstreams). Usetherightmethod: UseedSS()ifyouwishtostarteditingthefirststream(butaccessallstreams). UseedS()streamifyouwouldliketochoose whichstreamtoedit

FromMicrosoftVB
CalledSS() CalledS(8)starteditingstreamnr.8

FromMicrosoftExcel
=edSS() =edS(8)starteditingstreamnr.8

FromMicrosoftVisualC++
edSS(); edS(8);//starteditingstreamnr.8

40

Streamoperating
Fromthispageyoucan: selectastream(select/editstream) defineanamefortheselectedstream saveeditedstreamdata Computedifferentflashoperatins

Defineanewstream/editexistingstreams selectthestream(youwishtoedit/define)fromtheSelect/editstreamlist gotopageComponents,definethelistofcomponentsandrelativeweights gotopageModels,definethemodelsforthedifferentproperties,definesettings,loadBIPs backtopageOperating,putanameforthestreamandclickonSave checkthatcorrectstreamcompositionappearsonthesecondgrid Computeaflashoperation makesureafeedingstreamhasbeenproperlydefined(composition,models,settings)thenselectthefeedingstream selecttheflashoperation definetherequiredspecificationsandclikonCompute IMPORTANT beforetoleavetheapplicationremembertosavealldataintothearchiveotherwaysyourchangeswillbelost!

41

PredefinedFlashOperations
ProdePropertiesallowstosolvedirectlyfromeditormanyFlashoperations
IMPORTANTwithH-PandS-Poperationsenterdsordhwithreferencetoinitialvalueoftheenthalpy(orentropy)ofthestream

T-PVL
vapor-liquid,twophases,atspecifiedtemperatureandpressure

T-P VLL
vapor-liquid-liquid,multiphase,atspecifiedtemperatureandpressure

T-P VLS
vapor-liquid-solid,multiphase,atspecifiedtemperatureandpressure

LF-P
equilibriumtemperatureatspecified(liquid)phasefractionandpressure

LF-T
equilibriumpressureatspecified(liquid)phasefractionandtemperature

H-PVL
equilibriumtemperature,twophases,atspecifiedpressureandenthalpy

H-P VLL
equilibriumtemperature,vapor-liquid-liquid,multiphase,atspecifiedpressureandenthalpy

H-P VLS
equilibriumtemperature,vapor-liquid-solid,multiphase,atspecifiedpressureandenthalpy

S-PVL
equilibriumtemperature,twophases,atspecifiedpressureandentropy

S-P VLL
equilibriumtemperature,vapor-liquid-liquid,multiphase,atspecifiedpressureandentropy

S-P VLS
equilibriumtemperature,vapor-liquid-solid,multiphase,atspecifiedpressureandentropy

V-PVL
equilibriumtemperature,twophases,atspecifiedpressureandspecificvolume

V-P VLL
equilibriumtemperature,vapor-liquid-liquid,multiphase,atspecifiedpressureandspecificvolume

V-P VLS
equilibriumtemperature,vapor-liquid-solid,multiphase,atspecifiedpressureandspecificvolume

CopyStream
copyastreamintoanotherstream

GasSeparator
simulatesagasseparationatspecifiedtemperatureandpressure

LiquidSeparator
simulatesaliquidseparationatspecifiedtemperatureandpressure

42

StreamComposition
Fromthispageyoucan: definealistofcomponentsbyselectingcomponentsfromthelibrary specifyitheamountofeachcomponent.

Definethesortingcriteria selectthepreferredcriteria Addacomponenttothelist selectacomponentfromthelistofcomponents clickonAddbutton Removeacomponentfromthelist clickonRemovebuttontoremovethelastcomponentinthelist Clearthelist clickonClearbuttontorclearallcomponentsinthelist Enter/normalizeaccordingMoleorWeightfractions selectthedesiredMoleorWeightfractions

43

StreamModels
Fromthispageyoucan: defineupto30differentpackageswithuserdefinedmodelsandoptions definethemodelpereachproperttyandstate(gas,liquid,solid) setdifferentoptionsavailableforcalcs

Defineanewpackage/Editexistingpackage selectapackageinthelist inModelsandOptionsWindowselectthemodelsandoptionsforthispackage defineanameforthepackage, clickonSavebuttontosavethispackage Selectapackage selectapredefinedpackageinthelist Defineamodel specifythemodelpereachpropertyandstate Setaoption definemultiphaseasvapor+liquidorvapor+liquid+solid reducethenumberoftrialphases(inmultiphase) usePenelouxtocorrectliquidvolume useisocompressibilitycoeff.todetectthestateofeachphase evaluatestabilityofeachphaseinequilibrium inphasediagrams,endlineswithspecifiedphasefractionswhencrossingaphaseboundary inphasediagrams,selectEOSrootforminimumenergyorstate usebaseorextendedAlphafunctions

44

BIPs
Fromthispageyoucan: input/edit/loadBIPsforthedifferentmodels DefinealistofBIPs clickonGetBIPsforloadingallBIPsavailableinlibrary ifrequiredaddyourownspecificBIPs

IMPORTANT ForBIPsthefirsttwocolumnsCiandCjdefinethecomponentspositioninthelist(i.e.1forthefirstcomponent,2forsecondand soon),notethatK12-21andA12-21(alphaparameterinNRTLmodel)aredimensionlesswhileA12andA21haveunitsofcal/ gr.mol. Example,binaryofmethanolandethylacetateUNIQUACA12:-64.1299,A21:644.1931inthefirsttwocolumns(c1,c2)enterthe componentsrelativepositioninthelist,assumingthatmethanolisthefirstcomponentandethylacetatethesecond c1 1 c2 2 K12-21 0 A1-2 -64.1299 A2-1 644.1931

45

ConfigUnits
Fromthispageyoucan: definetheunitofmeasurementforthedifferentproperties

IMPORTANT ProdePropertiesisacollectionoffunctionsforthermodynamiccalculations,thesefunctionsreceivedata,ofpropertiessuchas temperatureorpressure,areferencetoastreametc.andperformsomeoperations. WithProdePropertiesyouhavecompletecontrolovertheengineeringunits,thismeansthatprogrampermitstoselectfromalist ofdifferentunitsforeachproperty,andProdePropertiesautomaticallyconvertstheinputvaluesandtheresultsaccordingtothe selectedunits. 1) ifyousetBar.aasunitforpressureallinputsandoutputswillbeinthatunit!. 2)ifyouwishtodefineyourownsetofunitsremember,beforetoleavetheapplication,tosavedataintoaarchiveotherwaysyour changeswillbelost!

46

Config Settings
Fromthispageyoucan: definethedifferentsettingsasmaxnumberofstreams,thetemperatureandpressureatreferenceconditions,thebasevalues forentalpyandentropy,convergencetoleranceetc.

ProdePropertiespermitstodefineseveraldifferentoperatingparameters,theseparametersare: maxnumberofstreams maxnumberofcomponentsperstream maxnumberofinteractioncoefficientspairsperstream referencetemperatureandpressure basevaluesforenthalpyandentropycalcs convergencetolerance maxallowedtimeforsolvingaoperation

IMPORTANT beforetoleavetheapplicationremembertosavealldataintothearchivedifferentlyyourchangeswillbelost!

47

Chemicalsdata
Fromthispageyoucan: editandchangethephysicalpropertiesdataincludedinthedatabank savealldatainafile

Edit/modifydata: selectacomponentfromthecomponentslist edit/modifytherelatedfields(seealsothesectionwithdescriptionofallfields) selecttheSavebuttontosavethemodifieddata(differentlynewdatawillbedischarged)

Addinganewcomponent:
selecttheNewbutton edittherelatedfields(seealsothefollowingpagewithdescriptionofalldatafields) selecttheSavebuttontosavethedata(differentlynewdatawillbedischarged)

Removeacomponent:
selectacomponentfromthecomponentslist selecttheRemovebutton

IMPORTANT

Updatingthefilewhichcontainsthedatabank:
thisoptionpermitstostorealldataintoafile,differentlyallchangeswillbelostwhenleavingtheapplication selecttheFilebutton CAUTION:youmaywishtocreateabackupofthefilechem.datbeforetooverwritethefile

48

ChemicalsSettings
Fromthispageyoucan: editinformations(CASnumber)requiredtoidentifysomecomponents.

49

Regressrawdata
Fromthispageyoucan: regressrawdataintovaluescompatiblewithchemicalsdatabase

Regressrawdata
inChemicalsDatapageselectachemical inChemicalRegresspageseletapropertyandthecorrelationforfittingrawdata entertheavailabledata(alltemperatureandvaluepairs)withtheproperunitsofmeasurement ifrequiredyoumayenterinitializingvaluesandlimitsforcalculatedparameters clickonCalculatebutton,evaluatecalculatedvaluesanderrors,youmaytrydifferentcorrelationsforbestdatafitting clickonTransferbuttontocopycalculatedvaluesintoChemicalsDatapage inChemicalsDatapageselecttheSavebuttontosavethedata(differentlynewdatawillbedischarged)

IMPORTANT ProdePropertiesflexibledatbaseformatsupportsmorethan15differentcorrelations(30inextendedversion),soforeachproperty youcanselectthecorrelationwhichbestfitsexperimentaldata.

50

BinaryInteractionParameters(BIP)
Fromthesepagesyoucan: editBinaryInteractionParameters add/removeBinaryInteractionParameters regressVLE(vapor-liquid),LLE(liquid-liquid),SLE(solid-liquid)datapoints savealldatainafile

Edit/modifydata: selecttwocomponentsfromthecomponentslists edit/modifyBIPsforthedifferentmodels selecttheSavebuttontosavethemodifieddata(differentlynewdatawillbedischarged) IMPORTANT

UpdatingthefilewhichcontainstheBIPsdata:
thisoptionpermitstostorealldataintoafile,differentlyallchangeswillbelostwhenleavingtheapplication selecttheFilebutton CAUTIONyoumaywishtocreateabackupofthefilebips.datbeforetooverwritethefile Note:K12-21andA12-21(alphaparameterinNRTL)aredimensionlesswhileA12andA21haveunitsofcal/gr.mol

51

RegressVLE-LLE-SLEdata
Fromthispageyoucan: regressVLE-LLE-SLEdataforcalculatingthebestfittingparanetersofdifferentmodels asfirststepinBIPs->Datapageyoumustselecttwocomponents(inthisexamplemethanolandwater)

Theprocedurepermitstoenterexperimental(measured)VLE-LLE-SLEdatapointsorfitautomaticallythemodeltoVLEpoints calculatedwithUNIFAC.

WhenenteringmeasuredVLE(vapor-liquiddatapoints)oneachrowincludeinXcolumnthemeasuredliquidmolarfractionof component1,inYcolumnthemeasuredvapormolarfractionofcomponent1,forLLE(liquid-liquidequilibria)includeinXcolumn themeasuredliquidmolarfractionofcomponent1infirstliquidphase,andinYcolumnthemeasuredliquidmolarfractionof component1insecondliquidphase,forSLE(solid-liquidequilibria)includeinXcolumnthemeasuredliquidmolarfractionof component1inliquidphase,andinYcolumnthemeasuredsolidmolarfractionofcomponent1,finallyenterthetemperatureand thepressureforthatpoint. ExampleofmeasuredVLEdataforMethanol-Water VLEdataforMethanol-Waterat735mmHg X(1) 0.008400 0.025800 0.068000 0.137000 0.240000 0.480000 0.572000 0.741000 Y(1) 0.103000 0.227000 0.391000 0.568000 0.680000 0.790000 0.820000 0.906000 Temperature(C) 96.5 92.3 87.5 80.1 75.9 70.6 68.7 66.4 52

Enterthemeasureddata,selectthemodelstoregress(inthiscaseWilsonforliquidphaseandregulat-ideal-forvapor phase)

SelectingthebuttonCalculatetheprocedurecalculatesthebestfittingparameters,showsthecalculatdresultsandtherelative errors(%)

asalternativetheprocedureofferstheoptiontocalculatethebestfittingparameterstoVLEdatapointscalculatedwithUNIFAC,this entirelypredictivemethoddoesntrequireexperimentaldataandinsomecasescanresultuseful.

53

SelectVLEpointscalculatedwithUNIFACinRegressselectortousethismethod

OncetheparamtershavebeencalculatedyoumustselecttheTransferbuttontotransfertheresultsinBIPs->Datapage,from thatpageyoucansavethecalculatedBIPsindatabase(selectSavebutton)orstorepermanentlyinfile(selectFilebutton).

54

AccessingProdePropertieslibrary
ThetechniqueforaccessingthemethodsavailableinProdePropertieslibrarywilldependonwhichprogramminglanguageYouuse. LanguagessuchasFORTRAN,C,C++orMicrosoftNET(VB,C)exhibitdifferencesinparameterpassinginandoutoffunctions. Thismayrequireyoutoadaptyourcodefromtheexamplesshownhere.Thecallingconventiondetermineshowaprogrammakes acallandwheretheparametersarepassed.PROPERTIESdoesuseofstandardcallsofWindowsAPI,itpushesparameterson thestack,inreverseorder.WhenaccessingPROPERTIESYoumustalsoconsider: ProdePropertiesrealtypeis8bytes ProdePropertiesintegertypeis4bytes parametersarepassedbyvalue(withexceptionofstringswhicharearraysofcharacters) IMPORTANT C/C++supportfilesarelocatedinthedirectory\Prode\C FORTRANsupportfilesarelocatedinthedirectory\Prode\FORTRAN MicrosoftNETsupportfilesarelocatedinthedirectory\Prode\NET MicrosoftEXCELsupportfilesarelocatedinthedirectory\Prode\Excel

Fortran
addppp.libfiletothelistofthefilesinYourprojectandincludeppp.f90toinstructthecompileraboutthemethodsavailableinProde Propertiesthenaccessthemethodsastheywereincludedinyourcode C thisprocedurereturnsthecriticaltemperatureofacompound INTERFACETOREAL*8FUNCTIONTC([C,ALIAS:CompTc]comp) INTEGER*4comp[VALUE] END REAL*8tc INTEGER*4id C definetheidvaluehere tc=TC(id)

C / C++
includetheppp.hheader addppp.libfiletothelistofthefilesinYourproject makesureyouusethecallingconventionofppp.hheaderfile, accesstheProdePropertiesmethods

char*name; name=CompN(1);//returnsthenameofthefirstcomponentinthechemicalsfile

MicrosoftNET(VB)
seethesamplesprovidedwithProdePropertiesforadditionalinformation includeproperties.vbatoinstructthecompileraboutthemethodsavailableinProdePropertiesandaccessthemethods

CompName=MCompN(1)

MicrosoftExcel
MicrosoftExcelsupportsmacrosandVBAlanguagefordefiningprocedures;bothofthesecanbeusedtoaccessthefunctionsin ProdeProperties,seethesamplesprovidedwithProdePropertiesforadditionalinformation includeproperties.vbatoinstructMicrosoftExcelaboutthemethodsavailableinProdePropertiesandaccessthemethods

CompName=MCompN(1)

55

Translateresourcestodifferentlanguages
Alargepartoftheresourcesarestoredinthefileres.lan,seetheparagraphDatafilesfolderforadditionalinformationabouthow tolocatethefile.Thefileres.lanisatextfile,easilyeditablebytheuser. Example inEnglishlanguage N2_NAME=Nitrogen; inFrenchlanguage N2_NAME=Azote; inItalianlanguage N2_NAME=Azoto; IMPORTANT Wheneditingastringtakecaretomodifyonlythepartsenclosedwithinthebracesanddonotalter/modifythedatastructures composedbyspecialcharactersasforexample::

MicrosoftApplicationsandStrings
Prode Properties utilizes the standardAPI calling convention for Microsoft Windows applications.This assures that almost all WindowscompatibleapplicationswhichsupportDLLswillalsosupportProdeProperties.Thereare,however,someexceptionsin passingstrings(arraysofcharacters)sinceMicrosoftutilizesproprietarydataformats.ProdePropertiesincludesMicrosoftspecific methods in addition to the standard methods supporting theANSI C standard, Microsoft specific methods are compatible with almostallMicrosoftapplicationsastheyuseVarianttypes.

Definemodels,compatibilitywitholdverions
ProdePropertiesincludesmanymethodsfordefining(viasoftware)thethermodynamicmodelsandtherelatedoptions,seethe paragraphMethodstoset/accessdifferentoptionsforadditionalinformation

56

Unitsofmeasurement
ProdePropertiesallowstodefineviasoftwaretheunitsofmeasurement,therearemethodsfordefiningtheunitsandmethodsfor retrievingcodesandstrings,seeparagraphMethodsforaccessing/definingtheunitsofmeasurementandthesamplesprovided withthepackageforadditionalinformation,inProdePropertiestoreferenceaunitmustuseanumericcode

QUANTITY Pressure (abs) Pressure (rel) Temperature (abs) Temperature(rel) Calorific Value (weight) Calorific Value (molar) Power Entropy (Streams) Heat Capacity (weight) Heat Capacity (molar) Flow (mass basis) Flow (gas, mass basis) Density (weight) Density (molar) Specific Volume (weight) Specific Volume (molar) Thermal Conductivity Viscosity (dynamic) Surface Tension Lenght Area Volume Mass Velocity Acceleration Force Time Heat Flux Thermal Resistance Heat Transfer Coefficent Flow (volume basis) Viscosity (kinematic) Energy Dipole moment Solubility parameter Flow Coefficient Compressibility coefficient Joule Thomson coefficient Flow (molar basis) Volume expansivity

UNIT CONV_P CONV_DP CONV_T CONV_DT CONV_HM CONV_HMM CONV_HS CONV_SS CONV_CP CONV_CPM CONV_W CONV_WG CONV_D CONV_DM CONV_SV CONV_SVM CONV_TC CONV_V CONV_ST CONV_L CONV_A CONV_VOL CONV_M CONV_VL CONV_ACC CONV_FOR CONV_TM CONV_HF CONV_TR CONV_HTC CONV_VW CONV_VK CONV_EN CONV_EDM CONV_SP CONV_CV CONV_CC CONV_JTC CONV_WM CONV_VE

CODE 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54

DEFAULT UNIT Pa.a Pa K K Kj/Kg Kj/Kmol KW KJ/(K*s) kJ/(kg*K) kJ/(kmol*K) Kg/s Kg/s Kg/m3 Kmol/m3 m3/Kg m3/Kmol W/(m*K) Pa*s N/m m m2 m3 Kg m/s m/s2 N s KW/m2 K*m2/KW KW/(m2*C) m3/s m2/s KJ c-m (J/m3)^1/2 Cv 1/Pa K/Pa Kmol/s 1/K

57

IntroducingProdePropertieslibrarymethods
ProdePropertieslibraryincludesarangeofmethodstodealwithproblemsinchemicalengineeringandtoachievetightcontrolover thecalculations. Anon-inclusivelistwouldinclude Thermodynamiccalcs(flashoperations,enthalpy,entropy,volume,energy,unitoperations) Streamsdataaccessandcalcs(setandretrieveoperatingconditions,criticalandtransportpropertiescalcs) Chemicalslibraryaccess(retrievedatafromchemicalsfile) Errormessages(managementoferrorsmessages)

Methodsforthermodynamiccalcs
ProdePropertiesincludesacompletesetofmethodsforsolvingallthestandardflashoperationswithspecifiedfinaltemperatureor pressureandentropyorenthalpyorvolumeorenergybasis,phasefractionwithtemperatureorpressurebasisplusmixers,dividers, gas,liquidphaseseparationoperationsetc.

integerresult=setOp(integerstream,doublet,doublep)
Givenastream,operatingpressureandtemperature,performsanisothermalflashandsetsoperatingconditions.

integerresult=setSOp(integerstream)
Givenastreamperformsanisothermalflashat(userdefined)standardconditions.

doublet=PfPF(integerstream,doublep,doublepf,intstate,intn)
Givenastream,thepressure,phasefraction(range0-1),state(gas,liquid,solid)andpositionncalculatesandreturnsthenth(n :1-5)equilibriumtemperaturealongthespecifiedphasefractionline

doublep=PfTF(integerstream,doublet,doublepf,intstate,intn)
Givenastream,thetemperature,phasefraction(range0-1),state(gas,liquid,solid)andpositionncalculatesandreturnsthenth (n:1-5)equilibriumpressurealongthespecifiedphasefractionline

doublet=LfPF(integerstream,doublep,doublelf)
Givenastream,thepressureandLiquidfraction(range0-1)calculatesandreturnsthefirstequilibriumtemperaturealongthe specifiedphasefractionline

doublep=LfTF(integerstream,doublet,doublelf)
Givenastream,thetemperatureandLiquidfraction(range0-1)calculatesandreturnsthefirstequilibriumpressurealongthe specifiedphasefractionline

doublet=HPF(integerstream,doublep,doubleh,doubleet)
Givenastream,finalpressure,therequired(final)enthalpy(seethemethodStrH()forthedefinition)andaestimatedvalueforfinal temperature(or0forautomaticestimate),methodsolvestheflashoperation(enthalpybasis)andreturnsfinaltemperature

doublep=HTF(integerstream,doublet,doubleh,doubleep)
Givenastream,finaltemperature,therequired(final)enthalpy(seethemethodStrH()forthedefinition)andaestimatedvaluefor finalpressure(or0forautomaticestimate),methodsolvestheflashoperation(enthalpybasis)andreturnsfinalpressure

doublet=SPF(integerstream,doublep,doubles,doubleet)
Givenastream,finalpressure,therequired(final)entropy(seethemethodStrS()forthedefinition)andaestimatedvalueforfinal temperature(or0forautomaticestimate),methodsolvestheflashoperation(entropybasis)andreturnsfinaltemperature.

doublep=STF(integerstream,doublet,doubleds,doubleep)
Givenastream,finaltemperature,therequired(final)entropy(seethemethodStrS()forthedefinition)andaestimatedvalueforfinal pressure(or0forautomaticestimate),methodsolvestheflashoperation(entropybasis)andreturnsfinalpressure.

doublet=VPF(integerstream,doublep,doublev,doubleet)
Givenastream,finalpressure,therequiredspecificvolume(seethemethodStrV()forthedefinition)andaestimatedvalueforfinal temperature(or0forautomaticestimate),methodsolvestheflashoperation(volumebasis)andreturnsfinaltemperature.

doublep=VTF(integerstream,doublet,doublev,doubleep)
Givenastream,finaltemperature,therequiredspecificvolume(seethemethodStrV()forthedefinition)andaestimatedvaluefor finalpressure(or0forautomaticestimate),methodsolvestheflashoperation(volumebasis)andreturnsfinalpressure.

58

doublet=EPF(integerstream,doublep,doubleE,doubleaout,doubleet)
Givenastream,finalpressure,outletarea,thetermE(equaltoHin+1/2Vin^2)andaestimatedvalueforfinaltemperaure(or0for automaticestimate)methodsolvestheconstantenergyflashandreturnsfinaltemperature. Hin+1/2Vin^2=Ho+1/2Vo^2 thismethodpermitstomodeladiabatic,irreversibleexpansionswhenthecontributeofkineticenergycannotbeneglected.

integerresult=MixF(integerstream1,integerstream2,doubleet)
Giventwostreams,stream1andstream2andaestimatedvalueforfinaltemperature(or0forautomaticestimate)methodsolves amixeroperationandreturnstheresultonstream1,thefeedstreamsareadiabaticallyflashedtothelowestinletstreampressure

integerresult=Divi(integerstream1,integerstream2,doublewdiv)
Giventwostreams(stream1andstream2)andaflowratefraction(0-1)performsadivideroperationsothatstream1isshiftedinto twostreams(stream1,stream2)ofthesamecomposition,temperatureandpressure,flowratefractionsaresubdividedasspecified bywdiv(stream2=wdiv,stream1=1-wdiv)

integerresult=psep(integerstream1,integerstream2,integerphase)
Givenastream(stream1)performsanisothermalflashtosimulateaphasetype(vapor,liquid,solid)separatorandreturnstheresult asstream2.

59

Methodsforstreamsdataaccess
ProdePropertiesincludesasetoffunctionsforaccessingstreamparametersandcalculatingtransportproperties.Notethatwhen calculatingtransportpropertiestheprogramperformsaVLEflashandreturns0(zerovalue)whennoassociatedliquidorgas phaseisfound.

integerres=isSDef(integerstream)
givenastreamreturnsTRUE(integer=1)ifstreamhasbeendefined,otherwisereturnsFALSE(0)

doublet=getT(integerstream)
givenastreamreturnsstreamsoperatingtemperature

doublep=getP(integerstream)
givenastreamreturnsstreamsoperatingpressure

integer nr = getPNr()
returnsthemaximumnumberofphasesthatprocedurecandetect

integertype=StrPt(integerstream,intphase)
givenastreamandpositioninrange1-getPNr()returnsthephasetype(vapor,liquid,solid)

char*description=StrPts(integerstream,intphase)
givenastreamandpositioninrange1-getPNr()returnsaANSICstringwiththedescriptionoftypefordetectedphase

Variantdescription=MStrPts(integerstream,intphase)
givenastreamandpositioninrange1-getPNr()returnsaMicrosoftVariantwiththedescriptionoftypeofdetectedphase,thisisthe Microsoftcompatiblemethod

doublelf=StrLf(integerstream)
givenastreamreturnsthetotalliquidfraction(molarbasis)instream

doublepf=StrPf(integerstream,integerphase)
givenastreamandphasepositioninrange1- getPNr()returnsthephasefraction

doublew=getW(integerstream,integerphase,integerpos.)
givenastream,thephasepositionandcomponentsposition(incomponentslist)returnsthecomponentmolarfractioninthat phase

doubleZi=getZ(integerstream,integerpos.)
givenastreamandcomponentsposition(incomponentslist)returnsthecompsZ(weightpercentage,molarbasis)

integerres=putZ(integerstream,integerpos.,doubleZi)
givenastream,compspositionandZ,setsthecompspos.inZvector(composition,molarbasis)forthatstream

integernr=getCNr(integerstream)
givenastreamreturnsthenumberofcomponentsdefinedinthatstream

integer nr = getMCNr()
returnsthemaximumnumberofcomponentsinastream

doublezv=StrZv(integerstream)
givenastreamreturnstherelevantcompressibilityfactor(gasphase)

doublemw=StrMw(integerstream)
givenastreamreturnstheaveragedmolecularweight(allphases)

doublev=StrV(integerstream)
givenastreamreturnsthespecificvolumeassumofspecificvolumesofallphases

doublemw=StrGMw(integerstream)
givenastreamreturnstheaveragedmolecularweight(gasphase)

doublemw=StrLMw(integerstream)
givenastreamreturnstheaveragedmolecularweight(liquidphase)

60

doubleh=StrH(integerstream)
givenastreamreturnsthetotal(stream)enthalpy(gas+liquid+solidphases)

doubleh=StrGH(integerstream)
givenastreamreturnsthetotal(stream)enthalpy(gasphase)

doubleh=StrSGH(integerstream)
givenastreamreturnsthespecific(unitweight)enthalpy(gasphase)

doubleh=StrLH(integerstream)
givenastreamreturnsthetotal(stream)enthalpy(liquidphase)

doubleh=StrSLH(integerstream)
givenastreamreturnsthespecific(unitweight)enthalpy(liquidphase)

doubleh=StrSH(integerstream)
givenastreamreturnsthetotal(stream)enthalpy(solidphase)

doubleh=StrSSH(integerstream)
givenastreamreturnsthespecific(unitweight)enthalpy(solidphase)

doublecp=StrGICp(integerstream)
givenastreamreturnstheidealgasheatcapacity

doublecp=StrGCp(integerstream)
givenastreamreturnsthespecificheatcapacity(constantpressure,gasphase)

doublecv=StrGCv(integerstream)
givenastreamreturnsthespecificheatcapacity(constantvolume,gasphase)

doublecp=StrLCp(integerstream)
givenastreamreturnsthespecificheatcapacity(constantpressure,liquidphase)

doublecv=StrLCv(integerstream)
givenastreamreturnsthespecificheatcapacity(constantvolume,liquidphase)

doublecp=StrSCp(integerstream)
givenastreamreturnsthespecificheatcapacity(constantpressure,solidphase)

doubless=StrMSS(integerstream)
givenastreamreturnsthespeedofsound(gas,liquid)ascalculatedwithHEMmodelformixedphases

doubless=StrGSS(integerstream)
givenastreamreturnsthespeedofsoundingasphase

doubless=StrLSS(integerstream)
givenastreamreturnsthespeedofsoundinliquidphase

doublejt=StrGJT(integerstream)
givenastreamreturnstheJouleThomsoncoefficientingasphase

doublejt=StrLJT(integerstream)
givenastreamreturnstheJouleThomsoncoefficientinliquidphase

doubleic=StrGIC(integerstream)
givenastreamreturnstheisothermalcompressibilitycoefficient-(1/V)*dV/dPingasphase

doubleic=StrLIC(integerstream)
givenastreamreturnstheisothermalcompressibilitycoefficient-(1/V)*dV/dPinliquidphase

doublev=StrGVE(integerstream)
givenastreamreturnsthevolumetricexpansivitycoefficient-(1/V)*dV/dTingasphase

doubleic=StrLVE(integerstream)
givenastreamreturnsthevolumetricexpansivitycoefficient-(1/V)*dV/dTinliquidphase 61

doubles=StrGS(integerstream)
givenastreamreturnsthetotal(stream)entropy(gasphase)

doubles=StrSGS(integerstream)
givenastreamreturnsthespecific(unitweight)entropy(gasphase)

doubles=StrLS(integerstream)
givenastreamreturnsthetotal(stream)entropy(liquidphase)

doubles=StrSS(integerstream)
givenastreamreturnsthetotal(stream)entropy(solidphase)

doubles=StrSLS(integerstream)
givenastreamreturnsthespecific(unitweight)entropy(liquidphase)

doubles=StrSSS(integerstream)
givenastreamreturnsthespecific(unitweight)entropy(solidphase)

doubles=StrS(integerstream)
givenastreamreturnsthetotal(stream)entropy(gas+liquid+solidphases)

integerres=setWm(integerstream,doubleW)
givenastreamandflow(massbasis),setstheflow

doublew=getWm(integerstream)
givenastreamreturnstheflowspecifiedforthatstream.

doublehc=StrHC(integerstream)
givenastreamreturnsthecalculatednetheatofcombustion(gasphase).

doublefl=StrFML(integerstream)
givenastreamreturnsthecalculatedflammabilityleanlimit(gasphase).

doublefl=StrFMH(integerstream)
givenastreamreturnsthecalculatedflammabilityrichlimit(gasphase).

doubled=StrLD(integerstream)
givenastreamreturnsthecalculatedliquiddensity(atoperatingconditions).

doubled=StrGD(integerstream)
givenastreamreturnsthecalculatedgasdensity(atoperatingconditions).

doubletc=StrLC(integerstream)
givenastreamreturnsthecalculatedliquidthermalconductivity(atoperatingconditions).

doubletc=StrGC(integerstream)
givenastreamreturnsthecalculatedgasthermalconductivity(atoperatingconditions).

doublev=StrLV(integerstream)
givenastreamreturnsthecalculatedliquidviscosity(atoperatingconditions).

doublev=StrGV(stream)
givenastreamreturnsthecalculatedgasviscosity(atoperatingconditions).

doublest=StrST(integerstream)
givenastreamreturnsthecalculatedsurfacetension(atoperatingconditions).

Integercpnr=StrCPnr(integerstream)
givenastreamreturnsthenumberofcriticalpointsdetectedandcalculated,togetacriticalpointusethemethodsStrPc()and StrTc()settingvalueofposintherange1-cpnr

doublep=StrPc(integerstream,Integerpos)
givenastreamandthecriticalpointpositioninthelist(seemethodStrCPnr())returnsthecriticalpressure

doublet=StrTc(integerstream,Integerpos)
givenastreamandthecriticalpointpositioninthelist(seemethodStrCPnr())returnsthecriticaltemperature. 62

doublep=StrCBp(integerstream)
givenastreamreturnsthecricodenBarpressure.

double t= StrCBt(integer stream)


givenastreamreturnsthecricodenBartemperature.

doublep=StrCTp(integerstream)
givenastreamreturnsthecricodenThermpressure.

doublet=StrCTt(integerstream)
givenastreamreturnsthecricodenThermtemperature.

doubleac=StrAc(integerstream)
givenastreamreturnstheacentricfactor(molefractionaverage).

63

Methodsforstreamsdefinition
ProdePropertiesincludesasetoffunctionstodefineastreambyprogram(asalternativetoutilizethePropertiesEditor) typicalapplication ! callinitS()

! ! ! ! ! ! !

definethelistofcomponentswithputCC() definethemolefractionofeachcomponentwithputZ() callsetS()todefinethestream utilizethemethodsdescribedinparagraphMethodstodefinethermodynamicmodelstodefinethemodels callsetW()todefinetheflow callloadSB()toloadthestandardBIPsfromdatabase asalternativetodefinespecificBIPsutilizethemethodsPutCi(),PutCj(),PutMod(),PutKji(),PutGij(),PutAji()

integerres=initS(integerstream)
givenastreaminitializesalldataforsuccessivedatatransferoperations.Thismethodmustbecalledbeforerestoringstreamsdata fromarchives(filesetc.)

integerres=putCC(integerstream,integerpos,integercompcode)
givenastream,componentsposition(incomponentslist)andcomponentcodesetsthecodeincomponentslist.

integerres=putZ(integerstream,integerpos.,doubleZi)
givenastream,compspositionandZ,setsthecompspos.inZvector(composition,molarbasis)forthatstream

integerres=setS(integerstream)
givenastreamperformsasequenceofvalidatingoperationsondata.Thismethodmustbecalledaftertohaverestoredstreams datafromarchives(filesetc.)Methodstodefineainitialconditionforastream

ntegerres=loadSB(integerstream)
givenastreamloadsallBIPavailableindatabase.Thismethodmustbecalledafterthestreamhasbeendefinedsinceitrequires thelistofcomponents.

doubleZi=getZ(integerstream,integerpos.)
givenastreamandcomponentsposition(incomponentslist)returnsthecompsZ(molarfraction)

integercc=getCC(integerstream,integerpos)
givenastreamandcomponentsposition(incomponentslist)returnsthecomponentcode(aintegerthatidentifiesthecomponent inchemicalsfile).

integer nr = getMBPNr()
returnsthemaximumnumberof(interactioncoefficients)binarypairsinastream

intci=getCi(integerstream,integerpos)
givenastreamandposition(ininteractionscoeff.list)returnsthefirstcomponentreference(aintegerthatidentifiesthecomponent incomponentslist).

integerres=PutCi(integerstream,integerpos,integerci)
givenastream,position(ininteractioncoefficientslist)andfirstcomponentreferencesetsthecomponentsreferenceininteraction coefficientslist.

intcj=getCj(integerstream,integerpos)
given a stream and position (in interactions coeff. list) returns the second component reference (an integer that identifies the componentincomponentslist).

integerres=PutCj(integerstream,integerpos,integercj)
givenastream,position(ininteractioncoefficientslist)andsecondcomponentreferencesetsthecomponentsreferenceininteraction coefficientslist.

intmodel=getMod(integerstream,integerpos)
givenastreamandposition(ininteractionscoeff.list)returnstherelatedmodel(anintegerthatidentifiesthemodel).

integerres=PutMod(integerstream,integerpos,integermodel)
givenastream,position(ininteractioncoefficientslist)andamodelidentifiersetsthemodelininteractioncoefficientslist.

64

doublekji=getKji(integerstream,integerpos)
givenastreamandposition(ininteractionscoeff.list)returnstheKjiinteractioncoefficient.

integerres=PutKji(integerstream,integerpos,doubleKji)
givenastream,position(ininteractioncoefficientslist)andKjivaluesetsthevalueininteractioncoefficientslist.

doublegji=getGji(integerstream,integerpos)
givenastreamandposition(ininteractionscoeff.list)returnstheGjiinteractioncoefficient.

integerres=PutGji(integerstream,integerpos,doubleGji)
givenastream,position(ininteractioncoefficientslist)andGjivaluesetsthevalueininteractioncoefficientslist.

doublegij=getGij(integerstream,integerpos)
givenastreamandposition(ininteractionscoeff.list)returnstheGijinteractioncoefficient.

integerres=PutGij(integerstream,integerpos,doubleGij)
givenastream,position(ininteractioncoefficientslist)andGijvaluesetsthevalueininteractioncoefficientslist.

doubleaji=getAji(integerstream,integerpos)
givenastreamandposition(ininteractionscoeff.list)returnstheAjiinteractioncoefficient.

integerres=PutAji(integerstream,integerpos,doubleAji)
givenastream,position(ininteractioncoefficientslist)andAjivaluesetsthevalueininteractioncoefficientslist.

65

Methodstodefinestreamsoperatingconditions
ProdePropertiesincludesasetoffunctionstodefinetheintial(operating)conditionofastream,thesecanbeutilizedasalternative tothestandardinitializationviasetOp()method typicalapplication ! callrstValidSop()

! ! ! ! ! ! ! !

definecompostioninphase1withputW() definephasefractionwithputPF() definephasetypewithputPT() setphase1asvalid,setValidPhase() continuewithanotherphase(2...n) definetemperaturewithputT() definepressurewithputP() setconditionsasvalidwithsetValidSop()

integerresult=rstValidSop(integerstream)
Givenastreamclearsthecompostionsofdifferentphasesatoperatingconditions

integerresult=setValidSop(integerstream)
Givenastreamsetsthecompostionsofdifferentphasesatoperatingconditions.asvalid.

integerresult=setValidPhase(integerstream,integerphase)
Givenastreamandphasesetsthephasecompostion.asvalid.

integerresult=putW(integerstream,integerphase,intcompnr,doublew)
Givenastream,phase,componentnumberandcomponentsmolarfractioninthatphasestoresthevalue

integerresult=putPF(integerstream,integerphase,doublefraction)
Givenastream,phaseandphasefractionstoresthephase.fractionvalue

integerresult=putPT(integerstream,integerphase,inttype)
Givenastream,phaseandphasetype(vapor,liquid,solid)storesthephasetype

ntegerresult=putT(integerstream,doublet)
Givenastreamandoperatingtemperaturestoresthevalue

ntegerresult=putP(integerstream,doublep)
Givenastreamandoperatingpressurestoresthevalue

Copyofstreams
tomakeacopyofastreamutilizethemethod integerres=StrCopy(integerstream1,integerstream2)
Giventwostreams(stream1andstream2)copiesthestream2intostream1

66

Methodsforsolvingstagedcolumns
Note:thismethodutilizesthestandardANSICconventionforexchangingparameters(seethesamples providedwiththesoftware)
Propertiesincludesaprocedureforsolvingstagedcolumns,thecolumnismodeledwithstgnrequilibriumstages,columnmay includeacondenserandarebolier,stagenumberingisbottomup,thebottomstage(reboiler,ifspecified)isnumberoneandthe topstage(condenser,ifspecified)isnumberstgnr Theremaybeoneormorefeeds,afeedismodeledbyenteringliquidonthespecifiedstageandvaporportiontothestageabove (withexceptionoftopstage). Theremaybeoneormoresidestreams Heatadded/removedoneachstagecanbespecified Efficiencyparameteroneachstagecanbespecified

integerres=DCOL(intcsep,intstgnr,intinit,double*stgt,double*stgp,double*stgef,double*stgdH, intprod_h,intbtm_h,intfnr,int*fstr,int*fpos,intsnr,int*sstr,int*spos,int*sft, double*sflow,intvnr,double*vrv,int*vtype,int*ptype,int*piv,double*prv, double*flows)


Parameters: csep (int) stgnr (int) init (int) stgt (double*) stgp (double*) stgef (double*) stgdH (double*) prod_h(int) btm_h (int) fnr (int) fstr (int*) fpos (int*) snr (int) sstr (int*) spos (int*) sft (int*) sflow (double*) vnr (int) vtype (int*) vrv (double*) ptype (int*) piv (int*) prv (double*) flows (double*) Codesforvariables reboiler totalcondenser partialcondenser Codesforspecifications refluxratio producttofeedratio(molarfract.) bottomtofeedratio(molar fract.) component(molarfract.)intopproduct component(molarfract.)inbottomproduct componentrecoveryintopproduct componentrecoveryinbottomproduct columntype:1VLE,2VLLE,3LLE(somefeaturesavailableinextendedversions) numberofstages 0(FALSE)forautomaticinitialization,1(TRUE)wheninitialtemperaturesandflowsaredefined vector(stgnr)withstagetemperatures vector(stgnr)withspecifiedstagepressures vector(stgnr)withspecifiedstageefficiency,permittedrange0,1-1 vector(stgnr)withspecifieddH(heatadded,removed) streamfortopproduct/distillate streamforbottomproduct numberoffeeds vector(fnr)withthefeedingstreams vector(fnr)withfeedspositions1-stgnr numberofsidestreams vector(snr)withthelistofsidestreams vector(snr)withsidestreamspositions(1-stgnr) vector(snr)withspecifiedflowtype(GAS_PHASE,LIQ_PHASE,seeCodesusedinProdelibrary) vector(snr)withthespecified(oneachsidestream)sideproducttofeedflowratio numberofvariablestosolve vector(vnr)withtypeofvariable(seebelow) vector(vnr)withcalculatedvaluesforvariable vector(pnr)withtypeofspecification(seebelow) vector(pnr)withintegervaluesasthepositionofcomponentsinthelist vector(pnr)withvaluesofthespecificationstosolve vectorwithcalculatedvaluesforvapor/liquidflowsinallstages,dimensionnrphases*nrc*stgnr whenacondenserispresenttherefluxistheliquidflowontopstage 1 2 3 1 2 3 4 5 6 7

Notes: Whenpassing/returningparamentersthefirstelementinvectorsistheelement0 Mainvariables(1-vnr)are(whenspecified)reboilerandcondenser(partialortotal),eachvariable(oftypedefinedinvtype) requiresasuitablespecification(inptype,piv,prv),usuallyforreboilerthespecificationistheproducttofeedratioandfora condensertherefluxratio,butspecificationsbasedoncomponentsfractionsontopandbottomproductsarepermitted,inthese casesspecifyinpivthepositionofselectedcomponentinthelistandinprvthevalueofthefractionrequired Secondaryvariablesaresidestreams(1-snr),eachsidestream(definedinsstr,spos)requires(insflow)aspecificationforthe sideproductto(total)feedflowratio. Thecolumnismodeledwiththermodynamicsandoptionsdefinedforthefirstfeedinthelist. 67

Initialization inmostcasestheproceduredoesntrequiretoinitializevalues,whenrequiredsetthevariableinitto1anddefinetheproper initialvaluesinvectorsstgtandflows,notethatinasequenceofsimilaroperations(forexamplewhencontrollingtheoperating pointofacolumn)itmayresultusefultoreintroducethecalculatedvaluesasstartingpointforthenewcalculus Examples Columnwith8stages,1feed(stage4),pressurereboiler12.5Bar,pressuretop12Bar,efficiency1,dH=0 csep stgnr init stgp[0] ...... stgp[7] stgef[0] ...... stgef[7] stgdH[0] ...... stgdH[7] prod_h btm_h fnr fstr fpos =1 =8 =0 =12.5 =12 =1 =1 =0 =0 =stream1 =stream2 =1 =stream3 =4

variables:reboilerandtotalcondenser specifications :component2fractionintopproductandbottomproducttotofeedratio vnr vtype[0] ptype[0] piv[0] prv[0] vtype[1] ptype[1] piv[1] prv[1] =2 =1 =4 =2 =0.96 =2 =3 =0 =0.4

variables:reboiler,partialcondenserand2sidestreams(liquidandgasphases) specifications :component2fractionintopproduct,bottomproducttofeedratio,sidestreamsflowtofeedratio vnr vtype[0] ptype[0] piv[0] prv[0] vtype[1] ptype[1] piv[1] prv[1] snr sstr[0] spos[0] sft[0] sflow[0] sstr[1] spos[1] sft[1] sflow[1] =2 =1 =4 =2 =0.96 =3 =3 =0 =0.4 =2 =stream4 =4 =LIQ_PHASE =0.12 =stream5 =8 =GAS_PHASE =0.078

68

MethodsforReactors
Note:thismethodutilizesthestandardANSICconventionforexchangingparameters(seethesamples providedwiththesoftware)
simulationofreactors

intres=REACT(intstreamIn,streamOut,intmodel,intNrReactions,double**Conv,doublePout,double dHeat)
Parameters: streamIn streamOut model NrReactions Conv Pout dHeat (int) (int) (int) (int) (double**) (double) (double) inletstream outletstream modelforreactor(seebelow) numberofreactions matrix(NrComponents,NrReactions)tospecifyreactions outputpressure heatadded,removed 1 2

Codesformodels Gibbs EquilibriumReactor additionalmodelsonrequest

69

Methodsforfluidflowproblems
simulationofsinglephase,two-phases,multiphaseflowoncircularpipes

intres=PIPE(intstream,intmodel,doublediam,doublerough,doublelength,doubledHeight, doubledHeat)
Parameters: stream (int) model (int) diam (double) rough (double) length (double) dHeight(double) dHeat (double) inletstream modelforfluidflowandphaseequilibria(seebelow) pipeinternaldiameter parameterdefiningrelativepiperoughness lenghtofthissegment heightdifference(inlet,outlet) heatadded,removed

Codesformodels Beggs&Brill/Hazen-Williams/AGA additionalmodelsonrequest

MethodsforHydratesphaseequilibria
methodsforcalculatinghydrateformationpressure(ortemperature)

doublep=HPFORM(intstream,doublet,intmethod) doublet=HTFORM(intstream,doublep,intmethod)
Parameters: stream (int) t(double) method(int) inletstream operatingtemperature(oroperatingpressure) 1=assumefreewaterpresent,thisoptionproducesconservativevalues 2=calculateamountofwaterinliquidphase 3=solveasmultiphaseequilibria,solvephaseequilibriaincludingsolidsasice

MethodsforsolvingaPolytropicoperation
Polytropicstage(compressionandexpansion)

doubleval=PSPF(intstream,doublepout,intmodel,doubleparam)
Parameters: stream (int) pout(double) model(int) param(double) inletstream outletpressure model,seebelowcodes1-4 formodel1and3specifiedpolytropicefficiency(range0-1) formodel2and4(measured)outlettemperature

theprocedurecanmodelcompressionandexpansionunitssuchascentrifugalcompressors,expansionturbinesetc. theprocedurereturns -calculatedtemperature options1,3 -calculatedefficiency options2,4 modelsavailable(**) 1 2 3 4 giveninitialcondition,poutandpolytropicefficiencycalculatesoutletcondition, R.A.HuntingtonEvaluationofPolytropiccalculationMethodsforTurbomachineryPerformance, methodapplicabletogasphaseonly giveninitialcondition,poutandtoutcalculatespolytropicefficiency, R.A.HuntingtonEvaluationofPolytropiccalculationMethodsforTurbomachineryPerformance, methodapplicabletogasphaseonly giveninitialcondition,poutandpolytropicefficiencycalculatesoutletcondition R.ParonPolytropicsolutionwithphaseequilibria methodapplicabletogasandmixed(gas+liquid)phases giveninitialcondition,poutandtoutcalculatespolytropicefficiency, R.ParonPolytropicsolutionwithphaseequilibria methodapplicabletogasandmixed(gas+liquid)phases

(**)additionalmodelsavailablefromProde 70

Methodsforreliefvalvesdesign/rating
Thisunitmodelsareliefvalvewithdifferentmethods

doublearea=ISPF(intstream,doublepout,intmodel,double*param)
Parameters: stream (int) pout(double) model(int) param(double) inletstream outletpressure model,seebelowcodes1-4 correctionparameter,seebelowtherangeofvalues

theproceduremodelsareliefvalveatspecifiedoperatingconditionsandreturnsthecalculatedarea modelsavailable(**) 1 2 3 4 model HEM HNE HNE-DS NHNE HEMHomogeneousEquilibrium(SolutionofMassFluxintegral) HNEHomogeneousNon-equilibrium(HEMwithBolingDelayandGas-LiquidSlipContributes) HNE-DS ,HomogeneousNon-equilibrium NHNENon-homogeneousNon-equilibrium recommendedrangeofvaluesforcorrectionparameter notrequired 0.7-0.8forsafetyvalves seethepaper 0.7-0.8forsafetyvalves

(**)additionalmodelsavailablefromProde

71

Methodsforcalculatingequilibriumlinesinphasediagrams
Note:thesemethodsutilizethestandardANSICconventionforexchangingparameters,thedistribution includessamplestoshowhowtoutilizethesemethodsindifferentlanguages ProdePropertiesincludesmethodsforcalculatingdifferenttypesofphasediagrams vapor-liquid vapor-liquid-liquid vapor-liquid-solid(**) (**)featureavailableinextendedversions
typicalapplication ! definethestream,settherequiredphaseequilibria(vapor-liquid,vapor-liquid-liquid,vapor-liquid-solid)

! ! !

callPELnr()tocalculatethephasediagramandobtainthenumberoflinesavailable oneachlinecallPELP(),PELT(),PELine()toobtainthedataforthedifferentlines ifrequiredcallPFLine()tocalculatealinewithspecifiedphasefractionadstate

integerlnr=PELnr(integerstream)
Givenastreamcalculatesthephasediagramandreturnsthenumberofequilibriumlinesavailable

integerlnr=PELT(integerstream,integerline)
Givenastreamandtheline,returnsthelinetype(seebelow)

1=bubbleline 2=dewline 3=threephaseline integerlnr=PELP(integerstream,integerline)


Givenastreamandtheline,returnsthelineproperty(seebelow)

1=vapor-liquid 2=vapor-liquid-liquid 3=vapor-solid 4=liquid-solid integernrpt=PELine(integerstream,integerline,double*P,double*T,intmaxpt)


Givenastream,thelineandtwoarrays(0-maxptelements)theprocedurereturnsnrpt<maxptequilibriumpointsinspecifiedline

integernrpt=PVLine(integerstream,integerline,double*P,double*T,double*H,double*S,double*V,int maxpt)
Givenastream,thelineandfivearrays(0-maxptelements)theprocedurereturnsnrpt<maxptequilibriumpointsinspecifiedline, inadditionstot,pvaluesthismethodreturnsenthalpy,entropyandvolumevaluescalculatedatequilibriumpoints thismethodallowstocalculatealinewithspecifiedphasefractioninspecifiedstate(gas,liquid,solid)

integernrpt=PFLine(integerstream,doublepf,double*P,double*T,intmaxpt)
Given a stream, a state, a specified phase fraction and two arrays (0-maxpt elements) the procedure returns nrpt < maxpt equilibriumpointsinspecifiedphasefractionline

72

Methodsfordirectaccesstoproperties(F,H,S,V)andderivatives(T,P,W)
Note:thesemethodsutilizethestandardANSICconventionforexchangingparameters, ifdesiredwecanexportallpropertiesandderivativesindifferentformats,askfordetails. integerres=StrFv(integerstream,integerstate,doublet,doublep,double*w,double*fg)
Givenapredefinedstreamtherequiredstate(vapor,liquid,solid))andoperatingconditionsreturnsthevectoroffugacities(Pa)

integerres=StrFvd(integerstream,integerstate,doublet,doublep,double*w,double*fg,double*dfgt, double*dfgp,double**dfgw)
Givenapredefinedstreamtherequiredstate(vapor,liquid,solid))andoperatingconditionsreturnsthevectoroffugacities(Pa) andrelatedderivativesvs.temperature(K),pressure(Pa),composition(note:derivativesvs.compositionasmatrix[n][m])

integerres=StrFvdv(integerstream,integerstate,doublet,doublep,double*w,double*fg,double*dfgt, double*dfgp,double*dfgw)
Givenapredefinedstreamtherequiredstate(vapor,liquid,solid))andoperatingconditionsreturnsthevectoroffugacities(Pa) andrelatedderivativesvs.temperature(K),pressure(Pa),composition(note:derivativesvs.compositionasvector[n*m])

integerres=StrlnFv(integerstream,integerstate,doublet,doublep,double*w,double*lnfg)
Givenapredefinedstreamtherequiredstate(vapor,liquid,solid))andoperatingconditionsreturnsthevectoroflnfugacities

integerres=StrHv(integerstream,integerstate,doublet,doublep,double*w,double*H)
Givenapredefinedstreamtherequiredstate(vapor,liquid,solid))andoperatingconditionsreturnsthemolarenthalpy(Kj/Kmol)

integerres=StrHvd(integerstream,integerstate,doublet,doublep,double*w,double*H,double*dHt, double*dHp,double*dHw)
Givenapredefinedstreamtherequiredstate(vapor,liquid,solid))andoperatingconditionsreturnsthemolarenthalpy(Kj/Kmol) andrelatedderivativesvs.temperature,pressure,composition

integerres=StrSv(integerstream,integerstate,doublet,doublep,double*w,double*S)
Givenapredefinedstreamtherequiredstate(vapor,liquid,solid))andoperatingconditionsreturnsthemolarentropy(Kj/Kmol-K)

integerres=StrSvd(integerstream,integerstate,doublet,doublep,double*w,double*S,double*dSt, double*dSp,double*dSw)
Givenapredefinedstreamtherequiredstate(vapor,liquid,solid))andoperatingconditionsreturnsthemolarentropy(Kj/Kmol-K) andrelatedderivativesvs.temperature,pressure,composition

integerres=StrVv(integerstream,integerstate,doublet,doublep,double*w,double*V)
Givenapredefinedstreamtherequiredstate(vapor,liquid,solid))andoperatingconditionsreturnsthemolarvolume(M3/mol)

integerres=StrVvd(integerstream,integerstate,doublet,doublep,double*w,double*V,double*dVt, double*dVp,double*dVw)
Givenapredefinedstreamtherequiredstate(vapor,liquid,solid))andoperatingconditionsreturnsthemolarvolume(M3/mol)and relatedderivativesvs.temperature,pressure,compositionMethodsforstreamsdataaccess

73

Extendedmethodsforaccessingstreamsproperties
Thesefunctions(whichareotherwaysequivalenttostandardmethods)permitinadditiontosettheoperatingconditionsatwhichthe requiredpropertymustbeevaluated.Thismayresultusefulinmanycases,forexamplewhenutilizingProdePropertiesmethodsas macrosfromExcelcells.Caution:theisothermalflashwillresetanyprevioussettingsandyoushouldusewithcarethesemethods insequentialcalculus.

doublemw=EStrGMw(integerstream,doublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnsthemolecularweightforgasphase

doublemw=EStrLMw(integerstream,doublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnsthemolecularweightforliquidphase

doublelf=EStrLf(integerstream,doublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnsliquidfraction(molarbasis)instream

doublepf=EStrPf(integerstream,integerstate,doublet,doublep)
givenastream,state(gas,liquid,solid)pressureandtemperatureperformsanisothermalflashandreturnsthephasefraction (molarbasis)inspecifiedstate

doublezv=EStrZv(integerstream,doublet,doublep)
given the stream, pressure and temperature performs an isothermal flash and returns the relevant compressibility factor (gas phase)

doubleh=EStrH(integerstream,doublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnstheenthalpy(gas+liquidphase)

doublev=EStrV(integerstream,doublet,doublep)
givenastream,pressureandtemperatureperformsanisothermalflashandreturnsthespecificvolumeassumofspecificvolumes ofallphases

doublecp=EStrGCp(integerstream,doublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnsthespecificheatcapacity(constantpressure, gasphase)

doublecv=EStrGCv(integerstream,doublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnsthespecificheatcapacity(constantvolume, gasphase)

doublecp=EStrLCp(integerstream,doublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnsthespecificheatcapacity(constantpressure, liquidphase)

doublecv=EStrLCv(integerstream,doublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnsthespecificheatcapacity(constantvolume, liquidphase)

doublec=EStrGIC(integerstream,doublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnstheisothermalcompressibilityingasphase

doublec=EStrLIC(integerstream,doublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnsthetheisothermalcompressibilityinliquid phase

doubless=StrMSS(integerstream,doublet,doublep)
giventhestreampressureandtemperatureperformsanisothermalflashandreturnsreturnsthespeedofsound(gas,liquid)as calculatedwithHEMmodelformixedphases

doubless=EStrGSS(integerstream,doublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnsthespeedofsoundingasphase

doubless=EStrLSS(integerstream,doublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnsthespeedofsoundinliquidphase

doublejt=EStrGJT(integerstream,doublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnstheJouleThomsoncoefficientforgasphase 74

doublejt=EStrLJT(integerstream,doublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnstheJouleThomsoncoefficientforliquidphase

doubleic=EStrGIC(integerstreamdoublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnstheisothermalcompressibilitycoefficient(1/V)*dV/dPingasphase

doubleic=EStrLIC(integerstreamdoublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnstheisothermalcompressibilitycoefficient-(1 /V)*dV/dPinliquidphase

doublev=EStrGVE(integerstreamdoublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnsthevolumetricexpansivitycoefficient-(1/ V)*dV/dTingasphase

doublev=EStrLVE(integerstreamdoublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnsthevolumetricexpansivitycoefficient-(1/ V)*dV/dTinliquidphase

doublehc=EStrHC(integerstream,doublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnsthenetheatofcombustion(gasphase).

doublefl=EStrFML(integerstream,doublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnstheflammabilityleanlimit(gasphase).

doublefl=EStrFMH(integerstream,doublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnstheflammabilityrichlimit(gasphase).

doubles=EStrS(integerstream,doublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnstherelativeentropy(gas+liquidphase)

doubled=EStrLD(integerstream,doublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnsthecalculatedliquiddensity(atoperating conditions).

doubled=EStrGD(integerstream,doublet,doublep)
given the stream, pressure and temperature performs an isothermal flash and returns the calculated gas density (at operating conditions).

doubletc=EStrLC(integerstream,doublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnsthecalculatedliquidthermalconductivity(at operatingconditions).

doubletc=EStrGC(integerstream,doublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnsthecalculatedgasthermalconductivity(at operatingconditions).

doublev=EStrLV(integerstream,doublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnsthercalculatedliquidviscosity(atoperating conditions).

doublev=EStrGV(stream,doublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnsthecalculatedgasviscosity(atoperating conditions).

doublest=EStrST(integerstream,doublet,doublep)
giventhestream,pressureandtemperatureperformsanisothermalflashandreturnsthecalculatedsurfacetension(atoperating conditions).

75

Methodsforchemicalsfileaccess
ProdePropertiesincludesasetoffunctionsforchemicaldatafileaccess.Componentsarereferencedviaacomponentcodewhich isanintegerwithvalueintherange1togetFCNR()

Integer nr = getFCNr()
returnsthenumberofcomponentsinChemicalsFile

Variantstr=MCompF(integercode)
giventhecomponentcodereturnstherelevantcomponentformula(eventuallytruncatedtostringmaximumlenght),thisisthe Microsoftcompatiblemethod

char*str=CompF(integercode)
giventhecomponentcodereturnstherelevantcomponentformula(eventuallytruncatedtostringmaximumlength),thisistheANSI Ccompatiblemethod

Variantstr=MCompN(integercode)
given the component code returns the relevant component name (eventually truncated to string maximum length) , this is the Microsoftcompatiblemethod

char*str=CompN(integercode)
giventhecomponentcodereturnstherelevantcomponentname(eventuallytruncatedtostringmaximumlength),thisistheANSI Ccompatiblemethod

intid=CompID(integercode)
giventhecomponentcodereturnscomponentsID(itstheCASnumber)

intcc=CompCID(integerid)
giventhecomponentIDreturnsthecomponentscode

doublemw=CompMw(integercode)
giventhecomponentcodereturnstherelevantmolecularweight

doubletc=CompTc(integercode)
giventhecomponentcodereturnstherelevantcriticaltemperature

doubleac=CompAc(integercode)
giventhecomponentcodereturnstherelevantacentricfactor

doublevc=CompVc(integercode)
giventhecomponentcodereturnstherelevantcriticalvolume

doublepc=CompPc(integercode)
giventhecomponentcodereturnstherelevantcriticalpressure

doubledm=CompDm(integercode)
giventhecomponentcodereturnsthedipolemoment

doublerg=CompRg(integercode)
giventhecomponentcodereturnstheradiusofgyration

doublesol=CompSol(integercode)
giventhecomponentcodereturnsthesolubilityparameter

doublehf=CompHf(integercode)
giventhecomponentcodereturnsthestd.enthalpyofformation

doublegf=CompGf(integercode)
giventhecomponentcodereturnstheGibbsenergyofformation

doublesf=CompSf(integercode)
giventhecomponentcodereturnstheenthalpyoffusion

doublenb=CompNb(integercode)
giventhecomponentcodereturnsthenormalboilingpoint

doublemp=CompMp(integercode)
giventhecomponentcodereturnsthemeltingpoint 76

doublep=CompVP(integercode,doublet)
giventhecomponentcodeandatemperature,returnsthecalculatedsaturationpressure(calculatedviaChemicalsfiletemperature dependentcorrelation)

doubleh=CompHG(integercode,doublet0,doublet1)
giventhecomponentcode,initialandfinaltemperaturesforintegration,returnsthecalculatedidealgasenthalpy(calculatedvia Chemicalsfiletemperaturedependentcorrelation)

doubles=CompSG(integercode,doublet0,doublet1)
giventhecomponentcode,initialandfinaltemperaturesforintegration,returnsthecalculatedidealgasentropy(calculatedvia Chemicalsfiletemperaturedependentcorrelation)

doubleh=CompHL(integercode,doublet0,doublet1)
giventhecomponentcode,initialandfinaltemperaturesforintegration,returnsthecalculatedidealliquidenthalpy(calculatedvia Chemicalsfiletemperaturedependentcorrelation)

doubles=CompSL(integercode,doublet0,doublet1)
giventhecomponentcode,initialandfinaltemperaturesforintegration,returnsthecalculatedidealliquidentropy(calculatedvia Chemicalsfiletemperaturedependentcorrelation)

doubleh=CompHS(integercode,doublet0,doublet1)
giventhecomponentcode,initialandfinaltemperaturesforintegration,returnsthecalculatedidealsolidenthalpy(calculatedvia Chemicalsfiletemperaturedependentcorrelation)

doubles=CompSS(integercode,doublet0,doublet1)
giventhecomponentcode,initialandfinaltemperaturesforintegration,returnsthecalculatedidealsolidentropy(calculatedvia Chemicalsfiletemperaturedependentcorrelation)

doubleh=CompHV(integercode,doublet)
giventhecomponentcodeandatemperature,returnsthecalculatedlatentheat(calculatedviaChemicalsfiletemperaturedependent correlation)

doublev=CompLV(integercode,doublet)
giventhecomponentcodeandatemperature,returnsthecalculatedliquidviscosity(calculatedviaChemicalsfiletemperature dependentcorrelation)

doublev=CompGV(integercode,doublet)
giventhecomponentcodeandatemperature,returnsthecalculatedgasviscosity(calculatedviaChemicalsfiletemperature dependentcorrelation)

doubled=CompLD(integercode,doublet)
giventhecomponentcodeandatemperature,returnsthecalculatedliquiddensity(calculatedviaChemicalsfiletemperature dependentcorrelation)

doubletc=CompLC(integercode,doublet)
giventhecomponentcodeandatemperature,returnsthecalculatedliquid(thermal)conductivity(calculatedviaChemicalsfile temperaturedependentcorrelation)

doubletc=CompGC(integercode,doublet)
given the component code and a temperature, returns the calculated gas (thermal) conductivity (calculated via Chemicals file temperaturedependentcorrelation)

doublest=CompST(integercode,doublet)
giventhecomponentcodeandatemperature,returnsthecalculatedsurfacetension(calculatedviaChemicalsfiletemperature dependentcorrelation)

doubled=CompSD(integercode,doublet)
giventhecomponentcodeandatemperature,returnsthecalculatedsoliddensity(calculatedviaChemicalsfiletemperature dependentcorrelation)

doubletc=CompSC(integercode,doublet)
giventhecomponentcodeandatemperature,returnsthecalculatedsolid(thermal)conductivity(calculatedviaChemicalsfile temperaturedependentcorrelation)

77

Methodstoset/accessstreamsnames
InProdePropertiesstreamshaveseveralpropertiesincludingalabel(name)whichcouldmatch(forexample)thenameofalinein yourproject,youcaneasilyset/accesstheselabelsthroughaseriesofmethods.

Variantstr=MStrN(integerstream)
givenainteger(thatidentifiesastream)methodreturnsasMicrosoftVarianttypethestringidentifyingthatstreamthisisaMicrosoft compatiblemethod

char *str = StrN(integer stream)


givenainteger(thatidentifiesastream)methodreturnsasANSICtypethestringidentifyingthatstream.

integerres=MputN(integerstream,Variantstr
givenainteger(thatidentifiesastream)andaMicrosoftVariantstringidentifyingthatstreamthismethodsetsthelabel,thisisa Microsoftcompatiblemethod

integer res = putN(integer stream, char *str)


givenainteger(thatidentifiesastream)andaANSICstringidentifyingthatstreamthismethodsetsthelabel.

78

Methodstoset/accessdifferentoptions
Toset/accessthedifferentoptionsavailableinProdePropertiesthelibraryincludestwomethods,getOM()andsetOM(),these methodsaccept/returna32bitinteger,eachbitintheintegerrepresentsadifferentoption,seebelowashortlistofthemost importantoptionsavailable.

intom=getOM(integerstream)
givenastreamreturnsacode(integer)whichdefinesthesettings

integerres=setOM(integerstream,integeroption)
givenastreamandmodelcodesetstheoptions.

CodesusedinProdelibrary

Tableofcodestospecifythedifferentoptions reference:methodsgetOM(),setOM()... Caution!Thecodesmaychangeindifferentversions. Bit 1 2 3 4 5 6 7 8 8 9 Decimalvalue 1 2 4 8 16 32 64 128 256 512 Option setmultiphasevapor+liquid setmultiphasevapor+liquid+solid reducethenumberoftrialphases(inmultiphase) usePenelouxtocorrectliquidvolume useisocompressibilitycoeff.todetectsinglephasestate evaluatestabilityofeachphaseinequilibrium calculateallcriticalpointsdetected selectEOSrootforminimumGibbsenergy validateEOSrootaccordingstate selectstd.EOSparameters

tosetoneormoreoptionscallsetOM()passingasvalueaintegerwiththesum(decimalvalues)ofallrequiredoptions.

Tableofcodestospecifythedifferentstates reference:methodsDCOL(),setMFg(),getMFg()... Code 0 1 2 State Vaporphase Liquidphase Solidphase

79

Tableofcodestospecifythedifferentmodels reference:methodssetMFg(),getMFg()... Caution!Somemodelsmaynotbeavailableand/orthecodesmaychangeindifferentversions(contactProdefordetails). Code 1 11 21 31 32 33 40 50 51 60 61 62 63 65 66 67 70 71 75 76 80 81 90 95 96 100 101 102 105 Model Regular Pitzer Hayden-OConnell Wilson NRTL Uniquac Unifac Soave-Redlich_Kwong(VDW) Soave-Redlich_KwongAPI(VDW) PengRobinson(VDW) PengRobinson-Wilson(WS) PengRobinson-UNIQUAC(WS) PengRobinson-NRTL(WS) PengRobinson-Wilson(HV) PengRobinson-UNIQUAC(HV) PengRobinson-NRTL(HV) BWR BWRS LeeKesler LeeKesler(Plocker) SSMsimplifiedSolidSolutionModel Hydrates(CPA,VDW-Platteeuw) PCSAFT CPASRK CPAPR Steamtables(IAPWS1995) GERG(ISO18453) GERG(2008) AGA(ISO20765)

80

Methodstodefinethermodynamicmodels
TodefineorretrievethethermodynamicmodelsassociatedwithastreamthelibraryincludesseveralmethodssetKM()permitsto defineapackage(asetofdifferentmodels)whilesetMFg(),setMH(),setMS(),setMV()permittodefinespecificmodels.

integerres=setKM(integerstream,integerKcode)
givenastreamandthecodeforthepredefinedpackage(contactProdeforthelistofpredefinedpackagesavailableindifferent versions)setsthepackage.

integerres=setMFg(integerstream,integermodel,integerstate)
givenastream,therelatedphase(Vapor,Liquid,Solid)andthemodelthismethodsetsthespecifiedmodelforfugacityandreturns TRUEincaseofsuccess,otherwisereturnsFALSE

integerm=getMFg(integerstream,integerstate)
givenastreamandtherelatedphase(Vapor,Liquid,Solid)thismethodreturnsthespecifiedmodelforfugacity

integerres=setMH(integerstream,integermodel,integerstate)
givenastream,therelatedphase(Vapor,Liquid,Solid)andthemodelthismethodsetsthespecifiedmodelforenthalpyandreturns TRUEincaseofsuccess,otherwisereturnsFALSE

integerm=getMH(integerstream,integerstate)
givenastreamandtherelatedphase(Vapor,Liquid,Solid)thismethodreturnsthespecifiedmodelforenthalpy

integerres=setMS(integerstream,integermodel,integerstate)
givenastream,therelatedphase(Vapor,Liquid,Solid)andthemodelthismethodsetsthespecifiedmodelforentropyandreturns TRUEincaseofsuccess,otherwisereturnFALSE

integerm=getMS(integerstream,integerstate)
givenastreamandtherelatedphase(Vapor,Liquid,Solid)thismethodreturnsthespecifiedmodelforentropy

integerres=setMV(integerstream,integermodel,integerstate)
givenastream,therelatedphase(Vapor,Liquid,Solid)andthemodelthismethodsetsthespecifiedmodelforvolumeandreturns TRUEincaseofsuccess,otherwisereturnFALSE

integerm=getMV(integerstream,integerstate)
givenastreamandtherelatedphase(Vapor,Liquid,Solid)thismethodreturnsthespecifiedmodelforvolume

81

Methodstocontrolerrorsmessages
PROPERTIESincludesasetoffunctionstocontroltheerrormessages.BydefaultPROPERTIESproducesanerrormessagevia aMicrosoftWindowsDialogBoxeverytimeanerrorisdiscovered.Thisapproachcanslowdowntheprocesswhenalongsequence oferrorsoccursinanextendedcalculationsequence,suchasaniterativeconvergencecalculation.Abettersolutioninthatsituation istoprovideastatusflagthatcanbeinterrogatedandusedbytheusersatconvenientpointsinthesequence.

setErrFlag(integerstate)
givenaBoolean(state)setstheerrorflagtoTRUEorFALSE.Theflagshouldbecleared(state=FALSE)beforeeachsequenceof calculationsandtested(methodgetErrFlag())afterthecalcs.Ifthisisdone,thenaflagstateofTRUEindicatesthatanerrorhas occurredsomewhereinthecalculationsequence).

integerres=getErrFlag()
avalueofTRUEmeansthatanerrorhasbeenfound,pleasenotethatPROPERTIESdoesntcleartheerrorflagstate,Youshould cleartheerrorflag(viasetErrFlag())beforeeachsequenceofcalcs.

defErrMsg(integerstate)
a value TRUE for variable state sets on the Microsoft Windows Dialog Box and a message will appear every time an error is discovered.AvalueFALSEsetsoffthedialogbox(nomessagesoferror).

Variantstr=MErrMsg()
Returnsthelasterrormessagegenerated,thisistheMicrosoftcompatiblemethod

char *str = ErrMsg()


Returnsthelasterrormessagegenerated,thisistheANSICcompatiblemethod

Methodsforaccessingdata-editingwindows
ProdePropertiesincludestwopredefinedmethodsforactivatingPropertieseditor

integerres=edS(ntegerstream)
givenainteger(thatidentifiesastream)methodactivatesthePropertiesEditoronthespecifiedstream

integer res = edSS()


thismethodactivatesthePropertiesEditoronfirststream

Methodstoload/savearchives
ArchivesarefileswhichcontainacopyofthedatausedbyProdePropertiestomanagestream'sandunitsofmeasurement,when youopenanarchivethestream'sdataandunitsareloaded,whenyouchoosetosaveanarchivethesedataarestoredinafile. Archivesareusefultocreatecopiesofyourworkotherwaysalldatawillbelostwhenleavingtheapplication,ProdeProperties includesmethodsforoperationsonarchives.

integerres=AOpen()
openafileasarchive(browseforfile)

integerres=AFOpen(char*path)
openthefilespecifiedin*pathasarchive

integerres=ASave()
saveafileasarchive(browseforfile)

integerres=AFSave(char*path)
savethefilespecifiedin*pathasarchive

82

Methodsforaccessing/definingtheunitsofmeasurement
ProdePropertiesincludesmethodsforaccessinganddefiningtheunitsofmeasurement,thesemethodsutilizeanumericcodefor identifyingthecorrespondentquantities,refertotheparagraphAccessviasoftwaretotheunitsofmeasurementforalistofthese codes.

integerres=getUMC(integerUM)
givenainteger(thatidentifiesaquantity)methodreturnstheselectedUMforthatquantity.

integerres=setUMC(integerUM,integersel)
giventwointegers(thefirstidentifiesaquantityandthesecondtheselection)methodselectsaUMforthatquantity.

integerres=getUMN(integerUM)
givenainteger(thatidentifiesaquantity)methodreturnsthenumberofdifferentunitsofmeasurementavailableforthatquantity.

Variantstr=MgetUMS(integerUM,integersel)
giventwointegers(thefirstidentifiesaquantityandthesecondtheselection)methodreturnsasMicrosoftVarianttypethestring identifyingtheselectedUM,thisisaMicrosoftcompatiblemethod

char*str=getUMS(integerUM,integersel)
giventwointegers(thefirstidentifiesaquantityandthesecondtheselection)methodreturnsasANSICtypethestringidentifyingthe selectedUM.

Variantstr=MgetSUMS(integerUM)
givenaintegerUMforquantitythismethodreturnsasMicrosoftVarianttypethestringidentifyingtheselectedUM,thisisa Microsoftcompatiblemethod

char*str=getSUMS(integerUM)
givenaintegerUMforquantitythismethodreturnsasANSICtypethestringidentifyingtheselectedUM. doubleres=UMCR(doublevalue,integerUM,integerSEL) givenavalue,thecodeforquantityandselectionconvertstoreferenceandreturnstheresult doubleres=UMCS(doublevalue,integerUM,integerSEL) givenavalue,thecodeforquantityandselectionconvertsfromreferenceandreturnstheresult

integerres=UMAU(doublea,doubleb,char*name,integerUM)
giventhecodeforaquantity,theparametersa,brequiredforconversionandthenameaddsanew(userdefined,temporary) unit.

integerres=UMRAU(integerUM)
giventhecodeforaquantityremovesalladditional(temporary)units

Additionalmethods
doublep=getPatm()
returnstheinternalreference(userdefined)foratmosfericpressurequantity.

83

Applicationexamples
WepresentheresomenotesaboutProdePropertiesapplicationsinformofFAQthatshouldassistuserstoeasilyextendfeatures oraddinterfaces.

TipsoncreationofProdePropertiesapplications
Includeacommand(menu,buttonetc.)foraccessingthePropertiesEditor(methodedS(stream)) EnsurethatunitsofmeasurementarethosedefinedinProdePropertiesorincludemethodstosettheunits. UseisSDef()methodtotestastreamsvaliditybeforeaccessingthestream.Accessinganundefinedstreamgeneratesalarge numbersoferrors. Includefunctionsforcontrollingerrormessagesifyouhaveextendedcalculationsequences.Whenmanagingerrormessages ensurethatyoutestattheendofthecalculationsequencetocaptureanyproblemsthatmayhaveoccurred. Whendebuggingalwaysattempttolimitthecomplexityofproblemsandexpandprogressivelytothefullapplication,retestingat intervalsasyouexpandthescopeofyourproblem.

UserdefinedIDforaccessingthecomponentsinchemicalsfile
InProdePropertieseachcomponentinchemicalsfileincludesaIDwhichpermitstoaccessthatcomponent,thisfeaturepermits tomaintainauniqueidentificationnumberalsowhenthechemicalfilechanges.TheIDmustbeaintegertype,asdefaulttheCAS numberhasbeenadoptedbuttheusermayeditandchangethisvaluefromthePropertiesEditor.Thefunctionsforaccessing componentsinProdePropertiesrequirethecomponentcode,thiscodemayvaryindifferentversionsofchemicalfile,toconvertthe IDtothecomponentcodeutilizethemethodCompCID()andCompID()toconvertfromcodetoID thisexampleshowshowtoaccessdata withIDcode DimcodeAsLong,IDAsLong,PcAsDouble ID =74840 CAScodeforEthane(buttheusermaydefinehisownlistofvalues) code =CompCID(ID) getthecode Pc = CompPc(code) andthecriticalpressure mperature

84

Howtodefinedirectlyastream(withoutaccessingthePropertiesEditor)
ProdePropertiesincludesmethodstoaccess(readandwrite)eachdifferentvalueinastream,makingitpossiblefortheuserto createproceduretodefine/edit/updatedirectlyeachvaluewithoutgoingthroughthePropertieseditor Followinglistpresentsthemethodsforaccessingallitems operatingpressure, operatingtemperature, getT() flow, vector[getMCNr()elements]withcomponentscodes vector[getMCNr()elements]Zvector,molebasis getZ() thermodynamicmodel(andrelatedoptions) vector[getMBPNr()elements]ofCi vector[getMBPNr()elements]ofCj vector[getMBPNr()elements]ofKji vector[getMBPNr()elements]ofGji vector[getMBPNr()elements]ofGij readthevalue getP() setOp() getW() getCC() putZ() getKM() getCi() getCj() getKji() getGji() getGij() set the value setOp() setW() putCC() setKM() putCi() putCj() putKji() putGji() putGij()

Whendefiningastreamonemustfollowthesesteps. callinitS()methodtoclearallstreamsdata definedata callsetS()methodtovalidatethedata

Thefollowingexampleshowshowtodefinea2componentsstream

Call initS(Stream) Call setMfg(Stream, SRK, 0) Call setMfg(Stream, SRK, 1) ........................... Call putZ(Stream, 1, z1) Call putCC(Stream, 1, cc1) Call putZ(Stream, 2, z2) Call putCC(Stream, 2, cc2) Call setS(Stream) Call setW(Stream, W) Call loadSB(Stream)

see the paragraph Codes used in Prode library define the models for all required properties and states

validates stream flow load BIPS from database

85

Howtosaveandrestorestreamsto/fromafile
Archivesarefileswhichcontainacopyofallcompositions,operatingconditions,unitsofmeasurement,settingsetc.,archivesare usefulforcreatingcopiesofyourworkotherwaysalldatawillbelostwhenleavingtheapplication. Thelibraryincludesmethodstoloadandsavearchives,seetheparagraphMethodstoload/savearchivesforthelist.

Call AOpen() Call AFOpen(e:/def.ppp) Call ASave() Call AFSave(e:/def.ppp)

open a file as archive (browse for file) open the specified file as archive save a file as archive (browse for file) save the specified file as archive

86

Errormessages
PROPERTIESmaygeneratethefollowingerrormessages.Forsomeofthese,anactionissuggested

Memoryallocationerror
Alimitinresourcesallocation(closeapplications,releasememoryandrestart)

Corruptedfile,errorreadingdatafile
PROPERTIEScannotaccessafile,thismaydependfromthefilenotbeingintheproperdirectoryorbeingcorrupted,itissuggested thatYoureinstallPROPERTIES.

Internalerror
Thiserrormaydependfromseveraldifferentconditions,themostcommonisawrongparameterinafunction(i.e.anattemptto passavalueoutofpermittedrange).CheckYourcode.

toomanylocalvariables toomanyvariables
alimitinresourcesallocation(seeabove)

calc.onundefinedstreamdata
anundefinedstreamfoundwhileexecutingcalcs(editanddefinethestream)

undefinedstreamsoperatingconditions
pressure,temperatureorflowareundefined(editanddefinethestream)

errorcallingthermocalc.procedure
wrong input value (calcs cannot converge) or calcs outside temperature range (check chemicals file for limits in temperature correlations).

cannotconvergecalcsloop
Awrongconvergenceconditionhasbeenspecified(i.einanadiabaticflashcalcsathermalconditionthatcannotbereachedby varyingtemperature,pressureorliquidfraction;aparameterisoutsiderangelimitsetc.)

T,PvaluesoutsideH,Srangecalcs
Awrongconditionhasbeenspecifiedandaparameterinenthalpy/entropycalcsisoutsiderangelimits

toomanycompsinastream
whentwoormorestreamsaremixedthetotalnr.ofcomponentsmayexceedthemaximum someinconsistencesinstreamsdata

erroraccessingcomponentsdataarchive
unavailabledata(aunspecifiedcomponent)orcalcsoutsidetemperaturerange.

Stackerror(nomemory),reloadprocedure
alimitinresourcesallocation(seeabove)

Methodnotavailableinthisversion
Attempttodefineamethodnotavailableinthatversion,editthestreamanddefineanewmethod

AstreamwithSteamTablesmodelmusthaveonly1component
YoushouldspecifyastreamwithonecomponentonlyinordertoapplyASMESteamTablesmodel

87

Calculationbasis
Theusercanspecifywhichmethodtouseselectingthemodels. PleaserefertotheparagraphreferenceliteratureandModelsforadditionalinformationaboutthemethods. Fugacity Enthalpy Entropy Volume calculatedaccordingselectedmodel calculatedaccordingselectedmodel calculatedaccordingselectedmodel calculatedaccordingselectedmodel

Viscosity
gas lowpressuremixingruleaccordingWilke(1950),operatingconditionscorrectionaccordingStielandThodos(1964). liquid logarithmicaveragemixingrule,pressurecorrectionaccordingLucas(1981)

Thermalconductivity
gas lowpressuremixingruleaccordingMasonandSaxena(1958),operatingconditionscorrectionaccordingStielandThodos(1964) liquid mixingruleaccordingLi(1976)

Surfacetension
mixingruleaccordingMacLeod-Sugden

Heatofcombustion
weightaveragemixingruleaccordingISOstd.(databasecontainsvaluesinKj/Kg)

Flammabilitylimits
mixingruleaccordingLeChatelierasdiscussedbyCoward&Jones(1952)

Limitsinthermodynamiccalcs
Enthalpy,Entropycalcs
InProdePropertiestheusercanspecifydifferentinitialconditionsforenthalpyandentropy,seetheparagraphConfigsettingsfor additionaldetails.

Temperature,pressureranges
Temperaturerange Pressurerange 1K-5000K 1Pa1000Bar

88

ChemicalsFileformat
Note:alldatadependentcorrelationsinchemicalsfilehavearangeoftemperatureforapplication,outsidethisrangetheymay provideinconsistentresults.ProdePropertieschecksforthisrange(asdefinedbyhighandlowlimitsinchemicalsfile)andattempts toextenddatawhenrequired(whenoperatingconditionsareoutsidetherangeofapplicationofcorrelations),thismayproducein somecasesinconsistentresultswithsimplemodelsandpropertieswhichrequiredifferentiation,forexamplespecificheatcapacity.

Flexibledataformat
ProdePropertiesutilizesproprietarycodewhichallowsupto30correlationsandcustomunitstodefineeachtemperaturedependent property,allmajorstandardsincludingDIPPRandothersaresupported. Chemicalsdatafile ProdePropertiesbaseversionadoptsthefollowingformat 1 Formula string 12 chars max 2 Name (1) (main list) string 40 chars max 3 Name (2) (user defined list) string 40 chars max 4 Name (3) (user defined list) string 40 chars max 5 Identification number (CAS as default) 6 Molecular weight 7 Critical temperature 8 Critical pressure 9 Critical volume 10 Acentric factor 11 Dipole Moment 12 Radius of Gyration 13 Solubility parameter 14 Standard enthalpy of formation (298 K) 15 Gibbs free energy of formation (298 K, 1 atm) 16 Normal boiling point 17 Enthalpy of fusion 18 Melting point 19 Flammability lean limit % (range 0-100) 20 Flammability rich limit % (range 0-100) 21 Autoignition temperature 22 Net heat of combustion 23 Uniquac q size parameter 24 Uniquac r size parameter 25 Unifac functional group (a) qty 26 Unifac functional group (a) structure 27 Unifac functional group (b) qty 28 Unifac functional group (b) structure 29 Unifac functional group (c) qty 30 Unifac functional group (c) structure 31 Unifac functional group (d) qty 32 Unifac functional group (d) structure 33 Unifac functional group (e) qty 34 Unifac functional group (e) structure 35 Unifac functional group (f) qty 36 Unifac functional group (f) structure 37 CPA SRK Association parameter 38 CPA SRK parameter 1 39 CPA SRK parameter 2 40 CPA SRK parameter 3 41 CPA SRK Association Energy 42 CPA SRK Association Volume 43 CPA PR Association parameter 44 CPA PR parameter 1 45 CPA PR parameter 2 46 CPA PR parameter 3 47 CPA PR Association Energy 48 CPA PR Association Volume 49 SAFT Association parameter 50 SAFT parameter 1 51 SAFT parameter 2 52 SAFT parameter 3 53 SAFT Association Energy 54 SAFT Association Volume 55 Peng Robinson Extended , parameter A 89

56 57 58 59 60

Peng Robinson Peng Robinson Soave Redlich Soave Redlich Soave Redlich

Extended , parameter B Extended , parameter C Kwong Extended , parameter A Kwong Extended , parameter B Kwong Extended , parameter C

Gas heat capacity correlation 61 type of equation 62 unit for property 63 unit for temperature 64 low temperature limit 65 high temperature limit 66-70 A-E (5 parameters) Vapor viscosity correlation 71 type of equation 72 unit for property 73 unit for temperature 74 low temperature limit 75 high temperature limit 76-80 A-E (5 parameters) Vapor thermal conductivity correlation 81 type of equation 82 unit for property 83 unit for temperature 84 low temperature limit 85 high temperature limit 86-90 A-E (5 parameters) Heat of vaporization correlation 91 type of equation 92 unit for property 93 unit for temperature 94 low temperature limit 95 high temperature limit 96-100 A-E (5 parameters) Liquid vapor pressure correlation 101 type of equation 102 unit for property 103 unit for temperature 104 low temperature limit 105 high temperature limit 106-110 A-E (5 parameters) Surface tension 111 type of equation 112 unit for property 113 unit for temperature 114 low temperature limit 115 high temperature limit 116-120 A-E (5 parameters) Liquid density correlation 121 type of equation 122 unit for property 123 unit for temperature 124 low temperature limit 125 high temperature limit 126-130 A-E (5 parameters) Liquid viscosity correlation 131 type of equation 132 unit for property 133 unit for temperature 134 low temperature limit 135 high temperature limit 136-140 A-E (5 parameters) 90

Liquid thermal conductivity correlation 141 type of equation 142 unit for property 143 unit for temperature 144 low temperature limit 145 high temperature limit 146-150 A-E (5 parameters) Liquid heat capacity correlation 151 type of equation 152 unit for property 153 unit for temperature 154 low temperature limit 155 high temperature limit 156-160 A-E (5 parameters) Solid vapor pressure correlation 161 type of equation 162 unit for property 163 unit for temperature 164 low temperature limit 165 high temperature limit 166-170 A-E (5 parameters) Solid density correlation 171 type of equation 172 unit for property 173 unit for temperature 174 low temperature limit 175 high temperature limit 176-180 A-E (5 parameters) Solid thermal conductivity correlation 181 type of equation 182 unit for property 183 unit for temperature 184 low temperature limit 185 high temperature limit 186-190 A-E (5 parameters) Solid heat capacity correlation 191 type of equation 192 unit for property 193 unit for temperature 194 low temperature limit 195 high temperature limit 196-200 A-E (5 parameters)Sourcesofdata

91

Sourcesofdata
Datainchemicaldatafilecomefromseveralsourcesincluding: DechemaChemistryDataser.textbooks DIPPRdatacollectiontextbooks TechnicalDataBook,PetroleumRefining Duetothelargedifferencesincriticalandtransportpropertiesfoundindifferentsources,DIPPR(AICHEDesignInstituteforPhysical PRopertyData)referencehasbeenselectedasadefault.

Componentsidentification
Componentsareidentifiedbyname(fromDIPPRlist),chemicalformulaandIdentificationnumber.

Regressionproceduresandresults
CoefficientsincorrelationshavebeencalculatedwithacustomprogramthatusesamodifiedversionofLevenberg-Marquardt algorithm,reportederrors(ateachfittingpoint)areusuallylowerthan1%ofinputvaluesforthemostcomplexcorrelations(i.e. vaporpressure),),howeverinsomecasestheymaybehigher.

Consistencytests
Whenrelationsexistbetweenthermodynamicproperties(i.e.acentricfactorandcriticalpressureandtemperature,vaporpressure andheatofvaporizationetc.)aconsistencytesthasbeenperformed.

ComparingProdePropertiesresultsagainstthoseofdifferentprocesssimulators
Whencomparingdatafromdifferenttoolsonemustverifythat thedifferenttoolsdousethesamethermodynamicmodels propertiesindatabankshavesiimilarvalues listsandvaluesofBIPsandotherparametreswhichcaninfluenceresultshavesimilarvalues

92

Models
Thebaseversionincludesthissetofthermodynamicmodels,additionalmodelsareavailablefromtheauthor Regular
Propertiescalculatedaccordingidealfluidlaw

Wilson
PropertiescalculatedaccordingWilson(G.M.Wilson1964)

NRTL
PropertiescalculatedaccordingNRTL(RenonandPrausnitz,1968)

UNIQUAC
PropertiescalculatedaccordingUNIQUAC(AbramsandPrausnitz,AICHEJ.1975)

UNIFAC
LiquidactivitycoefficientcalculatedaccordingUNIFAC(Fredeslund,Jones,Prausnitz,AICHEJ.1975)

Soave-Redlich-Kwong
DifferentvariantsofSoaveRedlichKwongmodel(GiorgioSoave,1972)areavailablefromauthor, baseversionofProdePropertiesincludesstandardandextendedversion, extendedversionincludesparameterscalculatedtofitexperimentaldata(saturationpressure,density,latentheat)

PR,PengRobinson
DifferentvariantsofPengRobinsonmodel(D.Y.Peng,D.B.Robinson,1976)areavailablefromauthor, baseversionofProdePropertiesincludesstandardandextendedversionwithvanderWaalsandcomplex(Wong-Sandler)mixing rules extendedversionincludesparameterscalculatedtofitexperimentaldata(saturationpressure,density,latentheat)

BWRS,Benedict-Webb-Rubin-Starling
PropertiescalculatedaccordingBenedict-Webb-RubinStarlingHan(1972)

LKP,LeeKeslerPlocker
Properties calculatedaccordingLee-Kesler-Plocker(1978)

AGA(ISO20765)
GasvolumecalculatedaccordingAGAreport(ISO20765)

GERG(ISO18453)
Fugacity calculatedaccordingGERGreport(ISO18453)

CPASRK
PropertiescalculatedasQ=Qphys+QasswhereQphysisderivedfromSoaveRedlichKwongmodelwithparameterscalculated tofitexperimentaldata(saturationpressure,density,latentheat)andQassistheassociationterm(G.M.Kontogeorgis,E.Voutsas, I.Yakoumis,D.P.Tassios1996)

CPAPR
DifferentvariantsofCPAmodelareavailablefromtheauthor, inCPAPRPropertiesarecalculatedasQ=Qphys+QasswhereQphysisderivedfromPengRobinsonmodelwithparameters calculatedtofitexperimentaldata(saturationpressure,density,latentheat)andQassistheassociationtermcalculatedasinCubic PlusAssociationmodel,CPAPR(1999)hasbeenverifiedtogivegoodaccuracy.

SSMSolidSolutionModel
solidphasetreatedashomogeneoussolution,solidfugacityderivedfromliquidfugacitycalculatedaccordingselectedmodel

Steamtables(IAPWS1995)
Water/steampropertiescalculatedaccordingIAPWS1995formulationforthethermodynamicpropertiesofWaterforgeneraland scientificuse,issuedbytheInternationalAssociationforthePropertiesofWaterandSteam

Hydrates
HydratephasecalculatedaccordingVDW-PlatteeuwprocedureandCPA-SRKmodelforsolid,vaporandliquidfugacities.

93

UNIFACfunctionalgroups
TheunderlyingideainUNIFACmethodisthatamoleculecanbeconsideredasacollectionoffunctionalgroups.Themainadvantage of this approach is that from a relatively small number of functional groups the properties of many different molecules can be predicted.TheUNIFACmodelisusefulforestimatingsolutionbehaviourintheabsenceofexperimentaldata.ProdeProperties incorporatestheUNIFACGroupContributionrevision5(January1992,J.P.Baker). Followingthemaingroupsandsubgroupstable:

Code Main
1 2 3 4 5 6 7 8 70 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 CH2

Subgroup

Example

C=C

ACH ACCH2 OH CH3OH H2O ACOH CH2CO CHO CCOO HCOO CH2O

CNH2 CNH (C)3N ACNH2 Pyridine CCN COOH CCl CCl2 CCl3 CCl4 ACCl CNO2

CH3 Hexane CH2 n-Hexane CH 2-Methylpropane C Neopentane CH2=CH 1-Hexene CH=CH 2-Hexene CH2=C 2-Methyl-1-butene CH=C 2-Methyl-2-butene C=C 2,3-Dimethylbutene ACH Naphthaline AC Styrene ACCH3 Toluene ACCH2 EthylBenzene ACCH Cumene OH n-Propanol CH3OH Methanol H2O Water ACOH Phenol CH3CO Butanone CH2CO Pentanone-3 CHO Propionicaldehyde CH3COO Butylacetate CH2COO Methylpropionate HCOO Ethylformate CH3O Dimethylether CH2O Diethylether CHO Diisopropylether THF Tetrahydrofuran CH3NH2Methylamine CH2NH2Ethylamine CHNH2 Isopropylamine CH3NH Dimethylamine CH2NH Diethylamine CHNH Diisopropylamine CH3N Trimethylamine CH2N Triethylamine ACNH2 Aniline C5H5N Pyridine C5H4N 2-Methylpyridine C5H3N 2,3-Dimethylpyridine CH3CN Acetonitrile CH2CN Propionitrile COOH Aceticacid HCOOH Formicacid CH2Cl Butane-1-chloro CHCl Propane-2-chloro CCl 2-Methylpropane-2-chloro CH2Cl2 Methane-dichloro CHCl2 Ethane-1,1-dichloro CCl2 Propane-2,2-dichloro CHCl3 Chloroform CCl3 Ethane-1,1,1-trichloro CCl4 Methane-tetrachloro ACCl Benzene-chloro CH3NO2 NitroMethane CH2NO2 Propane-1-nitro CHNO2 Propane-2-nitro

94

Code Main
57 58 59 60 61 62 63 64 65 66 67 68 69 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 ACNO2 CS2 CH3SH

Subgroup

Example

ACNO2 Benzene-nitro CS2 CarbonDisulfide CH3SH Methanethiol CH2SH Ethanethiol Furfural Furfural Furfural DOH DOH 1,2-Ethanediol I I Iodoethane Br Br Bromoethane C-C CH-C Hexyne-1 C-C Hexyne-2 DMSO DMSO Dimethylsulfoxide ACRY Acrylnitril Acrylnitrile ClCC Cl-(C=C) Ethene-trichloro ACF ACF Hexafluorobenzene DMF DMF-1 N,N-Dimethylformamide DMF-2 N,N-Diethylformamide CF2 CF3 Perfluorohexane CF2 CF Perfluoromethylcyclohexane COO COO Methylacrylate SiH2 SiH3 Methylsilane SiH2 Diethylsilane SiH Heptamethyltrisiloxane Si Heptamethyldisiloxane SiO SiH2O 1,3-Dimethyldisiloxane SiHO 1,1,3,3-Tetramethyldisiloxane SiO Octamethylcyclotetrasiloxane NMP NMP N-methylpyrrolidone CClF CCl3F Trichlorofluoromethane CCl2F Tetrachloro-1,2-difluoroethane HCCl2F Dichlorofluoromethane HCClF 1-Chloro-1,2,2,2,-tetrafluoroethane CClF2 1,2-Dichlorotetrafluoroethane HCClF2 Chlorodifluoromethane CClF3 Chlorotrifluoromethane CCl2F2 Dichlorodifluoromethane CON CONH2 Acetamid CONHCH3 N-Methylacetamid CONHCH2 N-Ethylacetamid CON(CH3)2 N,N-Dimethylacetamid CONCH3CH2 N,N-methylethylacetamid CON(CH2)2 N,N-Diethylacetamid OCCOH C2H5O22-Ethoxyethanol C2H402 2-Ethoxy-1-propanol CH2S CH3S Dimethylsulfide CH2S Diethylsulfide CHS Diisopropylsulfide Morpholine MORPH Morpholine ThiopheneC4H4S Thiophene C4H3S 2-Methylthiophene C4H2S 2,3-Dimethylthiophene

95