Skip to content

Commit 73e9216

Browse files
authored
Merge pull request #10 from daavid00/development
gas water co2store
2 parents ad56474 + 6d68427 commit 73e9216

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1301
-487
lines changed

.github/workflows/CI.yml

+9-7
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ on:
77
pull_request:
88

99
jobs:
10-
run-pyff-local:
11-
timeout-minutes: 30
10+
run-expreccs-local:
11+
timeout-minutes: 60
1212
strategy:
1313
fail-fast: false
1414
matrix:
@@ -30,12 +30,14 @@ jobs:
3030
- name: Install Flow Simulator
3131
run: |
3232
sudo apt-get update
33-
sudo apt-get install software-properties-common
34-
sudo apt-add-repository ppa:opm/ppa
35-
sudo apt-get update
36-
sudo apt-get install mpi-default-bin
37-
sudo apt-get install libopm-simulators-bin
3833
sudo apt-get install texlive-fonts-recommended texlive-fonts-extra dvipng cm-super
34+
sudo apt-get install software-properties-common
35+
sudo apt-get install -y build-essential gfortran pkg-config cmake
36+
sudo apt-get install -y mpi-default-dev
37+
sudo apt-get install -y libblas-dev libboost-all-dev libsuitesparse-dev libtrilinos-zoltan-dev
38+
sudo apt-get install libdune-common-dev libdune-geometry-dev libdune-istl-dev libdune-grid-dev
39+
chmod u+x build_opm-flow_mpi.bash
40+
./build_opm-flow_mpi.bash
3941
4042
- name: Install test dependecies
4143
run: |

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ opm-models/
144144
opm-simulators/
145145

146146
# Extra folders
147+
tests/configs/back
147148
tests/configs/compare
148149
tests/configs/output
149150
examples/output

build_dune_and_opm-flow.bash

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ CURRENT_DIRECTORY="$PWD"
22

33
# Dune modules
44
for module in common geometry grid istl
5-
do git clone https://gitlab.dune-project.org/core/dune-$module.git --branch v2.9.0
5+
do git clone https://gitlab.dune-project.org/core/dune-$module.git
66
done
77
for module in common geometry grid istl
88
do ./dune-common/bin/dunecontrol --only=dune-$module cmake -DCMAKE_DISABLE_FIND_PACKAGE_MPI=1
@@ -21,13 +21,13 @@ for repo in common grid models
2121
do
2222
mkdir build/opm-$repo
2323
cd build/opm-$repo
24-
cmake -DUSE_MPI=0 -DOPM_ENABLE_PYTHON=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$CURRENT_DIRECTORY/dune-common/build-cmake;$CURRENT_DIRECTORY/dune-grid/build-cmake;$CURRENT_DIRECTORY/dune-geometry/build-cmake;$CURRENT_DIRECTORY/dune-istl/build-cmake;$CURRENT_DIRECTORY/build/opm-common;$CURRENT_DIRECTORY/build/opm-grid" $CURRENT_DIRECTORY/opm-$repo
24+
cmake -DUSE_MPI=0 -DNDEBUG=1 -DOPM_ENABLE_PYTHON=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$CURRENT_DIRECTORY/dune-common/build-cmake;$CURRENT_DIRECTORY/dune-grid/build-cmake;$CURRENT_DIRECTORY/dune-geometry/build-cmake;$CURRENT_DIRECTORY/dune-istl/build-cmake;$CURRENT_DIRECTORY/build/opm-common;$CURRENT_DIRECTORY/build/opm-grid" $CURRENT_DIRECTORY/opm-$repo
2525
make -j5
2626
cd ../..
2727
done
2828

2929
mkdir build/opm-simulators
3030
cd build/opm-simulators
31-
cmake -DUSE_MPI=0 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$CURRENT_DIRECTORY/dune-common/build-cmake;$CURRENT_DIRECTORY/dune-grid/build-cmake;$CURRENT_DIRECTORY/dune-geometry/build-cmake;$CURRENT_DIRECTORY/dune-istl/build-cmake;$CURRENT_DIRECTORY/build/opm-common;$CURRENT_DIRECTORY/build/opm-grid;$CURRENT_DIRECTORY/build/opm-models" $CURRENT_DIRECTORY/opm-simulators
31+
cmake -DUSE_MPI=0 -DNDEBUG=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$CURRENT_DIRECTORY/dune-common/build-cmake;$CURRENT_DIRECTORY/dune-grid/build-cmake;$CURRENT_DIRECTORY/dune-geometry/build-cmake;$CURRENT_DIRECTORY/dune-istl/build-cmake;$CURRENT_DIRECTORY/build/opm-common;$CURRENT_DIRECTORY/build/opm-grid;$CURRENT_DIRECTORY/build/opm-models" $CURRENT_DIRECTORY/opm-simulators
3232
make -j5 flow
3333
cd ../..

build_opm-flow_mpi.bash

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ for repo in common grid models
1212
do
1313
mkdir build/opm-$repo
1414
cd build/opm-$repo
15-
cmake -DUSE_MPI=1 -DOPM_ENABLE_PYTHON=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$CURRENT_DIRECTORY/build/opm-common;$CURRENT_DIRECTORY/build/opm-grid" $CURRENT_DIRECTORY/opm-$repo
15+
cmake -DUSE_MPI=1 -DNDEBUG=1 -DOPM_ENABLE_PYTHON=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$CURRENT_DIRECTORY/build/opm-common;$CURRENT_DIRECTORY/build/opm-grid" $CURRENT_DIRECTORY/opm-$repo
1616
make -j5
1717
cd ../..
1818
done
1919

2020
mkdir build/opm-simulators
2121
cd build/opm-simulators
22-
cmake -DUSE_MPI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$CURRENT_DIRECTORY/build/opm-common;$CURRENT_DIRECTORY/build/opm-grid;$CURRENT_DIRECTORY/build/opm-models" $CURRENT_DIRECTORY/opm-simulators
23-
make -j5 flow
22+
cmake -DUSE_MPI=1 -DNDEBUG=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$CURRENT_DIRECTORY/build/opm-common;$CURRENT_DIRECTORY/build/opm-grid;$CURRENT_DIRECTORY/build/opm-models" $CURRENT_DIRECTORY/opm-simulators
23+
make -j5 flow_gaswater_dissolution
2424
cd ../..

examples/cases/case1a/basecase.txt

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""Set the full path to the flow executable and flags"""
2-
flow --enable-opm-rst-file=true --linear-solver=cprw --enable-tuning=true
2+
flow --tolerance-mb=1e-7 --enable-opm-rst-file=true --linear-solver=cprw --newton-min-iterations=1 --enable-tuning=true
33

44
"""Set the model parameters"""
55
15000 15000 9 #Reginonal aquifer length, width, and depth [m]
@@ -16,9 +16,10 @@ pres #Use free/closed/porv/porvproj/flux/pres/pres2p/well
1616
6666 7075 7885 8450 1 1 #Site fault x, and y positions [m] (initial and final) and x and y multipliers for the trans
1717
9 #Thicknes of the layers
1818
3E7 105 105 4.934e-10 #Pressure on the reservoir top [Pa], top and bottom temperatures [C], and rock compressibility [1/Pa]
19-
6700 8100 0 #Sensor position x, y, and z to assess the error over time w.r.t the reference solution [m]
19+
6700 8100 4.5 #Sensor position x, y, and z to assess the error over time w.r.t the reference solution [m]
2020
0 #The function for the reservoir surface
2121
1 2.92 #Add hysteresis (1/0) and salinity (value [1E-3 kg-M/kg])
22+
0 #Number of interations for back-coupling
2223

2324
"""Set the saturation functions"""
2425
krw * ((sw - swi) / (1.0 - sni -swi)) ** nkrw #Wetting rel perm saturation function [-]
@@ -27,8 +28,8 @@ pec * ((sw - swi) / (1.0 - swi)) ** (-(1.0 / npe)) #Capillary pressure sa
2728

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

3334
"""Properties rock"""
3435
"""Kxy [mD], Kz [mD], phi [-]"""
@@ -38,10 +39,10 @@ PERMXY5 1000 PERMZ5 100 PORO5 0.2
3839
"""x, y, zi, and zf positions [m]"""
3940
7500 7500 0 9 #Well 0
4041
11300 11300 0 9 #Well 1
41-
11200 3800 0 9 #Well 2
42+
11300 3800 0 9 #Well 2
4243

4344
"""Define the injection values"""
4445
"""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]))"""
45-
360 30 30 30 1 4136031.3852 1 4136031.3852 1 0
46-
360 30 30 30 1 0 1 0 1 4136031.3852
47-
360 30 30 30 1 0 1 4136031.3852 1 4136031.3852
46+
360 30 30 30 1 4106776.18 1 4106776.18 1 0
47+
360 30 30 30 1 0 1 0 1 4106776.18
48+
360 30 30 30 1 0 1 4106776.18 1 4106776.18
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
"""Set the full path to the flow executable and flags"""
2-
flow --enable-opm-rst-file=true --linear-solver=cprw --enable-tuning=true
2+
flow --tolerance-mb=1e-7 --enable-opm-rst-file=true --linear-solver=cprw --newton-min-iterations=1 --enable-tuning=true
33

44
"""Set the model parameters"""
55
15000 15000 9 #Reginonal aquifer length, width, and depth [m]
66
75 #Variable array of x-refinment (Regional)
77
75 #Variable array of y-refinment (Regional)
88
1 #Variable array of z-refinment (Regional)
9-
600 #Variable array of x-refinment (Reference)
10-
600 #Variable array of y-refinment (Reference)
9+
75 #Variable array of x-refinment (Reference)
10+
75 #Variable array of y-refinment (Reference)
1111
1 #Variable array of z-refinment (Reference)
1212
5000 5000 10000 10000 #Site xi, yi, xf, and yf box positions [m]
1313
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))
14-
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
14+
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
1515
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]
1616
6666 7075 7885 8450 1 1 #Site fault x, and y positions [m] (initial and final) and x and y multipliers for the trans
1717
9 #Thicknes of the layers
1818
3E7 105 105 4.934e-10 #Pressure on the reservoir top [Pa], top and bottom temperatures [C], and rock compressibility [1/Pa]
19-
6700 8100 0 #Sensor position x, y, and z to assess the error over time w.r.t the reference solution [m]
19+
6700 8100 4.5 #Sensor position x, y, and z to assess the error over time w.r.t the reference solution [m]
2020
0 #The function for the reservoir surface
2121
1 2.92 #Add hysteresis (1/0) and salinity (value [1E-3 kg-M/kg])
22+
0 #Number of interations for back-coupling
2223

2324
"""Set the saturation functions"""
2425
krw * ((sw - swi) / (1.0 - sni -swi)) ** nkrw #Wetting rel perm saturation function [-]
@@ -27,8 +28,8 @@ pec * ((sw - swi) / (1.0 - swi)) ** (-(1.0 / npe)) #Capillary pressure sa
2728

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

3334
"""Properties rock"""
3435
"""Kxy [mD], Kz [mD], phi [-]"""
@@ -38,10 +39,10 @@ PERMXY5 1000 PERMZ5 100 PORO5 0.2
3839
"""x, y, zi, and zf positions [m]"""
3940
7500 7500 0 9 #Well 0
4041
11300 11300 0 9 #Well 1
41-
11200 3800 0 9 #Well 2
42+
11300 3800 0 9 #Well 2
4243

4344
"""Define the injection values"""
4445
"""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]))"""
45-
360 30 30 30 1 4136031.3852 1 4136031.3852 1 0
46-
360 30 30 30 1 0 1 0 1 4136031.3852
47-
360 30 30 30 1 0 1 4136031.3852 1 4136031.3852
46+
360 30 30 30 1 4106776.18 1 4106776.18 1 0
47+
360 30 30 30 1 0 1 0 1 4106776.18
48+
360 30 30 30 1 0 1 4106776.18 1 4106776.18
+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
"""Set the full path to the flow executable and flags"""
2+
/Users/dmar/Github/opm/build/opm-simulators/bin/flow --tolerance-mb=1e-7 --enable-opm-rst-file=true --linear-solver=cprw --newton-min-iterations=1 --enable-tuning=true
3+
4+
"""Set the model parameters"""
5+
15000 15000 9 #Reginonal aquifer length, width, and depth [m]
6+
75 #Variable array of x-refinment (Regional)
7+
75 #Variable array of y-refinment (Regional)
8+
1 #Variable array of z-refinment (Regional)
9+
75 #Variable array of x-refinment (Reference)
10+
75 #Variable array of y-refinment (Reference)
11+
1 #Variable array of z-refinment (Reference)
12+
5000 5000 10000 10000 #Site xi, yi, xf, and yf box positions [m]
13+
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))
14+
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
15+
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]
16+
6666 7075 7885 8450 1 1 #Site fault x, and y positions [m] (initial and final) and x and y multipliers for the trans
17+
9 #Thicknes of the layers
18+
3E7 105 105 4.934e-10 #Pressure on the reservoir top [Pa], top and bottom temperatures [C], and rock compressibility [1/Pa]
19+
6700 8100 4.5 #Sensor position x, y, and z to assess the error over time w.r.t the reference solution [m]
20+
0 #The function for the reservoir surface
21+
1 2.92 #Add hysteresis (1/0) and salinity (value [1E-3 kg-M/kg])
22+
0 #Number of interations for back-coupling
23+
24+
"""Set the saturation functions"""
25+
krw * ((sw - swi) / (1.0 - sni -swi)) ** nkrw #Wetting rel perm saturation function [-]
26+
krn * ((1.0 - sw - sni) / (1.0 - sni - swi)) ** nkrn #Non-wetting rel perm saturation function [-]
27+
pec * ((sw - swi) / (1.0 - swi)) ** (-(1.0 / npe)) #Capillary pressure saturation function [Pa]
28+
29+
"""Properties sat functions"""
30+
"""swi [-], sni [-], krw [-], krn [-], pec [Pa], nkrw [-], nkrn [-], npe [-], threshold cP evaluation"""
31+
SWI5 0.478 SNI5 0. KRW5 1. KRN5 .3 PRE4 0 NKRW1 3 NKRN1 3 NPE1 2 THRE1 1e-5
32+
SWI5 0.478 SNI5 0.312 KRW5 1. KRN5 .3 PRE4 0 NKRW1 3 NKRN1 3 NPE1 2 THRE1 1e-5
33+
34+
"""Properties rock"""
35+
"""Kxy [mD], Kz [mD], phi [-]"""
36+
PERMXY5 1000 PERMZ5 100 PORO5 0.2
37+
38+
"""Wells position"""
39+
"""x, y, zi, and zf positions [m]"""
40+
7500 7500 0 9 #Well 0
41+
11300 11300 0 9 #Well 1
42+
11300 3800 0 9 #Well 2
43+
44+
"""Define the injection values"""
45+
"""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]))"""
46+
360 30 30 30 1 4106776.18 1 4106776.18 1 0
47+
360 30 30 30 1 0 1 0 1 4106776.18
48+
360 30 30 30 1 0 1 4106776.18 1 4106776.18
+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
"""Set the full path to the flow executable and flags"""
2+
flow --tolerance-mb=1e-7 --enable-opm-rst-file=true --linear-solver=cprw --newton-min-iterations=1 --enable-tuning=true
3+
4+
"""Set the model parameters"""
5+
15000 15000 9 #Reginonal aquifer length, width, and depth [m]
6+
75 #Variable array of x-refinment (Regional)
7+
75 #Variable array of y-refinment (Regional)
8+
1 #Variable array of z-refinment (Regional)
9+
75 #Variable array of x-refinment (Reference)
10+
75 #Variable array of y-refinment (Reference)
11+
1 #Variable array of z-refinment (Reference)
12+
5000 5000 10000 10000 #Site xi, yi, xf, and yf box positions [m]
13+
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))
14+
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
15+
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]
16+
6666 7075 7885 8450 1 1 #Site fault x, and y positions [m] (initial and final) and x and y multipliers for the trans
17+
9 #Thicknes of the layers
18+
3E7 105 105 4.934e-10 #Pressure on the reservoir top [Pa], top and bottom temperatures [C], and rock compressibility [1/Pa]
19+
6700 8100 4.5 #Sensor position x, y, and z to assess the error over time w.r.t the reference solution [m]
20+
0 #The function for the reservoir surface
21+
1 2.92 #Add hysteresis (1/0) and salinity (value [1E-3 kg-M/kg])
22+
0 #Number of interations for back-coupling
23+
24+
"""Set the saturation functions"""
25+
krw * ((sw - swi) / (1.0 - sni -swi)) ** nkrw #Wetting rel perm saturation function [-]
26+
krn * ((1.0 - sw - sni) / (1.0 - sni - swi)) ** nkrn #Non-wetting rel perm saturation function [-]
27+
pec * ((sw - swi) / (1.0 - swi)) ** (-(1.0 / npe)) #Capillary pressure saturation function [Pa]
28+
29+
"""Properties sat functions"""
30+
"""swi [-], sni [-], krw [-], krn [-], pec [Pa], nkrw [-], nkrn [-], npe [-], threshold cP evaluation"""
31+
SWI5 0.478 SNI5 0. KRW5 1. KRN5 .3 PRE4 0 NKRW1 3 NKRN1 3 NPE1 2 THRE1 1e-5
32+
SWI5 0.478 SNI5 0.312 KRW5 1. KRN5 .3 PRE4 0 NKRW1 3 NKRN1 3 NPE1 2 THRE1 1e-5
33+
34+
"""Properties rock"""
35+
"""Kxy [mD], Kz [mD], phi [-]"""
36+
PERMXY5 1000 PERMZ5 100 PORO5 0.2
37+
38+
"""Wells position"""
39+
"""x, y, zi, and zf positions [m]"""
40+
7500 7500 0 9 #Well 0
41+
11300 11300 0 9 #Well 1
42+
11300 3800 0 9 #Well 2
43+
44+
"""Define the injection values"""
45+
"""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]))"""
46+
360 30 30 30 1 4106776.18 1 4106776.18 1 0
47+
360 30 30 30 1 0 1 0 1 4106776.18
48+
360 30 30 30 1 0 1 4106776.18 1 4106776.18

0 commit comments

Comments
 (0)