Skip to content

Commit

Permalink
Merge pull request #25 from brunompacheco/main
Browse files Browse the repository at this point in the history
small clean-up of case setup from mrst data
  • Loading branch information
moyner authored Nov 10, 2023
2 parents 582772d + ba0cb41 commit daaff6d
Showing 1 changed file with 6 additions and 13 deletions.
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

0 comments on commit daaff6d

Please sign in to comment.