Example on how to save grid in resqml format


My name is Arnaldo and I’m an undergrad student in SP.

I apologize for my stupid question but I could not understand how to organize the data. My task is to save a reservoir grid in a resqml file. My professor gave me a library that allows me to read simulations from imex and eclipse files. With the library I already loaded the nodes coordinates but I can not figure it out how to identify the faults, which nodes are the split nodes and so on…
I have read the resqml documentation and the exemple in the fesapi source. If someone could give some light I will be very greatful.

Again, sorry for the stupid question.

Best Regards,

Arnaldo Coelho

Oï Arnaldo,

There is no stupid question on this forum. Asking a question makes the forum living and that’s a great thing!

As a first step, I won’t look at identifying faults. Identifying split nodes (usually linked to some faults) is probably the first step.

Spit nodes are nodes which have different XYZ coordinates than another node at the same index (iNode, jNode, kNode). For example, look at the node at index 3,0 below : you can actually find two of them. On the other hand, there is only one node 2,0, one node 1,0 etc…
I cannot tell you how to identify them using the library of your professor but, at least, you know what they are.

Hi Phillippe,

Thank you so much for your quick response!
I will do that but I still have some doubts.
In the example only the first line of the split nodes are declared ( 2, 7, 12, 17 ). Is it not necessary include the other nodes? And if Is there another split node sequence?


In this case, If there were another node bellow 18 like 25 is bellow 17? How do I declare them?

Again, thank you very much for your help.
For me, using this library has been a very good experience and learning c ++ has been challenging.
I was able to compile the library without major problems. Just a few stumbles with miniziplib.

Best Regards,

Arnaldo Coelho

Your illustration is very good.

In RESQML, you must define/include all your nodes (split and not split ones). In your case, I presume you should have per K interface : 5 * 5 = 25 non split nodes + 4 split nodes. So, a total of of 25 + 4 = 29 nodes per K interface.
As you have 3 K interfaces then you should have 3*29=87 nodes in your RESQML grid.

Using Fesapi, you have to list your nodes in the following order which comes from RESQML:

  • For k = 0 to k = maxK
    – For j = 0 to j = maxJ
    – - For i = 0 to i = maxI
    – - - Give coordinates of allNON SPLIT (and only NON SPLIT) nodes
    – Give coordinates of SPLIT nodes. The order does not really matter since pillarOfCoordinateLine, splitCoordinateLineColumnCumulativeCount, splitCoordinateLineColumns (in setGeometry methods) allows you to give information about the split nodes.

Following this pseudo code, your indexing on your illustration is perfect on K = 0. And you would probably have a shift of 29 on node indexing below

Happy to read you could build Fesapi easily. Minizip is indeed the problem number one.

Hi Phillipe,

Sorry for not answering before. I had hope to present some better results. :frowning:

I iterated as you said and exported the nodes but again I am stuck when I try to create the list of pillar Coordinate Line, split Coordinate Line Column Cumulative Count and the split Coordinate Line Columns.

This is the synthetic example that I have to work.



I wonder if am using the correct data structure.
Do you have any tips about that?

Best Regards,

Arnaldo Coelho

Hi Arnaldo,

What is the Resqml reader you use on your second image please? Is it Fespp (paraview plugin?) ?

In order to debug, you should first concentrate only on non split nodes. Can you try to write and read your grid without any split node at all please?
As a result, you should have the same grid as in your first picture without any vertical split. This is the first thing to verify.
Once you have verified that you can write and read a non splitted grid, you can try to split it.

Hi Phillippe,

Thank you for your answer.
I used the Fespp for paraview 5.2. I put it in a different position because point clouds are hard to distinguish.

I will try to do that. :slight_smile:

Best Regards,


Hi Phillipe,

I followed your advice and here is the result. :smiley:


Thanks a lot ! Now I will try to set the split nodes.

Best regards,


That’s a good start!!!
Now just try to split the first pillar probably the pillar located in (0,1).
If you succeed, you can continue. If not, come back and let’s investigate why.