Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

small clean-up of case setup from mrst data #25

Merged
merged 4 commits into from
Nov 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions src/input_simulation/mrst_input.jl
Original file line number Diff line number Diff line change
Expand Up @@ -856,30 +856,23 @@ function setup_case_from_mrst(casename; wells = :ms,
sym = well_symbols[i]
wi, wdata, res_cells = get_well_from_mrst_data(mrst_data, sys, i, W_data = first_well_set,
extraout = true, well_type = wells, context = w_context, use_lengths = use_well_lengths)
param_w = setup_parameters(wi)

sv = wi.secondary_variables
sv_m = model.secondary_variables

prm = model.parameters
param_w = setup_parameters(wi)

if typeof(wi.system) == typeof(model.system)
sv[:PhaseMassDensities] = sv_m[:PhaseMassDensities]
if haskey(sv, :ShrinkageFactors)
sv[:ShrinkageFactors] = sv_m[:ShrinkageFactors]
set_secondary_variables!(wi, PhaseMassDensities = model.secondary_variables[:PhaseMassDensities])
if haskey(wi.secondary_variables, :ShrinkageFactors)
set_secondary_variables!(wi, ShrinkageFactors = model.secondary_variables[:ShrinkageFactors])
end
if haskey(sv_m, :PhaseViscosities)
set_secondary_variables!(wi, PhaseViscosities = sv_m[:PhaseViscosities])
if haskey(model.secondary_variables, :PhaseViscosities)
set_secondary_variables!(wi, PhaseViscosities = model.secondary_variables[:PhaseViscosities])
else
set_parameters(wi, PhaseViscosities = prm[:PhaseViscosities])
set_parameters(wi, PhaseViscosities = model.parameters[:PhaseViscosities])
end
sv[:PhaseViscosities] = sv_m[:PhaseViscosities]
if haskey(param_w, :Temperature)
param_w[:Temperature] = param_res[:Temperature][res_cells]
end
end
pw = wi.primary_variables
models[sym] = wi
ctrl = mrst_well_ctrl(model, wdata, is_comp, rhoS)
if isa(ctrl, InjectorControl)
Expand Down
Loading