Having Problem Running Simulation in MMP

21 views
Skip to first unread message

Muhammad Khoirul Latif

unread,
Apr 21, 2025, 4:05:24 PMApr 21
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hello MRST Users,

I tried to copy the code example of "compositionalMiscibilityExample" found in the Compositional module and then an error occurred in the simulateScheduleAD section because I simulated it without using packSimulationProblem and only used simulateScheduleAD.  Does anyone know how to solve this problem?. I attached the following code
WhatsApp Image 2025-04-21 at 12.49.26_7061a43c.jpg
Thank you
BaseCaseMMP.m

Olav Møyner

unread,
Apr 22, 2025, 9:39:39 AMApr 22
to Muhammad Khoirul Latif, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi,

I have not run your case since your "mmp" case is not standard MRST in getBenchmarkMixture, but I can see at least one issue: You are using "value" inside the interpolation calls, which will remove derivatives. The code needs to work with AD variables to be able to simulate - by removing derivatives, you are likely making the problem difficult for the solver to converge. You may want to have a look at assignSGOF to look at how a SGOF table is set up when parsed from an input file. I am not sure if we support interp1 with extrapolation, but I could be wrong. interpTable is what we normally use, e.g.

 @(s) interpTable(SOF2(:,1), SOF2(:,2), s)

and then make sure that the table covers saturations from 0 to 1 by adding the endpoints if needed. I have done this in the attached script.

Hope this helps!

Best regards,
Olav

From: sinte...@googlegroups.com <sinte...@googlegroups.com> on behalf of Muhammad Khoirul Latif <khol...@gmail.com>
Sent: Monday, April 21, 2025 7:49
To: MRST-users: The Matlab Reservoir Simulation Toolbox User Group <sinte...@googlegroups.com>
Subject: [MRST Users] Having Problem Running Simulation in MMP
 
--
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/fc086000-0dc3-4a0e-a9ca-60b582dc4ef4n%40googlegroups.com.
BaseCaseMMP.m

Muhammad Khoirul Latif

unread,
Apr 22, 2025, 10:28:00 AMApr 22
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group

Hi Olav,WhatsApp Image 2025-04-22 at 21.16.05_78021964.jpgWhatsApp Image 2025-04-22 at 21.15.48_ba473d51.jpg

Thank you very much for your help, in the example code "compositionalMiscibilityExample" there is no use of relative permeability values and just now I tried to run the code without relative permeability SGFN and SOF2 and it still gives an error, is this a timestep problem or what? I also attached the sample code of “compositionalMiscibilityExample”

compositionalMiscibilityExample.m
Reply all
Reply to author
Forward
0 new messages