Skip to content

Commit

Permalink
fix: ⚡ move curves post-processing to downscale_upscale
Browse files Browse the repository at this point in the history
+ removed calls to `monotonize`
  • Loading branch information
djmaxus committed Jul 17, 2024
1 parent dbaf9f9 commit 14fa27d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
4 changes: 4 additions & 0 deletions src/downscale_upscale.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 3 additions & 8 deletions strata_trapper.m
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
File renamed without changes.

0 comments on commit 14fa27d

Please sign in to comment.