[Opm] Explicitly setting the initial solution of EBOS.

Andreas Lauser and at poware.org
Mon Jul 31 14:02:58 UTC 2017


Hi,

On Montag, 31. Juli 2017 10:12:01 CEST you wrote:
> Thank you for your answer.  I've attached a minimum working example. As you
> can see, the residuals do not change after the update of the initial
> solution.
> In the example, the initial solution is (attempted) to be set to be equal
> to the final state.

sorry, but I cannot see that you change anything compared to the current 
solution before the call to convertInput(tmp_reservoir_state), so getting the 
same result is the expected behavior. Also, I still can't see how your code is 
supposed to be used without doing some guesswork of where it should go (I 
suppose the run() method of the simulator class?) it would be less confusing 
if you would send patches (i.e., the output of `git diff origin/master`).

I've attached a patch which probably does what you want. In particular, note 
that if you cannot guarantee a fixed number of changed variables of the result 
due to a single change of the initial condition, the problem is not sparse.

cheers
  Andreas

> 2017-07-28 11:41 GMT-03:00 Andreas Lauser <and at poware.org>:
> > Hi Joakim,
> > 
> > it looks like you modify copies of the objects which are actually used by
> > the
> > simulator. I can't be too sure because the file which you attached is
> > incomplete.
> > 
> > cheers
> > 
> >   Andreas
> > 
> > On Donnerstag, 27. Juli 2017 16:15:32 CEST Joakim R. Andersen wrote:
> > > Hi, all.
> > > 
> > > I am trying to calculate the numerical Jacobian of the reservoir
> > 
> > residuals
> > 
> > > w.r.t. the initial state. To do this I need to replace the initial
> > 
> > solution
> > 
> > > of EBOS with a perturbed one. I've been trying for a while, and I am
> > > getting nowhere.
> > > 
> > > I've attached the code. It is placed at the end of "nonlinearIteration"
> > 
> > in
> > 
> > > "BlackoilModelEbos.hpp":
> > > 
> > > if (!report.converged) { ... }
> > > 
> > > else {
> > > // all the code goes here.
> > > }
> > > 
> > > I've also made the "nonlinearIteration" take the initial reservoir state
> > 
> > as
> > 
> > > an input. Thus, we have both the final state and the initial state when
> > 
> > the
> > 
> > > "else"-case is invoked.
> > > 
> > > Setting the initial solution as done in the attachment does not work.
> > > How
> > > can I pass this information further such that the "linearize()" function
> > > (the one that calculates the residuals and the Jacobian in EBOS) will be
> > > affected?
> > > 
> > > Let me be more precise. The code runs, and the initial solution is set,
> > 
> > but
> > 
> > > the "linearize()" function are not aware of the change.
> > > 
> > > 
> > > Best regards,
> > > Joakim R. Andersen
> > 
> > --
> > The Illuminati don't run the world. C programmers do.
> > 
> >         -- Daniel Angel Muñoz Trejo
> > 
> > _______________________________________________
> > Opm mailing list
> > Opm at opm-project.org
> > http://opm-project.org/cgi-bin/mailman/listinfo/opm


-- 
The Illuminati don't run the world. C programmers do. 
        -- Daniel Angel Muñoz Trejo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sensitivity.patch
Type: text/x-patch
Size: 1922 bytes
Desc: not available
URL: <//opm-project.org/pipermail/opm/attachments/20170731/25bd9ceb/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <//opm-project.org/pipermail/opm/attachments/20170731/25bd9ceb/attachment.sig>


More information about the Opm mailing list