Plotting multiple graphs on one graph

49 views
Skip to first unread message

Mai MRST

unread,
Nov 7, 2023, 4:22:38 PM11/7/23
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group

Hello MRST Team! I am trying to plot test results of geothermal modelling, for resolution testing. The models are in sizes with 100 m, 300 m and 900 m increments. The full model is roughly 4500x2700m. Every model is run at the same schedule setting: same total simulation time, timestep duration, and ramp up. At the end, I get a graph figure as one of the outputs. I was wondering if there is a way to overlay these graph figures for each of these models on one graph (most likely a figure showing the change in temperature over time/timesteps)? Also given given the model size, how do we know we have an appropriate spatial resolution? 

This is how one of the graphs look like:

graphhhh.png

I have also run into these types of warnings while running the models, I can send the script over together with the grid if it would be useful to see what is going on here and whether it would be an issue for the results:

warning0.png

warrning2.png

Thank you!

Knut-Andreas Lie

unread,
Nov 7, 2023, 5:31:45 PM11/7/23
to Mai MRST, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi,

Let me assume that each of your models has been simulated using a call like the following:
   [wellSols, states, report] = simulateScheduleAD(state, model, schedule, ..)
To produce the figure you included, you would then normally do something like
   plotWellSols(wellSols, report.ReservoirTime)

If you have simulated multiple models, in your case three different ones, we can assume that the results are available as wellSols1, wellSols2, and wellSols3, and likewise report1, report2, and report3. To plot them on the same graph, you can call
   plotWellSols({wellSols1,wellSols2,wellSols3}, {report1.ReservoirTime, report2.ReservoirTime, report3.ReservoirTime});

Regarding resolution: This is difficult to answer in general. In your case, I assume it would be natural to compare well curves for the three different resolutions and say that the coarsest of any models giving a close match has sufficient resolution. (In addition to spatial resolution,  I would also have run different time-step lengths to see if the temporal resolution is sufficient.)

The error message you report typically occurs when your system is close to being incompressible. One way to check this would be to increase the fluid and/or rock compressibilities somewhat and see if the message disappears.

Best regards,
Knut-Andreas

--
Knut-Andreas Lie, Professor, PhD
Chief Scientist, SINTEF Digital, Mathematics & Cybernetics, Oslo
Phone: +47 930 58 721 (mobile)
http://folk.ntnu.no/andreas

From: sinte...@googlegroups.com <sinte...@googlegroups.com> on behalf of Mai MRST <crevasce...@gmail.com>
Sent: Tuesday, November 7, 2023 10:22 PM
To: MRST-users: The Matlab Reservoir Simulation Toolbox User Group <sinte...@googlegroups.com>
Subject: [MRST Users] Plotting multiple graphs on one graph
 
--
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/55ad4811-e16f-4ce7-a887-ce7df5e34993n%40googlegroups.com.
Message has been deleted

Mai MRST

unread,
Nov 19, 2023, 9:02:55 PM11/19/23
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group

Hi Knut-Andreas,

 

Thank you for the detailed reply. The figures appeared as intended. I was wondering, is there a way to rename the datasets as well? I tried typing 'datasetnames', ['dataset1''dataset2''dataset3'after using report.ReservoirTime, but the result does not show the name of the datasets in the figures themselves (see below).

dataset.png

 

The geothermal model we are using assumes water, which is mostly incompressible, while having another component, i.e. salt dissolved within water. Perhaps that is also why this warning appeared?  So far, we have been using this standard simulator function (based on the examples given in the Simulation of Geothermal Systems Using MRST), is it sufficient enough or is there a better solver for this kind of problem available?

 

[wellSols, states, report] = simulateScheduleAD(state0, model, schedule, 'afterStepFn', fn)



Thank you!

Olav Møyner

unread,
Nov 21, 2023, 7:06:40 AM11/21/23
to Mai MRST, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Mai,

Try doing plotWellSols(ws, time, 'datasetnames', {'dataset1'; 'dataset2'; 'dataset3'}) (note the use of cell arrays instead of a regular array).

Regarding the singular warning, it is nothing to worry about if the simulation completes succesfully. This message comes from MATLAB's solver, but MRST has rigorous convergence checks on top of this. It is indeed likely related to near incompressibility, where the value of the pressure is weakly coupled to the fluid properties.

Best regards,
Olav

Sent: Monday, November 20, 2023 3:02

To: MRST-users: The Matlab Reservoir Simulation Toolbox User Group <sinte...@googlegroups.com>
Subject: Re: [MRST Users] Plotting multiple graphs on one graph
 
Reply all
Reply to author
Forward
0 new messages