Read data from Eclipse .DATA and run the simulation using MRST

141 views
Skip to first unread message

Cong Xiao

unread,
Oct 22, 2023, 5:23:06 AM10/22/23
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Dear MRSTdeveloper, 

          I try to read data from Eclipse .DATA and run the simulation using MRST. However,  I encounter an error as floows:

           cannot identify  "W"。

Error  FacilityModel/validateModel ( 377 lines)
                W = varargin{1}.W;

Error   ReservoirModel/validateModel (213 lines)
        model.FacilityModel = model.FacilityModel.validateModel(varargin{:});

Error   ThreePhaseBlackOilModel/validateModel (207 line)
        model = validateModel@ReservoirModel(model, varargin{:});

Error   simulateScheduleAD (249 Line)
    model = model.validateModel(fstruct, opt.checkOperators);

Error   readDATA_new (60 line)
[wellSols, states, report] = simulateScheduleAD(state0, model, schedule);

I cannot read the schedule, however, the Well is not readed. Can you tell me which MRST function cann be used to read the well stucture from Eclipse DATA file for MRST simulation? I have attached the code. I'd appreciate it if you can help me.

best regard

Cong Xiao

China University of Petroleum, Beijing

CONTROL_OIL_2_1_1_1_1.DATA
readDATA_new.m
readDATA_new.m
CONTROL_OIL_2_1_1_1_1.DATA

Bård Skaflestad

unread,
Oct 22, 2023, 10:50:21 AM10/22/23
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group, Cong Xiao
Hi,

In general you'd use function 'initEclipseProblemAD' from the 'ad-core' module to load  your model from a ".DATA" file and then invoke function 'simulateScheduleAD' using the outputs that function, e.g,:

    [state0, model, schedule, nlsolver] = initEclipseProblemAD('CONTROL_OIL_2_1_1_1_1.DATA');
    [wellSols, state, report] = simulateScheduleAD(state0, model, schedule, 'NonlinearSolver', nlsolve)

You didn't share your run script, however, so maybe you're already doing this.  In that case there ought to be some other diagnostic messages, typically from the loading process, that might give you some additional clues as to the underlying issue.  Unless we know more about those we will not be able to provide any assistance.  As a general rule, we can't really aid you in any way unless we have at least the full run script and a complete copy of any diagnostic messages emitted while running it.


Bård Skaflestad
SINTEF Digital, Mathematics & Cybernetics
Applied Computational Science group


From: 'Cong Xiao' via MRST-users: The Matlab Reservoir Simulation Toolbox User Group <sinte...@googlegroups.com>
Sent: 22 October 2023 11:23
To: MRST-users: The Matlab Reservoir Simulation Toolbox User Group <sinte...@googlegroups.com>
Subject: [MRST Users] Read data from Eclipse .DATA and run the simulation using MRST
 
--
You received this message because you are subscribed to the Google Groups "MRST-users: The Matlab Reservoir Simulation Toolbox User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sintef-mrst...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sintef-mrst/6c1a9a16-45ca-4ddd-b627-c26ab6f9aedcn%40googlegroups.com.

abal baba

unread,
Jun 12, 2025, 7:35:04 AMJun 12
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Mr  Cong Xiao ,
when i upload the model ,this is the error ,how can i fix it ?

>> model_simple20250905
Error in using readVector_textscan (line 73)
Error in using assert
Internal Logic Error

Error in readVector (line 53)
vec = readVector_textscan(fid, field, nel);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in readGridBoxArray (line 70)
values ​​= readVector(fid, kw, numel(i));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in readGRID (line 194)
grd = readGridBoxArray(grd, fid, kw, nc, NaN);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in readEclipseIncludeFile (line 69)
[varargout{1:nargout}] = fun(inc_fid, dirname, varargin{:});
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in readGRID (line 277)
deck = readEclipseIncludeFile(@readGRID, fid, dirname, ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in readRUNSPEC (line 238)
deck = readGRID(fid, dirname, deck);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in readEclipseDeck (line 66)
deck = readRUNSPEC(fid, dirname, deck);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error initEclipseProblemAD (line 74)
deck = readEclipseDeck(deck);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error model_simple20250905 (line 9)
[state0, model, schedule, nlsolver] = initEclipseProblemAD('D:\ccus\research\XU\CASE_ADJUST_2_1.DATA');
^ ...

Bård Skaflestad

unread,
Jun 12, 2025, 8:07:43 AMJun 12
to abal baba, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi,

Thank you for your interest in MRST. The diagnostic "Internal Logic Error" means that something's gone wrong while loading the input file and that we're in a situation that the parser did not expect and was not prepared to deal with. There can be any number of reasons for this, ranging from programming errors in the input loader, to faulty input that the loader was not able to identify. 

Without seeing the actual text/input it's unfortunately not easy to analyse the problem further. Would you be able to share the 'CASE_ADJUST_2_1.DATA' input file and any pertinent include files? If so, I can take a look and try to understand what's happening here. Otherwise, you may have to debug the problem yourself.

That said, I'd like to ask what MRST version you're running. We generally recommend getting the latest version—2025a at the time of writing (12 June 2025)—since that typically has the most up-to-date and tested code.


Best Regards,

Bård Skaflestad
MRST Developer
SINTEF Digital, Mathematics & Cybernetics
Applied Computational Science group


From: sinte...@googlegroups.com <sinte...@googlegroups.com> on behalf of abal baba <abalbab...@gmail.com>
Sent: Wednesday, June 11, 2025 09:02

To: MRST-users: The Matlab Reservoir Simulation Toolbox User Group <sinte...@googlegroups.com>
Subject: Re: [MRST Users] Read data from Eclipse .DATA and run the simulation using MRST
Reply all
Reply to author
Forward
0 new messages