Petroleum Engineering Huazhou Li Multiphase Equilibria of Complex Reservoir Fluids An Equation of State Modeling Approach Petroleum Engineering Editor-in-Chief GbengaOluyemi,RobertGordonUniversity,Aberdeen,Aberdeenshire,UK SeriesEditors AmirmasoudKalantari-Dahaghi,DepartmentofPetroleumEngineering,West VirginiaUniversity,Morgantown,WV,USA AlirezaShahkarami,DepartmentofEngineering,SaintFrancisUniversity,Loretto, PA,USA MartinFernø,DepartmentofPhysicsandTechnology,UniversityofBergen, Bergen,Norway TheSpringerseriesinPetroleumEngineeringpromotesandexpeditesthedissem- ination of new research results and tutorial views in the field of exploration andproduction.Theseriescontainsmonographs,lecturenotes,andeditedvolumes. The subject focus is on upstream petroleum engineering, and coverage extends to all theoretical and applied aspects of the field. Material on traditional drilling and moremodernmethodssuchasfrackingisofinterest,asaretopicsincludingbutnot limitedto: (cid:129) Exploration (cid:129) Formationevaluation(welllogging) (cid:129) Drilling (cid:129) Economics (cid:129) Reservoirsimulation (cid:129) Reservoirengineering (cid:129) Wellengineering (cid:129) Artificialliftsystems (cid:129) Facilitiesengineering Contributions to the series can be made by submitting a proposal to the responsible publisher, Anthony Doyle at [email protected] or the AcademicSeriesEditor,[email protected]. Moreinformationaboutthisseriesathttp://www.springer.com/series/15095 Huazhou Li Multiphase Equilibria of Complex Reservoir Fluids An Equation of State Modeling Approach HuazhouLi DepartmentofCivilandEnvironmental Engineering,SchoolofMining andPetroleumEngineering UniversityofAlberta Edmonton,AB,Canada ISSN2366-2646 ISSN2366-2654 (electronic) PetroleumEngineering ISBN978-3-030-87439-1 ISBN978-3-030-87440-7 (eBook) https://doi.org/10.1007/978-3-030-87440-7 ©TheEditor(s)(ifapplicable)andTheAuthor(s),underexclusivelicensetoSpringerNature SwitzerlandAG2022 Thisworkissubjecttocopyright.AllrightsaresolelyandexclusivelylicensedbythePublisher,whether thewholeorpartofthematerialisconcerned,specificallytherightsoftranslation,reprinting,reuse ofillustrations,recitation,broadcasting,reproductiononmicrofilmsorinanyotherphysicalway,and transmissionorinformationstorageandretrieval,electronicadaptation,computersoftware,orbysimilar ordissimilarmethodologynowknownorhereafterdeveloped. Theuseofgeneraldescriptivenames,registerednames,trademarks,servicemarks,etc.inthispublication doesnotimply,evenintheabsenceofaspecificstatement,thatsuchnamesareexemptfromtherelevant protectivelawsandregulationsandthereforefreeforgeneraluse. Thepublisher,theauthorsandtheeditorsaresafetoassumethattheadviceandinformationinthisbook arebelievedtobetrueandaccurateatthedateofpublication.Neitherthepublishernortheauthorsor theeditorsgiveawarranty,expressedorimplied,withrespecttothematerialcontainedhereinorforany errorsoromissionsthatmayhavebeenmade.Thepublisherremainsneutralwithregardtojurisdictional claimsinpublishedmapsandinstitutionalaffiliations. ThisSpringerimprintispublishedbytheregisteredcompanySpringerNatureSwitzerlandAG Theregisteredcompanyaddressis:Gewerbestrasse11,6330Cham,Switzerland Stillnessiseasytomaintain. Whathasnotyetemergediseasytoprevent. Thebrittleiseasytoshatter. Thesmalliseasytoscatter. Solveitbeforeithappens. Orderitbeforechaosemerges. Atreeaswideasaman’sembracegrowsfromatinyshoot. Atowerofninestoriesstartswithapileofdirt. Aclimbofeighthundredfeetstartswherethefootstands. Thosewhoactwillfail. Thosewhoseizewilllose. So,thesagedoesnotactandthereforedoesnotfail,doesnotseize andthereforedoesnotlose. Peoplefailatthethresholdofsuccess. Beascautiousattheendasatthebeginning. Thentherewillbenofailure. Therefore,thesagedesiresnodesire, doesnotvalueraretreasures, learnswithoutlearning, recoverswhatpeoplehaveleftbehind. Hewantsallthingstofollowtheirownnaturebutdaresnotact. —LaoTzu TranslatedbyStefanStenudd Preface Ourearthiscomposedofmattersthatappearasdistinctphasestates.Theapparent onesincludevaporphase,liquidphase,andsolidphase.Inatypicalsummerwalk inasouthwestcommunityintheCityofEdmonton,onecouldeasilyspotastorm pondthatisfilledwithwater,surroundedbybanks,andoverlaidbyair.Allthethree phasescanbeidentifiedeasilywithnakedeyes.Thewaterappearsasaliquidphase, thebanksappearasasolidphase,andtheairappearsasavaporphase. If we drill a well that goes to the deeper part of the earth to tap oil and gas resourcesfromahydrocarbon reservoir,wecanstillencounter theco-existence of three-phasestatesinatinyporespacetherein,albeitbeingunobservablewithnaked eyes.Thethreephaseswouldbeavaporhydrocarbonphase,aliquidhydrocarbon phase, and a solid rock phase. However, the pressure and temperature condition in the tiny pore space would be much more elevated than that in the storm pond. Todescribetheaforementionedvapor-liquid-solidthree-phaseequilibriaunderboth atmospheric and elevated conditions, we resort to thermodynamic models. Some thermodynamic models are capable of modeling such multiphase equilibria over extended pressure/temperature conditions. It is noted, nonetheless, that the solid phaseintheabovetwoscenarioswouldbenormallyexcludedinthethermodynamic modelsasitspresencehasatrivialeffectontheoverallphaseequilibria. Butasolidphasemaybeofrelevancetopetroleumreservoirfluids.Complexfluid mixtures, which do not only exhibit vapor-liquid phase equilibria, but also vapor- liquid-solidphaseequilibria,havebeenincreasinglydiscoveredintheunderground petroleumreservoirs.Thesolidphasesmaybeintheformofasphaltenes,waxes,and hydrates.Itishighlyimportanttoproperlycharacterizethestaticphasebehavioras wellasthedynamicflowbehaviorofthesecomplexfluidsoverawiderangeofcondi- tionsbecausetheycanexertalargeimpactontheproductivityofpetroleumreservoirs. Forexample,waxprecipitationinaparaffinicreservoirfluid,duetothechangeof temperature/pressureconditionsalongtheproductiontubing,maychokethenormal oilproductionorevenrenderthewellunproductive.Tounderstandwhenandwhere waxprecipitationoccurs,onehastobuildathermodynamicmodelthatcanreliably predictthephasebehaviorofsuchparaffinicreservoirfluidundervariedconditions. vii viii Preface This monograph will cover the fundamental thermodynamic frameworks governing the multiphase equilibria of complex reservoir fluids. An emphasis will begiventotheuseofCubicEquationofState(CEOS)modelstodescribethephase equilibriaofcomplexreservoirfluidsaswellasthecorrespondingalgorithmimple- mentations.Thismonographprovidesdetailedcoverageofthetwoessentialmodules ofatypicalmultiphaseequilibriumcalculationalgorithm,i.e.,stabilitytestandmulti- phaseflash.Complementarytootherbookswithsimilartitles,thismonographgives astate-of-the-artoverviewofthemostrobustandefficientversionsofthemultiphase equilibriumcalculationalgorithmswhicharedevelopedintheveryrecentyears. Themonographiscomprisedoffivechapters.Chapter1givesabriefintroduction tothefundamentaltheoriesrelatedtothephasebehaviormodelingofreservoirfluids. Chapter2reviewsthepopularCEOSs.Chapter3focusesonthetheoreticaltreatise andnumericalimplementationofphasestabilitytest.InChap.4,themathematical modelsandnumericalalgorithmsrelatedtotwo-phaseequilibriumcalculationsare presented.ThemonographendswithChap.5whichcoversthemathematicalmodels andnumericalalgorithmsdedicatedtomultiphaseequilibriumcalculations.Atthe end of each chapter, example questions are provided to exemplify the important conceptsandproceduresintroducedintheprecedingsections.Ihopethissuccinct monographwillbeofvaluetoacademicsandengineersworkingintherelatedarea. IwouldliketosincerelythankmyformerPh.D.advisor,Dr.DaoyongYangatthe UniversityofRegina,whointroducedmetotheinterestingfieldofphasebehavior ofreservoirfluidsin2009.IwouldalsoliketothankmyPh.D.studentMr.Lingfei XuforcalculatingthephaseenvelopeshowninQuestion4ofChap.2.Lastbutnot least, I am grateful for the financial support provided by the University of Alberta andtheNaturalSciencesandEngineeringResearchCouncilofCanada(NSERC). Edmonton,Canada HuazhouLi Contents 1 Introduction ................................................... 1 1.1 FirstandSecondLawsofThermodynamics .................... 1 1.2 FundamentalThermodynamicRelations ....................... 2 1.3 PhaseStabilityandPhaseEquilibriumConditions ............... 4 1.4 FugacityandFugacityCoefficients ............................ 5 1.5 GibbsPhaseRule ........................................... 7 1.6 PhaseBehaviorofPureFluids ................................ 7 1.7 PhaseBehaviorofBinaryMixtures ........................... 9 1.8 GeneralPhaseBehaviorofComplexReservoirFluids ........... 12 1.9 ExampleQuestions ......................................... 18 References ..................................................... 23 2 CubicEquationofState ......................................... 25 2.1 BriefOverviewofMostPopularEOSs ........................ 25 2.2 vdWEOS ................................................. 27 2.3 RKEOS .................................................. 29 2.4 SRKEOS ................................................. 30 2.5 PREOS ................................................... 36 2.6 VolumeTranslationModelsinCEOS .......................... 41 2.6.1 HistoricalDevelopment ............................... 41 2.6.2 Impact of Using Volume Translation on Phase EquilibriumCalculations .............................. 45 2.6.3 Distance-Function-BasedVolumeTranslationModel forPREOSandSRKEOS ............................ 47 2.6.4 Pressure–Volume Crossover Issue Caused by Temperature-Dependent Volume Translation Models ............................................. 54 2.7 Huron-VidalMixingRule ................................... 57 2.8 FurtherReadings ........................................... 60 2.9 ExampleQuestions ......................................... 60 References ..................................................... 78 ix x Contents 3 PhaseStabilityTest ............................................. 83 3.1 GibbsFreeEnergyAnalysisofPhaseEquilibria ................ 83 3.2 DerivationoftheTPDFunction .............................. 88 3.3 SolutionMethods ........................................... 92 3.3.1 EquationSolvingApproach ........................... 92 3.3.2 Trust-Region-BasedMinimizationApproach ............. 110 3.4 ExampleQuestions ......................................... 122 References ..................................................... 137 4 Two-PhaseEquilibriumCalculations ............................. 139 4.1 EqualFugacityCondition .................................... 139 4.2 DerivationofRREquation ................................... 139 4.3 OtherFormsofRREquation ................................. 143 4.4 NumericalAlgorithmofTwo-PhaseEquilibriumCalculations .... 144 4.5 ExampleQuestions ......................................... 151 References ..................................................... 160 5 MultiphaseEquilibriumCalculations ............................ 163 5.1 MultiphaseFlashCalculationTheories ........................ 163 5.1.1 RREquationforMultiphaseFlash ...................... 163 5.1.2 MultiphaseFlashApproachProposedbyMichelsen (1994) .............................................. 165 5.1.3 MultiphaseFlashApproachProposedbyLeibovici andNichita(2008) ................................... 166 5.1.4 MultiphaseFlashApproachProposedbyOkunoetal. (2010) .............................................. 167 5.1.5 MultiphaseFlashApproachProposedbyPetitfrere andNichita(2014)andPanetal.(2021) ................. 169 5.2 General Trust-Region-Based Three-Phase Equilibrium CalculationAlgorithm ...................................... 170 5.3 Vapor–Liquid-LiquidThree-PhaseEquilibriumCalculation Algorithms ................................................ 172 5.4 Vapor–Liquid-AqueousThree-PhaseEquilibriumCalculation Algorithms ................................................ 188 5.5 Free-Water and Augmented Free-Water Three-Phase EquilibriumCalculationAlgorithms ........................... 190 5.6 Vapor–Liquid-Asphaltene Three-Phase Equilibrium CalculationAlgorithms ...................................... 190 5.7 FurtherDiscussion .......................................... 198 5.8 FurtherReadings ........................................... 202 5.9 ExampleQuestions ......................................... 202 References ..................................................... 208