Outdated MRST script for Egg Model

11 views
Skip to first unread message

Đăng Trình Phạm

unread,
Oct 28, 2025, 1:14:28 PM (2 days ago) Oct 28
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Dear MRST developers, 

I have downloaded the Egg Model data files from https://data.4tu.nl/articles/dataset/The_Egg_Model_-_data_files/12707642, and run the script Reading_deck_Egg_model_Fully_Implicit.m:

1.  First error, I get this error: 
error: Unexpected input '' encountered at position '396' whilst scanning file 'D:\datasets\Egg_Model_Data_Files_v2\MRST\SCHEDULE_NEW.INC'.
error: called from
    readVectorOld>myscanner at line 322 column 7
    readVectorOld at line 54 column 1
    readVector at line 50 column 7
    readSCHEDULE>readTSTEP at line 271 column 4
    readSCHEDULE at line 106 column 13
    readEclipseIncludeFile at line 69 column 8
    readSCHEDULE at line 153 column 14
    readSUMMARY at line 50 column 13
    readSOLUTION at line 143 column 13
    readREGIONS at line 75 column 13
    readPROPS at line 384 column 13
    readGRID at line 278 column 13
    readRUNSPEC at line 233 column 13
    readEclipseDeck at line 65 column 13
    Reading_deck_Egg_model_Fully_Implicit at line 43 column 1
   *Solution: I fix this by changing the End of Line Sequence of the file SCHEDULE_NEW.INC from CRLF to LF. The file is now able to be read


2. After solving that error, i continue to get this second error
error: The length of logical vector differs from number of grid cells.
error: called from
    assert at line 109 column 11
    removeCells at line 80 column 7
    Reading_deck_Egg_model_Fully_Implicit at line 51 column 1
   * Solution: remove the exact line 51 `G     = removeCells(G, ~deck.GRID.ACTNUM);`

3.  Moving on after solving the error, I continue to get this third error
warning: The 'ad-fi' module has been replaced by the 'ad-core + ad-blackoil' modules. 'ad-fi' and associated routines may be removed in a future release of MRST.
warning: called from
    runScheduleADI at line 105 column 1
    Reading_deck_Egg_model_Fully_Implicit at line 103 column 2

error: =: nonconformant arguments (op1 is 7x3, op2 is 7x2)
error: called from
    updateConnDP at line 64 column 9
    getWellContributions at line 78 column 5
    eqsfiOW at line 161 column 10
    stepOW at line 34 column 2
    initADISystem>@<anonymous> at line 216 column 13
    solvefiADI>@<anonymous> at line 83 column 8
    solvefiADI at line 104 column 10
    runScheduleADI at line 231 column 5
    Reading_deck_Egg_model_Fully_Implicit at line 103 column 2


Could you please guide me through this Egg Model MRST script?

Best,
Trinh D. Pham

Bård Skaflestad

unread,
Oct 28, 2025, 1:31:18 PM (2 days ago) Oct 28
to Đăng Trình Phạm, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi,

Thank you for your interest in MRST. Did you write the "Reading_deck_Egg_model_Fully_Implicit" script yourself or did you get it from somewhere else? The reason I ask is that if it's using the "ad-fi" module then it's very likely to be based on an older version of MRST. As the diagnostic message explains, the "ad-fi" module is deprecated now and no new scripts should use this module. For what it's worth, this module is no longer maintained and it's not surprising that certain workflows will start to fail when using it. Would you mind sharing the script?

By the way, what version of MRST are you using and do you use MATLAB or Octave or perhaps some other platform? If you're in MATLAB, then you really should not get into the "readVectorOld" routine while the transcript shows that you do.


Best Regards,

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


From: sinte...@googlegroups.com <sinte...@googlegroups.com> on behalf of Đăng Trình Phạm <trinh.da...@gmail.com>
Sent: Tuesday, October 28, 2025 10:55
To: MRST-users: The Matlab Reservoir Simulation Toolbox User Group <sinte...@googlegroups.com>
Subject: [MRST Users] Outdated MRST script for Egg Model
--
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 visit https://groups.google.com/d/msgid/sintef-mrst/8fd7aec0-fd24-4ad2-b098-53a1f1378883n%40googlegroups.com.

Đăng Trình Phạm

unread,
Oct 28, 2025, 9:57:48 PM (2 days ago) Oct 28
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi,

I use the script directly from the data.zip/MRST/Reading_deck_Egg_model_Fully_Implicit.m downloaded from egg model's webpage: https://data.4tu.nl/articles/dataset/The_Egg_Model_-_data_files/12707642

Also, I run eggExample.m from ./MRST/modules/ad-blackoil/examples/egg/eggExample.m, and I got: 
Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND =  7.721213e-19.
> In iterapp (line 33)
In gmres (line 433)
In GMRES_ILUSolverAD/solveLinearSystem (line 57)
In LinearSolverAD/solveLinearProblem (line 361)
In PhysicalModel/stepFunction (line 739)
In ReservoirModel/stepFunction (line 307)
In NonLinearSolver/solveMinistep (line 374)
In NonLinearSolver/solveTimestep (line 210)
In simulateScheduleAD (line 295)
In eggExample (line 16)

Given that I use both versions of MRST (2025 & 2023b), the warnings of eggExample.m pop up for both versions

Thank you.

Best,
Trinh D. Pham
Vào lúc 00:31:18 UTC+7 ngày Thứ Tư, 29 tháng 10, 2025, Bård Skaflestad đã viết:

Olav Møyner

unread,
Oct 29, 2025, 8:13:53 AM (yesterday) Oct 29
to Đăng Trình Phạm, MRST-users: The Matlab Reservoir Simulation Toolbox User Group

Hi,

 

The eggExample should be the way to go. The warning comes from MATLABs solver, so there is nothing to worry about if the simulation completes successfully. We recommend that you set up AMGCL if you want to speed up simulations, this will also remove the warning. Details should be in the linearsolvers module.

 

Best regards,

Olav

 

Đăng Trình Phạm

unread,
Oct 29, 2025, 11:01:04 AM (yesterday) Oct 29
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi,

Thank you for your solution and responses. That helps uncover the problem, I will try your solution.

Best regards,
Trinh

Vào lúc 19:13:53 UTC+7 ngày Thứ Tư, 29 tháng 10, 2025, Olav Møyner đã viết:
Reply all
Reply to author
Forward
0 new messages