Skip to content

Commit

Permalink
Fix to co2-brine extra_out in setup
Browse files Browse the repository at this point in the history
Closes #74
  • Loading branch information
moyner committed Oct 23, 2024
1 parent 6c209b2 commit 4f86848
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/CO2Properties/setup.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ function setup_reservoir_model_co2_brine(reservoir::DataDomain;
co2_source = missing,
co2_density = :nist,
extra_out = true,
parameters = Dict{Symbol, Any}(),
salt_names = String[],
salt_mole_fractions = Float64[],
kwarg...
Expand Down Expand Up @@ -40,12 +41,7 @@ function setup_reservoir_model_co2_brine(reservoir::DataDomain;
error("Unknown physics argument for co2_physics: $co2_physics is not one of :kvalue or :immiscible.")
end

out = setup_reservoir_model(reservoir, sys; thermal = thermal, extra_out = extra_out, kwarg...)
if extra_out
model = out[1]
else
model = out
end
model = setup_reservoir_model(reservoir, sys; thermal = thermal, extra_out = false, kwarg...)

outvar = model[:Reservoir].output_variables
push!(outvar, :Saturations)
Expand Down Expand Up @@ -81,6 +77,12 @@ function setup_reservoir_model_co2_brine(reservoir::DataDomain;
end
end
end
if extra_out
parameters = setup_parameters(model, parameters)
out = (model, parameters)
else
out = model
end
return out
end

Expand Down

0 comments on commit 4f86848

Please sign in to comment.