-
Notifications
You must be signed in to change notification settings - Fork 11
/
aga_rpt.m
69 lines (59 loc) · 2.19 KB
/
aga_rpt.m
1
function aga_rpt(p,t,s,ttle)%AGA_RPT - Produces the final figure and results for the Agarwal model% % Syntax: aga_rpt(p,t,s,ttle )%% p(1) = a = slope of the late time straight line% p(2) = t0 = intersept of late time straight line% p(3) = sg = sigma, coefficient de skin% t = measured time% s = measured drawdown% ttle = Title of the figure %% Description:% Produces the final figure and results for the Agarwal model (1970).%% See also: aga_dmo, aga_pre, aga_gss, aga_dim%global AGA_RW AGA_RC AGA_R AGA_Qif( isempty(AGA_RW) ) disp(' ERROR: aga_rpt: You must run AGA_PRE before using the grf model') return;endrw=AGA_RW;rc=AGA_RC;r=AGA_R;q=AGA_Q;if(nargin<4) % Default value for ttle if not given by user ttle='Diagnostic plot';end% Rename the parameters for a more intuitive check of the formulasrw=AGA_RW; rc=AGA_RC; r=AGA_R; q=AGA_Q;a=p(1); t0=p(2); sg=p(3);T=0.1832339*q/a; % Computes the transmissivityS=2.25*T*t0/r.^2; % Computes the StorativityCd=rc.^2/2/rw.^2/S; % Computes wellbore coefficientrd=r/rw; % Computes dimensionless radius rd% Calls a internal script to compute drawdown, derivative, and residualsfunc='aga'; rpt_cmp% Defines the text of the left side of the legend lgdl=char('Test data:');lgdl=char(lgdl, sprintf(' Discharge rate: %3.2e m^3/s',q));lgdl=char(lgdl, sprintf(' Well radius: %0.2g m',rw));lgdl=char(lgdl, sprintf(' Casing radius: %0.2g m',rc));lgdl=char(lgdl, 'Hydraulic parameters:');lgdl=char(lgdl, sprintf(' Transmissivity T: %3.1e m^2/s',T));lgdl=char(lgdl, sprintf(' Storativity S: %3.1e m',S));lgdl=char(lgdl, sprintf(' Wellbore storage C_D: %3.1e',Cd));lgdl=char(lgdl, sprintf(' Skin factor s_g: %3.1e',sg));% Defines the text of the right side of the legend lgdr=char('Agarwal (1970) model');lgdr=char(lgdr, 'Fitting parameters:');lgdr=char(lgdr, sprintf(' slope a: %0.2g m',a));lgdr=char(lgdr, sprintf(' intercept t0: %0.2g m',t0));lgdr=char(lgdr, sprintf(' mean residual: %0.2g m',mr));lgdr=char(lgdr, sprintf(' 2 standard deviation: %0.2g m',sr));% Calls an internal script that place the legendrpt_lgd% Calls an internal script that plot the model and the datarpt_plt