[Opm] Explicitly setting the initial solution of EBOS.

Joakim R. Andersen joakira at stud.ntnu.no
Thu Jul 27 19:15:32 UTC 2017

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

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

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <//opm-project.org/pipermail/opm/attachments/20170727/c062e431/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: numerical_jacobian.cpp
Type: text/x-c++src
Size: 3707 bytes
Desc: not available
URL: <//opm-project.org/pipermail/opm/attachments/20170727/c062e431/attachment.cpp>

More information about the Opm mailing list