You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to compute the gradient by defining a objective function like this:
function objective_function(model, state, Δt, step_i, forces)
dif1 = JutulDarcy.compute_well_qoi(model, state, forces, :Producer1, SurfaceLiquidRateTarget) - obs_pro1[step_i]
dif2 = JutulDarcy.compute_well_qoi(model, state, forces, :Producer2, SurfaceLiquidRateTarget) - obs_pro2[step_i]
loss = sum(dif1.^2 + dif2.^2)
return loss
end
my observation data is:
obs_pro1= ws[:Producer1, :lrat]
obs_pro2= ws[:Producer2, :lrat]
However, the gradient computed based on this objective function seems not working quite well.
Therefore:
Is the function JutulDarcy.compute_well_qoi specifically designed for coarse and fine scale reservoir history matching?
Is it possible for me to access ws[:Producer1, :lrat] and ws[:Producer2, :lrat] through state in the objective function? ( I think JutulDarcy.compute_well_qoi is trying to complete this task, but it isn't giving me the right answer until now)
Thanks for your assistance!
Best regards,
Zhen
The text was updated successfully, but these errors were encountered:
The QOI code should be computing the point-wise data that ends up in ws[...] after some post-processing. I'm a bit surprised that the gradients are not accurate - could you share a small test case?
There is also a numerical gradient that uses the same interface - if the model is small, that is one way to verify if the gradients are accurate.
Hi Olav,
Thanks for your clarification. The gradient computation seems to be working
well. The issue was not with the gradient calculation but rather with my
boundary conditions. I had set them as no-flow, which resulted in
insufficient flow rate information to properly update the reservoir
parameters. I apologize for the confusion caused earlier!
Best regards,
Zhen
Hi,
I'm trying to compute the gradient by defining a objective function like this:
my observation data is:
obs_pro1= ws[:Producer1, :lrat]
obs_pro2= ws[:Producer2, :lrat]
However, the gradient computed based on this objective function seems not working quite well.
Therefore:
Is the function JutulDarcy.compute_well_qoi specifically designed for coarse and fine scale reservoir history matching?
Is it possible for me to access ws[:Producer1, :lrat] and ws[:Producer2, :lrat] through state in the objective function? ( I think JutulDarcy.compute_well_qoi is trying to complete this task, but it isn't giving me the right answer until now)
Thanks for your assistance!
Best regards,
Zhen
The text was updated successfully, but these errors were encountered: