-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.m
135 lines (95 loc) · 4.08 KB
/
main.m
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
%FV-MsRB - MultiScale Restriction smoothed Basis method
%Two Phase Flow
%2d -Impl�cita na Press�o Expl�cita na Satura��o (IMPES)
% 21/09/2016 por Artur Castiel Reis de Souza
%% Main File Start Up
% Clear all variables previously intializied
% Declare all global variables to be used in the code
nameFile = 'start_spe.dat';
prepareStart
clear all
clc
global osMode
osMode = 'linux'
global tol_c coord centelem elem esurn1 esurn2 nsurn1 nsurn2 bedge inedge ...
normals esureface1 esureface2 esurefull1 esurefull2 elemarea dens visc...
satlimit pormap bcflag courant totaltime numcase oneNodeEdges keypath2 foldername...
elemloc npar coarseelem exinterface exinterfaceaxes ghostelem pointWeight bedgeNode ...
numinterface interfacecenter coarseblockcenter coarseneigh intCoord ...
intRegion boundRegion GlobalBoundary H outSupport coarseElemCenter ...
coarseningRatio wells mshfile edgesOnCoarseBoundary refCenterInCoaseElem ...
dictionary edgesCoarseDict coarseDiricht intinterface pointloc regularEdges semiEdges ...
coarseedge polyReg cReg strips intRegion
%% Tolerance Settings
tol_c = 0.00001;
%% Adds Preprocessor folder to the path
% Including other folders to the path
path(path,'preprocessor');
%% Including the folder of the preprocessor of the method MsRB
path (path,'preMsRSB');
%% Including the folder of the postprocessor of the method MsRB
path (path,'postprocessor');
%% Including the folder of the multiscale library
path (path,'MsRB');
path (path,'preMsMPFAD');
%% Including the folder of the solver and it subfolders
path (path,'solver');
if strcmp(osMode,'windows')
path (path,'solver\TPFA');
path (path,'solver\MPFAD\onephase');
path (path,'solver\MPFAD\onephase\preMPFAD');
elseif strcmp(osMode,'linux')
path (path,'solver/TPFA');
path (path,'solver/MPFAD/onephase');
path (path,'solver/MPFAD/onephase/preMPFAD');
end
%preMsMPFAD
%% Adds the path of the fuctions used for debbuging
path(path,'debug');
%% Adds the path of the fuctions used for creating complex permeability fields
path(path,'permeability');
path(path,'permfield');
%% Adds the path of class
path(path,'class');
%% Adds the path of config options
path(path,'config');
colormat = load('color.dat');
%% Adds the path of SPE options
path(path,'SPE');
%% Adds the path of the GrTheory library for graphs
path(path,'GrTheory');
%% Adds the path Post Multiscale treatments
path(path,'postMs');
%% Adds the path of the Iterative Treatment
path(path,'iterative');
%% Preprocesador Global
[coord,centelem,elem,esurn1,esurn2,nsurn1,nsurn2,bedge,inedge,...
normals,esureface1,esureface2,esurefull1,esurefull2,elemarea,dens,visc,...
satlimit,pormap,bcflag,courant,totaltime,numcase,phasekey,kmap,...
wells, elemloc,npar,coarseelem ,ghostelem, coarseedge,intinterface,exinterface,exinterfaceaxes,...
numinterface,interfacecenter, coarseblockcenter, coarseneigh, intCoord, multiCC,coarseningRatio, semiEdges,bedgeNode,...
pmethod,mshfile,edgesOnCoarseBoundary,oneNodeEdges, pointloc,pointWeight,regularEdges ,keymsfv,interptype,keypath1 ] = preprocessor;
%debugTest3;
%debugPoint;
multiCC = 1;
%% Multiscale Preprocessador for MsRSB
[ intRegion , boundRegion, GlobalBoundary, H, outSupport, ...
coarseElemCenter,refCenterInCoaseElem, dictionary,edgesCoarseDict,coarseDiricht] = preMsRB(npar,coarseneigh, centelem,coarseelem, ...
coarseblockcenter,exinterface,multiCC);
%% Alternative Multiscale Preprocessor
[coarseElemCenter, coarse_interface_center, coarse_strips, boundRegion, intRegion, GlobalBoundary, bcoarse_strips] = alpreMsRB(npar,coarseneigh, centelem,coarseelem, ...
coarseblockcenter,exinterface,exinterfaceaxes, multiCC);
%% superfolder maker
itOn = 0;
superFolderMK
%% adequacao de flag
%adeSPE
%verficar a alteracao em wells no preprocessador
%wells = [6490, 1, 301, 1, 0, 1;wells]
%adeqPerm
%% Multiscale Solver
meshAnalysis
%permChannel
%changepermeability
%datageneration
%solver;