%% initialize reservoir parameters and discretization 

%% -------------------- RESERVOIR ----------------------


k=10.6391; %/3600; % from garn1 [s/m^2] 
c=2.6318e-11; %*3600; % from garn1 [m^2/(barg*s)]
%initialcondition P_bottomhole

%
V_oil_pipeline = m(4,1)/rho_oil;
V_gas_pipeline = (V_total_pipeline - V_oil_pipeline);
m_gas_pipeline = m(3,1); % initial gas mass

Pbh=m_gas_pipeline*R1*T_pipeline/(V_gas_pipeline*M);

Pres=p_reservoir;

xl=linspace(0,50,11);   % length of near wellbore reservoir
h=(max(xl)-0)/(size(xl,2)-1);
t=linspace(0,L,Ts*L); % [60000 sec]
dt=Ts;
%
P=zeros(size(xl,2), size(t,2));
%Q=zeros(1, size(t,2));
% reservoir initial-conditions
calc_reservoir_init;
%% ----------------------------------------------------