Skip to content

Conversation

@steink
Copy link
Contributor

@steink steink commented Nov 11, 2025

As discussed in #6587, shut wells opened through actions will wrongly get a prevState status OPEN when entering the initialization phase in the next time-step. This leads to initialization problems (circumvented by #6587).

Discussed with @bska whether it also could have other implications. Reason for the problem is the ws.updateStatus() in BlackoilWellModelGeneric<>::updateEclWellsConstraints(). It's probably there for a reason, so just running through the tests to see if anything is triggered by commenting it out.

@steink steink added the manual:irrelevant This PR is a minor fix and should not appear in the manual label Nov 11, 2025
@steink
Copy link
Contributor Author

steink commented Nov 11, 2025

jenkins build this failure_report please

@steink
Copy link
Contributor Author

steink commented Nov 11, 2025

The commented line seems to be needed currently for shut-instructions during actions to function properly

@GitPaean
Copy link
Member

What does the compareSeparateECLFiles do? The failures are not plotted.

mpi.compareSeparateECLFiles_flow+actionx_wlist
mpi.compareSeparateECLFiles_flow+actionx_wlist_4_procs

@steink
Copy link
Contributor Author

steink commented Nov 12, 2025

What does the compareSeparateECLFiles do? The failures are not plotted.

I haven't looked at these in detail, but appears they compare results from two decks that only differ in actionx/udq setup, but that should result in the same logic (but doesn't with this change).

@GitPaean
Copy link
Member

What does the compareSeparateECLFiles do? The failures are not plotted.

I haven't looked at these in detail, but appears they compare results from two decks that only differ in actionx/udq setup, but that should result in the same logic (but doesn't with this change).

Thanks for the response. Maybe those should also be in the failure_report to help investigation? @akva2

@akva2
Copy link
Member

akva2 commented Nov 12, 2025

i guess we can but there is no ground truth so there is no telling what is good and bad data from the plots.

@GitPaean
Copy link
Member

i guess we can but there is no ground truth so there is no telling what is good and bad data from the plots.

yes, you are right. I think those tests want two runs generate the similar enough results. Plotting can show the difference more directly, especially the well behavoirs.

@akva2
Copy link
Member

akva2 commented Nov 12, 2025

yes i know that, but my point is you can't tell from the plots which of the simulation(s) was changed by your changes. the only thing we know is that they are supposed to be identical, and we already detect that they are not. i can add it, i just think its usefulness is limited.

@akva2
Copy link
Member

akva2 commented Nov 12, 2025

in fact, in this case it shows absolutely nothing. results are identical, timestepping differs, https://ci.opm-project.org/job/opm-simulators-PR-builder/9004/

@GitPaean
Copy link
Member

in fact, in this case it shows absolutely nothing. results are identical, timestepping differs, https://ci.opm-project.org/job/opm-simulators-PR-builder/9004/

from the curves, time stepping should also be the same?

@GitPaean
Copy link
Member

in fact, in this case it shows absolutely nothing. results are identical, timestepping differs, https://ci.opm-project.org/job/opm-simulators-PR-builder/9004/

from the curves, time stepping should also be the same?

Keyword CTFAC:WI1:11,6,1 summary vector of different length (21 != 17)

But
https://ci.opm-project.org/job/opm-simulators-PR-builder/9004/artifact/mpi/build-opm-simulators/failure_report/05_actionx_wlist_4_procs.pdf

both curves have 21 time steps?

I might see things wrong.

@akva2
Copy link
Member

akva2 commented Nov 12, 2025

no, time stepping is not the same. you can see it from the error output, one file uses 21 timesteps, one uses 17.

@GitPaean
Copy link
Member

no, time stepping is not the same. you can see it from the error output, one file uses 21 timesteps, one uses 17.

yes, but the question is that no curves in the plotting use 17 time steps. both have more than 20 time steps. Excuse me if I read the plot wrong.

https://ci.opm-project.org/job/opm-simulators-PR-builder/9004/artifact/mpi/build-opm-simulators/failure_report/05_actionx_wlist_4_procs.pdf

@akva2
Copy link
Member

akva2 commented Nov 12, 2025

correct you are, it did use the same results for both curves. should be ok now.

@akva2
Copy link
Member

akva2 commented Nov 12, 2025

@GitPaean
Copy link
Member

more useful now i guess, https://ci.opm-project.org/job/opm-simulators-PR-builder/9008/

Yes. Actually showing well curves are identical/similar is also something helpful, because there is no obvious behavoir difference except rounding errors.

@akva2
Copy link
Member

akva2 commented Nov 13, 2025

jenkins build this opm-common=4832 failure_report please

1 similar comment
@akva2
Copy link
Member

akva2 commented Nov 13, 2025

jenkins build this opm-common=4832 failure_report please

@GitPaean
Copy link
Member

jenkins build this failure_report please

@GitPaean
Copy link
Member

I realized this is rather complicated.

        ws.updateStatus(well.getStatus());
        ws.update_type_and_targets(well, st);

through applyActions().

It only updates the well status and re-initialize a new well state. There might not be much value to copy from it in WellState::init(), and also the rough values initialized might be problematic to use in a simulation.

@GitPaean
Copy link
Member

GitPaean commented Nov 26, 2025

I think now the key issue is that with the following code,

        ws.updateStatus(well.getStatus());
        ws.update_type_and_targets(well, st);

when called through applyActions, we need to initialize a better state, including the segments related.

Will try to come up with a suggestion. We might need to refactor the function WellState::initWellStateMSWell() and maybe other related initialization functions so it can handle one single well, while change mind in the process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

manual:irrelevant This PR is a minor fix and should not appear in the manual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants