In this example we illustrate how allocation factors for well pairs can be used to assess the quality of upscaling. As our example, we consider a subsample of Model 2 from the 10th SPE Comparative Solution Project, but with a different well pattern consisting of two central injectors and producers at each of the four corners.
fprintf(1,'Solving fine-scale problem ...');
mrstModule('add', fullfile(ROOTDIR, 'mex', 'AGMG'))
rS = initState(G, W, 0);
T = computeTrans(G, rock);
rS = incompTPFA(rS, G, T, fluid, 'wells', W);
D = computeTOFandTracer(rS, G, rock, 'wells', W);
WP = computeWellPairs(rS, G, rock, W, D);
fprintf(1,'done\n');
Solving fine-scale problem ...done
Upscale petrophysical data
Upscale the permeability using either simple harmonic averaging, which we expect will give quite poor results, or a standard flow-based method from the 'upscaling' module, which is expected to give reasonable results. Notice that the computational cost of the flow-based method may be quite high for large subsets of the SPE10 model. For the porosity, we use a simple average.
We contrast the allocation factors for the injection wells computed on the fine and the coarse model. Ideally, bars on the negative axis that represent the allocation factors for the coarse model should be the mirror of the bars on the positive axis that represent the allocation factors for the fine model. To simplify the comparison, the fine-scale allocation factors are indicated by lines on top of those of the coarse scale. From the figures below, we see that the flow-based method is able to reproduce the allocations with reasonable accuracy, whereas when using the harmonic averaging methods, the estimates are far off (as should be expected).
figure;
for i=1:numel(D.inj)
subplot(1,2,i)
barh(WP.inj(i).z, cumsum(WP.inj(i).alloc,1),'stacked');
lh=legend(W(D.prod).name,4);
hold on
barh(WPc.inj(i).z, -cumsum(WPc.inj(i).alloc,1), 'stacked');
plot(-cumsum(cumsum(WP.inj(i).alloc,1),2), WP.inj(i).z, '+-k');
hold off, axis tight
set(lh,'units','pixels'); lp = get(lh,'OuterPosition');
set(lh, 'FontSize',6, 'OuterPosition',[lp(1:2)+[lp(3)-60 0] 60 60]);
title(W(D.inj(i)).name);
end