Skip to content

Commit

Permalink
Parse WSEGVALV
Browse files Browse the repository at this point in the history
  • Loading branch information
moyner committed Mar 7, 2024
1 parent 897b658 commit 2a0fce2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/InputParser/keywords/grid.jl
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ function parse_keyword!(data, outer_data, units, cfg, f, v::Union{Val{:POELCOEF}
data["$k"] = vals
end

function parse_keyword!(data, outer_data, units, cfg, f, v::Union{Val{:FIPNUM}, Val{:PVTNUM}, Val{:SATNUM}, Val{:EQLNUM}, Val{:ROCKNUM}, Val{:IMBNUM}, Val{:MULTNUM}})
function parse_keyword!(data, outer_data, units, cfg, f, v::Union{Val{:FIPNUM}, Val{:PVTNUM}, Val{:SATNUM}, Val{:EQLNUM}, Val{:ROCKNUM}, Val{:IMBNUM}, Val{:MULTNUM}, Val{:FIPZON}})
k = unpack_val(v)
parse_and_set_grid_data!(data, outer_data, units, cfg, f, k, T = Int)
end
Expand Down
22 changes: 22 additions & 0 deletions src/InputParser/keywords/schedule.jl
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,27 @@ function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:WELSEGS})
data["WELSEGS"][wname] = (header = wheader, segments = segments)
end

function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:WSEGVALV})
d = "Default"
defaults = [d, -1, NaN, NaN, -1, -1, -1, -1, "OPEN", -1]
@assert length(defaults) == 10
wells = get_wells(outer_data)
compdat = parse_defaulted_group_well(f, defaults, wells, 1)
# Unit conversion
utypes = identity_unit_vector(defaults)
utypes[4] = :area
utypes[5] = :length
utypes[6] = :length
utypes[7] = :length
utypes[8] = :area
utypes[10] = :area
for cd in compdat
swap_unit_system_axes!(cd, units, utypes)
end
push_and_create!(data, "WSEGVALV", compdat)
parser_message(cfg, outer_data, "WSEGVALV", PARSER_JUTULDARCY_MISSING_SUPPORT)
end

function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:COMPSEGS})
rec = read_record(f)
wname = only(parse_defaulted_line(rec, ["Default"]))
Expand Down Expand Up @@ -460,3 +481,4 @@ function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:UDQ})
skip_record(f)
parser_message(cfg, outer_data, "UDQ", PARSER_MISSING_SUPPORT)
end

0 comments on commit 2a0fce2

Please sign in to comment.