• Aucun résultat trouvé

Multiphase flow modeling in multiscale porous media: An open-source micro-continuum approach

N/A
N/A
Protected

Academic year: 2021

Partager "Multiphase flow modeling in multiscale porous media: An open-source micro-continuum approach"

Copied!
27
0
0

Texte intégral

(1)

HAL Id: insu-02946367

https://hal-insu.archives-ouvertes.fr/insu-02946367

Submitted on 23 Sep 2020

HAL is a multi-disciplinary open access

archive for the deposit and dissemination of

sci-entific research documents, whether they are

pub-lished or not. The documents may come from

teaching and research institutions in France or

abroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire HAL, est

destinée au dépôt et à la diffusion de documents

scientifiques de niveau recherche, publiés ou non,

émanant des établissements d’enseignement et de

recherche français ou étrangers, des laboratoires

publics ou privés.

Distributed under a Creative Commons Attribution - NoDerivatives| 4.0 International

License

Multiphase flow modeling in multiscale porous media:

An open-source micro-continuum approach

Francisco J. Carrillo, Ian C. Bourg, Cyprien Soulaine

To cite this version:

(2)

Contents lists available atScienceDirect

Journal

of

Computational

Physics:

X

www.elsevier.com/locate/jcpx

Multiphase

flow

modeling

in

multiscale

porous

media:

An open-source

micro-continuum

approach

Francisco

J. Carrillo

a

,

,

Ian

C. Bourg

b

,

c

,

Cyprien Soulaine

d

,

e aDepartmentofChemicalandBiologicalEngineering,PrincetonUniversity,Princeton,NJ,USA bDepartmentofCivilandEnvironmentalEngineering,PrincetonUniversity,Princeton,NJ,USA cPrincetonEnvironmentalInstitute,PrincetonUniversity,Princeton,NJ,USA

dEarthSciencesInstituteofOrléans(ISTO),CNRS,Universitéd’Orléans,BRGM,Orléans,France eFrenchGeologicalSurvey,BRGM,Orléans,France

a

r

t

i

c

l

e

i

n

f

o

a

b

s

t

r

a

c

t

Articlehistory: Received 17 March 2020

Received in revised form 9 July 2020 Accepted 3 September 2020 Available online 10 September 2020 Keywords: Porous Media Multi-scale Multiphase Micro-continuum Fracture Coastal Barrier

AmultiphaseDarcy-Brinkmanapproachisproposedtosimulatetwo-phaseflowinhybrid systems containing both solid-free regions and porous matrices. This micro-continuum model isrootedinelementaryphysicsand volumeaveragingprinciples,where aunique set ofpartialdifferentialequations isused torepresentflowinbothregionsand scales. ThecruxoftheproposedmodelisthatittendsasymptoticallytowardstheNavier-Stokes volume-of-fluidapproachinsolid-freeregionsandtowardsthemultiphaseDarcyequations in porousregions. Unlikeexistingmultiscale multiphasesolvers, it canmatch analytical predictionsofcapillary,relativepermeability,andgravitationaleffectsatboththeporeand Darcyscales.Throughitsopen-sourceimplementation,hybridPorousInterFoam,theproposed approachmarkstheextensionofcomputationalfluiddynamics(CFD)simulationpackages intoporousmultiscale,multiphasesystems.Theversatilityofthesolverisillustratedusing applicationstotwo-phaseflowinafracturedporousmatrixandwaveinteractionwitha porouscoastalbarrier.

©2020TheAuthor(s).PublishedbyElsevierInc.Thisisanopenaccessarticleunderthe CCBYlicense(http://creativecommons.org/licenses/by/4.0/).

1. Introduction

Virtuallyeveryaspectofsubsurfaceengineeringforenergyandenvironmentalapplicationsrequiresin-depth

understand-ing of multiphase flow within heterogeneous porous media. Examples includeenhanced hydrocarbon recovery, geologic

carbonsequestration,nuclearwastestorage,geothermalenergyproduction,seasonalstorageofnaturalgasingeologic for-mations, andgashydrateformation insediments[54,59,80,113]. Inaddition,multiphase fluiddynamicsinheterogeneous porous mediaplay key rolesinthenaturalfluxesofwaterandcarbon insoilsandsediments[32,73,64,85] as well asin avarietyofengineeringprocesses[7,44].Onelargelyunresolvedchallengeinthefieldistheinabilitytopredictand char-acterize multiphaseflow physics withininherently multiscalestructures, particularlyinsystems thatcontain both porous andsolid-freedomains[33].Althoughthischallenge iswidelyrecognized, thereisincreasedurgencyinaddressing it be-cause ofthe need to sequesterbillionsof tonsof CO2 andto efficiently extract hydrocarbons withoutcausing extensive

environmentaldamage.

*

Corresponding author.

E-mailaddress:franjcf@outlook.com(F.J. Carrillo). https://doi.org/10.1016/j.jcpx.2020.100073

(3)

Whereassingle-phaseflow inporous media isrelatively well understoodfrom atomisticto continuum scales,the dy-namicsofsystemscontainingmultiplephasesremainchallengingtodescribeatallscales[29,60].Multiphaseflowinvolves strong feedbackbetweeninertial,viscous, capillary,andinterfacial forces[65,21]. Thiscoupling isintrinsically multiscale, asinertialandviscousforcesdominateatlargeporesorfractureswhilecapillaryforcesandinterfacialenergeticsdominate within smaller porousmicro-structures. The complex linkagebetweenmicroscopic geometric heterogeneities and macro-scopic processes makes itnecessary to consider scale-dependent processes across porous media in orderto create truly predictivemodels,fromthescaleofmicroscopicinterfaces(

μm),to porenetworksandlabcolumns(

cm),alltheway uptothefieldscale(

km).

Onecomplicationassociatedwiththeeffortsoutlinedaboveisthattherearealmostasmanydefinitionsof“multiscale” as authors that invoke this concept. Nevertheless, multiscale modeling can be sorted in three main categories [34]: (i)

themultiscalehomogenizationstrategy, (ii) multiscalealgorithmapproach,and(iii) themultiphysicsapproach.Thefirstof these,themultiscalehomogenizationstrategy,aimsatderivinglargescalemodelsrootedinelementaryphysicalprinciples byusinghomogenizationtechniquesincludingvolumeaveraging,mixturetheory,andasymptoticexpansions[109,93,8,94]. Aprimeexampleistheseminalwork ofWhitaker [107],whichdemonstratesthat Darcy’slawarisesfromtheintegration of Stokes equation over a porousRepresentative Elementary Volume(REV). Theseupscaling techniquesusually uncouple each scale’srelevantphysics throughthescale-separationhypothesis.Thisway,effectivecoefficientsinlarge-scalemodels canbeusedtodescribefine-scalephenomenaandgeometricfeatures.Thesecoefficientsarecommonlyestimatedbyusing complementaryfine-scalesimulationsonREVsorsub-gridmodels.Thesecondstrategy,themultiscalealgorithmapproach, solvesflowphysicsoninterconnectedgridswithdifferentdegreesofrefinement.Thisway,eachgrid’srefinementlevelcan be tunedtofitits respectivescaleofinterest.Aportionofthesealgorithmsprimarily focuseson fine-scale solutions,and thus,usesmulti-scalefinitevolume/elementsolverstospeedupconvergenceinfinegrids[46,47,24].Conversely,alternative algorithms focusonlarge-scalebehaviorsandonlysolveforsmall-scalebehaviorwhenneeded[97,98].Thethirdstrategy, the multiphysics approach,uses domaindecomposition to solvedifferent physicswithin each scale’s sub-domain. In this method,sub-domainshavetheirownindependentsetofgoverningequationsandonlyinteractwitheachotherthroughthe implementationofappropriateboundaryconditions[95,7].ApopularimplementationofthisapproachusestheBeaversand Joseph [10] conditionstocoupleaporousdomaingovernedbyDarcy’sLawwithadomaingovernedby theNavier-Stokes equations.

Here, we implementconcepts from all threestrategies to propose an alternative solutionto the multiscalechallenge. Todoso,werelyonthemicro-continuumapproach[92],wherebyasingleequation isusedtohandleflow andtransport insystemswherealargescalesolid-freedomaincoexistswithasmall-scaleporousdomain(Fig. 1).Inthecaseof single-phaseflowandtransport,thisapproachgenerallyreliesonthewell-knownDarcy-Brinkman(DB)equation–alsoreferredto asDarcy-Brinkman-Stokes(DBS)equation– [13] thatarisesfromvolumeaveragingtheStokes(orNavier-Stokes) equations in a control volume that contains both fluidsand solids[101,41,11,27]. It consistsin a Stokes-like momentum equation that is weighted by porosity andcontains an additional drag force term that describesthe mutual friction betweenthe fluidsandsolidswithinsaid controlvolume. Unlikestandard continuumscale equationsforflowandtransportinporous media such asDarcy’s law, theDB equation remains validin solid-freeregions (see Fig. 1A) wherethe drag force term vanishesandtheDBequationturnsintotheStokes(orNavier-Stokes)equation.Inporousregions(seeFig.1C),incontrast, viscousdissipationeffectsarenegligiblecomparedwiththedragforceexertedontotheporewallsandtheDBmomentum equation tendsasymptotically towardsDarcy’slaw[96,107,5].Therefore,themicro-continuum DBequation hastheability tosimultaneouslysolveflow problemsthroughporousregions andsolid-freeregions[72],pavingthepathtohybridscale modeling (see Fig.1B). Inthecaseof singlephase flow, itis knownto beanalogous(in fact,formally equivalent) tothe previouslymentionedandwell-establishedBeavers-Josephboundaryconditions[10,72].

TheabilityoftheDBequationtohandletwoscalessimultaneouslyhasbeenusedtosolvefluidflowinthree-dimensional images of rock samplesthat contain unresolved sub-voxel porosity [52,4,86,89,49,87]. It also has been used to simulate dissolutionwormholingduringacidstimulationincoresbyupdatingtheweightingporosityfieldthroughgeochemical reac-tions[62,26,92,99].Moreover,ithasbeenshownthatwheneverlow-porositylow-permeabilityporousregionsarepresent, thevelocity within theseregions dropsto nearzero,such that themicro-continuumDBframework canbe usedasa pe-nalized approachto map a solid phaseonto a Cartesian gridwitha no-slipboundary atthe solidsurface [3,51,92]. This approachtendstoafullNavier-Stokesrepresentationoftheflowphysicsattheporescaleand,hence,canbeusedtomove fluid-solid interfacesefficiently ina Cartesian grid without a re-meshingstrategy. Forexample,Soulaine et al. [90] used a micro-continuum framework to predict the dissolution kineticsof a calcite crystalandsuccessfully benchmarked their modelagainststate-of-the-artporescaledissolutionsolverswithevolvingfluid-solidinterfaces[68].Anotherexample, pre-sentedinCarrilloandBourg [15],leveragedthisframeworktocreateaDarcy-Brinkman-Biotapproachcapableofpredicting thecoupledhydrologyandmechanicsofsoftporousmediasuchasclaysandelasticmembranes.

(4)

Fig. 1. Schematic

representations of a porous medium with two characteristic pore sizes depending on the scale of resolution: (a) full pore scale

(Navier-Stokes), (b) intermediate or hybrid scale, and (c) full continuum scale (Darcy). Our objective is to derive a framework that can describe multiphase flow at all three scales described in the figure based on a single set of equations resolved throughout the entire system.

Inthepresentpaper,weexpanduponSoulaineet al. [88] toproposeafullyrealizedmultiscalesolverfortwo-phaseflow inporousmediarootedinelementaryphysicalprinciplesandrigorouslyderivedusingthemethodofthevolumeaveraging [109]. Weshowthat thereexistsasingle setofpartialdifferentialequationsthat canbeappliedinpore,continuum, and hybrid scalerepresentation ofmultiphaseflow in porousmedia. Particular attentionispaid tothe rigorousderivation of gravity andcapillaryeffects intheporousdomain.The resultingtwo-phase micro-continuumframework isverifiedusing aseriesoftest caseswherereferencesolutionsexist.WeverifythatthemultiscalesolverconvergestothestandardDarcy scale solutions (Buckley-Leverett,capillary-gravity equilibrium, drainagein a heterogeneous reservoir)when used atthe continuum scaleandtothetwo-phaseNavier-Stokessolutions (dropletona flatsurface,capillaryrise,drainagewithfilm deposition,two-phase flowinacomplexporousstructure)whenusedattheporescale.Thefullyimplementednumerical model,alongwiththeaforementionedverificationandtutorialcases,isprovidedasanopen-sourcesolver

(hybridPorousIn-terFoam)accompanyingthepresentarticle.

The paper is organized asfollows. In Section 2, the multi-scalegoverning equations are rigorouslyderived usingthe method ofvolume averaging. Multi-scale parameters are then definedby asymptotic matchingto the two-phase Navier-Stokes and Darcy equations. In Section 3, we describe the numerical algorithm used to solve the problem (governing equations, constitutive relations, andboundary conditions) and presentits numericalimplementation as an open-source simulation platform.In Section 4, we presentthe modelverificationat thepore andcontinuum scales. In Section 5,we illustrate the versatility of the proposed framework by describing two hybrid scale applications: wave propagationin a coastalbarrierandtwo-phaseflowinafracturedporousmatrix.Weclosewithasummaryandconclusions.

2. Mathematicalmodel

Inthissection, wederive themicro-continuumequationsfortwo-phase flow. First,weconsider theconservationlaws for multi-phase systems in the continuous physical space. Then, the micro-continuum equations are formed by volume averagingthecontinuousequationsovereachvolumeofanEuleriangrid.Finally,informationbelowthesizeofthegridcell (fluid-fluidinterfacelocationandmicro-structuregeometry)ismodeledwithclosureofthemultiscaleparameters.

2.1. Governingequationinthecontinuousphysicalspace

Thissectionpresentsthebasichydrodynamiclawsthatgovernmultiphaseflowattheporescale.Thedomainis decom-posedinto threedisjointsubsets: asolid phase Vs, awetting liquidphase Vl,anda non-wettinggasphase Vg which is separatedfrom Vl bytheinterface Alg (seeFig.2A).Althoughthefluidsarereferred toasliquidandgas(orwetting and non-wetting), thederivation andresultingmodel arevalid foranyincompressible, immisciblefluid pairincluding liquid-liquidandliquid-gassystems.

EachfluidphaseisassumedtobeNewtonianandincompressible.Therefore,massconservationineachphasedictates

∇ ·

vi

=

0 in Vi, i

=

l

,

g

,

(1)

(5)

ρ

l

(

vl

w

)

·

nlg

=

ρ

g



vg

w



·

nlg at Ai j

,

(2)

where

ρ

iisthedensityofphasei,w isthevelocityoftheinterface,andnlgisthenormalvectortothefluid-fluidinterface pointingfromthewettingtothenon-wettingphase.Intheabsenceofphasechange,vl

=

vg

=

w atthefluid/fluidinterface.

Momentumconservationineachfluidyields

0

= −∇

pi

+

ρ

ig

+ ∇ ·

Siin Vi, i

=

l

,

g

,

(3)

whereg isthegravityvector,Si

=

μ

i



vi

+ ∇

viT



istheviscousstresstensor,andpi and

μ

iarethepressureandviscosity ofphasei,respectively.InEq. (3),theinertiatermshavebeenneglectedandthemomentumbalanceisdescribedusingthe Stokes equation. Thissimplificationiscommoninmodels ofsubsurfacefluid flow, whereflow ratesare usuallyvery low [9]. The Stokes equation is adoptedforsimplicity inthe derivationof themicro-continuum momentum equation, asthe volumeaveragingofinertialeffectsatornearaporousmediumhasalreadybeendescribedinpreviousstudies[101,41,27]. Forcompleteness,inertialeffectswillbeintegratedattheendofthederivationbasedonthefullNavier-Stokesequation.

Finally,momentumconservationatthefluid-fluidinterfaceyields

[plI

Sl]

·

nlg

=



pgI

Sg



·

nlg

+

σ κ

nlg at Alg

,

(4)

whereIistheunitytensor,

σ

isthefluid-fluidinterfacialtension,and

κ

= ∇ ·

nlgistheinterfacecurvature.

2.2. Volumeaveraging:derivationofasingle-fieldformulation

The mathematicalmodelintroducedinthe formersectionisdefinedona continuousphysicaldomain.Common

com-putational procedures solve thissystem ofequations by discretizingthe continuous domain into an ensemble of subset volumes by using theFinite Volume Method (FVM) [75]. In the FVM framework, all the physical variables are averaged over each discrete volume.The averaging process andthediscretization refinementlevel dictatethat thecontrol volume cancontainthefollowing:onefluid,twofluids,onefluidandasolidphase,ortwofluidsandasolidphase.Featureswith characteristiclength scales belowthatofthe averagingvolume (e.g.,thegeometryofsolid-fluidandfluid-fluidinterfaces andtheforcesexertedontothem) mustbedescribed usingsub-grid scalerepresentations.Inthissection,weusevolume averagingtheoremstoidentifytheformofthemultiphasemicro-continuumequations.

Volumeaveragingandsingle-fieldvariables In the FVM, the partial differential equations that describe conservation laws, Eqs. (1) and (3),are transformedintodiscrete algebraic equationsby integratingthem overeach discretevolume V .This operationiscarriedoutusingthevolumeaveragingoperator,

β

i

=

1 V



Vi

β

idV

,

(5)

where

β

i is afunction definedin Vi (i

=

l

,

g). Asinstandard volumeaveraging theory,wealso definea phaseaveraging operator,

β

i i

=

1 Vi



Vi

β

idV

.

(6)

TheaveragesdefinedbyEqs. (5) and (6) arerelatedthroughtheporosityfield

φ

andthesaturationfield

α

l.Theporosity field

φ

isdefinedas

(

Vl

+

Vg

)/

V ,i.e.,thevolumeoccupiedbybothfluidsdividedbythecontrolvolumeV ,suchthat:

φ

=



1

,

in solid-free regions,

]0

;

1[

,

in porous regions. (7)

The porosity field is the cornerstone of micro-continuum methods because it delineates porous (0

< φ <

1) and solid-free regions (

φ

=

1). It is intrinsically relatedto the resolutionof thesimulation asillustrated in Fig. 1.Forexample, in image-based flowsimulations,thecontrolvolumesize correspondstotheimaginginstrumentresolutionandtheporosity field obtainedfrom the gray-scale is used to model sub-voxel micro-structures [4,89,86,87,1]. By construction of micro-continuum models,all cellsmust havenon-zero porosity[92].Hence, apure solidphase (

φ

=

0) inthemicro-continuum frameworkisdescribedinsteadasaverylow-porosity,verylow-permeabilitydomain(

φ

0).

The saturation field

α

l isdefinedas Vl

/(

Vl

+

Vg

)

,i.e., the volume ofliquid dividedby the volume occupiedby both fluidswithinthecontrolvolume,suchthat

α

l

=

0

,

in regions saturated with gas, ]0

;

1[

,

in unsaturated regions,

1

,

in regions saturated with liquid.

(6)

Fig. 2. Distribution of the fluid phases in (a) the continuous physical domain, (b) the discrete Eulerian grid.

Asaturationfield

α

l suchasthatdescribedbyEq. (8) isusedincontinuumscalesimulationsofmultiphaseflowinporous media(whereitrepresentsactualsaturation)andinporescalesimulationsofmultiphaseflowinsolid-freeregionsthatrely ontheVOFrepresentation(whereitisusedtotracktheevolutionoftheimmisciblefluid-fluidinterface).Therelationship

α

l

+

α

g

=

1 isalwaysvalidand

α

g isdeducedfromtheknowledgeof

α

l.Theaveragingoperators definedbyEqs.(5) and (6) arerelatedby

β

i

= φ

α

i

β

i

i

(i

=

l

,

g).

The two-phasemicro-continuum approachrelieson single-fieldvariables,i.e., uniquefluid pressureandvelocity fields that are definedthroughoutthe entiregrid regardless ofthe natureof thephases that occupythe cells. Thesingle-field pressure p andvelocityv aredefinedasweightedsumsofthepressureandDarcyvelocityineachfluidphase:

p

=

α

lpll

+

α

gpgg

,

(9) and v

= φ

α

lvll

+

α

gvgg

,

(10)

respectively.Wenotethattheuseofporosity-weightedvaluesinEq. (10) yieldsasingle-fieldvelocityequaltothesumof thefiltration(Darcy)velocitiesineachphase, v

=

vl

+

vg,where vi

= φ

α

ivii.

(7)

∇β

i

= ∇β

i

+

1 V



Ai j

β

ini jd A

+

1 V



Ais

β

inisd A

,

∇ · β

i

= ∇ · β

i

+

1 V



Ai j

β

i

·

ni jd A

+

1 V



Ais

β

i

·

nisd A

,

(11)

where Ai j isthesurface areabetweenthetwofluids, Aisisthesurfaceareabetweenfluidi andthesolidphase,ni j isthe normalvectoratthefluid-fluidinterfacepointingfromi to j,andnisisthenormalvectoratthesolidsurfacepointingfrom thefluidtothesolid.Thesurfaceintegraltermsintheseequationstransformtheboundaryconditionsatthediscontinuity betweenthefluidphasesandatthe solidsurface intobodyforces.Inother words,theinterfacialconditionsareincluded directlyinthepartialdifferentialequationsthatdescribetheconservationlawsintheEuleriangrid.

Massbalanceandsaturationequations Theapplicationofthevolumeaveragingtheorem,Eq. (11),alongwiththecontinuity equations,Eq. (1),yields[108]:

∂φ

α

i

t

+ ∇.

vi

=

0

,

i

=

g

,

l

.

(12)

Thetwo-phasemicro-continuumframeworkdevelopedinthispaperconsistsofasetofpartialdifferentialequationsthat solveforthesingle-fieldvariablesv ,p,and

α

l.Becausethevolume-averagedcontinuityequations,Eq. (12),involveaveraged phasevelocitiesvi,theymustbetransformedintoequationsintermsofthemicro-continuumsingle-fieldvariables,namely atotalfluidconservationequationandasaturationequation.

Thetotalfluidconservationequationisobtainedbysummingthetwocontinuityequationsandassumingthattheporous structureisimmobilewithtime,suchthat:

∇ ·

v

=

0

.

(13)

Equation (13) is a divergence-freevelocity that is commonlyused together withthe momentum equation to derive the pressureequation.

Thesaturationequationisobtainedbyfirstintroducingtheconceptofrelativevelocity:

vr

=



vll

vgg



.

(14)

From thedefinitions ofsingle-fieldandrelative velocities,wecan show that vll

= φ

−1v

+

α

gvr.Because vl

= φ

α

lvll, the saturationequationcanbeexpressedas:

∂φ

α

l

t

+ ∇ ·



α

lv



+ ∇ ·



φ

α

l

α

gvr



=

0

.

(15)

Inequation(15),thewettingphasesaturation

α

l isadvectedbythesingle-fieldvelocity v.Thethirdtermontheleft-hand sideisanadditionalconvectionterminvolvingtherelativevelocity vr.Thesaturationequation,Eq. (15),isexact,i.e.,itis derived fromelementaryphysicalprincipleswithoutanyassumptions. However,there isnoconservationlawtosolve for

vr andthistermmustbeclosed.Intheforthcomingdiscussion,wewillseethatdifferentdescriptionsofvr arederivedfor solid-free(

φ

=

1)andporousregions(0

≤ φ <

1).Inthefirstcase,theconvectionterminvolvingtherelativevelocityserves tocompressthefluid-fluidinterface andensuresasharptransitionbetweentheimmisciblephases.Inthesecondcase, vr isclosedbymatchingEq. (15) tothestandardsaturationequationusedinmulti-phaseDarcyflowsolvers.

Momentumequation A similarprocedure isusedto formthemultiscalemomentum equation.First,the volumeaveraged equationsarederived foreach fluid.Then,thetworesultingequationsarecombinedtoformthesingle-fieldconservation law.

The applicationofthevolume averagingtheorem,Eq. (11),to theStokesmomentum conservationequationforfluid i,

Eq. (3),yields[108,56,42]: 0

= −∇



φ

α

ipii



+ φ

α

i

ρ

ig

+ ∇ ·



φ

α

iSi i



+

Dis

+

Di j

,

i

=

g

,

l

,

(16)

wherethelasttwotermsontheright-handside,

Dik

=

1 V



Aik nik

· (−

piI

+

Si

)

d A

,

(17)

are the drag forcesexerted by phase k on phase i.In short, Dis reflects the friction of fluid i on the solid surface and

(8)

aporoussolidstructure(0

≤ φ <

1)orfluidsonly(

φ

=

1).ThesedragforceswillbederivedlateroninSection2.3;forthe timebeing,theyarekeptintheirintegralforms.

Thesumofthetwophase-averagedmomentumconservationequationsyields:

0

= −∇



φ

p



+ φ

ρ

g

+ ∇ ·



φ

S



+

Dls

+

Dgs

+

Dlg

+

Dgl

,

(18)

where Sis thesingle-fieldshear stress

S

=

μ



v

+ ∇

vT



and

μ

is theaveragefluid viscosity



μ

=

α

l

μ

l

+

α

g

μ

g



.To formthemultiscalemomentumequation,weexpressthesumoftheaverageshearstressatthefluid-solidandfluid-fluid interfacesasthesumoftwoindependentterms,adragforce

μ

k−1v andasurfacetensionforce Fc:

μ

k−1v

+

Fc

= φ

−1



Dls

+

Dgs

+

Dlg

+

Dgl



.

(19)

Eventually,iftheporousstructureisimmobile,theporosity

φ

canberemovedfromthederivativesandthemultiscale

single-fieldmomentumequationbecomes:

0

= −∇

p

+

ρ

g

+ ∇ ·

S

μ

k−1v

+

Fc

.

(20)

Summaryofthederivation Thesingle-fieldmicro-continuummodelforincompressible,immiscibletwo-phaseflowinarigid porousmedium,derivedaboveusingvolumeaveragingtheory,consistsofasetofthreepartialdifferentialequations,namely a totalmass balanceequation, Eq. (13), a saturationequation, Eq. (15), anda momentumequation, Eq. (20), that canbe solvedforthesingle-fieldpressure p,thesingle-fieldvelocity v,andthewettingfluidsaturation

α

l:

∇ ·

v

=

0

,

∂φ

α

l

t

+ ∇ ·



α

lv



+ ∇ ·



φ

α

l

α

gvr



=

0

,

(21) 1

φ



ρ

v

t

+ ∇ ·



ρ

φ

v

¯

v

¯



= −∇

p

+

ρ

g

+ ∇ ·

S

μ

k−1v

+

Fc

.

In Eq. (21), themomentum equation hasbeen modified fromEq. (20) to includetheinertial effectsthat were neglected aboveintheinterestofclarityandbecausetheirvolumeaveragingprocedureiswellestablished.Thederivationwiththese inertialeffectsfollowsthesameaveragingprocedureasdescribedabove,startingfromtheNavier-Stokes(ratherthanStokes) equation[101,41,11,27].Thenumericalimplementationdescribed inSection3forsolvingEq. (21) accountsfortheinertial effects.

Thesetofequationspresentedaboveisvalidthroughoutthecomputationaldomainregardlessofthecontentofacell. Thischaracteristicisafundamental aspectofourmultiscalesolver. Itmeansthatthesameequationsformultiphaseflow andtransport can be usedin bothsolid-free andporousregions, unlike inthe caseofmulti-physics solvers that involve mortars[95,7].Thisfeatureallowstheproposed solvertobe appliedinmediawheretheporespaceisfullyresolvedand flowisdescribedusingtheNavier-Stokesequations(porescalemodeling),inmediawhereporesarenotresolvedandflow isdescribed usingDarcy’slaw(continuumscalemodeling),andinintermediatesituationsthatincludebothfullyresolved solid-freeregionsandporousregions(hybridscalemodeling)asillustratedinFig.1.

Acriticalfeature ofthemultiscalesolverdeveloped inthispaperis thatit tendsasymptotically tothesolution ofthe two-phaseNavier-Stokesequationswhenusedasaporescalemodelandtothesolutionofthetwo-phaseDarcyequations when usedasa continuum scalemodel.This isachievedby defining therelative velocity vr,thedrag force

μ

k−1v, and the surface tensionforce Fc. These terms are referred to as multiscaleparameters because they describe sub-grid scale information suchas thelocation ofthe fluid-fluid interface andthehydrodynamic impact ofthe porousmicro-structure. Theyhave a differentmeaningand adifferent formulationdepending on whetherthecomputational grid blockscontain solidmaterialornot.

2.3. Closureandmulti-scaleparameters

Inthefollowing,weshowhowthemultiscaleparameters vr,

μ

k−1,and Fc can bederivedbymatchingEq. (21) toits twodesiredasymptoticmodels:intheporescalelimit,thealgebraicVolume-of-Fluidmethod;inthecontinuumscalelimit, themultiphaseformofDarcy’slaw.

(9)

The VOFapproach reliesonasingle-fieldformulationoftheNavier-Stokesequationstocompute thetwo-phase flow.Ifa celloftheFiniteVolumegridisconsideredasacontrolvolume,thenallthederivationintroducedintheprevioussection canbeusedtoderivetheVOFmomentum,massbalance,andsaturationequations[63].

In the standard VOF approaches, the cells do not contain solid (

φ

=

1). The mass balance and saturation equations, Eqs. (13) and(15),remain,therefore,unchanged.Thesaturationequationwith

φ

=

1 istheequationusedinalgebraicVOF solverssuchasinterFoam,theVOFsolveroftheopen-sourceCFDcodeOpenFOAM®.There,therelativevelocity vr isused asa compressiontermtoforce the fluid-fluidinterface to beassharpaspossible [83]. Thiscompressionvelocity actsin thedirectionnormaltotheinterface.IntheVOFframework,thenormalto thefluid-fluid interfaceiscomputedusingthe gradientofthesaturation.Rusche [83] proposesarelativevelocityorientedinthedirectionnormaltointerfacewithavalue

basedonthemaximummagnitudeofv :

vr

=

max



v



nlg

,

(22)

where Cα isa modelparameterusedtocontrol thecompressionoftheinterface andnlg ismeannormalvector.Forlow valuesofCα,theinterfacediffuses.Forhighervalues,theinterfaceissharper,butexcessivevaluesareknowntointroduce parasitic velocities andlead tounphysical solutions. Inpractice, Cα is often chosen between0 and4.The mean normal vectornlg iscomputedbyusingthegradientofthephaseindicatorfunction

α

l.Therelationbetweenthesetwovectorscan beobtainedbyapplyingEq. (11) totheliquidphaseindicatorfunction

1

l (afunctionequalto1in Vl and0elsewhere)in solid-freeregionssuchthat[78],

α

l

= −

1 V



Alg nlgd A

.

(23) Therefore, nlg

= −

α

l

|∇

α

l

|

,

(24)

isaunitvectordefinedatthecellcentersthatdescribesthemeannormaltothefluid-fluidinterfaceinacontrolvolume. AnotherconsequenceoftheabsenceofsolidintheVOFequationsisthattheforcesdescribingtheshearstressesofthe fluidsontothesolidsurfacearenull,henceDls

=

Dgs

=

0.Therefore,theDarcyterminthemomentumequationvanishes:

μ

k−1v

=

0

.

(25)

The integrationof theshear boundary condition atthe fluid-fluid interface,Eq. (4), yields a relationshipbetween the mutualshearbetweenthetwofluidsandthesurfaceintegralofthesurfacetensioneffects:

Dlg

+

Dgl

= φ

Fc

=

1 V



Alg nlg

·

σ κ

d A

.

(26)

Thisequationcannotbeuseddirectly,becausethetermsunderthevolumeintegralrequirethelocationandcurvatureofthe fluid-fluidinterfacewithinagridblock.Thisinformationisunknowninagrid-basedformulationforwhichallthephysical variablesandforcesareaveragedoncontrolvolumes.IntheVOFmethod,thecurvatureoftheinterface

κ

isapproximated byameaninterfacecurvature

κ

.Brackbillet al. [12] assumesthatthemeancurvatureoftheinterfacecanbeapproximated bycalculatingthedivergenceofthemeannormalvector,

κ

= ∇ ·

nlg.Because

κ

and

σ

areconstantwithinacontrolvolume, theycanbeextractedfromtheintegralinEq. (26) toobtain(afterapplyingEq. (23))theso-calledContinuumSurfaceForce (CSF)formulation[12]: Fc

= φ

−1

σ

∇ ·



α

l

|∇

α

l

|



α

l

.

(27)

Standardtwo-phaseDarcymodelinthecontinuumscalelimit Inthissection,we recalltheformulationofthestandard two-phaseDarcymodelthatisclassicallyusedtodescribe two-phaseflowinporousmediaatthecontinuum scale[70,67,77]. ThemodelcanbederivedbyapplyingthevolumeaveragingoperatorsonaRepresentativeElementaryVolumeoftheporous structure [108,56],along the samelinesof thederivation inSection 2.2.Unlikethe presentmicro-continuummodel, the two-phase Darcymodelisatwo-fieldmodel,meaningthatinsteadofone velocityfielddescribingtheflow,therearetwo velocities(viwithi

=

g

,

l)withseparatepressurefields(piwithi

=

g

,

l).

Theincompressible,immiscibletwo-phaseDarcymodelconsistsofasaturationequationforthewettingphase,

∂φ

α

l

t

+ ∇.

vl

=

0

,

(28)

(10)

∇.

v

=

0

,

(29)

andtwomomentumbalanceequations,oneforeachphase,

vi

= φ

α

ivii

= −

k0kr,i

μ

i



pii

ρ

ig



,

i

=

g

,

l

,

= −

Mi



pii

ρ

ig



,

i

=

g

,

l

,

(30)

thesecanalsobewrittenas,

0

= −∇

pii

+

ρ

ig

Mi−1vi

,

i

=

g

,

l

,

(31) wherek0 istheabsolutepermeabilityoftheporousstructure,kr,l andkr,g are therelativepermeabilities withrespect to eachfluid (classicallyrepresentedhereasfunctionsofwatersaturation;morecomplexformulationsexistthataccount for viscouscouplingbetweenthetwofluidsorfortheKlinkenbergeffectinthegasphase[93,76]),andMi

=

k0μkr,ii arethefluid mobilities.ThesemomentumequationsarisefromfurthersimplificationofthevolumeaveragedStokesequations,Eq. (16), where the drag forces are combinedand described asa Darcy term. Moreover, Whitaker [107] showedthat the viscous dissipativeterm,

∇ ·



α

iS

i i



isnegligibleincomparisontothedragforceswheneverthesystem’smacroscopiclength scale issignificantlylargerthanthelengthscaleofthataveragingvolume.Thisfeatureisafundamentalaspectofthemultiscale micro-continuumframeworkbecauseitmeansthateventhoughtheviscousdissipativetermisretainedinthesingle-field momentumequation,itnaturallyvanisheswhenthecomputationalcellscontainsolidcontent.Thisallowsthecontinuityof stressesbetweenporousandsolid-freedomains[72].

Becauseitinvolvesfourequationsandfiveunknownvariables,thetwo-phaseDarcymodeliscomplementedbythe def-inition ofmacroscopiccapillarypressure pc,whichprovidesanadditionalrelationshipbetweenthetwoaveragedpressure fields: pc

(

α

l

)

=



pgg

pll



.

(32)

This equation hasbeen theoreticallyderived throughhomogenizationtechniques [108,100]. Forsimplicity,we follow the classical approximation that pc dependsonly on saturation [58,14,102]. Alternativeformulations have been proposed to accountforobserveddisequilibriumandhystereticeffectsinthemacroscopiccapillarypressure[32,29,60,66,94].

As the two-phase Darcy model explicitly represents the two phase-averaged velocities, it can be used to derive an expressionfortherelativevelocityvrintheporousregion.Beforegoingthroughthederivation,wenotethattheapplication of the gradient operator to the definition of the single-field pressure p, Eq. (9), along with the definition of capillary pressure,Eq. (32),resultsin:

pll

= ∇

p

− ∇



α

gpc



,

pgg

= ∇

p

+ ∇ (

α

lpc

) .

(33)

Basedontheequationspresentedabove,themulti-phaseDarcymodelimpliesthefollowingexpressionforvr:

vr

=



vll

vgg



,

= −

Ml

φ

α

l



pll

ρ

lg



+

Mg

φ

α

g



pgg

ρ

gg



,

= φ

−1



Ml

α

l

pll

+

Mg

α

g

pgg

+



ρ

l Ml

α

l

ρ

g Mg

α

g



g



,

= φ

−1





Ml

α

l

Mg

α

g



p

+



ρ

l Ml

α

l

ρ

g Mg

α

g



g

+

Ml

α

l



α

gpc



+

Mg

α

g

∇ (

α

lpc

)



,

= φ

−1





Ml

α

l

Mg

α

g



p

+



ρ

l Ml

α

l

ρ

g Mg

α

g



g

+



Ml

α

g

α

l

+

Mg

α

l

α

g



pc



Ml

α

l

Mg

α

g



pc

α

l



.

(34)

InSoulaineet al. [88] onlytheterminvolvingthesingle-fieldpressuregradient,

φ

−1



Ml αl

Mg αg



p

,wasconsidered.As such,themodelcouldnotaccountforgravityorcapillaryeffectswithintheporousdomain.Thecomprehensiveformulation presentedinEq. (34) overcomestheselimitations.

A two-phase Darcymodelforthe single-fieldvelocity v is thenformed to derivethe continuum scale formulationof the drag force

μ

k−1v andcapillaryforce F

(11)

v

=

vl

+

vg

,

= −

Mg

pgg

Ml

pll

+



ρ

gMg

+

ρ

lMl



g

,

(35)

= −



Mg

+

Ml



p

+



ρ

gMg

+

ρ

lMl



g

+



Ml



α

gpc



Mg

∇ (

α

lpc

)



.

Thepreviousequationcanberecastinto:

0

= −∇

p

+

ρ

g

M−1v

+

M−1



Ml



α

gpc



Mg

∇ (

α

lpc

)



,

(36)

whereM

=

Ml

+

Mg isthetotalmobilityand

ρ

=



ρ

lMl

+

ρ

gMg



/



Ml

+

Mg



isamobility-weightedaveragefluiddensity. Thissingle-fieldtwo-phase Darcyequationmatches thetwo-phasemicro-continuum momentumequation,Eq. (20),ifthe dragcoefficientandthecapillaryforceequal

μ

k−1

=

M−1

=

k01



μ

l krl

+

μ

g krg



1

,

(37) and Fc

=

M−1



Ml



α

gpc



Mg

∇ (

α

lpc

)



,

=



M−1



Ml

α

g

Mg

α

l

 ∂

pc

α

l



pc



α

l

,

(38)

respectively.Thesingle-fieldrelativepermeability,Eq. (37),isaharmonicaverageofthetwo-phasemobilities,inagreement withtheproposalofWangandBeckermann [104] andSoulaineet al. [88].

Finally,we note thatinEq. (36), thesingle-fieldfluid density

ρ

∗ inthe buoyanttermisaweighted averagebased on thefluid mobilities,ormoreexactly,thefractional flowfunctions, MiM−1.Thisisaclassic conceptinmultiphaseflow in porousmedia.AsshowninAppendixB,astrictlyequivalentsolutioncanbederivedwhere

ρ

∗isreplacedby

ρ

inEq. (36) andthecapillaryforceexpressionisreplacedby:

Fc

=

M−1



Ml

α

g

Mg

α

l



[(

ρ

l

ρ

g

)

g

+ ∇

pc

] −

pc

α

l (39)

Conditionattheinterfacebetweenasolid-freeregionandaporousdomain The multiscale parameters are derived above for solid-freeandporousregions.Inhybridscalesimulations, however,both regionscan existconcomitantlyinthe computa-tionalgrid(seeFig.1B).Here,aconditionattheinterfacebetweenporousandsolid-freedomainsisproposed.

First,wenote thatforsingle-phaseflowtheDBequationcapturesthesliplengthinduced bythecontinuityofstresses betweenthetwo regions[72].Iftheporousmatrixhassufficientlylow permeability,fluidvelocitiesintheporousdomain arenearzeroandano-slipconditionisrecoveredattheinterfacebetweensolid-freeandporousregions[3,51,92].This en-ablestheuseofmicro-continuumsimulationsattheporescaleusingapenalizedapproach,i.e.,thesolidphaseisdescribed asalow-permeabilityporousmedium.

Fortwo-phase flow, thediscontinuityinporosity leads toa changeinthe formofthesurface tensionforce. Here,we treatthisdiscontinuitybyassuming thatthefluid-fluidinterface ofadropletonaporoussubstrateformsacontactangle

θ

withthe solid surface (see Fig.3). The contactangleis an upscaledparameter that dependson varioussub-grid scale properties including interfacial energies, surface roughness, andthe presence ofthin precursor films [106,16,65]. In the presentmodel,thecontactangleisimposedbylocallymodifyingtheorientationofthefluid-fluidinterface relativetothe solid surface [38,91,88]. Thisisachievedby replacingthemeannormalvector nlg attheinterface betweenthesolid-free andtheporousregionsbyalocallymodifiednormal,n

ˆ

lg,thatsatisfiesthecondition,

ˆ

nlg

=

cos

θ

nwall

+

sin

θ

twall

,

(40)

where nwall andtwall are the normaland tangent vectorsto the porous surface, respectively. The numerical strategy to implementEq. (40) isdescribedindetailsinHorgueet al. [38] andSoulaineet al. [91].Theeffectivenessofthisinterfacial conditionisdemonstratedinSection4.2.

Summaryofthemultiscaleparameters The multiscaleparameters v

¯

r,

μ

k−1, and Fc were derived by asymptotic matching to theVOFmethodinsolid-freeregions andtothe multiphaseDarcymodelinporous regions.The resultingparameters, therefore,havedifferentforms indifferentregions. Intheporous domains,themultiscale parametersdepend onconcept suchasrelativepermeabilitykr,i (alsodescribedintermsoffluidmobility,Mi

=

k0kr,i

/

μ

i)andcapillarypressurepc

(

α

l

)

.

Therelativevelocityfollowstherelation:

¯

vr

=

max



v



|∇ααll|

,

in solid-free regions,

(12)

Fig. 3. Conceptual

Representation of the multiphase DB micro-continuum approach. Here

θ represents the contact angle and REV is a Representative Elementary Volume. The stated relationship between the averaging volume’s length scale LV and the porous length scale LPis required for the creation of a REV.

Thesingle-fieldrelativepermeabilityisgivenby:

μ

k−1

=

0

,

in solid-free regions, k01



k r,l μl

+

kr,g μg



1

,

in porous regions. (42)

Thebodyforce Fc describesthecapillaryforceswithinacomputationalcellusing:

Fc

=



−φ

−1

σ

∇.



n

ˆ

lg



α

l

,

in solid-free regions,

M−1



M l

α

g

Mg

α

l

 

pc ∂αl



pc

α

l

,

in porous regions, (43)

wherethemodifiednormalatthefluid-fluidinterfaceis:

ˆ

nlg

=



αl

|∇αl|

,

in solid-free regions,

cos

θ

nwall

+

sin

θ

twall

,

at the interface between solid-free and porous regions.

(44)

Finally,thesingle-fieldfluiddensityisexpressedas:

ρ

=



ρ

l

α

l

+

ρ

g

α

g

,

in solid-free regions,



ρ

gMg

+

ρ

lMl



M−1

,

in porous regions. (45)

The derivation of the multiphase micro-continuum equations,Eq. (21), and oftheir respective multiscaleparameters, Eqs. (41)-(45),representsthemaintheoreticalcontributionofthispaper.

3. Numericalimplementation

The two-phase multi-scale micro-continuum modelproposed above isimplemented in theopen-source CFDplatform

OpenFOAM® version7.0fromhttps://www.openfoam.org.ThiscodeisaC++librarythatsolvespartialdifferentialequations withthefinite-volumemethod.Ithandlescomplexstructuredandunstructuredthreedimensionalgridsbydefaultandhas demonstrated a good scalabilityfor parallel computingofflow inporous media [74,39,31]. One ofits features isthat it solves thecoupledequationsusingsequentialapproaches. Thepresentsectiondetailsthesolutionalgorithmdevelopedin thispaper.Particularlycloseattentionispaidtothedescriptionofthevelocity-pressurecoupling.

3.1. Discretizationoftheequations

Themomentumequation,Eq. (21),istransformedintoasetofalgebraicequationsafterapplicationofthefinite-volume discretizationprocedure. Thenonlinearityintroduced bytheadvectiontermisdealtwithby linearizingaroundthelatest velocity field.The momentumequation isexpressed insemi-discreteform(with successivetimelevels denotedby k and k

+

1)usingaEulerimplicitdifferencescheme:

(13)

Inequation(46),

V

and

δ

t standforthecellvolumeandtimestep,respectively.Thesubscript P indicatesvaluesatthecell center.ThecoefficientsaN P accountfortheinfluenceofneighboringcontrolvolumesandprimarilyincludeconvectiveand diffusivefluxesacrosscellfaces.Kf s correspondstotheexchangeofmomentumofthefluidswiththesolid,i.e.,theDarcy terminEq. (21).Thepressuregradient,buoyancyterm,andcapillaryforcearenotdiscretizedatthisstage.

Allexplicitsourcetermsotherthanthepressuregradient,buoyancyterm,andcapillaryforcearecombinedintoasingle vector,S

=

VρkvkP

δt .Eq. (46) canthenberearrangedas:



V

ρ

k+1

δ

t

+

a  P

+

Kf s



vkP+1

=



N P aN PvkN P+1

+

S

− ∇

p

+

ρ

g

+

Fc

.

(47) Thisequationformsamatrixsystemthatresultsfromthemomentumequationdiscretization.ThetermaP

=



Vρk+1 δt

+

aP

+

Kf s



represents the diagonal term of this matrix. Following OpenFOAM® internal notations [45], the operator H

(

X

)

=



N PaN PXN P

+

S isintroducedandEq. (47) becomes: aPvkP+1

=

H



vk+1



− ∇

p

+

ρ

g

+

Fc

.

(48)

Thissemi-discretizedformofthemomentumbalanceisusedtoformthepressureequation.Thisisusuallyachievedby dividingEq. (48) bythediagonal coefficient,aP,andsubstituting thesemi-discretized formofvk+1 intotheoverall mass balance,Eq. (13),whichisadivergencefreevelocityintheabsenceofphasechange.Finally,thepressureequationcanbe writtenas:

∇.



H



vk+1



+

ρ

g

+

Fc aP



− ∇.



1 aP

pk+1



=

0

.

(49)

FurtherdetailsregardingthediscretizationprocedureinOpenFOAM®canbefoundinJasak [45] andWelleret al. [105]. Thesaturationequation,Eq. (15),isdiscretizedwithaVanLeerlimiterfunctionfortheconvectiontermandaforwardEuler schemefortimediscretization.

3.2. Solutionalgorithm

ThediscretizedequationsaresolvedusingOpenFOAM®inasegregatedway.Inparticular,thepressure-velocitycoupling formed by Eqs. (48) and (49) ishandled bya predictor-correctoralgorithm alongthe samelinesasthePressure Implicit Splitting-Operator(PISO)algorithmoriginallydesignedbyIssa [43] tosolvethetransientNavier-Stokesequations.Itisbuilt on the top ofthe OpenFOAM® VOFsolver interFoam.The numerical scheme uses thefollowing sequence ofsteps. First, thesaturationequation,Eq. (15),issolvedexplicitlyusingtheOpenFOAM®implementationoftheFluxCorrectedTransport (FCT) theory [82] calledMultidimensional Universal LimiterwithExplicit Solution(MULES). Details regardingthe MULES algorithmcanbe foundintheChapter5ofDamian [20].Second,theboundaryvaluesof v and vr are updatedaccording

toEqs. (10) and(14).Third,thesingle-fieldrelativepermeabilitykk+1,density

ρ

k+1,andviscosity

μ

k+1 areupdatedusing thenewvalueofthesaturationfield,

α

k+1

l .Thesurfacetensionforce, F k+1

c ,iscomputedusingEq. (43).Fourth,thevelocity fieldv∗ iscalculatedbysolvingimplicitlythemomentumequation,

aPvP

=

H



v



+

ρ

k+1g

+

Fk+1

c

− ∇

pk

,

(50)

where the gradientof the pressure field isevaluated fromthe valuescomputed atthe previous time step. Thisstage is calledthemomentumpredictor.Fifth,thepredictedvelocityv∗ (whichdoesnotsatisfythecontinuityequation,Eq. (13))is corrected.Thisisachievedbyfinding

(

v∗∗

,

p

)

thatobeys,

v∗∗P

=

1 aP

H



v



+

ρ

k+1g

+

Fkc+1

− ∇

p

,

(51)

∇.

v∗∗

=

0

.

(52)

Basedonthesetwoequations,thepressureequationisformulatedas

∇.



H

(

v

)

+

ρ

k+1g

+

Fk+1 c aP



− ∇.



1 aP

p



=

0

,

(53)

and solved implicitlywith a generalized method of Geometric-Algebraic Multi-Grid (GAMG) embedded in OpenFOAM®.

(14)

Table 1

Table of Fluid Properties. Property Value Water Density 1000 kg m−3 Water Viscosity 1×10−3Pa s Air Density 1 kg m−3 Air Viscosity 1.76×10−5Pa s Oil Density 800 kg m−3 Oil Viscosity 0.1 Pa s Gravity 9.81 m s−2 Table 2

Table of Model Parameters.

Model Parameter Value

p0 100 Pa

m (Van Genuchten) 0.5 m (Brooks-Corey) 3 β(Brooks-Corey) 0.5

3.3. Open-sourcetoolbox:hybridPorousInterFoam

Theaccompanyingopen-sourcetoolboxfollowstheimplementationdescribedaboveandconsistsoffourdistinctparts:a maindirectorythatincludesthelicense files,instructionalfiles,releasenotes,andautomatedcompilationproceduresalong withthreemaintoolbox sub-directories.The threesub-directoriesconsistofaSolversub-directory thatincludesthecode forthehybridPorousInterFoam solver;aTutorialssub-directorythatincludesalltheverificationandexamplecasespresented inthispaper;andaLibrariessub-directory thatincludesboththedynamicallylinkedlibrariesusedintheimplementation ofthe penalizedcontactangleand, also,theBrooksandCorey [14] andvanGenuchten [102] porousmedia modelsused to calculate the requiredsub-voxel description of thefluid-fluid interface in termsof relative permeabilityand capillary pressures(seeAppendixA).Thislastlibrarywasobtainedfromtheopen-sourcetoolboxpublishedinHorgueet al. [39].The

hybridPorousInterFoam toolboxcanbeaccessedfromtheleadauthor’srepository(https://github.com/Franjcf).

4. Verification

Inthissection,thetwo-phasemicro-continuummodelisusedinvarious situationsforwhichreferencesolutionsexist. The objectiveis to verify that the multiscale solver converges effectivelytowards its two asymptotic limits, namelythe two-phaseDarcymodelatthecontinuumscaleandtheVOFformulationattheporescale.

Fig. 4. Comparison

of the time-dependent saturation profiles calculated from our numerical framework and Buckley-Leverett’s semi-analytical solution for

(15)

Fig. 5. Comparison

of the time-dependent saturation profiles calculated from our numerical framework and the semi-analytical

solution presented in

section4.1.2. Figure A is a visual representation of water saturation in the reservoir over time. Figures B and C show the semi-analytical (lines) numerical (symbols) solutions of the systems parametrized through the Brooks & Corey and Van-Genuchten relative permeability models, respectively.

4.1. Darcyscalevalidation

The model’sabilityto predictmultiphase flowatthe Darcyscaleis validatedagainstthree well-knownanalytical and semi-analyticalsolutions.Together,theseassessmentstestforthecorrectimplementationoftherelativepermeability, grav-ity, and capillary terms derived in section 2.3. This validation follows the steps outlined in Horgue et al. [39] for the development andvalidationoftheir ownmultiphaseDarcyscalesolver:impesFoam.Acompletelistofparametersusedis providedinTables1and2.

4.1.1. Buckley-Leverett

Wefirstconsiderthewell-establishedBuckley-Leverettsemi-analyticalsolutionfortwo-phaseflowinahorizontal one-dimensional system with no capillary effects (4 m long, 2000 cells,

φ

=

0

.

5, k0−1

=

1

×

1011 m−2). In this case, water is injected into an air-saturated reservoir at a constant flow rate with the following boundary conditions: vwater

=

1

×

10−5 m s−1, ∂pinlet

∂x

=

0 Pa m− 1, and p

outlet

=

0 Pa. As waterflowsinto thereservoir, it createsa saturationprofile thatis characterized bya watershockatitsfront,an effectiveshockvelocity, andasaturationgradient behind saidfront.Fig. 4

showsthatagoodagreementisobservedbetweenournumericalsolutions andthesemi-analyticalsolutionspresentedin Leverett [58] forallthreefeaturesregardlessofthechosenrelativepermeabilitymodel.

4.1.2. GravitydominatedBuckley-Leverett

We then testedtheexact sameair-saturated system, butthistime withthe addition ofgravity inthesame direction ofthewaterinjectionvelocity (seeFig.5). Undertheseconditions,gravity becomesthedominatingdrivingforce andthe followingequationcanbeusedtocalculatethewatersaturationatthefront[39]:

vll

k0kr,l

(

α

lf ront

)

μ

l

ρ

lg

=

0

,

(54)

wherethesymbolsareconsistentwiththeonespresentedinprevioussections.GiventheparameterspresentedinTables1

and 2, Eq. (54) is solved iteratively to obtain

α

lf ront

=

0

.

467 and

α

lf ront

=

0

.

753 when using the Brooks-Corey andVan Genuchten relativepermeability

(

kr,l

)

models, respectively(Appendix A). Fig.5 showsthat our numericalsolutionsagree withthesemi-analyticalsolutions.

4.1.3. Gravity-capillarityequilibrium

(16)

Fig. 6. Comparison

of the steady state water saturation profiles calculated from our numerical framework and the analytical solution shown in equation

(56). Figure A is a visual representation of the initial and final water saturation profiles in the reservoir. Figures B and C show the steady state saturation profiles and the resulting equilibrium saturation gradients for both implemented capillary pressure models, respectively.

1

×

1011m−2).Here,theinitialwatersaturationofthecolumnissetfarfromitsthermodynamicequilibriuminastep-wise fashion: the lower half is partially saturated withwater (Swater

=

0

.

5) while theupper half is initially dry asshown in Fig.6A.Toensureproperequilibriation, bothfluidsareallowed toflowfreelythroughthecolumn’stopboundary,butnot throughitslowerone: vtop

∂y

=

0 m s−1m−1, ∂ptop

∂y

=

0 Pa m−1,vbottom

=

0 m s−1,pbottom

=

0 Pa.Forthissimplifiedcase,the theoreticalsteady-statecanbedescribedasthebalancebetweencapillaryandgravitationalforces,wheregravitypullsthe heavierfluid(water)downwardswhilecapillaritypullsitupwards.Thisbehavior canbedescribedbythefollowingequation [39]:

pc

y

= (

ρ

g

ρ

l

)

gy

,

(55)

whichcanberearrangedtoyield:

α

l

y

=

(

ρ

g

ρ

l

)

gy ∂pc ∂αl

.

(56)

Thislastexpressionallowsfortheexplicitcalculationoftheequilibriumwatersaturationgradientbyusingtheclosed-form Brooks-Corey or Van Genuchten capillary pressure models to obtain ∂pc

∂αl (Appendix A). Fig. 6 shows that our numerical modelaccuratelyreplicatestheresultsobtainedfromEq. (56) regardlessofthechosencapillarypressuremodel.

4.1.4. Darcyscaleapplication:oildrainageinaheterogeneousreservoir

As an illustration ofthe applicability of our model to more complex systems at the Darcy scale, we simulate water injection into a heterogeneous oil-saturated porous medium (1 by 0.4 m, 2000 by 800 grid, water injection velocity

=

1

×

10−4 m s−1, p

(17)

Fig. 7. Simulation setup for oil drainage within a heterogeneous reservoir. The different colored blocks represent the spatially variable permeability field.

Fig. 8. Oil

drainage in a heterogeneous porous medium solved at the continuum scale using

hybridPorousInterFoam orimpesFoam.

The white rectangular

grid represents the blocks with k0values ranging from 1 ×10−13to 4 ×10−13m2as shown in the previous figure.

Under theaforementioned parametric conditions andwithequivalent numerical setups(i.e. samegrid, time-stepping, and solver tolerances), Fig. 8 shows that the simulations performedwith hybridPorousInterFoam and impesFoam develop

very similar, yet not perfectlyequivalent, saturation profiles. Ofparticularinterest is thedevelopment of fingering insta-bilities that formdueto the viscositydifference betweenthe twofluids [84,18].These instabilitiesare known to greatly reduce the efficiency of enhanced oil recovery, as they essentially trap residual oil behind the main water saturation front (Fig. 8). Previous numericalstudies haveshown that theevolution of viscous fingeringis highly dependent onthe model’shyper-parameters,gridrefinement,and/orsolutionalgorithms[25,79,39,17,37].Thischaracteristicexplainswhy hy-bridPorousInterFoam andimpesFoam develop slightlydifferentviscous fingeringinstabilitiesdespitehavingvirtually perfect agreement with thepreviously-presented analytical solutions: the two solvers rely on entirelydistinct sets ofgoverning equations,boundaryconditions,discretizationschemes,andpressure-solvingalgorithms(PISOvsIMPES).Nevertheless,this exampleapplicationshowsthat oursolvercanreadilysimulatecomplexporoussystemsthathavetraditionallybeen mod-eledusingconventionalsingle-scaleDarcysolvers.

4.2. Porescalevalidation

(18)

Fig. 9. Compilation

of all test cases performed for the verification of the solver within the Navier-Stokes domain. Parts A, B, and C refer to the experiments

described in sections4.2.1, 4.2.2, and 4.2.3, respectively. When present, the shaded walls show the porous boundaries used in hybridPorousInterFoam,

as

opposed to the standard boundary (no-slip boundary condition at an impermeable wall) using in interFoam.

For reference and easy comparison, the white

lines in Part A show the input equilibrium contact angle.

asanapproximatedescriptionofmultiphasebehavior atsolid interfaces,whilenotingtheexistenceofmoresophisticated formulationsincludingdynamiccontactangleswithviscousbendingorsurfaceroughness[106,16,103,19,110,65].

4.2.1. Contactangleonaflatplate

We first test the implementation of the penalized contactangle within hybridPorousInterFoam by initializing several “square” water droplets on a 2-D flat porous platewith negligible permeability(6 by 2.4mm, 480 by 192 cells, k01

=

1

×

1020 m−2) andallowing them toreach equilibriumfordifferentprescribed contactangles (

θ

water

=

60◦

,

90◦

,

150◦). Thesetestsarecomparedagainstequivalentdropletsinitializedonconventionalnon-porousboundariesandsolvedthrough

interFoam.Fig.9Ashowsexcellentagreementbetweenthenumericalsimulations andthetargetequilibriumcontactangle

θ

water.Thelackofaperfectlysharpinterface(anintrinsicfeatureoftheVOFmethod)makesitdifficulttoaccuratelymeasure thecontactangleatthesolid interface.However, we canconfidentlystate that allourresultsare within 5◦ ofthetarget equilibriumcontactangle.ThesetestsarevirtuallyidenticaltotheonesshowninHorgueet al. [38] andareconsistentwith theirresults.

4.2.2. Capillaryrise

Asa secondclassic testforthecorrectimplementationofmultiphaseflowatthepore-scale,wemodelwatercapillary rise inan air-filledtube (1by 20mm, 40by 400cells,

θ

water

=

45◦)andmeasure thesteady-state positionofthe water meniscus.Toensureapropernumericalsetup,thetube’slowerboundaryismodeledasaninfinitewaterreservoirandits upper boundaryasopen to the atmosphere. Toprevent initialization bias,the meniscusis initialized about2mm lower thanthetheoreticalequilibriumheightof10mm,whichisgivenbythefollowingequation[48]:

heq.

=

σ

cos

(θ )

R

ρ

lgy

,

(57)

where R isthetube’s radius. Wethen numericallysimulatethe systemwithhybridPorousInterFoam and interFoam, using impermeableporousboundarieswiththeformer(k01

=

1

×

1020m−2)andconventionalsharpboundarieswiththelatter. Fig.9Bshowsthesteadystateconfigurationsofbothcases,whichhaveameniscusheightof8.8 mm.AccordingtoEq. (57), thisheightisequivalenttoanimposedcontactangleof52◦,asmallyetsignificantdifferencetotheimposedcontactangle of45◦.WearenotthefirsttonotethatinterFoam (thestandardporescalemultiphaseflowsolverinOpenFOAM®presents minorinaccuracies inits abilitytoimpose aprescribed contactangle[38,30]. Thecomparisons presentedhereshowthat oursolver’saccuracyinthisregardissimilartothatofinterFoam.

4.2.3. Taylorfilm

(19)

Fig. 10. Oil

drainage in a complex porous medium solved at the pore scale using

hybridPorousInterFoam andinterFoam.

The shaded sections represent solid

grains (modeled using φ=0.001 and k−10 =1 ×1020m−2in hybridPorousInterFoam)

and the blue and red colors represent oil and water, respectively.

Theheightofthisfilmisgivenbythefollowinganalyticalsolution,whichweuseasabenchmarktoverifyournumerical simulations[6],

hfilm R

=

1

.

34Ca2/3

1

+

3

.

35Ca2/3

,

(58)

where Ca isthecapillarynumberdefinedasCa

=

μeth.U

σ .We cansolveEq. (58) withthe givensimulationparametersto

obtain a filmthicknessof 4.35 μm.Simulations ofthissystem performedusinghybridPorousInterFoam withimpermeable porousboundaries(k01

=

1

×

1020m−2)andinterFoam withconventionalboundariesyieldavalueof4.50 μm,representing arelativeerrorofabout3%or0.15 μm.Thesetestsandtheirresultsareconsistentwithnumericalsimulationsreportedby Graveleauet al. [28] andMaesandSoulaine [63] usinginterFoam.

4.2.4. Porescaleapplication:oildrainageinacomplexporenetwork

AswedidattheendoftheDarcyscaleverificationsection,wenowillustrateourmodel’sapplicabilitytomorecomplex systemsbypresentingasimulationofoildrainage,thistimeattheporescale.Therelevanceofthesimulatedsystemfollows fromourpreviousillustrativeproblem,asthisissimplyitsun-averagedequivalentatasmallerscale.Thecomplexityofthe simulatedsystem(1.7 by 0.76mm,1700by 760cells, waterinjectionvelocity =0.1m/s,

θ

oil

=

45◦, poutlet

=

0 Pa)stems fromtheinitializationofaheterogeneousporosityfieldasa representationofacross-sectionofan oil-wetrock.Here,the porosityissettooneinthefluid-occupiedspaceandclosetozerointherock-occupiedspace(SeeFig.10A).Thisallowsfor thesolidgrainstoactasvirtuallyimpermeablesurfaces(k01

=

1

×

1020m−2)withwettabilityboundarycondition[38].To verifytheaccuracyofoursolver,wesolvedanequivalentsystemwithinterFoam byremovingtherock-occupiedcellsfrom themeshandimposingthesamecontactangleatthesenewboundariesthroughconventionalmethods.

Références

Documents relatifs

Mais le débat sur la nature juridique de ces accords est-il central lorsque l’objectif pour- suivi par les organisations syndicales dans ce type de négociation internationale

CPU time used for the resolution of the pressure and saturation equations of the TPFA method on the top and the MMsFE with multiscale global basis functions on the bottom.... Since

Dans une maison, la cuisine est aussi importante que le salon. C'est une pièce dans laquelle on passe beaucoup de temps, puisqu'on y prend les repas. Par conséquent cette pièce

Moreover, the degree of realism can be tuned depending on the question to be addressed, from testing a specific hypothesis to building a full-grown artificial evolutionary

La description détaillée de la reconstruction du vertex secondaire et des différents algorithmes de reconstruction et d’identification des jets de b est abordée dans la section 5.2

Elle permet en particulier de minorer le nombre de certains points spéciaux ou de certaines droites concourantes, comme le nombre de sommets ou de droites nor- males concourantes,

Intensity (I) and linear polarization (Q/I) theoretical spectrum of the Na i D lines as observed 4.1 arcsec inside the solar limb.. CRD: Assum- ing complete redistribution of