Skip to content

Commit

Permalink
Merge pull request #5 from daavid00/developing
Browse files Browse the repository at this point in the history
New cases, including gas velocity computations
  • Loading branch information
daavid00 committed Feb 28, 2024
2 parents 0f9204b + 3d237aa commit 1f386aa
Show file tree
Hide file tree
Showing 26 changed files with 2,492 additions and 84 deletions.
49 changes: 49 additions & 0 deletions examples/newcases/Case1/basecase.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
"""Set the full path to the flow executable and flags"""
flow --tolerance-mb=1e-7 --enable-opm-rst-file=true --linear-solver=cprw --newton-min-iterations=1 --enable-tuning=true

"""Set the model parameters"""
15000 15000 9 #Reginonal aquifer length, width, and depth [m]
375 #Variable array of x-refinment (Regional)
375 #Variable array of y-refinment (Regional)
1 #Variable array of z-refinment (Regional)
375 #Variable array of x-refinment (Reference)
375 #Variable array of y-refinment (Reference)
1 #Variable array of z-refinment (Reference)
5000 5000 10000 10000 #Site xi, yi, xf, and yf box positions [m]
porv 1e9 1e9 1e9 1e9 #Use free/closed/porv for the Regional aquifer (if porv, enter the bottom, right, top, and left values (e.g, porv 1e8 1e7 1e6 1e5))
pres #Use free/closed/porv/porvproj/flux/pres/pres2p/wells for the BC site (if porv; bottom, right, top, and left values (e.g, porv 1e4 1e3 1e2 1e1)); for pres/flux, add 'interp' to use linear interpolation in time
11000 11000 1 1 0 #Regional fault x, and y positions [m], x and y multipliers for the trans, and height of the fault jump [m]
6666 7075 7885 8450 1 1 #Site fault x, and y positions [m] (initial and final) and x and y multipliers for the trans
9 #Thicknes of the layers
3E7 105 105 4.934e-10 #Pressure on the reservoir top [Pa], top and bottom temperatures [C], and rock compressibility [1/Pa]
6700 7500 4.5 #Sensor position x, y, and z to assess the error over time w.r.t the reference solution [m]
0 #The function for the reservoir surface
1 2.92 #Add hysteresis (1/0) and salinity (value [1E-3 kg-M/kg])
0 #Number of interations for back-coupling

"""Set the saturation functions"""
krw * ((sw - swi) / (1.0 - sni -swi)) ** nkrw #Wetting rel perm saturation function [-]
krn * ((1.0 - sw - sni) / (1.0 - sni - swi)) ** nkrn #Non-wetting rel perm saturation function [-]
pec * ((sw - swi) / (1.0 - swi)) ** (-(1.0 / npe)) #Capillary pressure saturation function [Pa]

"""Properties sat functions"""
"""swi [-], sni [-], krw [-], krn [-], pec [Pa], nkrw [-], nkrn [-], npe [-], threshold cP evaluation"""
SWI5 0.478 SNI5 0. KRW5 1. KRN5 .3 PRE4 0 NKRW1 3 NKRN1 3 NPE1 2 THRE1 1e-5
SWI5 0.478 SNI5 0.312 KRW5 1. KRN5 .3 PRE4 0 NKRW1 3 NKRN1 3 NPE1 2 THRE1 1e-5

"""Properties rock"""
"""Kxy [mD], Kz [mD], phi [-]"""
PERMXY5 1000 PERMZ5 100 PORO5 0.2

"""Wells position"""
"""x, y, zi, and zf positions [m]"""
7500 7500 0 9 #Well 0
11500 11500 0 9 #Well 1
11500 3500 0 9 #Well 2

"""Define the injection values"""
"""injection time [d], time step size to write results regional [d], time step size to write results site/reference [d], maximum time step [d], fluid (0 wetting, 1 non-wetting) well 0, injection rates [kg/day] well 0, fluid ... well n, injection, ...well n, (if 'wells' for BC in site (Line 14); bottom, right, top, and left values (0(prod)/1(inj), pressure [Pa]))"""
180 1 1 1 1 4106776.18 1 4106776.18 1 4106776.18
180 1 1 1 1 0 1 0 1 4106776.18
180 1 1 1 1 0 1 4106776.18 1 0
180 1 1 1 1 4106776.18 1 4106776.18 1 4106776.18
49 changes: 49 additions & 0 deletions examples/newcases/Case1/basecase_closed.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
"""Set the full path to the flow executable and flags"""
flow --tolerance-mb=1e-7 --enable-opm-rst-file=true --linear-solver=cprw --newton-min-iterations=1 --enable-tuning=true

"""Set the model parameters"""
15000 15000 9 #Reginonal aquifer length, width, and depth [m]
375 #Variable array of x-refinment (Regional)
375 #Variable array of y-refinment (Regional)
1 #Variable array of z-refinment (Regional)
375 #Variable array of x-refinment (Reference)
375 #Variable array of y-refinment (Reference)
1 #Variable array of z-refinment (Reference)
5000 5000 10000 10000 #Site xi, yi, xf, and yf box positions [m]
porv 1e9 1e9 1e9 1e9 #Use free/closed/porv for the Regional aquifer (if porv, enter the bottom, right, top, and left values (e.g, porv 1e8 1e7 1e6 1e5))
closed #Use free/closed/porv/porvproj/flux/pres/pres2p/wells for the BC site (if porv; bottom, right, top, and left values (e.g, porv 1e4 1e3 1e2 1e1)); for pres/flux, add 'interp' to use linear interpolation in time
11000 11000 1 1 0 #Regional fault x, and y positions [m], x and y multipliers for the trans, and height of the fault jump [m]
6666 7075 7885 8450 1 1 #Site fault x, and y positions [m] (initial and final) and x and y multipliers for the trans
9 #Thicknes of the layers
3E7 105 105 4.934e-10 #Pressure on the reservoir top [Pa], top and bottom temperatures [C], and rock compressibility [1/Pa]
6700 7500 4.5 #Sensor position x, y, and z to assess the error over time w.r.t the reference solution [m]
0 #The function for the reservoir surface
1 2.92 #Add hysteresis (1/0) and salinity (value [1E-3 kg-M/kg])
0 #Number of interations for back-coupling

"""Set the saturation functions"""
krw * ((sw - swi) / (1.0 - sni -swi)) ** nkrw #Wetting rel perm saturation function [-]
krn * ((1.0 - sw - sni) / (1.0 - sni - swi)) ** nkrn #Non-wetting rel perm saturation function [-]
pec * ((sw - swi) / (1.0 - swi)) ** (-(1.0 / npe)) #Capillary pressure saturation function [Pa]

"""Properties sat functions"""
"""swi [-], sni [-], krw [-], krn [-], pec [Pa], nkrw [-], nkrn [-], npe [-], threshold cP evaluation"""
SWI5 0.478 SNI5 0. KRW5 1. KRN5 .3 PRE4 0 NKRW1 3 NKRN1 3 NPE1 2 THRE1 1e-5
SWI5 0.478 SNI5 0.312 KRW5 1. KRN5 .3 PRE4 0 NKRW1 3 NKRN1 3 NPE1 2 THRE1 1e-5

"""Properties rock"""
"""Kxy [mD], Kz [mD], phi [-]"""
PERMXY5 1000 PERMZ5 100 PORO5 0.2

"""Wells position"""
"""x, y, zi, and zf positions [m]"""
7500 7500 0 9 #Well 0
11500 11500 0 9 #Well 1
11500 3500 0 9 #Well 2

"""Define the injection values"""
"""injection time [d], time step size to write results regional [d], time step size to write results site/reference [d], maximum time step [d], fluid (0 wetting, 1 non-wetting) well 0, injection rates [kg/day] well 0, fluid ... well n, injection, ...well n, (if 'wells' for BC in site (Line 14); bottom, right, top, and left values (0(prod)/1(inj), pressure [Pa]))"""
180 1 1 1 1 4106776.18 1 4106776.18 1 4106776.18
180 1 1 1 1 0 1 0 1 4106776.18
180 1 1 1 1 0 1 4106776.18 1 0
180 1 1 1 1 4106776.18 1 4106776.18 1 4106776.18
49 changes: 49 additions & 0 deletions examples/newcases/Case1/basecase_flux.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
"""Set the full path to the flow executable and flags"""
flow --tolerance-mb=1e-7 --enable-opm-rst-file=true --linear-solver=cprw --newton-min-iterations=1 --enable-tuning=true

"""Set the model parameters"""
15000 15000 9 #Reginonal aquifer length, width, and depth [m]
375 #Variable array of x-refinment (Regional)
375 #Variable array of y-refinment (Regional)
1 #Variable array of z-refinment (Regional)
375 #Variable array of x-refinment (Reference)
375 #Variable array of y-refinment (Reference)
1 #Variable array of z-refinment (Reference)
5000 5000 10000 10000 #Site xi, yi, xf, and yf box positions [m]
porv 1e9 1e9 1e9 1e9 #Use free/closed/porv for the Regional aquifer (if porv, enter the bottom, right, top, and left values (e.g, porv 1e8 1e7 1e6 1e5))
flux #Use free/closed/porv/porvproj/flux/pres/pres2p/wells for the BC site (if porv; bottom, right, top, and left values (e.g, porv 1e4 1e3 1e2 1e1)); for pres/flux, add 'interp' to use linear interpolation in time
11000 11000 1 1 0 #Regional fault x, and y positions [m], x and y multipliers for the trans, and height of the fault jump [m]
6666 7075 7885 8450 1 1 #Site fault x, and y positions [m] (initial and final) and x and y multipliers for the trans
9 #Thicknes of the layers
3E7 105 105 4.934e-10 #Pressure on the reservoir top [Pa], top and bottom temperatures [C], and rock compressibility [1/Pa]
6700 7500 4.5 #Sensor position x, y, and z to assess the error over time w.r.t the reference solution [m]
0 #The function for the reservoir surface
1 2.92 #Add hysteresis (1/0) and salinity (value [1E-3 kg-M/kg])
0 #Number of interations for back-coupling

"""Set the saturation functions"""
krw * ((sw - swi) / (1.0 - sni -swi)) ** nkrw #Wetting rel perm saturation function [-]
krn * ((1.0 - sw - sni) / (1.0 - sni - swi)) ** nkrn #Non-wetting rel perm saturation function [-]
pec * ((sw - swi) / (1.0 - swi)) ** (-(1.0 / npe)) #Capillary pressure saturation function [Pa]

"""Properties sat functions"""
"""swi [-], sni [-], krw [-], krn [-], pec [Pa], nkrw [-], nkrn [-], npe [-], threshold cP evaluation"""
SWI5 0.478 SNI5 0. KRW5 1. KRN5 .3 PRE4 0 NKRW1 3 NKRN1 3 NPE1 2 THRE1 1e-5
SWI5 0.478 SNI5 0.312 KRW5 1. KRN5 .3 PRE4 0 NKRW1 3 NKRN1 3 NPE1 2 THRE1 1e-5

"""Properties rock"""
"""Kxy [mD], Kz [mD], phi [-]"""
PERMXY5 1000 PERMZ5 100 PORO5 0.2

"""Wells position"""
"""x, y, zi, and zf positions [m]"""
7500 7500 0 9 #Well 0
11500 11500 0 9 #Well 1
11500 3500 0 9 #Well 2

"""Define the injection values"""
"""injection time [d], time step size to write results regional [d], time step size to write results site/reference [d], maximum time step [d], fluid (0 wetting, 1 non-wetting) well 0, injection rates [kg/day] well 0, fluid ... well n, injection, ...well n, (if 'wells' for BC in site (Line 14); bottom, right, top, and left values (0(prod)/1(inj), pressure [Pa]))"""
180 1 1 1 1 4106776.18 1 4106776.18 1 4106776.18
180 1 1 1 1 0 1 0 1 4106776.18
180 1 1 1 1 0 1 4106776.18 1 0
180 1 1 1 1 4106776.18 1 4106776.18 1 4106776.18
49 changes: 49 additions & 0 deletions examples/newcases/Case1/basecase_open.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
"""Set the full path to the flow executable and flags"""
flow --tolerance-mb=1e-7 --enable-opm-rst-file=true --linear-solver=cprw --newton-min-iterations=1 --enable-tuning=true

"""Set the model parameters"""
15000 15000 9 #Reginonal aquifer length, width, and depth [m]
375 #Variable array of x-refinment (Regional)
375 #Variable array of y-refinment (Regional)
1 #Variable array of z-refinment (Regional)
375 #Variable array of x-refinment (Reference)
375 #Variable array of y-refinment (Reference)
1 #Variable array of z-refinment (Reference)
5000 5000 10000 10000 #Site xi, yi, xf, and yf box positions [m]
porv 1e9 1e9 1e9 1e9 #Use free/closed/porv for the Regional aquifer (if porv, enter the bottom, right, top, and left values (e.g, porv 1e8 1e7 1e6 1e5))
free #Use free/closed/porv/porvproj/flux/pres/pres2p/wells for the BC site (if porv; bottom, right, top, and left values (e.g, porv 1e4 1e3 1e2 1e1)); for pres/flux, add 'interp' to use linear interpolation in time
11000 11000 1 1 0 #Regional fault x, and y positions [m], x and y multipliers for the trans, and height of the fault jump [m]
6666 7075 7885 8450 1 1 #Site fault x, and y positions [m] (initial and final) and x and y multipliers for the trans
9 #Thicknes of the layers
3E7 105 105 4.934e-10 #Pressure on the reservoir top [Pa], top and bottom temperatures [C], and rock compressibility [1/Pa]
6700 7500 4.5 #Sensor position x, y, and z to assess the error over time w.r.t the reference solution [m]
0 #The function for the reservoir surface
1 2.92 #Add hysteresis (1/0) and salinity (value [1E-3 kg-M/kg])
0 #Number of interations for back-coupling

"""Set the saturation functions"""
krw * ((sw - swi) / (1.0 - sni -swi)) ** nkrw #Wetting rel perm saturation function [-]
krn * ((1.0 - sw - sni) / (1.0 - sni - swi)) ** nkrn #Non-wetting rel perm saturation function [-]
pec * ((sw - swi) / (1.0 - swi)) ** (-(1.0 / npe)) #Capillary pressure saturation function [Pa]

"""Properties sat functions"""
"""swi [-], sni [-], krw [-], krn [-], pec [Pa], nkrw [-], nkrn [-], npe [-], threshold cP evaluation"""
SWI5 0.478 SNI5 0. KRW5 1. KRN5 .3 PRE4 0 NKRW1 3 NKRN1 3 NPE1 2 THRE1 1e-5
SWI5 0.478 SNI5 0.312 KRW5 1. KRN5 .3 PRE4 0 NKRW1 3 NKRN1 3 NPE1 2 THRE1 1e-5

"""Properties rock"""
"""Kxy [mD], Kz [mD], phi [-]"""
PERMXY5 1000 PERMZ5 100 PORO5 0.2

"""Wells position"""
"""x, y, zi, and zf positions [m]"""
7500 7500 0 9 #Well 0
11500 11500 0 9 #Well 1
11500 3500 0 9 #Well 2

"""Define the injection values"""
"""injection time [d], time step size to write results regional [d], time step size to write results site/reference [d], maximum time step [d], fluid (0 wetting, 1 non-wetting) well 0, injection rates [kg/day] well 0, fluid ... well n, injection, ...well n, (if 'wells' for BC in site (Line 14); bottom, right, top, and left values (0(prod)/1(inj), pressure [Pa]))"""
180 1 1 1 1 4106776.18 1 4106776.18 1 4106776.18
180 1 1 1 1 0 1 0 1 4106776.18
180 1 1 1 1 0 1 4106776.18 1 0
180 1 1 1 1 4106776.18 1 4106776.18 1 4106776.18
49 changes: 49 additions & 0 deletions examples/newcases/Case1/basecase_porvproj.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
"""Set the full path to the flow executable and flags"""
flow --tolerance-mb=1e-7 --enable-opm-rst-file=true --linear-solver=cprw --newton-min-iterations=1 --enable-tuning=true

"""Set the model parameters"""
15000 15000 9 #Reginonal aquifer length, width, and depth [m]
375 #Variable array of x-refinment (Regional)
375 #Variable array of y-refinment (Regional)
1 #Variable array of z-refinment (Regional)
375 #Variable array of x-refinment (Reference)
375 #Variable array of y-refinment (Reference)
1 #Variable array of z-refinment (Reference)
5000 5000 10000 10000 #Site xi, yi, xf, and yf box positions [m]
porv 1e9 1e9 1e9 1e9 #Use free/closed/porv for the Regional aquifer (if porv, enter the bottom, right, top, and left values (e.g, porv 1e8 1e7 1e6 1e5))
porvproj #Use free/closed/porv/porvproj/flux/pres/pres2p/wells for the BC site (if porv; bottom, right, top, and left values (e.g, porv 1e4 1e3 1e2 1e1)); for pres/flux, add 'interp' to use linear interpolation in time
11000 11000 1 1 0 #Regional fault x, and y positions [m], x and y multipliers for the trans, and height of the fault jump [m]
6666 7075 7885 8450 1 1 #Site fault x, and y positions [m] (initial and final) and x and y multipliers for the trans
9 #Thicknes of the layers
3E7 105 105 4.934e-10 #Pressure on the reservoir top [Pa], top and bottom temperatures [C], and rock compressibility [1/Pa]
6700 7500 4.5 #Sensor position x, y, and z to assess the error over time w.r.t the reference solution [m]
0 #The function for the reservoir surface
1 2.92 #Add hysteresis (1/0) and salinity (value [1E-3 kg-M/kg])
0 #Number of interations for back-coupling

"""Set the saturation functions"""
krw * ((sw - swi) / (1.0 - sni -swi)) ** nkrw #Wetting rel perm saturation function [-]
krn * ((1.0 - sw - sni) / (1.0 - sni - swi)) ** nkrn #Non-wetting rel perm saturation function [-]
pec * ((sw - swi) / (1.0 - swi)) ** (-(1.0 / npe)) #Capillary pressure saturation function [Pa]

"""Properties sat functions"""
"""swi [-], sni [-], krw [-], krn [-], pec [Pa], nkrw [-], nkrn [-], npe [-], threshold cP evaluation"""
SWI5 0.478 SNI5 0. KRW5 1. KRN5 .3 PRE4 0 NKRW1 3 NKRN1 3 NPE1 2 THRE1 1e-5
SWI5 0.478 SNI5 0.312 KRW5 1. KRN5 .3 PRE4 0 NKRW1 3 NKRN1 3 NPE1 2 THRE1 1e-5

"""Properties rock"""
"""Kxy [mD], Kz [mD], phi [-]"""
PERMXY5 1000 PERMZ5 100 PORO5 0.2

"""Wells position"""
"""x, y, zi, and zf positions [m]"""
7500 7500 0 9 #Well 0
11500 11500 0 9 #Well 1
11500 3500 0 9 #Well 2

"""Define the injection values"""
"""injection time [d], time step size to write results regional [d], time step size to write results site/reference [d], maximum time step [d], fluid (0 wetting, 1 non-wetting) well 0, injection rates [kg/day] well 0, fluid ... well n, injection, ...well n, (if 'wells' for BC in site (Line 14); bottom, right, top, and left values (0(prod)/1(inj), pressure [Pa]))"""
180 1 1 1 1 4106776.18 1 4106776.18 1 4106776.18
180 1 1 1 1 0 1 0 1 4106776.18
180 1 1 1 1 0 1 4106776.18 1 0
180 1 1 1 1 4106776.18 1 4106776.18 1 4106776.18
29 changes: 29 additions & 0 deletions examples/newcases/Case1/run_simulations.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# SPDX-FileCopyrightText: 2024 NORCE
# SPDX-License-Identifier: GPL-3.0

""""
Script to run Flow
"""

import os

NAMES = [
"basecase",
]
os.system("rm -rf compare")
nsimulations = len(NAMES)
command = ""
for i, name in enumerate(NAMES):
command += f"expreccs -i {name}.txt -o Case_1 -m all -p no & "
command += "wait"
os.system(command)
command = ""
for i, name in enumerate(NAMES):
command += f"expreccs -i {name}_flux.txt -o Case_1 -m site -p no & "
command += f"expreccs -i {name}_porvproj.txt -o Case_1 -m site -p no & "
command += f"expreccs -i {name}_closed.txt -o Case_1 -m site -p no & "
command += f"expreccs -i {name}_open.txt -o Case_1 -m site -p no & "
command += "wait"
os.system(command)
command = f"expreccs -i {name}_open.txt -o Case_1 -m none -p yes"
os.system(command)
Loading

0 comments on commit 1f386aa

Please sign in to comment.