GEOS-DEV / GEOS

GEOS Simulation Framework
GNU Lesser General Public License v2.1
206 stars 83 forks source link

flux boundary conditions modifcations #532

Closed rrsettgast closed 4 years ago

rrsettgast commented 5 years ago

Currently the "flux" boundary condition specifies a mass flux, and has an option to apply the injection evenly across a set.

Issues:

  1. The set size is incorrect in a parallel environment. The global size of the set must be determined to properly partition the flux to the receiver cells.
  2. There should be an option for mass flux or volume flux. I think he default should be volume flux since that is what is typically specified in a pumping schedule.

@francoishamon @yue-2018 @klevzoff comments?

klevzoff commented 5 years ago
  1. Yes. I caught some FPEs from division by zero set size when I added source flux tests in https://github.com/GEOSX/GEOSX/pull/529. I ended up just adding a zero check, but clearly your solution is the correct one. Would be great if the global size was precomputed and saved (not sure where), rather than figured out at every BC application.
  2. One problem with volume flux - you have to decide whether it's given at "reservoir" conditions or "surface" conditions. Maybe not much of an issue for single-phase flows which typically are nearly incompressible, but a major thing for multiphase. I imagine, pumping volumes are given at surface conditions, so we need to define (or let user specify) what those conditions are and then go through a constitutive call to determine surface fluid density. Of course, as a first step we can just make an approximation and use fluid density at the cell, but it won't be correct in general.
francoishamon commented 5 years ago

For 2., I agree with @klevzoff. For the wells, the current status is the same as for the flux boundary conditions, i.e., a mass flux is specified as input when the well is controlled by rate. But it would make more sense to specify a volume flux at reservoir or surface conditions and then call the constitutive functions (if surface conditions are specified) to compute the terms that enter into the mass balance equations at reservoir conditions.

I left this as a TODO in the well branch. So, unless someone else wants to do it, I can work on this for both the flux boundary conditions and the wells since it could make sense to have a uniform treatment/XML interface for these two terms.

yue-2018 commented 5 years ago
  1. I agree. The global size had better be precomputed.
  2. The volume flux is typically given at surface conditions. So if fluid phase density at surface conditions is given it is pretty straightforward to convert volume flux to mass flux. This can be handled by the well model. For most of flux boundary conditions we use mass flux instead of volume flux to specify flux at reservoir conditions because fluid density at reservoir may change with time. So I think the well model should be able to take volume flux at surface condition, and for regular flux boundary conditions we just use mass flux.