subscript.welltest_dpds.welltest_dpds
- class subscript.welltest_dpds.welltest_dpds.CustomFormatter(prog, indent_increment=2, max_help_position=24, width=None)
Multiple inheritance used for argparse to get both defaults and raw description formatter
- subscript.welltest_dpds.welltest_dpds.genobs_vec(filen, vec, time)
Adjust vector to time axis defined by observation file. Used to create output compatible with ERTs GENERAL_OBSERVATION file format and directy comparable with output from eg Kappa Saphir. Note; csv files exported from Saphir are separated with and contain headers with space which makes parsing fragile.
- Parameters:
filen – (str) csv file to extract time axis from, using colomn dTime
vec – (np.array) Vector to remap onto the axis
time – (np.array) Original time axis
- Returns:
(np.array)
- Return type:
gen_data
- subscript.welltest_dpds.welltest_dpds.get_buildup_indices(rates)
Go through the simulated rate and identify bu periods, as defined by zero flow.
- Parameters:
rates – np.array
- Returns:
(list) indices associated with start of buildups buildup_end_indices : (list) indices associated with end of buildups
- Return type:
buildup_indices
- subscript.welltest_dpds.welltest_dpds.get_parser()
Define the argparse parser
- Returns:
parser (argparse.ArgumentParser)
- subscript.welltest_dpds.welltest_dpds.main()
Main entry point for the script
Args:
- Returns:
pass
- subscript.welltest_dpds.welltest_dpds.summary_vec(summary, key, required=True)
Read vector corresponding to key from summary instance
- Parameters:
summary – (resdata.summary.Summary)
key – (str)
required – (bool)
- Returns:
np.array
- Return type:
vec
- subscript.welltest_dpds.welltest_dpds.supertime(time, rate, bu_start_ind, bu_end_ind)
Calculate supertime
- Parameters:
time (np.array)
rate (np.array)
bu_start_ind (int)
bu_end_ind (int)
- Returns:
supertime (np.array)
- subscript.welltest_dpds.welltest_dpds.to_csv(filen, field_list, header_list=None, start=0, end=None, sep=',')
Dump vectors to csv file. Handles arbitrarly number of fields
- Parameters:
filen (str)
field_list (list of np.array)
header_list (list of str)
start (int)
end (int)
sep (str)
- Returns:
pass
- subscript.welltest_dpds.welltest_dpds.weighted_avg_press_time_derivative_lag1(delta_p, dspt)
Compute weighted average of pressure time derivative, one time step to each side. Lag1
Formula: ( (dp_f/dspt_f)*dspt_b + (dp_b/dspt_b)*dspt_f )/(dspt_f + dspt_b)
spt is SuperPositionedTime and dspt is delta spt
- Parameters:
dp (np.array)
dspt (np.array)
- Returns:
dpdspt_weighted (np.array)
- subscript.welltest_dpds.welltest_dpds.weighted_avg_press_time_derivative_lag2(delta_p, dspt, super_time, wbhp, bu_start_ind, bu_end_ind)
Compute weighted average using LAG 2 for pressure time derivative
- Parameters:
delta_p (np.array)
dspt (np.array)
supertime (np.array)
wbhp (np.array)
bu_start_ind (int)
bu_end_ind (int)
- Returns:
dpdspt_weighted_lag2 (np.array)