Prior Model Generation

Author: Lewis Li

May 15th 2016

In this notebook, we will demonstrate how we generated the prior models which are used as the input for PFA to build the statistical relationship between the data and forecast. The case study in question is based on a onshore reservoir in Libya, consisting of 5 compartments. Refer to this repository for details regarding the construction of the structural and depositional model. In our case study, we will consider 12 uncertain parameters with prior distributions shown below:

Symbol Description Prior Distribution
$S_{wir}$ Irreducible water saturation $N(0.2, 0.05)$
$S_{wor}$ Irreducible oil saturation $N(0.2, 0.05)$
$k_{rw}^{end}$ End point water relative permeability $N(0.3, 0.1)$
$k_{ro}^{end}$ End point oil relative permeability $N(0.7, 0.1)$
$n_{o}$ Oil Corey exponent $N(2.5, 0.2)$
$n_{w}$ Water Corey exponent $N(2.0, 0.2)$
$F_1$ Fault 1 transmissibility multiplier $U[0.2 0.8]$
$F_2$ Fault 2 transmissibility multiplier $U[0.2 0.8]$
$F_3$ Fault 3 transmissibility multiplier $U[0.2 0.8]$
$F_4$ Fault 4 transmissibility multiplier $U[0.2 0.8]$
$\nu_o$ Oil viscosity $N(4,0.2)$
$OWC$ Oil water contact depth $U[1061,1076]$

In [1]:
% ParameterRanges is a struct that contains
Normal = 0;
Uniform = 1;

PriorParameterDistribution = struct();

% Irreducible water saturation
PriorParameterDistribution.('Swir') = [0.2 0.05 Normal]; 

% Irreducible oil saturation
PriorParameterDistribution.('Swor') = [0.2 0.05 Normal]; 

% End point water rel perm
PriorParameterDistribution.('krw_end') = [0.3 0.1 Normal]; 

% End point oil rel perm
PriorParameterDistribution.('kro_end') = [0.7 0.1 Normal]; 

% Oil Corey exponent
PriorParameterDistribution.('no') = [2.5 0.2 Normal]; 

% Water Corey exponent
PriorParameterDistribution.('nw') = [2 0.2 Normal]; 

% Fault 1 trans multiplier
PriorParameterDistribution.('FaultMulti1') = [0.2 0.8 Uniform];

% Fault 2 trans multiplier
PriorParameterDistribution.('FaultMulti2') = [0.2 0.8 Uniform]; 

% Fault 3 trans multiplier
PriorParameterDistribution.('FaultMulti3') = [0.2 0.8 Uniform]; 

% Fault 4 trans multiplier
PriorParameterDistribution.('FaultMulti4') = [0.2 0.8 Uniform]; 

% Oil viscosity
PriorParameterDistribution.('Viscosity') = [4 0.2 Normal];      

% Oil water contact
PriorParameterDistribution.('OWC') = [1061 1076 Uniform];

We will generate 500 prior models for the 12 realizations.


In [2]:
% Case Name
CaseName = 'Prior';

% Number of simulations
NbSimu = 500;     

% Number of parameters we will vary
NbParams = 12;    

% Set random seed
rng('shuffle');

We can plot the prior distributions for each parameter below:


In [5]:
%plot inline -s 1800,800
ParameterNames = fieldnames(PriorParameterDistribution);

rng('shuffle');

% Iterate over each uncertain reservoir parameter
for i = 1:numel(ParameterNames)
    ParameterName = ParameterNames{i};
    ParameterRange = PriorParameterDistribution.(ParameterName);
    
    % Plot prior values
    figureid = i-floor((i-1)/4)*4;
    if (mod(i-1,4) == 0)
         figure(floor(i/4)+1);
         figurepic=floor(i/4)+1;
    end
    
    subplot(2,2,figureid);
    
    if (ParameterRange(3) == Normal)
        xx = linspace(ParameterRange(1)-ParameterRange(2),...
            ParameterRange(1)+ParameterRange(2));
        yy = normpdf(xx,ParameterRange(1),ParameterRange(2));
    elseif (ParameterRange(3) == Uniform)
        xx = linspace(ParameterRange(1),ParameterRange(2));
        yy = ones(size(xx))/(ParameterRange(2)-ParameterRange(1));
    end
    
    FontSize = 14;
    plot(xx,yy,'LineWidth',3);
    set(gcf,'color','w');
    set(gca,'FontSize',FontSize);
    xlabel(ParameterName,'FontSize',FontSize);
    ylabel('PDF','FontSize',FontSize);
    axis tight;
end


We can then sample from the prior distributions to generate the prior models


In [ ]:
rng('shuffle');
PriorModelParameters = struct();
% Iterate over each uncertain reservoir parameter
for i = 1:numel(ParameterNames)
    ParameterName = ParameterNames{i};
    ParameterRange = PriorParameterDistribution.(ParameterName);
    
    % Sample from uniform/normal distributions
    if (ParameterRange(3) == Normal)
        Value = ParameterRange(1) + ParameterRange(2)*randn(NbSimu,1);
    elseif(ParameterRange(3) == Uniform)
        Value = ParameterRange(1) + rand(NbSimu,1)*...
            (ParameterRange(2) - ParameterRange(1));
    end
    
    % Store sampled value
    PriorModelParameters.(ParameterName) = Value;
    
end