% Henrik Tuvnes

%% Reservoir and inflow coefficients

Pres= 370E5; % [Pa] reservoir pressure far out  
ProdI = 1.0000e-006;   % [kg/(s*pa)] productivity index: w/(Pres-Pbh)

%% initial values
Pbh=220E5;  % bottomhole initial pressure
w=16;   % [kg/s] initial flowrate to well

%% Initialize matrices
P=zeros(11,L);
Q=zeros(1,L);
w_in=zeros(1,L);
p_downhole=zeros(1,L);
inflow=zeros(1,L);

