Mathematical modeling of energy flow in a geothermal reservoir Halldór Pálsson University of Iceland Mathematical modeling of energy flow in a geothermal reservoir p. 1
Objective of the project To develop a model of two phase flow in reservoirs, based on a flexible existing framework of computational fluid dynamics software. Laminar, incompressible, single phase flow and energy transfer. Flow is quasi-steady, temperature is unsteady. Two phase flow without phase change, including a dynamic well bore flow model. Two phase flow with phase change, using a steady state solution for flow if appropriate, but dynamic energy calculations. Multiphase flow with phase change between water and steam and additional gas mixtures included. Mathematical modeling of energy flow in a geothermal reservoir p. 2
Variables and equation of state The state of the reservoir is given by pressure p, enthalpy h, density ρ and saturation α. A general equation of state is given as ρ = f(p,h) A specific equation for compressible liquid can be written as ( p p0 ρ = ρ 0 exp E β(h h ) 0) c p Finally, the Boussinesq approximation is ρ = ρ 0 ( 1 β(t T0 ) ) Mathematical modeling of energy flow in a geothermal reservoir p. 3
Conservation of mass The continuity equation for a single phase is given in general form as ρ t + (ρ u) = 0 The equation of state can be included in the time derivative, giving ρ p p t + ρ h h t + (ρ u) = 0 In case of no phase change, saturation changes must be included, e.g. α t + ( uα) = 0 Mathematical modeling of energy flow in a geothermal reservoir p. 4
Conservation of energy For the fluid, the energy conservation is written as ( ) k (ρh)+ (ρ uh) = h +S t c p assuming no viscous heating. The source term S can include e.g. heat transfer coupling to the solid material. For the solid ρ s c s T t = (k s T)+S s where the source term S s is similar to the fluid source term, e.g. coupling between the two. Mathematical modeling of energy flow in a geothermal reservoir p. 5
Velocity-pressure coupling For most cases, the coupling can be expressed with the Darcy-Forchheimer relation p+ρ g = µ κ u ρf 2d u u where u is the superficial velocity. This formulation can e.g. be inserted into the conservation of mass for laminar liquid, ( ) ρ p ρ κ E t = µ ( p+ρ g) + βρ h c p t Mathematical modeling of energy flow in a geothermal reservoir p. 6
Dimensionless variables Dimensionless temperature is defined as θ = T T 0 T 1 T 0 the dimensionless pressure as φ = ρ 0cκ µk (p+ρ 0gLz) and the dimensionless time as ( ) k τ = ρ 0 cl 2 t Mathematical modeling of energy flow in a geothermal reservoir p. 7
The Darcy-Lapwood system By introduction the dimensionless field variables the heat equation becomes θ τ = (( φ Raθ z)θ + θ ) and the continuity requirement is then ( φ Raθ z) = 0 with the dimensionless porous Rayleigh number defined as Ra = ρ2 0 cgβ(t 1 T 0 )κl µk Mathematical modeling of energy flow in a geothermal reservoir p. 8
A customized solver code while (runtime.loop()) { Info<< "Time = " << runtime.timename() << nl << endl; # include "readpisocontrols.h" # include "CourantNo.H" for (int nonorth=0; nonorth<=nnonorthcorr; nonorth++) { fvscalarmatrix peqn ( // Darcy equation for porous flow fvm::laplacian(kappa / nu, p) + kappa / nu * fvc::div(gflux, rhok) ); // Set reference pressure and solve Darcy equation peqn.setreference(prefcell, prefvalue); peqn.solve(); // Update velocity field and flux U = -kappa / nu * (fvc::grad(p) + rhok * g); phi = fvc::interpolate(u) & mesh.sf(); solve ( // Solve heat transport equation fvm::ddt(t) + fvm::div(phi, T) - fvm::laplacian(nu / Pr, T) ); } // Update kinematic density, based on Boussinesq approximation rhok = 1.0 - beta*(t - TRef); } runtime.write(); Mathematical modeling of energy flow in a geothermal reservoir p. 9
Results for Ra = 100, pressure Mathematical modeling of energy flow in a geothermal reservoir p. 10
Results for Ra = 100, temperature Mathematical modeling of energy flow in a geothermal reservoir p. 11
Results for Ra = 100, continued Mathematical modeling of energy flow in a geothermal reservoir p. 12
Results for Ra = 500, temperature Mathematical modeling of energy flow in a geothermal reservoir p. 13
Dimensionless flux from top and bottom Nusselt number Spectral amplitude 5.46 5.44 5.42 5.4 5.38 5.36 5.34 5.32 5.3 0.6 0.65 0.7 0.75 0.8 Dimensionless time 30 25 20 15 10 5 0 50 100 150 200 250 Frequency [Hz] Mathematical modeling of energy flow in a geothermal reservoir p. 14
Results for two dimensional cases 11 10 Nusselt number 9 8 7 6 5 Ra = 1000 Ra = 500 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Dimensionless time 10 4 Magnitude 10 2 10 0 10 0 10 1 10 2 10 3 10 4 Frequency number for dimensionless interval 0.73 Mathematical modeling of energy flow in a geothermal reservoir p. 15