Focus: Improving staggered iteration between multiphase reaction transport and geomechanics
• Motivating problems are hydrate dissociation problems
• Wildly varying fluid compositions and mechanical properties
• Large changes causes drastic changes to the fluid mixture properties
• Properties vary greatly in space and time: can't estimate a priori
• Very soft sediments with soft gases and stiff liquids and ices
Coupled transport, kinetics, and momentum balances:
Solve for p,T,X, and u such that: dmdt=∇⋅q+s}balance of massdXdt=r}reactions (possibly equilibrium)0=∇⋅σ+f}balance of momentum (quasistatic) Plus statemachine logic for phase change: state=transition(state;p,X,T)
Pick numerical methods that are best for each set of equations.
Have an additional interpolation step
Queiruga, Moridis, and Reagan, "Simulation of Gas Production from Multilayered Hydrate-Bearing Media with Fully Coupled Flow, Thermal, Chemical and Geomechanical Processes Using TOUGH+Millstone. Parts 1-3," Transport in Porous Media, 2019
At each timestep, we're solving two nonlinear algebraic problems:
F(p,T,X,...)=0}flow codeM(u)=0}mechanical codeTo really do Newton's method we would need: [∂F∂p∂F∂u∂M∂p∂M∂u]{ΔpkΔuk}=−{FkMk} E.g. in hydraulic fracturing the fluid pressure must be fully coupled like this or else it won't converge.
Hard to formulate those cross-terms:
For each Newton loop k in the timestep:
Staggering the two solvers is the same as this: [∂F∂p00∂M∂u]{ΔpkΔuk}=−{FkMk} Problematic when |∂M∂p|>|∂M∂u|: fluid stiffer than skeleton.
This is catastrophic in large-range multiphase flow problems: F(pbad)=raise out of range error Physical descriptions have limits! May never be able to solve the system.
Can we find some matrix C that helps? [∂F∂p00∂M∂u+C]{ΔpkΔuk}=−{FkMk}
The poroelastic constitutive response for the fluid pore pressure is dp=−Mα∇⋅du+M∇⋅(qdt) where the poroelastic coefficient is M−1=ϕK−1f+(α−ϕ)K−1s where qdt is an differential fluid volume into the control volume.
For the total stress, the constitutive response is, dσ=−αdpI+(Kd−23G)∇⋅duI+2G∇sdu.
Note: We use the law for σ, but not p
Have nonlinearity in composition-dependent properties; e.g. in hydrate, K and G are function of saturation S: K=K0(1−S)+K1S,G=G0(1−S)+G1S
We can substitute dp for a familiar form: dσ=(Ku−23G)∇⋅du+2G∇sdu+α2M∇⋅(qdt)I where the undrained bulk modulus is: Ku=Kd+α2M
Making the analogy to our matrix system, we had (note: more variables than p) [1MαtrαIKd]{dpdu}=−{fm} and are trying to do: [1Mαtr0Kd+α2M]{dpdu}=−{fm−αfI} Triangularized the system so solving du first would substitute into dp equation closer to the answer.
Caveat: Poroelasticity only holds in the linear regime! (Small changes)
Actual balance of mass that the reservoir simulator solves is: ∂∂tρ=∇⋅q where we assumed: ρ=ρ0(1+p/Kf) Flow simulators use very complicated nonanalytic formulations for ρ.
def gibbs_region1(T,p):
p1_star = 1.653e7
T1_star = 1.386e3
n1 = [ 0.14632971213167e00, -0.84548187169114e00,
-3.7563603672040e+00, 3.3855169168385e+00,
-0.95791963387872e00, 0.15772038513228e00,
-1.6616417199501e-02, 8.1214629983568e-04,
2.8319080123804e-04, -6.0706301565874e-04,
-1.8990068218419e-02, -3.2529748770505e-02,
-2.1841717175414e-02, -5.2838357969930e-05,
-4.7184321073267e-04, -3.0001780793026e-04,
4.7661393906987e-05, -4.4141845330846e-06,
-7.2694996297594e-16, -3.1679644845054e-05,
-2.8270797985312e-06, -8.5205128120103e-10,
-2.2425281908000e-06, -6.5171222895601e-07,
-1.4341729937924e-13, -4.0516996860117e-07,
-1.2734301741641e-09, -1.7424871230634e-10,
-6.8762131295531e-19, 1.4478307828521e-20,
2.6335781662795e-23, -1.1947622640071e-23,
1.8228094581404e-24, -9.3537087292458e-26]
i1 = [ 0, 0,0, 0, 0, 0, 0, 0, 1,1, 1, 1,1, 1, 2, 2, 2, 2, 2, 3, 3, 3,
4, 4,4, 5, 8, 8, 21, 23, 29, 30, 31, 32 ]
j1 = [ -2, -1, 0, 1, 2, 3, 4, 5, -9, -7, -1, 0,1, 3, -3, 0, 1,3, 17, -4,
0, 6, -5, -2, 10, -8, -11, -6, -29, -31, -38, -39, -40, -41 ]
p_i = p/p1_star
t_i = T1_star/T
return R*T*sum([ n*(7.1-p_i)**I*(t_i-1.222)**J
for n,I,J in zip(n1,i1,j1)])
density_region1,enthalpy_region1 = density_enthalpy(gibbs_region1)
Solving balance with fluxes: ddtMcomp=∑facetsFcomp Masses and fluxes are integrals over discrete domains and facets: Mcomp=∫Ωϕ∑phaseSphaseρphasecompXphasecompd3x and: Fcomp=∫Γ∑phaseqphasecomp⋅nd2x
Flow and mechanics are coupled through volume of |Ω|=V(t) dVdt=V(t)ddttrε Poroelastic formulation uses the product rule to extract this term: dρVdt=V∂ρ∂pdpdt+ρdVdt (Derive from transformation of ∇x⋅ to ∇X⋅ given x(t)=X+u(t))
For each Newton loop k in the timestep:
Use prior knowledge of how the flow solver will behave (even though the physical description is different) to precondition the iteration.
At each update, the flow simulator yields a Δp based on the current composition of the fluid.
Assume we're in the linear regime within the iteration: Δp=−Mα∇⋅Δu+∇⋅(qΔt) We can estimate the effective M: M∗=−α∇⋅Δu+∇⋅(qΔt)Δp
We can back out an estimate of the bulk modulus of the fluid: K∗f=ϕ(1M∗−(α−ϕ)Ks)−1
Assemble the mechanical stiffness matrix using Ku in place of Kd with estimated M∗: K∗u=Kd+α2M∗
Watch out: Not-a-number when Δp=0, e.g. at boundary conditions.
Estimate PDE ∇⋅q from fluxes: ∇⋅q=1V∫Ω∇⋅qd3x=1V∮∂Ωq⋅nd2x=1V∑facets∫Γq⋅nd2x=1V∑facetsF
Only modification needed to the flow solver; Millstone takes care of the rest.
1D quasi-static consolidation with a ramp-up load filled with a mixture of H2O and CH4
Each data point is one simulation; missing point reflects divergence.
Algorithms work on 1D test problem, but still not 100\% robust in some reservoir problems.
Need to add under-relaxation: Δu=[K(Kd+α2M∗)]∖{R(σ)} And update by uk+1=uk+βΔu With 0<β≤1. Smaller β slows down convergence.
Also, watch out for pore ``collapse'' when gases appear (Kf≈50Pa vs Ks≈1010Pa)
All this work to get this type of problem to work:
Comments:
These sldies are hosted at: ocf.io/afq/slides/Siam2019
Queiruga, Moridis, and Reagan, "Simulation of Gas Production from Multilayered Hydrate-Bearing Media with Fully Coupled Flow, Thermal, Chemical and Geomechanical Processes Using TOUGH+Millstone. Parts 1-3," Transport in Porous Media, 2019