PyTOUGH icon indicating copy to clipboard operation
PyTOUGH copied to clipboard

Creating Bottom Boundary Using Extra Blocks

Open pierecnlnd opened this issue 1 year ago • 5 comments

Dear @acroucher,

I hope this message finds you well. As you may be aware, there are instances where it becomes necessary to create additional blocks for boundary conditions. I would greatly appreciate your guidance on how to implement this using PyTOUGH. Your assistance would be invaluable. Thank you in advance.

pierecnlnd avatar Oct 09 '24 00:10 pierecnlnd

hi, the way we teach reservoir modelling here at Auckland, we don't usually recommend applying Dirichlet boundary conditions (i.e. specifying pressure, temperature etc) on bottom or side boundaries. We use Neumann boundary conditions to represent e.g. upflows instead, which in TOUGH2 terms means using generators rather than boundary blocks.

But, if you really want to set up Dirichlet boundary conditions using PyTOUGH, you can do it. You do it just the same as you would if you were setting up the TOUGH2 input file manually - first create the new block, then add it to the grid using the t2grid add_block() method. Usually you want to give it a large volume so conditions in the block don't change (as you do for atmosphere blocks). Then create a new connection between the new block and the block in the existing grid where you want to apply the boundary condition, and add that to the grid using the t2grid add_connection() method. Usually you want to set the exterior connection distance very small, so the condition is applied on the block face, again as is done for atmosphere blocks.

Also you will need to add a corresponding entry in your initial conditions for the new boundary block. Or, once you have added all the extra blocks you can create the t2incon object for the edited grid using the t2grid incons() method.

Doing this makes it a bit harder to extract your simulation results and plot/ post-process them using a mulgrid geometry, if you are doing that, because the blocks in the geometry no longer match those in the t2grid.

acroucher avatar Oct 09 '24 03:10 acroucher

Thank you for your response. It is interesting that you mentioned Dirichlet boundary conditions are not preferred. If I may ask, could you elaborate on the reasoning behind this? Some papers suggest that one of the industry practices is to apply a bottom boundary condition to create a more realistic surrounding thermal gradient. I also encounter some confusion when working with models built in Petrasim, which typically include Fixed State Blocks or Extra Blocks, and converting them to a Waiwera model. I would appreciate any clarification or guidance on this matter.

pierecnlnd avatar Oct 10 '24 00:10 pierecnlnd

It mostly affects modelling of production. There are a few papers (not many) about this e.g. Nugraha et al, 2022 (section 3.2.3).

acroucher avatar Oct 10 '24 01:10 acroucher

Thank you for your response. I have reviewed the reference paper you provided. I would appreciate it if you could share an example script on how to properly add extra blocks and connections for the bottom boundary. I’m particularly interested in comparing the approaches using extra blocks (Dirichlet) versus applying a heat flux (Neumann). Your guidance on this would be greatly appreciated.

pierecnlnd avatar Oct 16 '24 00:10 pierecnlnd

I don't have any examples of Dirichlet bottom boundary conditions, because we don't really use them, but there are some examples of using PyTOUGH to add Dirichlet side boundary conditions in the Waiwera benchmark tests, e.g. the Model Intercomparison Study problem 6 (line 144):

https://github.com/waiwera/waiwera/blob/master/test/benchmark/model_intercomparison_study/problem6/setup.py

For a bottom boundary you would do something very similar but change the connection permeability direction from 1 to 3 (for vertical connection) and the direction cosine from 0 to -1.

acroucher avatar Oct 16 '24 22:10 acroucher