Skip to content

Commit

Permalink
MINPVV support
Browse files Browse the repository at this point in the history
  • Loading branch information
moyner committed Jul 26, 2024
1 parent fd4d494 commit 6ade85a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
9 changes: 5 additions & 4 deletions src/CornerPointGrid/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,11 @@ function get_effective_actnum(g)
end

function handle_zero_effective_porosity!(actnum, g)
if haskey(g, "MINPV")
minpv = g["MINPV"]::Float64
minpv = get(g, "MINPV", 1e-6)::Float64
if haskey(g, "MINPVV")
minpv_for_cell = i -> max(g["MINPVV"][i], minpv)
else
minpv = 1e-6
minpv_for_cell = i -> minpv
end
added = 0
active = 0
Expand All @@ -108,7 +109,7 @@ function handle_zero_effective_porosity!(actnum, g)
if actnum[i]
pv = porv[i]
active += active
if pv < minpv
if pv < minpv_for_cell(i)
added += 1
actnum[i] = false
end
Expand Down
1 change: 1 addition & 0 deletions src/InputParser/InputParser.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ module InputParser
skip_kw!(:NPROCY, 0)
skip_kw!(:NONNC, 0)
skip_kw!(:NEWTRAN, 0)
skip_kw!(:RPTGRID, 1)
skip_kw!(:CO2STORE, 0, PARSER_JUTULDARCY_MISSING_SUPPORT)
skip_kw!(:CO2STOR, 0, PARSER_JUTULDARCY_MISSING_SUPPORT)
skip_kw!(:DIFFUSE, 0, PARSER_JUTULDARCY_MISSING_SUPPORT)
Expand Down
6 changes: 5 additions & 1 deletion src/InputParser/keywords/grid.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function unit_type(::Union{Val{:COORD}, Val{:ZCORN}})
return :length
end

function parse_keyword!(data, outer_data, units, cfg, f, v::Union{Val{:PERMX}, Val{:PERMY}, Val{:PERMZ}, Val{:PORV}, Val{:DEPTH}})
function parse_keyword!(data, outer_data, units, cfg, f, v::Union{Val{:PERMX}, Val{:PERMY}, Val{:PERMZ}, Val{:PORV}, Val{:DEPTH}, Val{:MINPVV}})
k = unpack_val(v)
parse_and_set_grid_data!(data, outer_data, units, cfg, f, k, unit = unit_type(k))
end
Expand Down Expand Up @@ -223,6 +223,10 @@ function unit_type(::Val{:PORV})
return :liquid_volume_reservoir
end

function unit_type(::Val{:MINPVV})
return :liquid_volume_reservoir
end

function parse_keyword!(data, outer_data, units, cfg, f, v::Union{Val{:DX}, Val{:DY}, Val{:DZ}})
k = unpack_val(v)
Δ = parse_grid_vector(f, get_cartdims(outer_data), Float64)
Expand Down

0 comments on commit 6ade85a

Please sign in to comment.