diff --git a/src/downscale_upscale.m b/src/downscale_upscale.m index b6aeda3..6de26be 100644 --- a/src/downscale_upscale.m +++ b/src/downscale_upscale.m @@ -21,4 +21,8 @@ subscale_dims, sub_porosity, sub_permeability, sub_entry_pressures ... ); +pc_upscaled = interp1(sw_upscaled,pc_upscaled,saturations,"linear","extrap"); +krw = interp1(sw_upscaled, krw', saturations, "linear","extrap")'; +krg = interp1(sw_upscaled, krg', saturations, "linear","extrap")'; + end diff --git a/strata_trapper.m b/strata_trapper.m index df51c8b..8f4137c 100644 --- a/strata_trapper.m +++ b/strata_trapper.m @@ -41,15 +41,10 @@ poro_upscaled(cell_index) = porosity; perm_upscaled(cell_index,:) = Kabs; - cap_pres_upscaled(cell_index,:) = interp1(sw_upscaled,pc_upscaled,saturations,"linear","extrap"); + cap_pres_upscaled(cell_index,:) = pc_upscaled; - for i = 1:3 - krw_cell(i,:) = monotonize(sw_upscaled, krw_cell(i,:), 1); - krg_cell(i,:) = monotonize(sw_upscaled, krg_cell(i,:), -1); - end - - krw(cell_index,:,:) = interp1(sw_upscaled, krw_cell', saturations, "linear")'; - krg(cell_index,:,:) = interp1(sw_upscaled, krg_cell', saturations, "linear")'; + krw(cell_index,:,:) = krw_cell; + krg(cell_index,:,:) = krg_cell; if enable_waitbar send(wb_queue,cell_index); diff --git a/src/monotonize.m b/util/monotonize.m similarity index 100% rename from src/monotonize.m rename to util/monotonize.m