-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathInputFile.m
More file actions
151 lines (127 loc) · 6.9 KB
/
Copy pathInputFile.m
File metadata and controls
151 lines (127 loc) · 6.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
% ---------------------------------------------------------------------
% Copyright (C) 2016 by the LearnEDFM authors
%
% This file is part of LearnEDFM.
%
% LearnEDFM is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% LearnEDFM is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with LearnEDFM. If not, see <http://www.gnu.org/licenses/>.
% ---------------------------------------------------------------------
%
% Authors: Gunnar Jansen, University of Neuchatel, 2016
% Ivan Lunati, Rouven Kuenze, University of Lausanne, 2012
%% GRID PARAMETERS ---------------------------------------------------------------------------------%
global Nf Nf_f len dx
len = [500 500]; % physical length of the domain in x and y direction [m]
Nf = [45 45]; % number of cells in x and y direction
dx = len./Nf; % cell length [m]
%% SIMULATION PARAMETER FOR TRANSPORT --------------------------------------------------------------%
global dt
timeSim = 5e5; % total simulation time [s]
dt = 1000; % time step length [s]
tol = 1.e-4; % saturation tolerance on pressure-concentration-heat loop [-]
maxit = 100; % maximum number of pressure concentration-heat loops to converge
%% FRACTURE NETWORK
% Crossed fracture test case
%frac_cross
% Random fractures
%frac_rand
% Single fracture
%frac_single
% Crossed fractures (rotated 45°)
%frac_cross_rot45
% Thirteen 'random' fractures
frac_complex_n13;
% Leeds 4a granite fracture data
%frac_granite_leeds4a;
if (dxf < min(dx))
error('dxf < dx')
end
%% INITIAL CONDITIONS--------------------------------------------------------------------------------%
global cmax
c0 = zeros(Nf(1),Nf(2)); % Initial saturation (normalized concentration) [-]
c0f = zeros(Nf_f,1);
cmax = 1; % maximum concentration [kg/m3] for normalization
T0 = zeros(Nf(1),Nf(2)); % Initial matrix temperature [°C]
T0f = zeros(Nf_f,1); % Initial fracture temperature [°C]
tmax = 10; % maximum temperature [°C] for plotting
p0 = zeros(Nf(1),Nf(2)); % Initial matrix pressure [Pa]
p0f = zeros(Nf_f,1); % Initial fracture pressure [Pa]
%% BC FLUID ----------------------------------------------------------------------------------------%
global Fix ibcs
ibcs = zeros(2*sum(Nf),1); % type 0:Neumann(N); 1:Dirichlet(D)
Fix = zeros(2*sum(Nf),1); % value N [m2/s] (inflow>0); D [Pa]
% ibcs(1:Nf(2)) = 1;
% ibcs(Nf(2)+1:2*Nf(2))=1;
% Fix(1:Nf(2)) = 1e5;
% Fix(Nf(2)+1:2*Nf(2))=0;
ibcs(1) = 1;
ibcs(2*Nf(1)+1)=1;
ibcs(2*Nf(2))=1;
ibcs(2*Nf(1)+2*Nf(2))=1;
Fix(1) = 1e7;
Fix(2*Nf(2))=0;
Fix(2*Nf(1)+1) = 1e7;
Fix(2*Nf(1)+2*Nf(2))=0;
%% BC TRANSPORT ------------------------------------------------------------------------------------%
flagTracerTransport = 0;
flagHeatTransport = 0;
global FixT FixC
FixT = zeros(2*sum(Nf),1); % normalized concentration of boundary flow [-]
FixC = zeros(2*sum(Nf),1); % normalized concentration of boundary flow [-]
%FixT(1:Nf(2)) = 1;
FixT(1) = 1;
FixT(2*Nf(1)+1) = 1;
%% SOURCE TERMS ------------------------------------------------------------------------------------%
Q = zeros(Nf); % source term [m2/s]; inflow positive
QC = zeros(Nf); % normalized concentration for source term [-]
QT = zeros(Nf); % normalized concentration for source term [-]
%% GRAVITY---------------------------------------------------------------------------------%
global gravity
gravity = 0; % gravity acceleration in y [m/s2]
%% PERMEABILITY ------------------------------------------------------------------------------------%
K = ones(Nf(1),Nf(2))*1e-9; % permeability field [m2]
K_f = ones(Nf_f,1)*1e-7; % fracture permeability field [m2]
%% Porosity ----------------------------------------------------------------------------------------%
phi = ones(Nf(1),Nf(2))*0.3; % porosity field
phi_f = ones(Nf_f,1)*0.3; % fracture porosity field
%% MECHANIC PROPERTIES
global k_modulus_l k_modulus_s biot_alpha
k_modulus_l = 2.15e9; % Bulk Modulus of the fluid [Pa]
k_modulus_s = 1.8e10; % Bulk Modulus of the rock [Pa]
biot_alpha = 1;
global shear_modulus poisson_ratio
shear_modulus = 29e9; % Shear modulus of the rock [Pa]
poisson_ratio = 0.25; % Poisson ratio of the rock [-]
global therm_exp_coeff
therm_exp_coeff = 7.9e-6; % Thermal expansion coefficient of the rock matrix [-]
%% ROCK DENSITY ------------------------------------------------------------------------%
density_s = 2000*ones(Nf); % density of the rock [kg/m3]
density_sf = 2000*ones(Nf_f,1); % density of the rock [kg/m3]
%% IN SITU STRESS ------------------------------------------------------------------------%
SH_max = 52e6*ones(Nf_f,1); % Maximum principal stress [Pa]
SH_min = 20e6*ones(Nf_f,1); % Minimum principal stress [Pa]
%% THERMAL DIFFUSION ------------------------------------------------------------------------%
global lambda_l lambda_s cp_l cp_s ibcD
lambda_l = 0;%0.5; % Thermal conductivity of the fluid [W/(m*K)]
lambda_s = 0;%2.0; % Thermal conductivity of the rock [W/(m*K)]
cp_l = 0;%1100; % Specific heat capacity of the fluid [J/(kg*K)]
cp_s = 0;%250; % Specific heat capacity of the rock [J/(kg*K)]
ibcD = zeros(2*sum(Nf),1); % 1 -> Diffusion on boundary cells
%% MOLECULAR DIFFUSION ------------------------------------------------------------------------%
global DifC ibcDC
DifC = 0; % [m2/s] molecular diffusion
ibcDC = zeros(2*sum(Nf),1); % 1 -> Diffusion on boundary cells
%% MASS DISPERSION ------------------------------------------------------------------------%
global alphal alphat
alphal = 0.0; % longitudinal dispersivity [m]
alphat = 0.0; % transversal dispersivity [m]