{"action":"created","issue":{"url":"https://api.github.com/repos/OPM/opm-simulators/issues/906","repository_url":"https://api.github.com/repos/OPM/opm-simulators","labels_url":"https://api.github.com/repos/OPM/opm-simulators/issues/906/labels{/name}","comments_url":"https://api.github.com/repos/OPM/opm-simulators/issues/906/comments","events_url":"https://api.github.com/repos/OPM/opm-simulators/issues/906/events","html_url":"https://github.com/OPM/opm-simulators/pull/906","id":188751238,"number":906,"title":"checking the residual for the well control equations.","user":{"login":"GitPaean","id":6847941,"avatar_url":"https://avatars.githubusercontent.com/u/6847941?v=3","gravatar_id":"","url":"https://api.github.com/users/GitPaean","html_url":"https://github.com/GitPaean","followers_url":"https://api.github.com/users/GitPaean/followers","following_url":"https://api.github.com/users/GitPaean/following{/other_user}","gists_url":"https://api.github.com/users/GitPaean/gists{/gist_id}","starred_url":"https://api.github.com/users/GitPaean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GitPaean/subscriptions","organizations_url":"https://api.github.com/users/GitPaean/orgs","repos_url":"https://api.github.com/users/GitPaean/repos","events_url":"https://api.github.com/users/GitPaean/events{/privacy}","received_events_url":"https://api.github.com/users/GitPaean/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-11T12:35:47Z","updated_at":"2016-11-14T08:57:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/OPM/opm-simulators/pulls/906","html_url":"https://github.com/OPM/opm-simulators/pull/906","diff_url":"https://github.com/OPM/opm-simulators/pull/906.diff","patch_url":"https://github.com/OPM/opm-simulators/pull/906.patch"},"body":"When the targets like, BHP or WRAT or ORAT, we are able to set the `WellState` to match the target value. As a result, we can get almost always zero residual for the well control equations, which is also why we do not care much about this residual and even not outputting them. \r\n\r\nWhen come to some types of combined control, like RESV, LRAT, REIN, VREP, and so on, we can not set the `WellState` based on the targets, then we get some non-zero residuals. The current tolerance is set to be `barsa`, which is 1e5, make the checking not working actually. \r\n\r\nWith this PR, we set the tolerance for 1.e-7 by default and also we output the evolution of the residual of the well control equations. \r\n\r\nIt is tested on Norne, it does not change the well curves. It reduced the non-linear iteration and linear iteration a little, which results from the better convergence from the previous step (resulting in less iteration failures.). \r\n\r\nThe following is my testing results with Norne. \r\nWith master branch\r\n```\r\n90483 Total time taken (seconds):  2154.89\r\n90484 Solver time (seconds):       2143.85\r\n90485 Overall Linearizations:      2005\r\n90486 Overall Newton Iterations:   1639\r\n90487 Overall Linear Iterations:   25440\r\n```\r\n\r\nWith this PR\r\n```\r\n90163 Total time taken (seconds):  2107.52\r\n90164 Solver time (seconds):       2096.43\r\n90165 Overall Linearizations:      1980\r\n90166 Overall Newton Iterations:   1624\r\n90167 Overall Linear Iterations:   25222\r\n```"},"comment":{"url":"https://api.github.com/repos/OPM/opm-simulators/issues/comments/260281028","html_url":"https://github.com/OPM/opm-simulators/pull/906#issuecomment-260281028","issue_url":"https://api.github.com/repos/OPM/opm-simulators/issues/906","id":260281028,"user":{"login":"GitPaean","id":6847941,"avatar_url":"https://avatars.githubusercontent.com/u/6847941?v=3","gravatar_id":"","url":"https://api.github.com/users/GitPaean","html_url":"https://github.com/GitPaean","followers_url":"https://api.github.com/users/GitPaean/followers","following_url":"https://api.github.com/users/GitPaean/following{/other_user}","gists_url":"https://api.github.com/users/GitPaean/gists{/gist_id}","starred_url":"https://api.github.com/users/GitPaean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GitPaean/subscriptions","organizations_url":"https://api.github.com/users/GitPaean/orgs","repos_url":"https://api.github.com/users/GitPaean/repos","events_url":"https://api.github.com/users/GitPaean/events{/privacy}","received_events_url":"https://api.github.com/users/GitPaean/received_events","type":"User","site_admin":false},"created_at":"2016-11-14T08:57:18Z","updated_at":"2016-11-14T08:57:18Z","body":"The running of model-2 also shows some positive effects. \r\nMaster branch. \r\n```\r\nTotal time taken (seconds):  12400.9\r\nSolver time (seconds):       12371.2\r\nOverall Linearizations:      3037\r\nOverall Newton Iterations:   2379\r\nOverall Linear Iterations:   61103\r\n```\r\nWith this PR\r\n```\r\nTotal time taken (seconds):  11760.8\r\nSolver time (seconds):       11732.4\r\nOverall Linearizations:      2991\r\nOverall Newton Iterations:   2349\r\nOverall Linear Iterations:   61669\r\n```\r\nHowever, it did cause small difference in the well-curve of `F-17B`. The resulting plots please find from the following link. \r\nhttps://www.dropbox.com/s/pqnrv9rt6lvifw4/model-2-wells.pdf?dl=0\r\n\r\nThe blue line is the result with this PR. I do not have the Eclipse result for this model, not sure how it will compare with with the Eclipse result. While in my opinion, there is no obvious reason that with this checking, the results should be less accurate, unless Eclipse does not check this residual either. \r\n"}}
{"actor":{"display_login":"GitPaean"}}