Skip to content

Commit

Permalink
Support for AQUANCON
Browse files Browse the repository at this point in the history
  • Loading branch information
moyner committed Aug 24, 2024
1 parent 7d9cb63 commit 217dde7
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/InputParser/keywords/schedule.jl
Original file line number Diff line number Diff line change
Expand Up @@ -360,11 +360,6 @@ function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:AQUFETP})
skip_record(f)
end

function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:AQUANCON})
parser_message(cfg, outer_data, "AQUANCON", PARSER_MISSING_SUPPORT)
skip_record(f)
end

function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:WTEMP})
d = "Default"
defaults = [d, NaN]
Expand Down
29 changes: 29 additions & 0 deletions src/InputParser/keywords/solution.jl
Original file line number Diff line number Diff line change
Expand Up @@ -260,3 +260,32 @@ function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:AQUCHWAT})
end
data["AQUCHWAT"] = out
end

function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:AQUANCON})
def_and_u = [
(1, :id), # Aquifer no
(-1, :id), # I start
(-1, :id), # I stop
(-1, :id), # J start
(-1, :id), # J stop
(-1, :id), # K start
(-1, :id), # K stop
("Defaulted", :id), # Where does it connect?
(NaN, :area), # surface area to aquifer
(1.0, :id), # Magic multiplier to flow rate
("NO", :id) # Allow interior aquifer connections
]
defaults = map(first, def_and_u)
utypes = map(last, def_and_u)
out = []
while true
rec = read_record(f)
if length(rec) == 0
break
end
l = parse_defaulted_line(rec, defaults)
swap_unit_system_axes!(l, units, utypes)
push!(out, l)
end
data["AQUANCON"] = out
end

0 comments on commit 217dde7

Please sign in to comment.