[Compositional Simulation]Nothing changes from my simulation than the tutorial one.

55 views
Skip to first unread message

Débora Yohane

unread,
Nov 12, 2020, 5:28:30 PM11/12/20
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi! I'm kinda very desperate because I've tried everything, revised it many times and I continue to be stuck on it for the last month. I kindly ask for your help. 

So, I'm trying to do a Compositional Simulation 1D  in a quadratic domain and solve it with natural variables, it runs normally without errors but the result ploted doesnt change a thing, it's like I've never made any difference for adding an well or even changing pressure. The boundary conditions consider the reservoir being isolated without replacing fluid in it. 

The code is commented as follows:


mrstModule add compositional ad-props ad-core

%===============SET UP PROBLEM====================
%TODO: mudar grid
nx = 50;
ny = 50;
nz = 1;
% Quadratic domain
dims = [nx, ny, nz]; %number of cells in each coordinate direction.
pdims = [1000, 1000, 10]; %physical size in units of meters of the computational domain
G = cartGrid(dims, pdims);
G = computeGeometry(G);

% Generate permeability
K=160*ones(G.cartDims);
K=K(G.cells.indexMap);
rock = makeRock(G, K*milli*darcy, 0.3);  %grid, perm, poro

figure;
plotCellData(G, K);
colorbar;
title('Permeability [mD]');

%===============SET UP COMPOSITIONAL MODEL====================
names = {'Metano'  'Butano'};
% Critical temperatures
Tcrit = [190.6, 408.1];
% Critical pressure
Pcrit = [45.40, 36.00]*101325;
% Critical volumes
Vcrit = [0.0990, 0.2630]*1e-3;
% Acentric factors
acentricFactors = [0.013, 0.1956];
% Mass of components (as MRST uses strict SI, this is in kg/mol)
molarMass = [16.0430, 58.1240]*1e-3;
% Initialize fluid
fluid = CompositionalFluid(names, Tcrit, Pcrit, Vcrit, acentricFactors, molarMass);

%=============SET UP INITIAL STATE============================
Pres = 50*0.0689476*barsa;
totTime = 10*year;

pv = poreVolume(G, rock);

%boundary condition structure as defined by function ‘pside’
%bc = pside([], G, 'West' , Pres); 

%W = verticalWell([], G, rock, nx/2+1, ny/2+1, 1:nz,'Type', 'rate', 'Val', 10000*meter^3/day,'comp_i',[1,0]);
W = verticalWell([], G, rock, nx/2, ny/2, 1:nz, 'sign',-1,'Type', 'rate', 'Val', -10000*meter^3/day,'comp_i',[1,0]);
plotWell(G, W, 'color', 'k');


flowfluid = initSimpleADIFluid('phases','OG','rho', [1000, 500], ...
                       'mu', [1, 1]*centi*poise, ...
                       'n', [2, 2], ...
                       'c', [1e-5, 0]/barsa);

ncomp = fluid.getNumberOfComponents();
s0 = [1, 0];
state0 = initState(G,W, Pres, s0); %Initialise state object for reservoir and wells.
T = 288.71; %K
state0.T = repmat(T, G.cells.num, 1); 
state0.components = repmat([0.85 0.15], G.cells.num, 1);

dt = rampupTimesteps(totTime, 75*day, 12);
schedule = simpleSchedule(dt);

%================SOLVE WITH NATURAL VARIABLES==========
model = NaturalVariablesCompositionalModel(G, rock, flowfluid, fluid, 'water', false);

nls = NonLinearSolver('useRelaxation', true);
[~, states, report] = simulateScheduleAD(state0, model, schedule, 'nonlinearsolver', nls);

%=================LAUNCH PLOT=========================
mrstModule add mrst-gui
figure;
plotToolbar(G, states)
title('Natural variables')


Could you please help me? :( please. 

Olav Møyner

unread,
Nov 12, 2020, 6:06:56 PM11/12/20
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group, Débora Yohane
Hi,
You need to pass wells/BC to the schedule, otherwise nothing will change with uniform initial conditions. You will then also get errors that tell you to add .components to BC/wells to define injection composition.

Best regards
Olav

From: sinte...@googlegroups.com <sinte...@googlegroups.com> on behalf of Débora Yohane <debor...@gmail.com>
Sent: Thursday, November 12, 2020 11:28:30 PM
To: MRST-users: The Matlab Reservoir Simulation Toolbox User Group <sinte...@googlegroups.com>
Subject: [MRST Users] [Compositional Simulation]Nothing changes from my simulation than the tutorial one.
 
--
You received this message because you are subscribed to the Google Groups "MRST-users: The Matlab Reservoir Simulation Toolbox User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sintef-mrst...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sintef-mrst/4194af32-2b26-400c-8b44-a1a89ba93a1dn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages