Open miguelcorralesg opened 4 days ago
I think there might be a subtle issue here where the disabled control will return a zero value for BHP. I think if you retrieve the BHP manually it will work:
bhp = first(state[:Observation_1].Pressure)
Going via the QOI code is not necessary in this case, since it does not make too much sense for observational wells.
You could also skip adding the observation well and instead do p = state.Reservoir.Pressure[some_cell]
if you want to work with a grid-cell pressure.
Thank you for your response. My main point was that using the L2 norm as an objective function for observation wells helps to match more observed data, which is why I’m using the compute_well_qoi
function, so I was hoping the function will do the job.
I found a workaround by setting the observation well as a producer and disabling the rate (idk if this is more appropriate), which allows me to obtain the gradient values (and not just zero values). However, as you suggested, accessing something like state.Reservoir.Pressure[some_cell]
could also be a viable approach.
Thanks again!
I think both approaches will yield the same result, the main issue is that DisabledControl
specifically skips computing the QOI - since it assumes that no pressure control is possible.
Hi Olav,
I'm trying to create an observation well to later use in an objective function alongside
BottomHolePressureTarget
. Based on previous discussions (in the issues thread with other user), you suggested usingDisabledControl()
to set up an observation well. However, when I implement the following and attempt to obtain the gradients, they come out as zero:On the other hand, if I set the observation well with
ProducerControl
andDisabledTarget()
(or set the target to zero), my gradient values are non-zero following the same objective function as before.Could you please comment on whether the objective function is correctly set when using an observation well? or Are there any other potential issues or considerations I should be aware of?