-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PYACTION and Convergence Failure #4804
Comments
Hi, I think it's likely that you've inadvertently identified a programming error in the simulator. That diagnostic ("...must not precede previous...") is emitted in a single location, when we're calculating summary quantities (e.g., field-level oil production rates or well-level gas injection totals) and if the time point happens to be before the time point of the previous summary evaluation time. The assumption is that time will never go backwards during the simulation and if it does then we should stop the run quickly. Before we're able help with your issue, however, I think we'll need to know a little bit more about your model and possibly how you're using PYACTION. Would you be able to elaborate a little on this topic? |
Hi, I also met this error before. One of the most likely problems is if there is something wrong with your python code then he will give you timing errors like this. Maybe you can your python code to see if there is any error. |
The python code is an empty block for now, as when it started failing I tried to eliminate that possibility first. The PYACTION is defined as:
And code is: import csv
def run(ecl_state, schedule, report_step, summary_state):
return False The intended use will be to read a csv file and open/close wells for a WAG schedule (we're using UDTs for it in Eclipse right now, but I wanted to implement in the same way for Flow to compare). |
You can try the python code like this: import csv
def run(ecl_state, schedule, report_step, summary_state,actionx_callback):
return False |
The revised code seems to have done the trick in terms of solving the error! |
Very good, I'm happy to hear that and thanks a lot to @soulstealer-star for the suggestion. For what it's worth, the
Yes, you're absolutely right. Wrong information in our documentation is worse than no information at all. I will see to it that our manual gets updated in time for the next release, tentatively scheduled for October of this year. |
Just one additional question: is the schedule.open_well(well_name, report_step) command functional at this time? I'm having some mixed results from it currently. The shut_well seems to work well, and the flow stops, but opening wells that have been shut does not restart flow, and the WMCTL is -1 (parent level oil rate control) for a gas injector. Function below. import csv
def run(ecl_state, schedule, report_step, summary_state, actionx_callback):
try:
cycle_id = {1:['NE2P1','NE2WI1','NE2WI1G'],
2:['NE2P2','NE2WI2','NE2WI2G'],
3:['NG2P1','NGF2WI1','NGF2WI1G'],
4:['NG3P1','NG3WI1','NG3WI1G'],
5:['NC2P1','NC2WI1','NC2WI1G'],
6:['VE2P1','VE2WI1','VE2WI1G'],
7:['VDJ2P1','VDJ2WI1','VDJ2WI1G'],
8:['NM2P1','NM2WI1','NM2WI1G']}
with open('/private/mcana/Documents/opm/eclipse/include/schedule/wag_data.csv', encoding='utf-8') as csvfile:
wag_list = list(csv.reader(csvfile, delimiter=','))
month = int(summary_state['TIME'] / 30)
curr_id = summary_state['FUWAGGI']
next_id = int(wag_list[month+1][1])
print('The current cycle is {}, and the next cycle is {}.'.format(curr_id, next_id))
if curr_id != next_id:
print('Switching cycle from {} to {}.'.format(curr_id, next_id))
print('---> Opening {}'.format(cycle_id[next_id][2]))
schedule.open_well(cycle_id[next_id][2], report_step)
print('---> Closing {}'.format(cycle_id[next_id][1]))
schedule.shut_well(cycle_id[next_id][1], report_step)
print('---> Opening {}'.format(cycle_id[curr_id][1]))
schedule.open_well(cycle_id[curr_id][1], report_step)
print('---> Closing {}'.format(cycle_id[curr_id][2]))
schedule.shut_well(cycle_id[curr_id][2], report_step)
summary_state.update('FUWAGGI', next_id)
except Exception as e:
print(e)
return False |
Hi,
Seems that I'm having an issue with PYACTION. There's some sort of check on elapsed time happening when the action is set to run, and when the timestep is chopped due to convergence failure (not ideal, but it happens), the check fails as shown in the attached. I've tried using no tuning and our default of 0.5 days, and both seem to have the same issue.
The text was updated successfully, but these errors were encountered: