-
Notifications
You must be signed in to change notification settings - Fork 18
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
multiple well gradients #60
Comments
Yes, this should be possible. Try something like this: function objective_function(model, state, Δt, step_i, forces)
grat = 0
for w in [:Producer1,:Producer2]
grat += JutulDarcy.compute_well_qoi(model, state, forces, w, SurfaceGasRateTarget)
end
return Δt*grat/(inj_rate*sum(dt))
end
data_domain_with_gradients = JutulDarcy.reservoir_sensitivities(case, result, objective_function, include_parameters = true) I have not tested this code, but if you can find the ECMOR paper there is an example for the Norne model where we do this kind of setup over all producers. |
Thanks, that's very helpful, and I have another two small problems: First, if I have some observation data, should I do this: Second problem, I'd like to set the production rate to zero and use the bottom hole pressure (BHP) of the producer as the objective function, treating it like a monitoring well. Could I do that? Thanks! |
Your observation data looks good to be - but you may have to use You can set Hope this helps! |
Thanks for the explanation, use DisabledControl is straightforward. However, for the observation data, let's say I have a time series surface gas production rate observation, and I want to minimize the summation of the differences between the simulated surface gas production rate and the observed surface gas production rate. how should I incorporate it? |
It is a bit tricky to explain without a full script, but if your case has time steps passed as |
Thanks, it seems that I can just simply pass the time steps into the
objective function, and it works well. Thanks for your help, it's a very
nice package!
Best regards,
Zhen
Olav Møyner ***@***.***> 于2024年9月24日周二 18:25写道:
… It is a bit tricky to explain without a full script, but if your case has
time steps passed as dt and dt has length 10 then step_i passed to your
objective will vary from 1 to 10. You can use this index to pick the
correct observations from however you have it stored, for example by making
a function get_gas_rates_for_step(step_i) and calling it inside the
objective function.
—
Reply to this email directly, view it on GitHub
<#60 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BIOR2UWASKMY5GGLZ6UKQYDZYGOCNAVCNFSM6AAAAABOWOAHFKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZRHA4DSNBXHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
That's great! I'll close this issue now. Feel free to reopen or add another issue if you have follow up questions. |
Hi,
I'm working on using the sensitivity functionality and wanted to check if it's possible to compute gradients using multiple wells. The original example is as follows:
gradient
function objective_function(model, state, Δt, step_i, forces)
grat = JutulDarcy.compute_well_qoi(model, state, forces, :Producer, SurfaceGasRateTarget)
return Δtgrat/(inj_ratesum(dt))
end
data_domain_with_gradients = JutulDarcy.reservoir_sensitivities(case, result, objective_function, include_parameters = true)
is it possible to do somthing like this:
gradient
function objective_function(model, state, Δt, step_i, forces)
grat = JutulDarcy.compute_well_qoi(model, state, forces, [:Producer1,:Producer2], [SurfaceGasRateTarget,SurfaceGasRateTarget])
return Δtgrat/(inj_ratesum(dt))
end
data_domain_with_gradients = JutulDarcy.reservoir_sensitivities(case, result, objective_function, include_parameters = true)
Thanks,
Zhen
The text was updated successfully, but these errors were encountered: